ModbusServer (FB)ΒΆ
FUNCTION_BLOCK ModbusServer
Tis function block processes up to 16 parallel client connection requests by Modbus TCP.
- InOut:
Scope
Name
Type
Initial
Comment
Input
wPortWORD502
Modbus server port - 502 is Modbus default
pInputDataPOINTER TO WORD
Input Registers
pOutputDataPOINTER TO WORD
Holding Registers
uiInputDataSizeUINTSize in words of Input Register data area
uiOutputDataSizeUINTSize in words of Output Register data area
xEnableBOOLFALSE
Flag to enable execution - default is FALSE
xResetBOOLFALSE
Flag to reset - default is FALSE
tTimeoutUDINT0
Modbus request timeout. If specified, the modbus data area that is updated by client (Holding Registers, Coils) is reset. Output xTimeout is TRUE.
InterfaceNameWSTRING(255)Name of ethernet interface (optional). If specified, the modbus server binds to the IP address of this interface.
Output
xBusyBOOLfunction block is active
xErrorBOOLan Error occured
byClientConnectionsBYTE0
Number of open TCP-connections
xTimeoutBOOLTimeout expired. Holding Registers and Coils are set to zero.