Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 458

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
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.
Sample program
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
421

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents