Conversion of variables from one type to another type. The input type must not be specified explicitly (overloaded conversion).
Also refer to the description of type conversion functions.
TO_<data type>
Conversion from a variable of data type REAL to INT:
VAR
iVar: INT;
bVar: BOOL;
strVar: STRING;
rVar: REAL;
END_VAR
wVar:=TO_WORD('123') (* result is 123 *)
bVar:=TO_BOOL(1); (* result is TRUE *)
strVar:=TO_STRING(342); (* result is '342' *)
iVar_=TO_INT(4.22); (* result is 4 *)