PLC_R: Controller Read Only System Variables

Variable Structure

The following table describes the parameters of the PLC_R System Variable (PLC_R_STRUCT type):

Var Name

Type

Comment

i_wVendorID

WORD

Controller Vendor ID.

101A hex = Schneider Electric

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).

i_dwSerialNumber

DWORD

Controller serial number (returns last five digits).

i_byFirmVersion[0..3]

ARRAY[0..3] OF BYTE

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

oi_byFirmVersion[0] = aa

o...

oi_byFirmVersion[3] = dd

i_byBootVersion[0..3]

ARRAY[0..3] OF BYTE

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

oi_byBootVersion[0] = aa

o...

oi_byBootVersion[3] = dd

i_dwHardVersion

DWORD

Controller Hardware Version.

i_dwChipVersion

DWORD

Controller Processor Version.

i_wStatus

PLC_R_STATUS

State of the controller.

i_wBootProjectStatus

PLC_R_BOOT_PROJECT_STATUS

Returns information about the boot application stored in FLASH memory.

i_wLastStopCause

PLC_R_STOP_CAUSE

Cause of the last transition from RUN to another state.

i_wLastApplicationError

PLC_R_APPLICATION_ERROR

Cause of the last controller exception.

i_lwSystemFault_1

LWORD

Not used. always returns FFFF FFFF FFFF FFFF hex.

i_lwSystemFault_2

LWORD

Not used.

i_wIOStatus1

PLC_R_IO_STATUS

Embedded I/O status.

i_wIOStatus2

PLC_R_IO_STATUS

Reserved.

i_wBatteryStatus

WORD

Charge remaining in the battery.

This system variable can report the following significant values:

o0064 hex = 100% = 3 V

o0032 hex = 50% = 2.5 V

o0000 hex = 0% = 2 V

NOTE: HMI controller display screen indicates also that the battery level is low at 50% or lower.

i_dwAppliSignature1

DWORD

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

The application signature is automatically generated by the software during build.

i_dwAppliSignature2

DWORD

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

The application signature is automatically generated by the software during build.

i_dwAppliSignature3

DWORD

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

The application signature is automatically generated by the software during build.

i_dwAppliSignature4

DWORD

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

The application signature is automatically generated by the software during build.