ModbusClient_RTU

ModbusClient_RTU (FB)

FUNCTION_BLOCK ModbusClient_RTU EXTENDS ModbusClientBase

Representation

InOut:

Scope
Name
Type
Initial
Comment
Inherited from

Output

xConnected

BOOL

TRUE if connection has been established

ModbusClientBase

Output

xLicenceValid

BOOL

TRUE if a valid licence was found

ModbusClientBase

Input

xResError

BOOL

FALSE

Input for resetting the error outputs (eErrorCode, byErrorUnitID) (on every rising edge)

Output

iSerialPortFb

INT

0

Feedback of the number of the serial interface

Output

eBaudrateFb

SysCom.SYS_COM_BAUDRATE

SysCom.SYS_COM_BAUDRATE.SYS_BR_4800

Feedback of the transmission speed of the serial interface

Output

eParityFb

SysCom.SYS_COM_PARITY

SysCom.SYS_COM_PARITY.SYS_NOPARITY

Feedback of the parity per BYTE of the serial interface

Output

eStopBitsFb

SysCom.SYS_COM_STOPBITS

SysCom.SYS_COM_STOPBITS.SYS_ONESTOPBIT

Feedback of the number of stop bits per byte of the serial interface

Output

eState

Client_RTU_StateCode

Client_RTU_StateCode.IDLE

Current state of the state machine

Output

byErrorUnitID

BYTE

0

Unit ID of the last error (0 = no device)

Output

xError

BOOL

FALSE

Display of the error state (FALSE = no error, TRUE = error)

Output

eErrorCode

Client_RTU_ErrorCode

Client_RTU_ErrorCode.NO_ERROR

Display of the cause of the last error

Input Const

eStopBits

SysCom.SYS_COM_STOPBITS

SysCom.SYS_COM_STOPBITS.SYS_ONESTOPBIT

Specification of the number of stop bits per byte of the serial interface

Input Const

eParity

SysCom.SYS_COM_PARITY

SysCom.SYS_COM_PARITY.SYS_NOPARITY

Specification of the parity per byte of the serial interface

Input Const

eBaudrate

SysCom.SYS_COM_BAUDRATE

SysCom.SYS_COM_BAUDRATE.SYS_BR_38400

Specification of the transmission speed of the serial interface

Input Const

iSerialPort

INT

2

Specification of the number of the serial interface

Input Const

tTimeCheckComPort

TIME

TIME#5s0ms

Time interval between two checking operations for the serial interface in idle state

Input Const

tTimeoutDeviceReceive

TIME

TIME#1s0ms

Timeout period for monitoring the response telegram (receiving)

Input Const

tTimeoutDeviceSend

TIME

TIME#1s0ms

Timeout period for monitoring the request telegram (sending)

Input Const

tTimeoutComConnect

TIME

TIME#1s0ms

Timeout period for monitoring the establishment of the connection to the serial interface

Last updated