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

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

Advertisement

Table of Contents
loading

Table of Contents