Delta AS Series Programming Manual page 356

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

5.
32-bit binary division:
D occupies two consecutive devices. The quotient is stored in (D+1, D).
Example
When X0.0 is ON, the instruction divides the dividend in D0 by the divisor in D10, and stores the quotient D20.
Whether the quotient is a positive value or a negative value depends on the leftmost bit in D20.
Additional remarks
1.
If the device is not available, the instruction is not executed, SM0 will be ON, and the error code stored in SR0 is
16#2003.
2.
If the divisor is 0, the instruction is not executed, SM0 will be ON, and the error code stored in SR0 is 16#2012.
3.
If you want to store the remainder, use the "/" instruction (Dividing binary values). Refer to the explanation for the "/"
instruction (API 0103) for more information.
S
+1
S
S
+1
1
1
2
b15.....b0 b15.....b0
b15.....b0 b15.....b0
/
Ch a pt er 6 A pp l i e d I n s tr uc t io ns
Quotient
S
D+1
D
2
b15.....b0 b15.....b0
=
6_
6 - 7 7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents