PLC_R: Controller Read-Only System Variables

Variable Structure

This table describes the parameters of the PLC_R system variable (PLC_R_STRUCT type):

Modbus Address (1)

Var Name

Type

Comment

60000

i_wVendorID

WORD

Controller Vendor ID.

101A hex = Schneider Electric

60001

i_wProductID

WORD

Controller Reference ID.

NOTE:  Vendor ID and Reference ID are the components of the Target ID of the controller displayed in the communication settings view (Target ID = 101A XXXX hex).

60002

i_dwSerialNumber

DWORD

Controller Serial Number

60004

i_byFirmVersion

ARRAY[0..3] OF BYTE

Controller Firmware Version [aa.bb.cc.dd]:

oi_byFirmVersion[0] = aa

o...

oi_byFirmVersion[3] = dd

60006

i_byBootVersion

ARRAY[0..3] OF BYTE

Controller Boot Version [aa.bb.cc.dd]:

oi_byBootVersion[0] = aa

o...

oi_byBootVersion[3] = dd

60008

i_dwHardVersion

DWORD

Controller Hardware Version.

60010

i_dwChipVersion

DWORD

Controller Coprocessor Version.

60012

i_wStatus

PLC_R_STATUS

State of the controller.

60013

i_wBootProjectStatus

PLC_R_BOOT_PROJECT_STATUS

Returns information about the boot application stored in FLASH memory.

60014

i_wLastStopCause

PLC_R_STOP_CAUSE

Cause of the last transition from RUN to another state.

60015

i_wLastApplicationError

PLC_R_APPLICATION_ERROR

Cause of the last controller exception.

60016

i_lwSystemFault_1

LWORD

Bit field FFFF FFFF FFFF FFFF hex indicates no error detected.

A bit at low level means that an error has been detected:

obit 0 = Reserved

obit 1 = TM3 error detected

obit 2 = Ethernet IF1 error detected

obit 3 = Ethernet IF2 error detected

obit 4 = Serial 1 in overcurrent error detected

obit 5 = Reserved

obit 6 = CAN 1 error detected

obit 7 = Reserved

obit 8 = Reserved

obit 9 = TM4 error detected

obit 10 = SD Card error detected

obit 11 = Firewall error detected

obit 12 = DHCP server error detected

obit 13 = OPC UA server error detected

60024

i_wIOStatus1

PLC_R_IO_STATUS

Reserved

60025

i_wIOStatus2

PLC_R_IO_STATUS

TM3 I/O status.

60026

i_wClockBatterystatus

WORD

Status of the battery of the RTC:

o0 = Battery change needed

o100 = Battery fully charged

Other values (1...99) represents the percentage of charge. For example, if the value is 75, it represents that the battery charge is 75%.

60028

i_dwAppliSignature1

DWORD

First DWORD of 4 DWORD signature (16 bytes total).

The application signature is generated by the software during build.

60030

i_dwAppliSignature2

DWORD

Second DWORD of 4 DWORD signature (16 bytes total).

The application signature is generated by the software during build.

60032

i_dwAppliSignature3

DWORD

Third DWORD of 4 DWORD signature (16 bytes total).

The application signature is generated by the software during build.

60034

i_dwAppliSignature4

DWORD

Fourth DWORD of 4 DWORD signature (16 bytes total).

The application signature is generated by the software during build.

(1) Not accessible through the application.

n/a

i_sVendorName

STRING(31)

Name of the vendor: “Schneider Electric”.

n/a

i_sProductRef

STRING(31)

Reference of the controller.

n/a

i_sNodeName

STRING(99)

Node name on EcoStruxure Machine Expert Network.

n/a

i_dwLastStopTime

DWORD

The time of the last detected STOP in seconds beginning with January 1, 1970 at 00:00 UTC.

n/a

i_dwLastPowerOffDate

DWORD

The date and time of the last detected power off in seconds beginning with January 1, 1970 at 00:00 UTC.

NOTE: Convert this value into date and time by using the function SysTimeRtcConvertUtcToDate. For more information about Time and Date conversion, refer to the Systime Library Guide.

n/a

i_uiEventsCounter

UINT

Reserved

n/a

i_wTerminalPortStatus

PLC_R_TERMINAL_PORT_STATUS

Status of the USB Programming Port (USB Mini-B).

n/a

i_wSdCardStatus

PLC_R_SDCARD_STATUS

Status of the SD card.

n/a

i_wUsrFreeFileHdl

WORD

Number of available File Handles.

A File Handle is the resource allocated by the system when you open a file.

n/a

i_udiUsrFsTotalBytes

UDINT

User FileSystem total memory size (in bytes).

It is the size of the flash memory for the directory "/usr/".

n/a

i_udiUsrFsFreeBytes

UDINT

User FileSystem free memory size (in bytes).

n/a

i_uiTM3BusState

PLC_R_TM3_BUS_STATE

TM3 bus state.

i_uiTM3BusState can have the following values:

o1: TM3_CONF_ERROR

Configuration mismatch between physical configuration and EcoStruxure Machine Expert configuration.

o3: TM3_OK

Physical configuration matches EcoStruxure Machine Expert configuration.

o4: TM3_POWER_SUPPLY_ERROR

TM3 bus is not powered (for example when the Logic Controller is powered by USB).

n/a

i_ExpertIO_RunStop_Input

BYTE

Reserved

n/a

i_x10msClk

BOOL

TimeBase bit of 10 ms.

This variable is toggling On/Off with period = 10 ms. The value toggles when the logic controller is in Stop and in Run state.

n/a

i_x100msClk

BOOL

TimeBase bit of 100 ms.

This variable is toggling On/Off with period = 100 ms. The value toggles when the logic controller is in Stop and in Run state.

n/a

i_x1sClk

BOOL

TimeBase bit of 1 s.

This variable is toggling On/Off with period = 1 s. The value toggles when the logic controller is in Stop and in Run state.

NOTE: n/a means that there is no pre-defined Modbus address mapping for this system variable.