PLCnext on Instagram  PLCnext on YouTube Github PLCnext CommunityStore PLCnext Community

 

 How to create a Blog Entry

Written by: Damian Bombeeck

Summary

In this tutorial I will show you how to download, build and install a third-party open-source library, in my case libcurl, on your PLCnext AXC F 2152 controller. I’ll go through the different steps and explain why these steps are needed, furthermore I’ll include all bash commands, pieces of code and side-notes concerning the installation. The tutorial is mainly focussed on CMake and won’t include languages as C#, JSON or Java.

"Miniconda is a free minimal installer for conda. It is a small, bootstrap version of Anaconda that includes only conda, Python, the packages they depend on, and a small number of other useful packages, including pip, zlib and a few others. Use the conda install command to install 720+ additional conda packages from the Anaconda repository." This and further information could be accessed on the official Miniconda website. If some packages are not available via PIP, Miniconda could be a solution.

What if you do not need a newer version of Python than the one that comes preinstalled on the controller (3.5.6), but you do want pip installed? There is a simple way to do so!

You can download the installation script via the curl command:

curl https://bootstrap.pypa;io/get-pip.py -o get-pip.py

The above command downloads an installation file to the current directory which you can execute with the following command:

python get-pip.py
This will install pip on your controller together with wheel and setuptools.

If you wish not to install these, you can install pip with the following command:

python get-pip.py --no-wheel --no-setuptools

If you do need all the new bells and whistles of the latest Python distribution I gladly advise you to watch Martins Makers blog regarding Python!

With Java 9, a new tool called jlink was introduced. It combines modules and builds an all-in runtime image. On the one hand, the whole 32 bit ARM JDK can be run on an AXC F 2152. But with jlink and modules it is possible to reduce the resources needed for your Java application. It creates a bundle with just the necessary parts of the JDK needed for your application.

From time to time, the OPC UA module in Node-RED doesn't always want to connect to our OPC UA server after installation.

The reason is that the installation doesn't always create the necessary self-signed certificates which are needed.

This blog will show you how to create those certificates on the controller and how to get your OPC UA connection up and running in Node-RED.

Installing Node.jsNode-RED and PM2 offline

Intro

When using Node.js the easiest way to install everything is by installing the package from the PLCNext Store. From then on you can install all needed dependencies with the use of npm (Node Package Manager).

However, in some cases you won’t be able to connect the PLC to the store in order to get the software you wish to install. In what follows you will learn how to install Node.jsNode-RED and PM2 offline. Once installed you will be able to run locally installed packages on the controller.

All preparations that are needed in order to prepare all packages for offline installation are carried out on a Linux host.

Page 3 of 9