ANY_TO_STRING
Converts variables to STRING variables

Arguments | ||
---|---|---|
i1 | BOOL - SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL - TIME - DATE - STRING | Any value |
o1 | STRING | If i1 is a Boolean, 'FALSE' or 'TRUE' If i1 is an integer or a real, decimal representation If i1 is a TIME: TIME time1 STRING s1 time1 :=13 ms; s1 :=ANY_TO_STRING(time1); (* s1 = '0s13' *) |
Example
(* FBD example with "Convert to STRING" Operators *)

(* ST Equivalence: *)
bres := ANY_TO_STRING (TRUE); | (* bres is 'TRUE' *) |
ares := ANY_TO_STRING (125); | (* ares is 125 *) |
Provide Feedback