Delta AH500 Programming Manual page 256

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
0208
D
GRY
Device X
Y
M
S
D
Symbol:
Explanation:
1.
The binary value in the device specified by S is converted into the Gray code, and the
conversion result is stored in the device specified by D.
2.
Only the instruction DGRY can use the 32-counter.
3.
The value in the operand S should be within the available range.
The value in the operand S used in the 16-bit instruction should be within the range between 0
and 32,767.
The value in the operand S used in the 32-bit instruction should be within the range between 0
and 2,147,483,647.
Example:
When X0.0 is ON, the constant 6513 is converted into the Gray code, and the conversion result is
stored in Y1.0~Y1.15.
K6513=H1971
GRAY 6513
Additional remark:
If the value in S is less than 0, the operation error occurs, the instruction is not executed, SM0 is ON,
and the error code in SR0 is 16#2003.
6 - 8 8
Operand
S, D
P
S
T
C
HC
D
Pulse instruction 16-bit instruction (5 steps) 32-bit instruction (5 steps)
AH500
S : Source device
D : Conversion result
b15
0 0 0 1 1
Y1.15
0 0 0
1
0
Converting the binary number into
the Gray code
L
SM SR
E
PR
AH500
Word/Double word
Word/Double word
0 0
1
0 1 1 1
0 0 0
Y1.0
1
0
1
1
1
0 0
1
0 0 1
Y1
Function
K
16# "$"
DF
AH500
b0
1

Advertisement

Table of Contents
loading

Table of Contents