any_to_real

PLCopen motion icon

Operator - Converts the input into single precision floating point real value.

Inputs

Input

Data Type

Range

Unit

Default

Description

IN

ANY

 

 

 

Input value.

Outputs

Output

Data Type

Range

Unit

Description

Q

REAL

 

 

Value converted to single precision floating point real.

Remarks

  • For BOOL input data types, the output is 0.0 or 1.0.
  • For DINT input data types, the output is the same number.
  • For TIME input data types, the result is the number of milliseconds.
  • For STRING input data types, the output is the number represented by the string or 0.0 if the string does not represent a valid number.

FBD Language

Any_To_RealFbd.gif (1271 octets)

FFLD Language

  • In the 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.

Any_To_RealLd.gif (1497 octets)

IL Language

Op1: FFLD  IN
     ANY_TO_REAL
     ST  Q

ST Language

Q := ANY_TO_REAL (IN);

See Also