plc - What is the default size of a STRING in IEC61131-3 -
i inherited plc program written in iec 61131-3 structured text. noticed has mixture of string
variables, , few string(15)
variables. suggests iec61131-3 declares strings pre-defined length (does it?) , there may default length (is there?) makes me wonder if of strange string behaviour have observed comes strings overflowing buffers , excess being ignored (possible?)
ideally, please support answer(s) link(s) readily accessible iec61131-3 reference 1 can browse further details of string
, other iec 61131-3 data types.
if declare string variable in iec61131-3 have specify length of string.
sexample : string(n);
n determines how many characters/bytes string has. \0 character appended, string(n) n+1 bytes big.
in codesys , twincat there vendor specific specialities not defined in iec61131-3 (afaik):
sexample : string; //this same string(80) sexample : t_maxstring; //this same string(255)
you should not use strings bigger t_maxstring because string functions available cannot handle bigger strings.
this information based on beckhoff infosys tc3, because codesys documentation has no easy access , official iec61131-3 standard not freely available. can provide vendor specific information.
you should recheck documentation plc system.
Comments
Post a Comment