Dear people, Currently, I am researching the internal custom component with regard to the possibilities it has with using C #. I know you can use C++ to create new internal user components. But if you add a new item within your project in visual studio, you can choose to add the item “program”. Does this program function as an internal user component? Or is it actually possible to create an internal user component with C#. Kind regards, Bart Minten
Hi Bart, Here is the CliffsNotes (or perhaps Blinkist?) version:
* Components * must be written in C++ (at the moment) - or at least be wrapped in a C++ interface. * instances are created by either the ACF or the PLM, based on the contents of a `.acf.config` or `.plm.config` file. * run in a non-real-time context. * Programs * can be written in IEC 61131, C#, C++, or Simulink (at the moment). * instances run in an ESM Task. * run in a real-time context.(I am using the words “Component” and “Program” in the way they are used by the PLCnext Runtime). So, based on the above, you can see that the answer to your question is: No, a C# Program does not function as a PLCnext Component, and no, it is not possible to create a PLCnext Component using C# (currently). The other way to use C# at the moment is to install the .NET Core runtime on the PLC, either directly or in a container, but this runs entirely outside the PLCnext Runtime and so gives a much looser coupling with the PLCnext Runtime features. Hope this helps. ~ Martin.