Hello,
Currently I am exploring the possibilities of PLCNext with higher-level languages, in this case C++. I am already using IEC languages for some parts of the system. However, some tasks are better suited to be written in C++, e.g. parsing config files, hash-maps we need for a localization method we use on our mobile robot, JSON parsing for MQTT-based communication etc.
So, in the terms of PLCNext Engineer, I would love to have „Programs“ and „FunctionBlocks“ running inside IEC Code. I then would create IN and OUT PORTs to exchange data inside the Global Data Layer (GDL).
I have setup plcncli and installed the SDK for our controller and have setup some projects. I fail at building of one of those (because the generated template project fails with plcncli build -p .), but what is more important for me right now is to understand the different options I have.
What I can see in the plcncli new verb is:
C++ programming on PLCnext Technology This C++ program type can be arbitrarily combined with programs in other languages (IEC 61131‑3 languages, MATLAB® Simulink®). The data interchange is done task-synchronous and consistent via the Global Data Space (GDS).
- acfproject and components
- ‚normal‘ projects ? with its component, consumableLibrary, program
- sharednative (sn) projects that suddenly come with c# code?
From the documentation:
I can see, that there are distinctions between C++ RT Apps, C++ Function extensions and C++ Linux Apps. From what I understand, Native Linux Apps are not in my interest as of right now, because I want to exchange data with the IEC Programs.
Can somebody help me sort these terms and understand, what each thing is, if some of the terms mean the same thing etc.
Thanks.
Hi Robin,
I can well understand that you have lost your bearings with all the abbreviations.
I will be happy to give you an initial overview of what is needed and for which application. If you wish, I can also contact you directly by e-mail to arrange an appointment.
Let’s start with the overview of the architechture.
C++ real-time app (Program and Functonblocks)
You can create a native C++ real time program as well as a function block (Shared native library)
The program type is quite easy to handle - the data exchange is done via GDS ports and scheduled within std. PLC tasks.
The shared native libraries are a bit more special and makes it possible to create an IEC 61131 function block written in native C++.
For both it is quite important to follow some rules of embedded real time programming, otherwise you can block all other tasks ;-).
C# real-time app (Program and Functonblocks)
Our 61131-3 runtime (called eCLR) is based on CIL and offers the possibility to create IEC FBs and Programs in C#.
But as we do not use the .Net Framework you’ve to check the available Namespaces.
Linux native Apps and Container
Well, basically those are all applications which are executed directly on Linux or inside a OCI container and does not have directly anything to do with PLCnext. They are normally not real-time, but mostly enough an quite easy to implement. The data exchange is normally done with UA, REST oder GRPS.
C++ functional extensions and the riddle of ACF
ACF stands for „Automation Component Framework“ and is the foundation „template“ for all system functions (or component). So in theory you can create your own ACF component and add a new system function - but his would demand a very very very deep workshop, however it is possible! 
image.png
I hope that helped a bit, please let me know if we should arrange a meeting for more details.
Btw.:
We are working on some updated Tutorials 
BR,
Frank
Hey Frank, pls contact me @ rheitz@ceilix.com.
Thanks!