FB_IEC870_5_103TBufferCtrl
This function block can be used to manipulate the content of the TX/RX data buffer, which is used for the communication via the IEC60870-5-103 low-level interface.
The function block features the following tasks:
- RxRemoveObj (removes the oldest FIFO entry from the RX FIFO);
- RxReset (clears all the RX FIFO entries, resets the RX FIFO);
- TxAddObj (inserts a new FIFO entry into the TX FIFO);
- TxReset (clears all the TX FIFO entries, resets the TX FIFO)
The content of the TX/RX data buffer can be changed by calling the actions listed above.
VAR_IN_OUT
VAR_IN_OUT
buffer : ST_IEC870_5_103TBuffer;
END_VAR
buffer: TX/RX data buffer. The TX/RX buffer parameters (like e.g. asduSize ) have to be configured before using.
VAR_OUTPUT
VAR_OUTPUT
getObj : ST_IEC870_5_103AOGen;
bOk : BOOL;
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.
Example (Low-Level interface): IEC 60870-5-103 central station (master)
Requirements
Development environment |
Target system type |
PLC libraries to be linked (category group) |
---|---|---|
TwinCAT v3.1.4012.0 |
PC oder CX (x86, x64, ARM) |
Tc2_IEC60870_5_10x (Communication->IEC60870) |