I have followed the example provided by other discussion for creating struct type in C++, and the code compiles without issue. However, when i add the library in PLCNext, i do not see the struct. Not sure what i missed. please help
C++ code
Martin,
Apologies. I was hoping to see the individual struct variables in the Port list rather than the watch window.
Is using structured text is the only way to assign the IEC variables to struct variables as it is not visible in the GDS port list? assign this to C++ variable HighLim to IEC variable _HighLim.
One solution would be to create an OUT port variable in the PLCnext Engineer project, using the STRUCT data type that was imported with the C++ library.
Then, connect the new OUT port variable to the matching IN port variable on the C++ program instance.
Then in any IEC language - not only Structured Text - you can assign values to individual elements of the OUT port variable.
Will that be OK for your project?
Martin,
I am now able to see the C++ struct variables, I am not sure if a restart of PLCNext was needed but this did not show up yesterday. I have IEC variables as external type, would that cause any issues?