![Xinje XD Series User Manual Download Page 156](http://html.mh-extra.com/html/xinje/xd-series/xd-series_user-manual_887444156.webp)
155
2. Operands
Operands Function
Data Type
S
Soft element address need coding
16bits/32bits, BIN
D
Soft element address to save coding result
16bits/32bits, BIN
3. Suitable soft components
*Notes: D includes D, HD; TD includes TD, HTD; CD includes CD, HCD, HSCD, HSD;
DM includes DM, DHM; DS includes DS, DHS.
D10
GRY
D100
X0
S·
D·
0
0
0
0
0
1
0
0
1
0
1
0
0
0
1
1
0
0
0
0
0
1
1
0
1
1
1
1
0
0
1
0
D10
b15
b15
b0
b0
D100
Transform the binary value to gray code.
GRY has 32 bits mode DGRY, which can transform 32 bits gray code.
Range is 0~32,767 (16 bits instruction); 0~2,147,483,647 (32 bits instruction).
4-8-12
.
Gray code to binary [GBIN]
1. Summary
Transform the gray code to binary data.
Gray code to binary [GBIN]
16 bits
GBIN
32 bits
DGBIN
Execution
condition
Normally ON/OFF,
rising/falling edge
Suitable
Models
XD, XL
Hardware
requirement
-
Software
requirement
-
2. Operands
Operand
System
Constant Module
D
*
FD
TD
*
CD
*
DX
DY
DM
*
DS
*
K /H
ID
QD
S
●
●
●
●
●
●
●
●
●
D
●
●
●
●
●
●
Word
Description
Source (BIN) → target (GRY)
S·
Each bit of D10 will XOR with the bit on
its left side. As the related gray code, the
left bit will not change (the left bit is 0);
the transformation result is stored in
D100.