Omron CJ - INSTRUCTIONS Reference Manual page 469

Table of Contents

Advertisement

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

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Table of Contents

Save PDF