![background image](http://html1.mh-extra.com/html/eaton/elc-pb/elc-pb_programming-manual_4017452483.webp)
E L C P r o g r a m m i n g M a n u a l
F o r m o r e i n f o r m a t i o n v i s i t :
w w w. e a t o n . c o m
M N 0 5 0 0 3 0 0 3 E
3 - 3 1 4
API Mnemonic
Operands
Function
129
D INT P
S, D
Floating Point to Integer
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K
H KnX
KnY
KnM KnS T
C
D
E
F
S
*
D
*
INT, INTP: 5 steps
DINT, DINTP: 9 steps
ELC ELCB
ELCM
PB PC/PA/PH
PV
PB PH/PA
32
16
P
32
16
P
32
16
P
32
16
P
32 16
P
Operands:
S
: Source address
D
: Destination address to store the result
Description:
1.
The binary floating point value of register
S
is converted to BIN integer and stored in register
D
.
2.
This instruction is the opposite of the API 49 (FLT) instruction.
3.
Flags: M1020 (Zero flag), M1021 (Borrow flag), M1022 (Carry flag)
If the absolute value of the result is larger than the maximum allowable floating point value, the
carry flag M1022= ON.
If the absolute value of the result is less than the minimum allowable floating point value, the
borrow flag M1021= ON.
If the result exceeds the integer or double integer range (an overflow occurs), the Carry flag
M1022= ON.
Program Example:
1.
When X0= ON, the binary floating point value of (D1, D0) will be converted to BIN integer and
the result is stored in (D10).
2.
When X1= ON, the binary floating point value of (D21, D20) will be converted to BIN integer
and the result is stored in (D31, D30).
INT
X0
D0
D10
DINT
X1
D20
D30
Содержание ELC-PB
Страница 1: ......
Страница 5: ...For more information visit www eaton com MN05003003E iv...
Страница 29: ...ELC Programming Manual For more information visit www eaton com MN05003003E 1 24 MEMO...
Страница 502: ...3 Instruction Set MN05003003E For more information visit www eaton com 3 333...
Страница 601: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 432...
Страница 625: ...ELC Programming Manual For more information visit www eaton com MN05003003E 3 456...