ModbusChannel
(FB)
FUNCTION_BLOCK ModbusChannel
Starts the execution of a single configured modbus channel.
- InOut:
Scope
Name
Type
Initial
Comment
Inout
slave
Input
xExecute
BOOL
- 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.
xAbort
BOOL
If this input is TRUE, the action is stopped immediately and all outputs are reset to their initial values.
iChannelIndex
INT
The Channel Index that shall be executed. An invalid index results in xError = TRUE (without any Modbus specific error code).
Output
xBusy
BOOL
Is TRUE as long as a request is in progress
xDone
BOOL
Is TRUE if a request finished successfully
xError
BOOL
Is TRUE if a request finished unsuccessfully
xAborted
BOOL
Is TRUE after a request in progress has been aborted by “xAbort”
ModbusError
MB_ErrorCodes.UNDEFINED
Specifies the current error as defined in the “MB_ErrorCodes” enumeration