Closed martinboers closed 3 years ago
You can use enums in C# and IEC 61131 as usual. They have to be defined in both worlds (probably the same) and to connect each other a port of type integer has to be used. This is different to the C++ implementation.
I don't think it's necessary to define the enum in both worlds.
If a C# enum is declared with the [Enumeration] attribute (below), then it should be visible and useable in a PLCnext Engineer project, without declaring it again or connecting it using port variables.
An example would clearly demonstrate the use of this attribute.
Example will be in the next update.
It would be interesting to see an example showing how to define and use enumerations.