ANY_TO_LINT
Converts variables to 64-bit long integer variables.
TIP:
The maximum value for a REAL or LREAL input must be
less than 9.2233720e+18. For input values greater than this maximum, the output value is
determined by the target type. For
Windows®
and Linux targets, the
output value is reset to zero when the input value is greater than 9.2233720e+18. While for
QNX targets, the output value will go into overflow.
Arguments | ||
---|---|---|
i1 | BOOL - SINT - USINT - BYTE - INT - UINT - WORD - DINT - UDINT - DWORD - LINT - ULINT - LWORD - REAL - LREAL - TIME - DATE - STRING | Any value |
o1 | LINT | 0 if i1 is FALSE / 1 if i1 is TRUE number of milliseconds for a timer integer part for real decimal number represented by a string |
Example
(* FBD example with "Convert to Long Integer" Operators *)

(* ST Equivalence: *)
bres := ANY_TO_LINT (true); | (* bres is 1 *) |
tres := ANY_TO_LINT (t#0s46ms); | (* tres is 46 *) |
mres := ANY_TO_LINT ('0198'); | (* mres is 198 *) |
Provide Feedback