I am using PLCnext Engineer 2021.0.1 (Build 4.7.1144.0). I have written a C++ ACF program and in the ACFProject1Component.hpp I have declared …
struct DigitalInputConfig
{
StaticString<512> path;
};//#port
//#attributes(Input)
DigitalInputConfig digitalInputsConfig[2];In my PLCnext Engineer project, I defined Programming ⇒ Local ⇒ DataTypes to have the following …
TYPE
DigitalInputConfig : STRUCT
path : STRING512;
END_STRUCT
END_TYPE
TYPE
digitalInputsConfig : ARRAY[0..1] OF DigitalInputConfig;
END_TYPEIn a new local Program, I create a OUT variable of type digitalInputsConfig called "foo ". After I have done this, however, I cannot link "foo " to the IN "ACFProject1Component1 / Program1 : digitalInputsConfig ". BUT if I change the “StaticString<512>” to “StaticString<80>” and “STRING512” to “STRING”, I can link the OUT variable “foo” to the IN “ACFProject1Component1 / Program1 : digitalInputsConfig” with no problems.`` I don’t understand why the StaticString does not work with STRING512 when contained in a STRUCT?