This site uses cookies for functional purposes. To continue please read and agree to our Data Privacy.

By closing this message, you consent to our use of cookies on this device.

PLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

Migrate projects to PLCnext Engineer 2019.x

A 1-minute walkthrough

After updating the firmware of a PLCnext Control AXC F 2152 from version 1.x to 2019.x it is necessary to migrate projects deriving from the former PC Worx Engineer 7.2.x to PLCnext Engineer 2019.x.

  • Migrating projects is done in the PLCnext Engineer 2019.x development environment, simply by changing the device description of the controller.

  • If a function block library is used in the project that was compiled for use with the former PC Worx Engineer, it has to be replaced by the matching PLCnext Engineer 2019.x library.

  • If a former PC Worx Engineer project contains high-level language libraries (e.g. the C++ toolchain) it must be compiled again from the Eclipse project along with the current SDK and project template. After that, a new library for PLCnext Engineer 2019.x must be built.

Here's how this can be done:

Replace the controller in PLCnext Engineer 2019.x

Changing the device description of the controller from AXC F 2152 Rev.>=0.0/1.x.x to AXC F 2152 Rev.>=00/2019.0.0:

  1. In PLCnext Engineer 2019.x, see in the "COMPONENTS" workspace on the right: navigate through the navigation tree by clicking on ">" to unfold a branch or on "˅" to fold a branch.
  2. Open the "Network" node and then "Controller".
  3. Mark the "AXC F 2152 Rev.>=00/2019.0.0" entry.
  4. Right-click to show the context menu of the controller and select "copy".
  5. In the "PLANT" workspace on the left, open the "Project" node.
  6. Mark the "axc2152-1:AXC F 2152" entry (you may have a different name there for your PLCnext Control).
  7. Right-click to show the context menu of the controller and select "replace".
    ⇒ The project will be compiled automatically.
  8. Save the project with a different name.

Replace a function block library

If a function block library is used in the project that was compiled for use with the former PC Worx Engineer, it has to be replaced by the matching PLCnext Engineer 2019.x library.

  1. Get a compatible library:
    • for function block libraries that came with the former PC Worx Engineer, new versions have been installed with the PLCnext Engineer 2019.x
    • for additional Phoenix Contact function block libraries, download the compatible version from the PLCnext Store free of charge
    • for other function block libraries, compile them for use with PLCnext Engineer 2019.x
  2. Replace the library in your project.
    ⇒ The project will be compiled automatically.
  3. Save the project with a different name.

Migrate a Eclipse™ C++ project

Migrating an existing Eclipse project for PLCnext Technology is done accordingly to building an Eclipse project for PLCnext Technology:

  1. Install the toolchain.
  2. Create a new project template in Eclipse basing on the current 2019.x toolchain.
  3. Compile with the current 2019.x SDK.
  4. Build a new PLCnext Engineer library.

Install the toolchain in detail:

Programming in C++ on PLCnext Technology is done with

  • Eclipse IDE
  • PLCnext Command Line Interface (CLI)
  • Solution Development Kit (SDK)
  • Eclipse Plug-in for PLCnext Technology
  1. Follow this short [tutorial video] to install the 2019.x toolchain.
  2. Start Eclipse and create a new project by means of a 2019.x controller template (e.g., AXC F 2152).
  3. Copy the source code from the former Eclipse project into the source code sections of the new .hpp and .cpp files.
  4. Compile with the current 2019.x SDK for your operating system.
  5. Build the PLCnext Engineer 2019.x library.

Compared to the former version, the current project template contains these changes:

  • Port variables are declared only in the header file (.hpp). Comments above the declaration define the application as port variable and its properties, like "Input", "Output", "Retain". These comment lines have to be placed above each port variable.
    It's not necessary to mention AddPortInfo("name", this-> Variable) in the .cpp file any more.

    Example of a port definition in the .hpp file:

    //#port
    //#attributes(Output|Retain)
    //#name(outBoolean)
    boolean outBoolean; //BOOL
    
    //#port
    //#attributes(Input|Retain)
    //#name(inUint8)
    uint8   inUint8;    //USINT
  • The meta data will be placed in this directory after successful compilation:

    • Project_xx\intermediate\Config\
  • The PLCnext Engineer library will be placed in this directory after successful compilation:

    • Project_xx\bin\
  • The .so file will be placed in this directory after successful compilation (e.g., for a PLCnext Control AXC F 2152):

    • Project_xx\bin\AXCF2152_19.0.0.xxxxx\Release\lib\
  • Before compilation, these source code files will be generated automatically:
    • Project-xx\intermediate\Code\Project_xx\Project_xxComponent.meta.cpp
    • Project-xx\intermediate\Code\Project_xx\Project_xxComponentProgramProvider.hpp
    • Project-xx\intermediate\Code\Project_xx\Project_xxComponentProgramProvider.cpp
    • Project_xx\intermediate\Code\Project_xx\Project_xxLibrary.hpp
    • Project_xx\intermediate\Code\Project_xx\Project_xxLibrary.cpp
    • Project_xx\intermediate\Code\Project_xx\Project_xxLibrary.meta.cpp