Redundancy-specific system variables

Available for RFC 4072R from 2022.0 LTS

In addition to the general PLCnext Technology system variables, the following system variables are available for operating a redundant system of controllers

Information on the redundant control system

Redundancy role

The LOCAL_RDNCY_INFO system variable is organized as a data structure. The LOCAL_RDNCY_INFO system variable can be used to retrieve various information on the redundant control system.

System variable Type Description
LOCAL_RDNCY_INFO LOCAL_RDNCY_INFO_TYPE Data structure
└ RDNCY_IS_FIRST BOOL If true then redundancy type of the controller isFirst.
└ RDNCY_IS_SECOND BOOL If true then redundancy type of the controller isSecond.
└ RDNCY_IS_PRIMARY BOOL If true then redundancy role of the controller is PRIMARY.
└ RDNCY_IS_BACKUP BOOL If true then redundancy role of the controller is BACKUP.
└ RDNCY_BASICSYNC_OK BOOL If true then the redundant control system is in the Basic Sync state.
└ RDNCY_FOLLOWUPSYNC_OK BOOL If true then the redundant control system is in the FollowUp Sync state.
└ RDNCY_HSBY BOOL If true then the redundant control system is in the HotStandBy state.
└ RDNCY_ERROR WORD Digit of the last diagnosed error in the redundant control system. For details, see the Redundancy error codes
└ RDNCY_NUMBER_OF_SWITCH_OVER INT Number of redundancy role switch-overs since the last restart of the redundant control system.
└ RDNCY_LAST_SWITCH_OVER_REASON INT Cause for the latest redundancy role switch-over, shown as a digit. See next table for detailed descriptions.
└ RDNCY_SYNC_LINK_STATE INT Status of the physical connection at the SYNC interface:
1: Physical connection available
2: No physical connection available
└ RDNCY_CURRENT_SYNC_PORT INT Interface that is used for synchronization.
Values:
1: LAN1
2: SYNC interface

Causes for switch-over

The PRIMARY or BACKUP redundancy role of the controllers determines which of the two controllers manages the process. The most recent cause for a switch-over is indicated in PLCnext Engineer as a digit in the RDNCY_LAST_SWITCH_OVER_REASON system variable.

In addition, the most recent cause for a switch-over is displayed in PLCnext Engineer in the Cockpit → Redundancy Status → Switch Over Reason.

Digit Displayed in PLCnext Engineer Description
0 None No switch-over of the redundancy role since the last time the PRIMARY controller was restarted.
1 FirmwareService The redundancy role was changed by the user.
2 RuntimeException A runtime error occurred on the PRIMARY controller.
3 LinkDownPnLan The physical network connection to Ethernet interface LAN1 was disconnected (LNK LED: off).
4 AllArsLost The PROFINET controller has lost the connection to all PROFINET devices via Ethernet interface LAN1.
5 ArLost The PRIMARY controller has lost the connection to at least one PROFINET device.
6 SystemShutdown The firmware of the PRIMARY controller was stopped by the user.
7 SystemTerminate The firmware of the PRIMARY controller was stopped due to an operating system exception that occurred.
8 PowerDown The PRIMARY controller was disconnected from the power supply.
9 SyncLinkTimeout A timeout occurred on the SYNC interface and on Ethernet interface LAN1.
10 InternalError An internal error occurred.

Power supply

Available from firmware 2023.0 LTS with RFC 4072R only

The RFC 4072R as a dedicated redundancy controller must be set up with redundant power supplies. Therefore, the RFC 4072R is equipped with two power connectors, X1 and X2.

The POWER_SUPPLY and REMOTE_POWER_SUPPLY data structures provide boolean elements for each connector to indicate at which connector voltage is supplied to the RFC 4072R device and its companion in a redundant control system. 

System variable Type Description
POWER_SUPPLY POWER_SUPPLY_TYPE Data structure
└ X1 BOOL If true then voltage is supplied at that connector.
└ X2 BOOL If true then voltage is supplied at that connector.
REMOTE_POWER_SUPPLY POWER_SUPPLY_TYPE Data structure
└ X1 BOOL If true then voltage is supplied at that connector.
└ X2 BOOL If true then voltage is supplied at that connector.

In addition, the RSC DeviceStatusService Status.PowerSupply.X1 and Status.PowerSupply.X2 can be used to query whether a device is supplied with power at the X1 and the X2 connector.

PROFINET system variables

PROFINET controller system variables

