Great, thanks for the feedback. Since the ResultData block has a fixed size of 128 bytes, it might make sense to increase the size of STRING_UNION_TYPE accordingly: TYPE STRING_UNION_TYPE :
UNION
_result: STRING(127);
_byte: ARRAY[0..127] OF BYTE;
END_UNION
END_TYPE Note that STRING(127) defines a 127-character string, but CODESYS reserves an extra byte automatically for the null termination. See here for an explanation. I forgot this when making my original recommendation for STRING_UNION_TYPE.
... View more