LENPermalink

Provided by standard library.

Returns the length of a string. Input STR is of type STRING, the return value of the function is type INT.

Example in Function Block Diagram

COD_LEN

Example in Structured Text

VarSTRING1 := LEN ('SUSI');

String functions are not "thread safe": When using tasks, string functions may only be used in a single task. If the same function is used in different tasks, there is a danger of overwriting.