How C# fits into PLCnext Technology
Here's a short overview to the key concept before starting your first C# programming session.
C# programming in PLCnext Technology is based on the embedded Common Language Runtime (eCLR) by ProConOS.
This runtime system is able to transform both standard hardware and specific embedded platforms into extremely fast, powerful and multitasking-capable controllers according to IEC 61131. ProConOS embedded CLR uses the Common Intermediate Language (CIL) according to ISO/IEC 23271. The IEC 61131 languages can be used to program firmware and function blocks, as well as C#. Using an ahead-of-time compiler, the CIL intermediate code is translated into native machine code prior to its execution. As a result, the source code can be executed very quickly and in real-time.
Read more about the eCLR before starting with C# programming in PLCnext Technology.
Since C# code is usually developed in Microsoft Visual Studio®, Phoenix Contact provides a Visual Studio® extension that enables for developing eCLR firmware libraries in C#. This includes programs, functions and function blocks.
- Get the Visual Studio® extension as part of the SDK for your PLCnext Control.
- Find some C# examples on GitHub.
The Visual Studio® extension implements the libraries on PLCnext Technology devices by means of PLCnext Engineer, the IEC 61131 engineering software from Phoenix Contact.
So this is how the tools work together:
For more information on parts of the structure, just hover over the scheme drawing and see what's in there.