FB_BA_FIFO04
The function block FB_BA_FIFO04 enables sequential control of up to four units, with automatic switching of the switch-on sequence based on operating hours.
The function block is available in two versions: for a sequence of four or eight units.
Units with fewer operating hours take precedence in the sequence over units with more operating hours.
A rising edge at bChg forces a sequence change. The units with the fewest operating hours are set to the top of the FIFO and thus given priority for switching on.
In the sequence only units are entered, which are enabled at inputs bEn01..bEn04. nNum indicates the number of requested units.
The operating hours of the units are entered at inputs nActvTi01 to nActvTi04. If all these inputs are set to a constant value of zero, the sequence change is controlled cyclically, depending on bChg.
The first unit is removed from the FIFO, the other units are advanced, and the first unit is appended at the end of the FIFO again. As a result is an alternating sequence of units.
Inputs
VAR_INPUT
bEn : BOOL;
nNum : UDINT;
bChg : BOOL;
bEn01 : BOOL;
bEn02 : BOOL;
bEn03 : BOOL;
bEn04 : BOOL;
nActvTi01 : UDINT;
nActvTi02 : UDINT;
nActvTi03 : UDINT;
nActvTi04 : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
bEn | BOOL | Function block enable |
nNum | UDINT | Number of aggregates |
bChg | BOOL | Force sequence change |
bEn01...bEn04 | BOOL | Enable aggregate 1...enable aggregate 4. |
nActvTi01...nActvTi04 | UDINT | Operating hours aggregate 1...operating hours aggregate 4. |
Outputs
VAR_OUTPUT
bQ01 : BOOL;
bQ02 : BOOL;
bQ03 : BOOL;
bQ04 : BOOL;
nNextOn : UDINT;
nNextOff : UDINT;
aFIFO : ARRAY [1..4] OF UDINT;
nNumOfEn : UDINT;
END_VAR
Name | Type | Description |
---|---|---|
bQ01...bQ04 | BOOL | Switches aggregate 1...4. |
nNextOn | UDINT | Number of the aggregate that is switched on next. |
nNextOff | UDINT | Number of the aggregate which will be switched off next. |
aFIFO | ARRAY OF UDINT | FIFO buffer as a field. |
nNumOfEn | UDINT | Number of devices, depending on the individual enable states. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.22 | Tc3_BA2 from v5.2.5.0 |