Delta AH500 Programming Manual page 259

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

Example 3:
The absolute value of the difference between two values:
Suppose X0.0 is ON.
1.
When the value in D0 is greater than that in D2, M0 is ON.
2.
When the value in D0 is equal to that in D2, M1 is ON.
3.
When the value in D0 is less than that in D2, M2 is ON.
4.
The value in D4 is a positive value.
Additional remark:
The representation of the value and its absolute value:
1.
Whether the data is a positive value or a negative value depends on the value of the highest bit
in the register. If the value of the highest in the register is 0, the data is a positive value. If it is 1,
the data is a negative value.
2.
The negative value can be converted into its absolute value by means of the instruction NEG.
(D0)=2
0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D0)=1
0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D0)=0
0 0 0 0 0 0 0 0 0 0 0 0 0 0
Ch a pt er 6 Ap p l i ed I ns t r uc t i ons
1
0
0
1
0
0
6 - 9 1

Advertisement

Table of Contents
loading

Table of Contents