ModbusChannel (FB)¶
FUNCTION_BLOCK ModbusChannel
Starts the execution of a single configured modbus channel.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
slaveInput
xExecuteBOOL- Rising edge: Action start
Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or aborted (xAbort), or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle.
xAbortBOOLIf this input is TRUE, the action is stopped immediately and all outputs are reset to their initial values.
iChannelIndexINTThe Channel Index that shall be executed. An invalid index results in xError = TRUE (without any Modbus specific error code).
Output
xBusyBOOLIs TRUE as long as a request is in progress
xDoneBOOLIs TRUE if a request finished successfully
xErrorBOOLIs TRUE if a request finished unsuccessfully
xAbortedBOOLIs TRUE after a request in progress has been aborted by “xAbort”
ModbusErrorMB_ErrorCodes.UNDEFINED
Specifies the current error as defined in the “MB_ErrorCodes” enumeration