122
SUB D10 D12 D14
X0
S1· S2· D·
S1 appoint the soft unit’s content, subtract the soft unit’s content appointed by S2
algebraically. The result will be stored in the soft unit appointed by D.
The action of each flag, the setting method of 32/64 bits operation’s soft units are both the
same with the preceding ADD instruction.
The importance is: in the preceding program, if X0 is ON, SUB operation will be executed
every scan cycle.
Refer to chapter 4-6-1 for flag action and functions.
<Two operands>
D appoint the soft unit’s content, subtract the soft unit’s content appointed by S1
algebraically. The result will be stored in the soft unit appointed by D.
The action of each flag, the setting method of 32/64 bits operation’s soft units are both the
same with the preceding ADD instruction.
The importance is: in the preceding program, if X0 is ON, SUB operation will be executed
every scan cycle. Rising or falling pulse edge is recommended to activate the instruction.
Refer to chapter 4-6-1 for flag action and functions.The relationship of the flag’s action and
vale’s positive/negative is shown below:
Note: The addresses of the operands in the QSUB instruction must be even.
4-6-3 Multiplication [MUL, DMUL, QMUL]
1)Summary
Multiply two numbers, store the result
Multiplication [MUL, DMUL, QMUL]
tudonghoatoancau.com