ST_BA_SeqLink / ST_BA_SeqLinkData
Structure of the data and command exchange between the control function block FB_BA_SeqLink and the sequence controllers FB_BA_SeqCtrl.
This structure has to be created once per sequence control:
stSeqLink : ST_BA_SeqLink;
Within this structure, a further field structure is declared automatically, through which the sequence link function block and the individual sequence controllers exchange all relevant data. Each sequence controller writes its data into the field element corresponding to its ordinal number (entry at input usiMyNum at the sequence controller function block). It is always the complete structure with all field elements that is linked to the function blocks.
The structures have the following setup:
TYPE ST_BA_SeqLink :
STRUCT
arrSeqLinkData : ARRAY[1..cMaxSeqCtrl] OF ST_BA_SeqLinkData;
bSeqActv : BOOL;
usiCurSeq : USINT;
byDummy : ARRAY[1..2] OF BYTE;
END_STRUCT
END_TYPE
bSeqActv: the sequence control is enabled and active.
usiCurSeq: from FB_BA_SeqLink: specification of current sequence controllers
byDummy: unused filling variables for creating a 4-byte configuration. This configuration is important, if this structure part of a data exchange between controllers has a different architecture (ARM/I486).
TYPE ST_BA_SeqLinkData:
STRUCT
lrY : LREAL;
lrYMin : LREAL;
lrYMax : LREAL;
lrW : LREAL;
bActn : BOOL;
bOp : BOOL;
bPresence : BOOL;
bErrDouble : BOOL;
usiCurSeq : USINT;
byDummy : ARRAY[1..3] OF BYTE;
END_STRUCT
END_TYPE
lrY: from FB_BA_SeqCtrl: transfer of current control value
lrYMin: from FB_BA_SeqCtrl: transfer of minimum control value
lrYMax: from FB_BA_SeqCtrl: transfer of maximum control value
lrW: from FB_BA_SeqCtrl: transfer of current setpoint
bActn: from FB_BA_SeqCtrl: transfer of inverse control direction (bActn = FALSE: heating mode - bActn = TRUE: cooling mode).
bOp: from FB_BA_SeqCtrl: sequence controller is enabled, i.e. its input bEn is set to TRUE.
bPresence: from FB_BA_SeqCtrl: check bit, see below.
bErrDouble: from FB_BA_SeqCtrl: error during number verification: there are at least 2 sequence controllers of the same ordinal number usiMyNum.
usiCurSeq: from FB_BA_SeqLink: specification of current sequence controllers
byDummy: unused filling variables for creating a 4-byte configuration. This configuration is important, if this structure part of a data exchange between controllers has a different architecture (ARM/I486).
Note regarding check bit:
Each sequence controller sets the bPresence flag in the structure that is applicable to it. If the flag is already set, usiMyNum must inevitably have been assigned twice, which means that two sequence controllers access the same structure. After the evaluation, the sequence link function block resets all check bits, so that this test takes place cyclically. This means that an error can automatically be rectified via an online change, and new sequence controllers can be added, if required
Requirements
Development environment | Target system | required library | required supplement |
---|---|---|---|
TwinCAT 2.11 R3/x64 | PC/CX | TcBA library from V1.0.0 | TS8040 | TwinCAT Building Automation from V1.0.0 |