3 . I n s t r u c t i o n S e t
M N 0 5 0 0 3 0 0 3 E F or m o r e i nf o r m a t i o n v i s i t : www. e a t o n. c o m
3-421
API Mnemonic
Operands
Function
173
D SUBR P
S
1
, S
2
, D
Floating Point Number Subtraction
Bit Devices
Word devices
Program Steps
Type
OP
X Y M S K H KnX KnY KnM KnS T
C D E
F
S
1
*
S
2
*
D
*
DSUBR: 13 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
1
:
Floating point number
minuend
S
2
:
Floating point number subtrahend
D:
Result
Description:
1. S
1
and S
2
are Floating point numbers
2. ELC-PB, ELCB-PB series models do not support index register E and F.
3. The DSUBR operands, S
1
and S
2
can each be 2 consecutive D-register addresses or actual
floating point values (e.g. F1.2).
4. When
S
1
and S
2
use D registers, the function will be the same as
API
120 ESUB.
5. If the absolute value of the operation result
> the
maximum floating point numbers, the carry flag
M1022=On.
6. If the absolute value of operation result < the minimum floating point numbers, the borrow flag
M1021=On.
7. If the operation result equals 0, the zero flag M1020=On.
Program example 1:
When X0 = ON, subtract floating point value F1.200E+0 (enter F1.2, scientific notation F1.200E+0
will be displayed in the instruction.) with F2.200E+0 and store the result F-1.000E+0 in register D10
and D11.
X0
DSUBR F1.200E+0
D10
F2.200E+0
Program example 2:
When X0=On, store the result of floating point number value (D1, D0)
-
(D3, D2) into (D11, D10).
X0
DSUBR
D0
D2
D10
Содержание 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...