Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Using the Gray code enables prevention of instantaneously incorrect output values because only one
bit in the Gray code will change when the output value of the encoder is incremented or decremented
by 1. The following figure shows the difference in the output value from an encoder for the Gray code
and Binary code.
TRUE
4
2
FALSE
TRUE
3
2
FALSE
TRUE
2
2
FALSE
TRUE
2
1
FALSE
TRUE
2
0
FALSE
The value of two bits change. This means
that an incorrect value may be output
instantaneously until the values of all bits
are set.
ERC: Encoder Remainder Correction
The ERC variable is used to specify the Gray code range when the encoder resolution is not a power of
2. The range is specified so that there is only one bit difference between the maximum and minimum
encoder output values. For example, consider the use of an absolute encoder with a resolution of 360.
Nine bits are used for the Gray code. The range that can be expressed with nine bits is 0 to 511. In this
case, a range of 180 from the center of 0 to 511 is used for the Gray code, i.e., 76 to 435. Therefore, a
Gray code of 001101010 (76 decimal) is output for an output value of 0, and a Gray code of 101101010
(435 decimal) is output for an output value of 359. There is a difference in only one bit between these
values. In this case, the value of encoder remainder correction ERC is 76.
For an output value of 0
There is a difference
in only one bit.
For an output value of 359

NY-series Instructions Reference Manual (W560)

Difference When Output Value Changes from 1 to 2
Binary code
Decimal
i
h
0
0
0
76
0
0
255
0
1
256
1
1
435
1
0
511
1
0
Gray code
TRUE
e
FALSE
TRUE
d
FALSE
TRUE
c
FALSE
TRUE
b
FALSE
TRUE
a
FALSE
The value of only one bit changes, so
an incorrect value is not output.
Gray code
g
f
e
d
c
b
a
0
0
0
0
0
0
0
1
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
2 Instruction Descriptions
ERC
(encoder remainder correction)
76
180
Resolution: 360
180
76
2
2-419

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents