Panasonic FP Series Programming Manual page 690

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F328_DINT
The function converts a floating point data at input s in the range -2147483000 to 214783000 into
Description
integer data (including +/- sign). The result of the function is returned at output d.
The converted integer value at output d is always less than or equal to the floating point value at
input s:
When there is a positive floating point value at the input, a positive pre-decimal
value is returned at the output.
When there is a negative floating point value at the input, the next smallest
pre-decimal value is returned at the output.
If the floating point value has only zeros after the decimal point, its pre-decimal
point value 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.
Availability of F328_DINT (see page 1324)
PLC types
Data types
Variable
Data type
REAL
s
DINT, DWORD
d
Operands
For
DWX DWY DWR
s
d
Error flags
No.
IEC address
%MX0.900.7
R9007
%MX0.900.8
R9008
%MX0.900.11
R900B
In this example, the same POU header is used for all programming languages. For an example
Example
using IL (instruction list), please refer to the online help.
Floating point data -> 32-bit integer data (the largest integer not
exceeding the floating point data)
Function
source REAL number data (2 words)
destination for storing converted data
Relay
DWL
DSV
-
DWY DWR
DWL
DSV
Set
permanently
for an instant
for an instant
T/C
Register
DEV
DDT
DLD
DFL
DEV
DDT
DLD
DFL
If
 the value at input s is not a REAL
number, or the converted result exceeds
the 32-bit area of output d.
 the result is 0.
Conversion instructions
Constant
dec. or hex.
-
689

Advertisement

Table of Contents
loading

Table of Contents