Installation of the PLCnext Technology SDK and Eclipse Frank PLCnext Team A software development kit (SDK) is mandatory in order to use C++ applications with PLCnext Technology. This kit is provided by Phoenix Contact. Phoenix Contact recommends the free Eclipse development environment with the PLCnext Technology CDT Common plugin as development environment. C++ programs have to be available as a PC Worx Engineer Library to be used in a PC Worx Engineer (IEC 61131) application. The PLCnext Technology Library Builder tool is available for this purpose.the installation of these components will be explained in the following manual. Download article This document is based on the release version of PLCnext Technology Watch also the corresponding Tutorial Video - PLCnext Technology SDK and Add In with Eclipse! Operating system Linux We recommend the following or equivalent distributions: Xubuntu 16.04.01 ( https://xubuntu.org/) Ubuntu 16.04 ( https://www.ubuntu.com/) An Internet connection is an essential requirement for the installation of the components. Microsoft Windows Windows 7 Windows 10 An Internet connection is an essential requirement for the installation of the components.
Software packages from Phoenix Contact Please find the PLCnext Technology SDK, Eclipse CDT Add In and PC Worx Engineer Library Builder in the download area of the AXC F 2152. Other software packages General Eclipse Neon 3 Download this software from Eclipse Neon. Linux OpenJDK 8 You can download this software from Open JDK. However, Phoenix Contact recommends the installation by way of the "apt-get" service (described below). CMake You can download this software from https://cmake.org/. However, Phoenix Contact recommends the installation by way of the "apt-get" service (described below). Mono Open Source.Net Framework You can download this software from Mono. However, Phoenix Contact recommends the installation by way of the "apt-get" service (described below). Microsoft Windows Oracle Java Runtime Environment You can download this software from Oracle Download JRE.
Microsoft.Net Framework 4.6.1 You can download this software from Microsoft https://www.microsoft.com. In case PC Worx Engineer 7.x is also used the Framework is already installed. Installation of the components on Microsoft Windows Installation of the Java Runtime Environment The development environment Eclipse is created in Java and requires a Java Runtime Environment. Download the current Java Runtime Environment. Follow the installation instructions. Installation of the.net Frameworks The PLCnext Technology Library Builder uses the.net Framework 4.6.1. Download the.net Framework. Follow the installation instructions. In case PC Worx Engineer 7.x is also used the Framework is already installed. Installation of the IDE Eclipse Neon 3 Phoenix Contact recommends the free development environment Eclipse Neon 3. Download the installer to your system. Choose the "Eclipse IDE for C/C++ Developers". Follow the installation instructions. Set the right proxy. Enter your Windows user name and password. Extract the SDKs The Windows SDK is packed in an archive called "pxc-glibc-x86_64-axcf2152-imagemingw-cortexa9t2hf-neon-toolchain-x.x.tar.xz".
Copy the archive. Extract it in any given directory. Execute the batch file "environment-setup-cortex9th....bat". Avoid spaces in the SDK directory (e.g. C:\Users\xxxx\Desktop\WindowsSDK\sysroots \x86_64-pokysdk-mingw32) Always extract the archive in the same directory. Figure 1 Folder structure Windows SDK Installation of the components on Linux Installation of the IDE Eclipse Neon 3 Phoenix Contact recommends the free Eclipse Neon 3 development environment. A Java Runtime Environment (in this case OpenJDK 8) is an essential requirement for this environment and uses CMake as the build tool in this case. Steps 2-6 only serve to add a shortcut to your desktop and are optional. All following instructions must be carried out in the Linux Terminal. 1. Unzip the Eclipse "tar.gz" archive in the download area (such as with -zxvf eclipse.xx.yy.tar.gz). We recommend that you then copy the file to another location (sudo mv xxx/eclipse.xx.yy /opt). 2. Create a desktop shortcut with the following content: gedit ~Desktop/eclipse.desktop Content
[Desktop Entry] Name=Eclipse Type=Application Exec=env UBUNTU_MENUPROXY=0 eclipse46 Terminal=false Icon=eclipse Comment=Integrated Development Environment NoDisplay=false Categories=Development;IDE; Name[en]=Eclipse 3. The shortcut must be executable. You can set this with the following command. chmod 744 ~Desktop/eclipse.desktop 4. Once the shortcut has been added, it has to be assigned with the correct permissions. "sudo desktop-file-install ~Desktop/eclipse.desktop" 5. Add the Symlink as follows. "sudo ln -s /opt/eclipse/eclipse /usr/local/bin/eclipse46" 6. Use the following command to assign the Eclipse icon to the shortcut. "sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps /eclipse.xpm" 7. Java is required to start Eclipse. It can be installed as a package. "sudo apt-get install openjdk-8-jdk" 8. CMake is required for compiling. It can also be installed as a package. "sudo apt-get install lib32ncurses5 lib32z1 libstdc++6:i386
cmake" 9. The directory "org.eclipse.osgi" is added once Eclipse is started. It must be possible to modify this directory. Use the following command to make this setting. "sudo chown -R $USER:$USER /opt/eclipse/configuration /org.eclipse.osgi" 10. Now Eclipse can be started by way of the desktop shortcut. Extract the SDK The SDK contains all components (libraries and toolchains) to create a C++ application for axcf2152-image-sdk-cortexa9t2hf-neon-toolchain-2.2.sh". Root permissions are required for the installation. Depending on how your operating system is configured, double-click the file to perform the installation. Alternatively, the installation can also be started in the Linux Terminal. PLCnext Technology. It is located in the self-extracting file (bash script) "pxc-glibc-x86_64- "./pxc-glibc-x86_64-axcf2152-image-sdk-cortexa9t2hf-neon-toolchain- 2.2.sh" The installation directory is queried once the installation is started. Phoenix Contact recommends the "default" path. Figure 2 Sample installation In the event that the installation should not start, make sure that the ".sh" file is declared as executable in Linux.
(e.g. with "chmod a+rx pxc-glibc-x86_64-axcf2152-image-base-cortexa9t2hfneon-toolchain-x.x.sh") Installing Mono-Complete The Mono-Complete package is required for using the PLCnext Technology Library Builder. It can be installed with the following command: "sudo apt-get install mono-complete". Preparing Eclipse for PLCnext Technology Installing the PLCnext Technology plugin Extract the file "com.phoenixcontact.cdt.updatesite.7z". Make sure that Eclipse has access rights to the folder. Now install the plugin by way of the tab --> Help --> Install New Software. Figure 3 Help - Install New Software Use "Add" to select the folder to which you unzipped the plugin files. (Plugin Path "**\PLCnext Technology CDT Build XXXX\com.phoenixcontact.cdt.updatesite")
Figure 4 Add Repository - Select Folder The following components have to be installed. Continue the installation by pressing "Next".
Figure 5 Available Software - select the packages to be installed Review the items to be installed and click "Next". Licenses must be reviewed and accepted. When accepted, click "finish" to complete the installation. There are often errors when Eclipse is not able to establish an Internet connection to install required dependencies. Check under "Window -> Preferences -> General -> Network Connection" whether the right proxy is set. PLCnext Technology Library Builder The PLCnext Technology Library Builder is an essential requirement when you want to use C++ programs within a PC Worx Engineering project. The Library Builder creates a library that can be read by PC Worx Engineer from the meta information and the shared object. Within PC Worx Engineer, C++ programs can be used like traditional IEC 61131 programs and can also be downloaded directly from PC Worx Engineer. Copy the file "EngineeringLibraryBuilder.exe". Make sure that Eclipse has access rights to the folder.
Now select the path to which you copied the file "EngineeringLibraryBuilder.exe" in Eclipse under Window -> Preferences -> PLCnext -> PCWLX Export. Figure 6 Window - Preferences Figure 7 Preferences - PLCnext - PCWLX Export In the event that no libraries can be created, Make sure that the ".exe" is declared as executable in Linux. (such as with "chmod a+rx EngineeringLibraryBuilder.exe" ) Start now with your first C++ PLCnext Technology application - Tutorial Video - Your first steps with Eclipse and C++ Updates Update SDK
Several PLCnext Technology SDKs can be used in parallel. To prevent a mix of different versions, Phoenix Contact recommends removing all older SDKs. Update of the Eclipse PLCnext Technology Plugin To perform an update of the PLCnext Technology Eclipse plug-in, you can proceed like for the first installation. Alternatively, the update can be copied to the existing directory to start an update under "Help -> Check for Updates" or "Install New Software".