Installing the PLCnext Technology Toolchain

In order to develop real-time and non-real-time applications in C++ and C# for the integrated runtimes of PLCnext Technology, the PLCnext Technology Toolchain is required. 

The PLCnext CLI is a crucial component in that toolchain. This dedicated command line interface can be used to generate metadata, C++ header files, PLCnext Engineer libraries, and for the build process. The PLCnext CLI functions can be called using simple commands. An integrated help lists the commands and describes their functions. For all details to the features and functions, see the PLCnext CLI description.

Security note: Automation developers need to secure their build system against unauthorized manipulation!

You can always work with the latest PLCnext toolchain release, no matter which PLCnext Control devices or releases of firmware you're programming for. The PLCnext toolchain is updated twice each year, subsequently to the "LTS" firmware release and the mid-year release (202x.6). The changes made from release to release are reported in the PLCnext Technology Toolchain change log.

As part of the PLCnext Technology Toolchain, Phoenix Contact offers an Eclipse® add-in and a Visual Studio® extension. They extend the respective IDE and its graphical user interface (GUI) to support the development process for PLCnext Technology. For installation see Installing IDE tools.

Tip: If for some reasons you need to stick to former firmware releases and programming tools, former PLCnext Technology Toolchain installers and legacy C++ and C# development tools for Visual Studio® 2015 or 2017 are still available. For details see Tool downloads.

Installation on Windows® computers

Installing the PLCnext Technology toolchain

Prerequisites

Using an integrated development environment (IDE) is optional for the most parts. But it is highly recommended to use one.

  • Microsoft® Visual Studio® extensions are provided for C++ and/or C# programming under Microsoft® Windows® 10.
    • With the current PLCnext Technology Toolchain the minimum IDE release is Visual Studio® 2019 (minimum version 16.11.26) or Visual Studio® 2022 (minimum version 17.6.2) including the following workloads:
      • .Net™ desktop development
      • Desktop development with C++
      • Linux® development with C++
  • Eclipse® (available under Microsoft® Windows® and Linux®) for C++ programming is supported by an Eclipse® add-in. 
    • For the Eclipse® add-in of PLCnext Technology Toolchain 2020.0 LTS or newer, at minimum a Java® v11 is required.
    • Each add-in release is tested with Eclipse IDE for C/C++ Developers package, release version 20##.03 or 20##.09, corresponding to the one just before our release date.
    • If an error code 13 occurs when Java® is started, check if the correct Java® version is installed. The Java® Runtime Environment (JRE) is required for Eclipse®. If you want to use a 64-bit Eclipse® version, you have to install a 64-bit Java® version, too.

Installation

The extensions for Visual Studio® 2019 and 2022 can be installed via the latest PLCnext Technology Toolchain setup. This enables templates, profiles, debugging (C# only), and other functionalities to develop in C# and C++ for the PLCnext Runtime System

  • Run the installation file and follow the instructions the installation wizard shows.
  • In the Package Selection dialog box, mark or unmark optional tools:
    • If both Visual Studio® releases are present on your computer, you can install extensions for both releases in the same run.
    • The Eclipse® add-in will just be placed as a .zip file in your PLCnext CLI installation folder for optional use in a further installation step.
    • For the purpose of Shared Native Libraries see C++ functions and function blocks
    • Setting the environment variable is recommended by Phoenix Contact to have the best experience working with the PLCnext toolchain on the command line.
  • Click Next to finalize the PLCnext toolchain installation.
  • Optional: Start Visual Studio® and check the installed extensions. For details see Installing IDE plug-ins.
  • Optional: To install the Eclipse® add-in, proceed with Installing IDE plug-ins.
  • Optional: For C++ programming you also need to install an SDK, suitable for your PLCnext Control device and its firmware release.

Updating the PLCnext toolchain

  • Run the newer PLCnext Technology Toolchain installer and follow the instructions in the installation wizard as described above.
  • Preferably install to the exact same directory where the current PLCnext Technology Toolchain is located.
  • If you decide to install into a different directory for reasons, follow the above instructions for an initial installation.

Installation on Linux® computers

The following packages are required for installation in Linux®:

  • xz-utils
    Required for SDK installation.
  • python3
    Required for SDK installation.
  • file
    Required for SDK installation.
  • build-essential
    The package contains the major part of the toolchain required for C++ programming, e.g., make.
  • libunwind8
    This library is required by the EngineeringLibraryBuilder.
  • sshpass
    Is used by the debug script to query user name and password when logging in to the controller.

Installing the PLCnext toolchain

  • To check if the packages were installed and to install them otherwise, enter the following command:
    sudo apt-get install xz-utils python3 file build-essential libunwind8 sshpass
  • Run the PLCnCLI_Setup.sh file.
  • Read and accept the Software License Terms.
    You will then receive a folder named plcncli to which the PLCnext CLI was unpacked.

Phoenix Contact recommends introducing the Executable file to simplify calling the file in the console. 

  • For introducing the Executable file, enter the following command: 
    ln -s [Path_to_your_PLCnext_CLI_installation_folder]/plcncli /usr/local/bin/plcncli

For example:

ln -s /home/plcncli/plcncli /usr/local/bin/plcncli

Unattended PLCnext Technology Toolchain setup

Under Windows®, the PLCnext Technology Toolchain setup can run unattended as of PLCnext Technology Toolchain 2024.0: 

 PLCnext_Toolchain_setup.exe /silent FEATURE_1=true FEATURE_2=false INSTALL_LOCATION=C:\toolchain

All feature IDs and names are listed inside the bootstrapper log file in %temp% (Log name example: PLCnext_Toolchain__.log).
The FEATURE can be true or false. If the INSTALL_LOCATION is not set, it will use the default path.

Updating the PLCnext toolchain

Updating under Windows®

Just start the installer and install into the same directory as former PLCnext Technology Toolchain versions.

Updating under Linux®

  • Delete the files and folders within the existing PLCnext CLI directory but keep the top-level folder.
  • Install the newer version in that directory. By doing so, your settings files will be left untouched. They are located in the /home/<username>/.config/plcncli/ directory.
  • If you're working with the Eclipse® IDE, then restart Eclipse®.
    ↪ On startup, Eclipse® detects the new add-in release and prompts you to update.

    Note: In case you decided to install a newer PLCnext CLI in a different directory than before, or if Eclipse does not detect the add-in update, then uninstall the former add-in and install the latest release (see Installing the Eclipse add-in).


• Published/reviewed: 2024-09-24   ☀  Revision 073 •