CAST_TO_REAL(a)
Converts the type of a to a REAL type without changing the underlying bit pattern.
Parameters
a (DINT or DWORD)
The value whose data type is to be converted to a REAL.
Return Value
Returns a REAL.
Remarks
Converts the data type to REAL data type by reinterpreting the raw 32 bits. Typically used with communications to correct the actual data type of a data value.
Examples
CAST_TO_REAL(1075314688) returns 2.375
CAST_TO_REAL(16#40A00000) returns 5.0
See Also
Standard Functions | CAST_TO_DWORD | CAST_TO_DINT
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion