FB_BA_LightingTgmSel8 / FB_BA_LightingTgmSel4
The function of the blocks is explained at FB_BA_LightingTgmSel8 as an example
The function blocks are used for priority control for up to 4 or up to 8 lighting control telegrams (stLighting_Prio1 ... stLighting_Prio4, or stLighting_Prio1 ... stLighting_Prio8) of type ST_BA_Lighting.
The active telegram with the highest priority is output at the output stLighting. "Active" means that the variable bActv is set within the structure of the positioning telegram. The priority is stored within the telegram structure as ePrio, whereby the lower the value of ePrio, the higher the priority.
For telegrams with the same priority, the last changed one (last writer wins) is valid, determined by the variable nEvtInc.
This function block is to be programmed in such a way that one of the applied telegrams is always active. If a telegram is not active, an empty telegram is output at the output, i.e. fLgtVal = 0, fLgtT = 0, bDimUp = FALSE, bDimDwn = FALSE, bDimMod = FALSE, bActv = FALSE.
Inputs
VAR_INPUT
stLightingTgm_1 : ST_BA_Lighting;
stLightingTgm_2 : ST_BA_Lighting;
stLightingTgm_3 : ST_BA_Lighting;
stLightingTgm_4 : ST_BA_Lighting;
stLightingTgm_5 : ST_BA_Lighting;
stLightingTgm_6 : ST_BA_Lighting;
stLightingTgm_7 : ST_BA_Lighting;
stLightingTgm_8 : ST_BA_Lighting;
END_VAR
Name | Type | Description |
---|---|---|
stLightingTgm_N | ST_BA_Lighting | Telegram inputs |
Outputs
VAR_OUTPUT
stLighting : ST_BA_Lighting;
nNumActvTgm : UINT;
ePrioActvTgm : E_BA_LightingPrio;
END_VAR
Name | Type | Description |
---|---|---|
stLighting | ST_BA_Lighting | Resulting telegram |
nNumActvTgm | UINT | Indicates which input results, e.g. if stLightingTgm_3 is passed, nNumActvTgm = 3. If nNumActvTgm = 0, no telegram is active. |
ePrioActvTgm | E_BA_LightingPrio | This output indicates the priority of the active telegram. |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT from v3.1.4024.22 | Tc3_BA2 from v5.2.5.0 |