FL2REGL
Extracts the bottom 16-bit values of a 32-bit floating-point number.
FL2REGL enables sending float numbers over Modbus as a pair of 16-bit word values. The
Modbus protocol does not support floats.

Parameter values for the FL2REGL function:
Parameter | Data Type | Description | ||
---|---|---|---|---|
Val | REAL | 32-bit floating-point REAL value. | ||
Q | DINT | Integer value representing the bottom 16-bits of
the 32-bit floating point number. |
TIP:
FL2REGL does not convert floats to integers.
Numbers remain in floating point format. To convert the input value to an integer, use the
ANA operator.
Function Block Diagram Example

Structured Text Example
OutputL
:= Fl2RegL(floating_real) ;
Provide Feedback