FB_IEC870_5_102TBufferCtrl
This function block changes the content of the TX/RX data buffer. This data buffer ist used by the communication via the IEC60870-5-102 Serial Link Interface.
The function block has the following actions:
- RxRemoveObj (removes the oldest Fifo entry from the RX-Fifo);
- RxReset (deletes all RX-Fifo entries, resets the RX-Fifo);
- TxAddObj (inserts a new Fifo entry in the TX-Fifo);
- TxReset (deletes all TX-Fifo entries, resets the TX-Fifo);
The content of the TX/RX data buffer can be changed by the call of one of the listed actions above.
VAR_IN_OUT
VAR_IN_OUT
buffer : ST_IEC870_5_102TBuffer; (* TX/RX data buffer *)
END_VAR
buffer: TX/RX data buffer. The TX/RX buffer parameters (like e.g. asduSize ) have to be configured before using.
VAR_INPUT
VAR_INPUT
putObj : ST_IEC870_5_102AOGen; (* ASDU to send *)
END_VAR
putObj: Data unit (ASDU) to be sent.
VAR_OUTPUT
VAR_OUTPUT
getObj : ST_IEC870_5_102AOGen; (* received ASDU *)
bOk : BOOL; (* TRUE = action succesfully, FALSE=Fifo overflow or fifo empty *)
END_VAR
getObj: Received data unit (ASDU).
bOk: This variable becomes TRUE, if a new entry was inserted or removed successfully from the Fifo. This variable becomes FALSE at a buffer overflow and if no entry could be removed, because the Fifo was already empty.
Requirements
Development Environment | Target System | PLC libraries to include |
---|---|---|
TwinCAT v2.10 Build >= 1319 | PC or CX (x86, ARM) | TcIEC870_5_102Link.Lib |