Omron CJ - INSTRUCTIONS Reference Manual page 467

Table of Contents

Advertisement

Function
GRAY_BIN(478)
GRAY_BIN(478) converts one word of gray code to one word of binary data. S specifies the source
word containing the gray code and the binary data is output to D.
GRAY_BINL(479)
GRAY_BINL(479) converts two words of gray code to two words of binary data. S specifies the first of
the two words containing the gray code and the binary data is output to D and D+1.
Example Programming
GRAY_BIN
When CIO 0.00 turns ON in the following example, the gray code in D0 is converted to binary data and
stored in D10.
GRAY_BINL
When CIO 0.00 turns ON in the following example, the gray code in D0 and D1 is converted to binary
data and stored in D10 and D11.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Gray code
1
0
1
1
1
0
Binary code
0.00
GRAY_BIN
D0
D10
Result of executing
GRAY_BIN
D0
#1930
0.00
GRAY_BINL
D0
D10
Result of executing
GRAY_BINL
D0 and D1
#12150918
0
0
1
0
1
0
0
1
1
0
D10
#11DF
D10 and D11
#1C19F1EF
3. Instructions
3
429

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents