14
GFK-2992B
Function Blocks for Enabling Serial Communication
The serial communication module uses 8 registers of input memory and 8 registers of output memory to send and
receive the data to any serial device. Function blocks are provided as part of the toolchest drawer to enable faster
implementation of serial communication with less efforts on application development.
Note: The toolchest drawer is available for download from the support site at http://geautomation.com.
The function block FB_RSTI_EP_5261 is used to send and receive byte strings of length upto 400 bytes. The function
block can send 400 bytes of data and receive 400 bytes of data. The length of the data to be received and sent is
determined by the input parameter of the function block.
The function block FB_MBM_RTU_Master is used to send and receive Modbus messages with the support of the
FB_RSTI_EP_5261 function block. The RTU master function block reads the user inputs and creates Modbus messages.
Tthe byte string is then input to the function block FB_RSTI_EP_5261 which in turn outputs the bytes on the serial bus.
The response is received by FB_RSTI_EP_5261 and passed as input to the RTU master to parse the response and update
the data to internal controller memory.
The function block ModbusMaster_CoilMax is internally used by the RTU master function block.
Note: Refer to the respective function block section in this document for more information on input and output
parameters of the serial and RTU master function blocks.
The blocks Serial_Comm and Serial_Comm_wMBMRTU are pre-defined blocks that call to FB_RSTI_EP_5261 and
FB_MBM_RTU_Master. Additionally, the symbolic variables are assigned to the inputs and outputs of the function blocks
FB_RSTI_EP_5261 and FB_MBM_RTU_Master.
To invoke serial and RTU master functions blocks
If only serial communication is required for the application, perform the following steps:
1.
Import the UDT Ser_Data to the controller target.
2.
Import the block FB_RSTI_EP_5261 to the controller target.
3.
Import the block Serial_Comm.
4.
Call the block Serial_Comm in the application logic.
If Modbus RTU communication is to be used,
1.
Import the UDT's Ser_Data and MBM_Data into the controller target.
2.
Import the blocks in the following sequence as follows:
a.
ModbusMaster_CoilMax
b.
FB_MBM_RTU_Master
c.
FB_RSTI_EP_5261
d.
Serial_Comm_wMBMRTU
3.
Call the block Serial_Comm_wMBMRTU in the application logic.
RSTi-EP Slice I/O Serial Communication Module
Toolchest Structure
For public disclosure
Need help?
Do you have a question about the EP-5261 and is the answer not in the manual?