Download DS800 Development Suite Software

Transcript
ANY_TO_REAL
Arguments:
IN
BOOL - SINT - DINT - TIME - STRING
any value other than a real
Q
REAL
0.0 if IN is FALSE / 1.0 if IN is TRUE
number of milliseconds for a timer
equivalent number for integer
Description:
Converts any variable to a real variable
Example
(* FBD example with "Convert to Real" Operators *)
(* ST Equivalence: *)
bres := ANY_TO_REAL (true);
(* bres is 1.0 *)
tres := ANY_TO_REAL (t#1s46ms);
(* tres is 1046.0 *)
ares := ANY_TO_REAL (198);
(* ares is 198.0 *)
DS800 Development Suite 2.1 - Language Reference
501