SERIAL_R[0...1]: Serial Line Read-Only System Variables

Introduction

SERIAL_R is an array of 2 SERIAL_R_STRUCT type. Each element of the array returns diagnostic system variables for the corresponding serial line.

For the M241 Logic Controller:

oSerial_R[0] refers to the serial line 1

oSerial_R[1] refers to the serial line 2

Variable Structure

This table describes the parameters of the SERIAL_R[0...1] system variables:

%MW

Var Name

Type

Comment

Serial Line

n/a

i_udiFramesTransmittedOK

UDINT

Number of frames successfully transmitted.

n/a

i_udiFramesReceivedOK

UDINT

Number of frames received without any errors detected.

n/a

i_udiRX_MessagesError

UDINT

Number of frames received with errors detected (checksum, parity).

Modbus Specific

n/a

i_uiSlaveExceptionCount

UINT

Number of Modbus exception responses returned by the logic controller.

n/a

i_udiSlaveMsgCount

UINT

Number of messages received from the Master and addressed to the logic controller.

n/a

i_uiSlaveNoRespCount

UINT

Number of Modbus broadcast requests received by the logic controller.

n/a

i_uiSlaveNakCount

UINT

Not used

n/a

i_uiSlaveBusyCount

UINT

Not used

n/a

i_uiCharOverrunCount

UINT

Number of character overruns.

n/a means that there is no predefined %MW mapping for this system variable.

Not used means that the variable is not maintained by the system, and that if the value of the variable is non-zero, it should be considered extraneous.

The SERIAL_R counters are reset on:

oDownload.

oController reset.

oSERIAL_W[x].q_wResetCounter command.

oReset command by Modbus request function code number 8.