ANY_TO_TIMEPLCopen motion icon

Operator - Converts the input into time value.

Inputs

IN : ANY  Input value

Outputs

Q : TIME  Value converted to time

Remarks

For BOOL input data types, the output is t#0 ms or t#1 ms. For DINT or REAL input data type, the output is the time represented by the input number as a number of milliseconds. For STRING inputs, the output is the time represented by the string, or t#0 ms if the string does not represent a valid time. In FFLD language, the conversion is executed only if the input rung (EN) is TRUE. The output rung (ENO) keeps the same value as the input rung. In ILClosed"Instruction list" This is a low-level language and resembles assembly Language, the ANY_TO_TIME function converts the current result.

ST Language

Q := ANY_TO_TIME (IN);

FBD Language

Any_To_TimeFbd.gif (1272 octets)

FFLD Language

(* The conversion is executed only if EN is TRUE *)
(* ENO keeps the same value as EN *)
Any_To_TimeLd.gif (1498 octets)

IL Language:

Op1: FFLD  IN
ANY_TO_TIME
ST  Q

See also

ANY_TO_BOOL   ANY_TO_SINT   ANY_TO_INT   ANY_TO_DINT   ANY_TO_LINT   ANY_TO_REAL   ANY_TO_LREAL   ANY_TO_STRING