ModbusServer
(FB)
FUNCTION_BLOCK ModbusServer
- InOut:
Scope
Name
Type
Initial
Comment
Input
byUnitID
BYTE
wPort: WORD:= 502; // Modbus server port - 502 is Modbus default
comPortSettings
ComSettings
Comport Settings
pInputData
POINTER TO WORD
Input Registers
pOutputData
POINTER TO WORD
Holding Registers
uiInputDataSize
UINT
Size in words of Input Register data area
uiOutputDataSize
UINT
Size in words of Holding Register data area
xEnable
BOOL
FALSE
Flag to enable execution - default is FALSE
xReset
BOOL
FALSE
Flag to reset - default is FALSE
tTimeout
UDINT
0
Modbus Write timeout, resets outputs if passed
EOFDetectionTimeout
UDINT
0
Timeout for end of frame detection (in micro-seconds!), if not set the default of (3.5 char times is used)
Output
xError
BOOL
FALSE