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.
fl2regl_block
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
fl2regl_fbdexample
Structured Text Example
OutputL := Fl2RegL(floating_real) ;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal