This content has moved to a new space on the Internet.

Go to new location

 


Structure of a C++ program

Note: 
If you want to consult the PLCnext Technology SDK C++ header files in parallel while reading this section, first install the necessary tools as described in Required Installations.

Note:
When naming PLCnext Technology components, observe the naming conventions.

 

With PLCnext Technology, programs that were created in different programming languages can be used together. For instantiation and calling by the PLCnext Technology firmware, the programs have a uniform basis. This basis applies to all programming languages. PLCnext Technology follows an object-oriented approach. The following base classes are relevant for creating a C++ program for the PLCnext Technology platform.

Library LibraryBase class The LibraryBase class is the smallest unit that can be downloaded. It represents an *.so file (shared object). One Library can instantiate one or more Components.
Component ComponentBase class The ComponentBase class is a collection of functions (programs) within the PLCnext Technology platform.
One component can instantiate one or more programs. The Program instances can interact via their shared Component instance.
Program ProgramBase class With PLCnext Technology, instances of the ProgramBase class can be performed in real time.
Here, the IN and OUT ports are published.

The base classes are stored in the Phoenix Contact SDK. Derive from these base classes to create your application.

Some sample applications programmed in C++ can be found at github.com/plcnext.

 

 

 

 


 • Published/reviewed: 2020-08-07 • Revision 35 •