Applied Instructions
SUB D10 D12 D14
X0
S1· S2· D·
The relationship of the flag’s action and vale’s positive/negative is shown below:
Function
(D10)—(D12)→(D14)
z point th soft unit’s content, subtract the soft unit’s content appointed by in the
format of algebra. The result will be stored in the soft unit appointed by (5-(-8)=13)
z The action of ach flag, the appointment method of 32 bits operation’s soft units are both
the same with the preceding ADD instruction.
z The importance is: in the preceding program, if X0 is ON, SUB operation will be
executed every scan cycle
ap e
.
S1·
S2·
D·
UB] [S
16 bits instruction:SUB 32 bits instruction:DSUB
Suitable Models:
XC1、XC3、XC5
Zero M8020
Borrow M8021
Flag
Carry M8022
Suitable Device
Word
Device
Bit
Device
D
FD
DM
DX
DY
DS
TD
CD
K/H
S1·
S2·
D·
X
Y
M
S
T
C
Dn.m
e
92