Conversion instructions
691
Part III FP Instructions
F333_FINT
Rounding the first decimal point down
The converted whole-number value at output d is always less than or equal to the floating-point
value at input s:
If a positive floating-point value is at the input, a positive pre-decimal point value
is returned at the output.
If a negative floating-point value is at the input, the next smallest pre-decimal
point value is returned at the output.
If the negative floating-point value has only zeros after the decimal point, its
pre-decimal point position is returned.
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F333_FINT (see page 1324)
Variable Data type Function
s REAL source
d REAL destination
For Relay T/C Register Constant
s DWX DWY DWR DWL DSV DEV DDT DLD DFL dec. or hex.
d - DWY DWR DWL DSV DEV DDT DLD DFL -
No. IEC address Set If
R9007 %MX0.900.7 permanently
R9008 %MX0.900.8 for an instant
the value at input s is not a REAL
number.
R900B %MX0.900.11 to TRUE the result is 0.
R9009 %MX0.900.9 for an instant the result causes an overflow.
Description
The function rounds down the decimal part of the real number data and returns it at output d.
Data types
Operands
Error flags
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.