System variables

System time

Available for AXC F x152RFC 4072SRFC 4072R

Note: For RFC 4072R, see additional variables in System variables - Redundancy

The RTC system variable is a system variable organized as a data structure. The RTC system variable can be used to retrieve information on the system time of the device‘s internal real time clock (in short, RTC).

RTC system variables

System variable Type Description
RTC RTC_TYPE Data structure
└ HOURS USINT System time (hours)
└ MINUTES USINT System time (minutes)
└ SECONDS USINT System time (seconds)
└ DAY USINT  System time (day)
└ MONTH USINT System time (month)
└ YEAR UINT System time (year)

PLC_CRC_PRJ

Available for RFC 4072SRFC 4072RSPLC 1000

The PLC_CRC_PRJ system variable provides the CRC of the non-safety-related project.

System variable Type Description
PLC_CRC_PRJ ULINT The CRC of the non-safety-related project

IP socket function blocks

Available for  AXC F x152RFC 4072SRFC 4072R

You can use the TCP_SOCKET and UDP_SOCKET function blocks to open and close the IP sockets that are used for IP communication via Transmission Control Protocol (TCP) or via User Datagram Protocol (UDP).

You can use the TLS_SOCKET function block to open and close IP sockets that are used for secure IP communication via Transport Layer Security (TLS).

You can retrieve the number of opened IP sockets using the following system variables:

IP socket system variables

System variable Type Description
IP_ACTIVE_SOCKETS UINT Number of IP sockets opened using the TCP_SOCKET and/or UDP_SOCKET function blocks
TLS_ACTIVE_SOCKETS UINT Number of IP sockets opened using the TLS_SOCKET function block

Device state

Available for  AXC F x152RFC 4072SRFC 4072R

For RFC 4072R, see additional System variables - Redundancy.

The DEVICE_STATE system variable is a system variable organized as a data structure. The DEVICE_STATE system variable can be used to retrieve various information on the device status of the controller.

Device status system variables

System variable Type Description
DEVICE_STATE DEVICE_STATE_X152_TYPE Data structure
└ BOARD_TEMPERATURE SINT Temperature inside the housing (in °C)

AXC F 3152RFC 4072S
└ FAN_FAIL 

 

 

 

 


AXC F 1152AXC F 2152
└ reserved1

BOOL

AXC F 3152RFC 4072S: The fan is defective.

Device defect due to overheating

Immediately replace the fan when the defect occurs.


AXC F 1152AXC F 2152: Reserved

RFC 4072S
└ RAMDISK_USAGE


AXC F x152
└ reserved2

USINT

RFC 4072S: Memory used on the RAM disk


AXC F x152: Reserved

└ CPU_LOAD_ALL_CORES USINT  Average current utilization of all processor cores (in %)
└ CPU_LOAD_PER_CORE CPU_LOAD_PER_CORE_ARRAY Information on the utilization per processor core
     └ [1] USINT Current utilization of processor core 1 (in %)
     └ [2] USINT Current utilization of processor core 2 (in %)

Fan state

Available for AXC F 3152RFC 4072SRFC 4072R 

Note: For RFC 4072R, see additional variables in System variables - Redundancy

The FAN_STATE system variable is a system variable organized as a data structure. The FAN_STATE system variable can be used to retrieve maintenance or failure information on the optional fan module.

System variable Type Description
FAN_STATE FAN_INFO Data structure of the fan system variables
└ FAN_MAINTENANCE BOOL Fan maintenance is required
└ FAN_DEFECT BOOL Fan is defective

User partition

Available for AXC F x152RFC 4072SRFC 4072R

Note: For RFC 4072R, see additional variables in System variables - Redundancy

The USER_PARTITION system variable is organized as data structure. The USER_PARTITION system variable can be used to retrieve various information and memory statistics about the user partition (Overlay file system). The partition can be located on an SD card or on the internal memory. This memory is organized in blocks. A block has a constant, fixed size, and a file always occupies one or more blocks. 

A certain number of blocks is reserved in the Linux system for the root user. Those reserved blocks are only available for the root user and ensure that the root user is able to act even if the memory is occupied (e.g. for log output).

User partition system variables

System variable Type Description
USER_PARTITION PARTITION_INFO Data structure
└ MEM_TOTAL ULINT Total memory of the partition in bytes
(including reserved blocks)
└ MEM_FREE ULINT Free, available memory in bytes 
(without reserved blocks)
└ MEM_USED ULINT Occupied memory in bytes
(including reserved blocks)
└ MEM_USAGE USINT  Used memory in %
(without reserved blocks)

UPS diagnostics

Available from firmware 2022.6  for all PLCnext Control devices with an integrated UPS

Some PLCnext Control devices have an integrated UPS (Uninterruptible Power Supply). In the event of a power supply failure, the device is shut down with the aid of this UPS, whereby the values of the retain variables in particular are saved. The information about the state of charge as well as the functionality of the UPS is particularly important and is therefore provided via the following system variables from firmware release 2022.6:

System variable Type Description
UPS_DIAGNOSTICS   Data structure
└ CHARGE_LEVEL INT UPS charge status in %
└ HWARN BOOL Health Low - warning bit of the status register
The notification UPS health warning is emitted (refer to WBM - Notifications page).
└ HFAIL BOOL Health Failure - warning bit of the status register
The notification UPS health failure is emitted (refer to WBM - Notifications page).

The function block UPS_DIAGNOSTICS can also be used to read out diagnostic or status information from the UPS. For more information on the function block refer to the PLCnext Engineer help. 

The WBM page Integrated UPS also displays the values and messages of the UPS. You can find further information in Diagnostics - Integrated UPS.

 


•  Web browser recommendation: Chrome/Edge 88 or newer, Firefox ESR 90 or neweror Safari • 
• Published/reviewed: 2022-09-14 • Revision 046 •