Using PLC strings as method parameters
To transfer a character string from PLC to C++ as a method parameter, use a pointer with length information when declaring the method in TMC:
Such a method can be called by means of implementing a method within the wrapper function block.
The reason is the different handling of method parameters in the two worlds:
- PLC: Uses the call by value for STRING(nn) data types.
- TwinCAT C++ (TMC): Uses the call by reference.