ModTcpConfig (FB)

FUNCTION_BLOCK ModTcpConfig EXTENDS AbbETrig3

Configuration Modbus TCP

InOut:

Scope

Name

Type

Initial

Comment

Input

RespTimeout

WORD

DEFAULTS.CONFIG_RESPONSE_TIME

Slave response timeout in ms. Maximum time waiting for a response after having sent a request

KeepAlive

DWORD

DEFAULTS.CONFIG_KEEP_ALIVE

Open Modbus Time in ms. A connection to a Server stays open after sending a request

until the time is expired. If there is another request within this time, the timer is restarted. On expiration the connection is closed.

ByteOrder

CAA.ENDIANESS

DEFAULTS.CONFIG_BYTE_ORDER

Endianess of data, little or Big Endian; Modbus Standard is Big Endian

Port

WORD

DEFAULTS.CONFIG_PORT

TCP Port

Output

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code describing error condition
NO_ERROR - Execution successfully completed
ERR_ENDIANESS_NOT_SUPPORTED - Endianess / byte order not supported
ERR_UNKNOWN - Undefined error