ModTcpServOnOff (FB)

FUNCTION_BLOCK ModTcpServOnOff EXTENDS AbbETrig3

Function Block serves to set Modbus TCP server to active/passive

InOut:

Scope

Name

Type

Initial

Comment

Input

Eth

BYTE

ETH1

Index number of the assigned interface

On

BOOL

TRUE

Switch on (TRUE) or off (FALSE) server

Output

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code describing error condition
NO_ERROR - Execution successfully completed
ERR_INVALID_INTERFACE - Invalid Ethernet interface or no Server configured on Ethernet interface
ERR_ALREADY_IN_STATE - Server already in requested state
ERR_SIMULTANEOUS_ACCESS - Server already accessed by other FB instance, try again later on
ERR_FAILED_SET_STATE - Failed to set Server to requested state
ERR_INTERNAL_UNEXPECTED_STATE - Unexpected state. Fatal internal error
ERR_UNKNOWN - Undefined error