The PROFINET controller system variables can be used to retrieve various information on the integrated PROFINET controller functionality. All PROFINET controller system variables are available, except for the PNIO_FORCE_PRIMARY. No PROFINET device system variables are available.

PROFINET system variables on the remote controller

The REMOTE_PROFINET_INFO system variable is organized as a data structure. The REMOTE_PROFINET_INFO system variable can be used to retrieve various information on the integrated PROFINET controller functionality of the remote controller.

Note: The content of this system variable is only valid if the value of the variable LOCAL_RDNCY_INFO.RDNCY_SYNC_LINK_STATE is 1.

System variable Type Description
REMOTE_PROFINET_INFO REMOTE_PROFINET_INFO_TYPE Data structure
└ PNIO_SYSTEM_SF BOOL Diagnostic alarm on a configured PROFINET device
At least one PROFINET device is indicating a system error (diagnostic alarm or maintenance alarm). The error priority can be determined from the PNIO_DIAG_AVAILABLE, PNIO_MAINTENANCE_DEMANDED, and PNIO_MAINTENANCE_REQUIRED variables.
└ PNIO_MAINTENANCE_DEMANDED BOOL Maintenance demand
At least one PROFINET device is indicating the maintenance demand alarm (high-priority maintenance alarm) with an active connection. The PROFINET device can be identified using the RALRM diagnostic block.
└ PNIO_MAINTENANCE_REQUIRED BOOL Maintenance required
At least one PROFINET device is indicating the maintenance requirement alarm (low-priority maintenance alarm) with an active connection. The PROFINET device can be identified using the RALRM diagnostic block.
└ PNIO_CONFIG_STATUS WORD Configuration status of the PROFINET controller
└ PNIO_CONFIG_STATUS_ACTIVE BOOL This variable is set if the desired configuration for the PROFINET controller has been loaded.
In this state, the PROFINET controller attempts to cyclically establish a connection to all devices in the desired configuration.
└ PNIO_CONFIG_STATUS_READY BOOL This variable is set if the PROFINET controller has been initialized correctly. No desired configuration has been loaded by PLCnext Engineer yet.
└ PNIO_CONFIG_STATUS_CFG_FAULT BOOL The desired PROFINET controller configuration has not been applied due to a serious error. In this case, please contact Phoenix Contact.
└ PNIO_FORCE_FAILSAFE BOOL All PROFINET devices are prompted to set their configured substitute values.
If required the system variable can be written/set from the program.

System time

System time on the active controller

see System variables - System time

System time on the remote controller

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

Note: The content of this system variable is only valid if the value of the variable LOCAL_RDNCY_INFO.RDNCY_SYNC_LINK_STATE is 1.

System variable Type Description
REMOTE_DATE_TIME 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)

Device state

Device state on the active controller

see System variables - Device state

Device state on the remote controller

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

Note: The content of this system variable is only valid if the value of the variable LOCAL_RDNCY_INFO.RDNCY_SYNC_LINK_STATE is 1.

System variable Type Description
REMOTE_DEVICE_STATE DEVICE_STATE_4xxx_TYPE Data structure
└ BOARD_TEMPERATURE SINT Board temperature (in °C)
└ FAN_FAIL BOOL

The fan is defective.

Device defect due to overheating

Immediately replace the fan when the defect occurs.

└ RAMDISK_USAGE USINT Memory used on the RAM disk
└ 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

Fan state on the active controller

see System variables - Fan state

Fan state on the remote controller

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

Note: The content of this system variable is only valid if the value of the variable LOCAL_RDNCY_INFO.RDNCY_SYNC_LINK_STATE is 1.

System variable Type Description
REMOTE_FAN_STATE FAN_INFO Data structure
└ FAN_MAINTENANCE BOOL Fan maintenance is required
└ FAN_DEFECT BOOL

The fan is defective.

Device defect due to overheating

Immediately replace the fan when the defect occurs.

User partition

User partition system variables on the active controller

see System variables - User partition

User partition system variables on the remote controller

The REMOTE_USER_PARTITION system variable is organized as data structure. The REMOTE_USER_PARTITION system variable can be used to retrieve various information and memory statistics about the user partition (overlay file system) of the remote controller. The partition is located on the external SD card of the remote controller. 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).

Note: The content of this system variable is only valid if the value of the variable LOCAL_RDNCY_INFO.RDNCY_SYNC_LINK_STATE is 1.

System variable Type Description
REMOTE_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)

 

 


• Published/reviewed: 2024-12-19  ☃  Revision 076 •