REG2FL

Combines the top and bottom 16-bit values of two integers to produce a 32-bit floating point number. REG2FL enables sending float numbers over Modbus as a pair of 16-bit word values. The Modbus protocol does not support floats.
reg2fl_block
Parameter values for the REG2FL function:
Parameter
Data Type
Description
High
DINT
Top 16-bits of the float value
Low
DINT
Bottom 16-bits of the float value
Q
REAL
Float value by combining the two 16-bit values.
TIP: REG2FL does not convert integers to floats. Numbers are still in floating point format. To convert the integer value to a float, use the REAL operator.
Function Block Diagram Example
reg2fl_fbdexample
Structured Text Example
Result := Reg2Fl(RegHigh, RegLow);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal