Operating system

The PLCnext Technology control platform is based on a Linux® operating system with the OSADL real-time patch. Linux® is a highly reliable, open source operating system suitable for applications that require a high stability. A wide range of open source software is available for the Linux® operating system, which is supported by a large community of users and developers.

You can also use this open software, software blocks, and technologies for your PLC applications (e.g., SQL server). PLCnext Technology uses the Linux operating system and extends it by the functions of a PLC such as the cyclic processing of tasks and cycle-consistent data exchange. Core changes or extensions are not possible. To add functions to the system, the user must compile and, if necessary, execute installations with root rights.

The operating system features the following components and services:

Text editors

Nano and Vim are installed on the controller as text editors. When you are connected to the controller via the SSH console, you can call the desired editor via the command line. To open a file with the desired editor, enter nano <file name> or vim <file name>.

Nano

The Nano text editor is easy to use and is therefore recommended for less experienced users.

Find an introduction and documentation of features at the GNU nano website

Vim

The Vim text editor has an extended range of functions and is a popular editor in the Linux® environment.

Find an introduction and documentation of features at the Vim website.

Linux scripts of the PLCnext Technology firmware

Firmware update

Beginning with firmware version 2019.0 LTS, you can update the firmware conveniently via the Web-based Management of your controller.

For older firmware versions, you can start the firmware update via the sudo update-plcnext shell script, which you will find in the file system of the controller.

In order to update to a current firmware release, a firmware version 2022.0 LTS or newer must be installed on the controller. Firmware versions 2021.9 and before will not accept the *.raucb firmware update file.

  • Coming from devices running on 2019.0 LTS to 2021.9 firmware, first update to the 2022.0 LTS release.
Note:

If the boot process failed several consecutive times then the inactive and the active boot partition will change their roles, too. This behavior has been implemented to keep the PLCnext Control device accessible even if the firmware update fails.

The behavior can also occur when the boot process is interrupted e.g. by power loss. In this case you will observe that the PLCnext Control boots with its previously installed firmware version. To prevent such unintended firmware downgrades, Phoenix Contact recommends that after a finally successful firmware update, the same firmware should be installed once again. This way both the active and the inactive boot partition will contain the same firmware version.

  • Download and unzip the firmware *.zip file from the download area of your controller (see Tool downloads).
  • For older firmware, run the *.exe setup file to extract the *.raucb update file. Newer firmware contains already the *.raucb update file.
  • Open an SFTP client software (e.g., WinSCP).
  • Log in to the PLCnext Control as an administrator
    (default access data is User name: admin; Password: printed on the controllers' housing).
  • Copy the *.raucb update file to the /opt/plcnext directory (this is the home directory of the Linux user “admin”).
  • Open the shell using a command line tool (e.g., PuTTY or Tera Term).
  • Log in to the PLCnext Control as administrator.
  • Issue the update command; the name of the update script is the same for every controller:sudo update-plcnext.
    • The script is available in the directory under /usr/sbin/.
    • Under /usr/sbin/, you will also find symbolic links with the respective product designation in the name, e.g., sudo update-axcf2152.

The script executes the following operations:

  1. Stopping the PLCnext Technology process.
  2. Performing the firmware update.
  3. Rebooting the system and deleting the firmware container.

 

The same goes for downgrading to a former firmware version.

Known issue: 

Known for firmware 2020.6 or newer on all supported PLCnext Control devices:

After downgrading the firmware, it is recommended to reset to Default setting Type 1 (see Factory Reset). This is not necessary when updating the firmware.

Reset to default setting type 1 and type 2

A distinction is made between two types of default settings:

  • Type 1: 
    All user-specific data is deleted (settings, programs, users, etc.). Licenses installed on the device and bound to the device as well as the  activated/deactivated SD card support setting are retained. The current PLCnext Technology firmware remains unchanged.
    The following directories are cleared:
    • /media/rfs/rw/upperdir
    • /media/rfs/rw/work 
    The directories that are used for containers are also cleared from firmware version 2023.0 LTS:  
    • /media/rfs/rw/var
    • /media/rfs/rw/data
  • Type 2:
    In addition to deleting the user-specific data (type 1), the firmware of the controller is reset to delivery state.
Note:

Known for all firmware versions on RFC 4072S:

LIC SD cards SD FLASH 8GB PLCNEXT MEMORY LIC (item no. 1151112) and SD FLASH 32GB PLCNEXT MEMORY LIC (item no. 1151111) are only supported from firmware release 2022.0 LTS or newer (see LIC SD cards for further information).

If you use a LIC SD card with your controller and perform a reset to default setting type 2, the firmware version of the delivery state that is activated by this reset might not support the LIC SD card. Updating to a higher firmware version is then no longer possible.

In this case, proceed as follows:

  • Connect to the controller, e.g. via WinSCP (see Connecting to the controller)
  • Upload the firmware container to /var/volatile/tmp. The folder is located in the RAM of the controller and has about 4 GB free memory.
  • Perform an update with the following command via SSH console:
    rauc install /var/volatile/tmp/<updatecontainer>.raucb
    ↪ The update is executed.

You can reset your controller to default settings via the device-specific operating elements (e.g., reset button or operating display). For additional information, please refer to the corresponding user manual.

Another option is to reset the controller using a shell script. The script is available in the controller's file system. The name of the factory reset script is the same for every controller:  sudo recover-plcnext 

You will find the script under /usr/sbin/. When calling the script, specify the desired reset type, e.g.,  sudo recover-plcnext 1 for type 1 default settings.
Under /usr/sbin/, you will also find symbolic links with the respective product designation in the name, e.g., 
recover-axcf2152 1 for type 1 default settings of a PLCnext Control AXC F 2152.

 

The type 1 default settings can also be restored via the Cockpit editor in PLCnext Engineer and from firmware version 2023.0 LTS via the WBM cockpit.

Note: Files that are stored outside the upperdir directory are not deleted during a reset to default setting type 1 or type 2 (e.g. PLCnext apps may not be installed and OCI images are not installed in the upperdir directory).

So in this case not necessarily all user files are deleted and a reset to default setting type 2 does not necessarily restore the controller to factory default state. 

All licenses, and especially licenses that are bound to the device, are retained.

Controlling the firmware

The plcnext script in the /etc/init.d directory controls the firmware.

You can control the firmware with the following commands:

Shell command Description
sudo /etc/init.d/plcnext stop Stops all PLCnext firmware processes
sudo /etc/init.d/plcnext start Starts all PLCnext firmware processes
sudo /etc/init.d/plcnext restart Restarts all PLCnext firmware processes

 

 

 


• Published/reviewed: 2024-02-27   ★  Revision 065 •