Conversion between integral number types
Conversion from an integral number type to another number type: When you perform a type conversion from a larger to a smaller type, you risk losing some information. If the number you are converting exceeds the range limit, the first bytes for the number will be ignored.
Example in ST:
si := INT_TO_SINT(4223); (* Result is 127
*)
If you save the integer 4223 (16#107f in hexadecimals represented) as a SINT variable, it will appear as 127 (16#7f in hexadecimals represented).
Example in IL:
LD 2
INT_TO_REAL
MUL 3.5