EasyManua.ls Logo

Delta AH500 - Page 258

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AH500 Programming Manual
6-90
API
Instruction code Operand Function
0210 D NEG P
D
Twos complement
Device
X Y M S T C HC D L SM SR E PR K 16#
“$” DF
D
Pulse instruction 16-bit instruction (3 steps)
32-bit instruction (3 steps)
AH500 AH500 AH500
Symbol:
D
Device in which the twos
complement is stored
Word/Double word
Explanation:
1. The instruction is used to convert the negative binary value into the absolute value.
2. Only the instruction DNEG can use the 32-bit counter.
3. Generally, the pulse instructions NEGP and DNEGP are used.
Example 1:
When X0.0 is switched from OFF to ON, all bits in D0 are inverted (0 becomes 1, and 1 becomes 0),
and 1 is added to the result. The final value is stored in the original register D10.
Example 2:
The absolute value of the negative value:
1. When the value of the 15
th
bit in D0 is 1, M0 is ON. (The value in D0 is a negative value.)
2. When M0 is ON, the instruction NEG is used to obtain the twos complement of the negative
value in D0. (The corresponding positive value is obtained.)

Table of Contents

Other manuals for Delta AH500

Related product manuals