Skip to main content

Function Block: ModbusSlaveComPort

Library: IoDrvModbus

This block is generated for each serial Modbus Server in the device tree. This function block represents the logical connection to an individual Modbus Serial Server. The channels defined for this device are processed in the background. The inputs and outputs of this block provide status information to the user and allow the ability to confirm occurring errors (in order to continue processing).

Table 15. Inputs (VAR_INPUT)

Name

Data Type

Initial Value

Description

xTrigger

Bool

FALSE

Triggers the transmission of all configured Modbus channels for a rising edge

xReset

Bool

FALSE

Restarts communication and resets xError and byModbusError

xAcknowledge

Bool

FALSE

Restarts communication and does not reset xError and byModbusError



Table 16. Outputs (VAR_OUTPUT)

Name

Data Type

Initial Value

Description

xInitDone

Bool

FALSE

All initialization commands were reset.

xError

Bool

FALSE

TRUE if any error occurs. Communication to this server is interrupted.

byModbusError

MB_ErrorCodes

0

Current errors defined in the MB_ErrorCodes enumeration