A/B Encoder. Single, double, quadruple evaluation ?

JesperMP

Lifetime Supporting Member + Moderator
Join Date
Feb 2003
Location
ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts
16,323
Hi all.

I just "won" the task of evaluating an encoder input.
There is the possibility to evaluate with either single, double, and quadruple precision. The quadruple evaluation simply takes all the phase transitions of both A and B channel into account.

What would be the reasons for chosing any of these modes ?
Why would one not go for the highest resolution, quadruple evaluation ?

Will be using an S7 IM151-8 CPU with an 1COUNT module for the task.


NB. Did search. Didnt get any results for "encoder quadruple" or "encoder evaluation". Got way too many results when I tried a simpler search term.

NB NB. "A/B" means the two channels of the encoder. It does not mean "Allen Bradley".
 
Last edited:
Quadrature will give you position as you change direction. I takes into account rising and falling edges and the order they occur. Look for terms like "Quadrature Encoder Evaluation" for more details.

A/B means the two channels you'll evaluate. Encoders also sometimes have a 3rd channel, marked Z or R, which is a single pulse once per revolution.

Good luck.
 
Hmmm, the PDF tells what I know already.

I am not talking about "quadrature", which is the term for sensing the 4 general directions of a shaft with 2 sensors.

About single-double-quadruple evaluation, the PDF just says that "most controllers have X2 or X4 logic". No explanation why one should chose one over the other.

Am I correct in that quadruple/X4 is the most accurate, and the most typical method used ?
For my application quadruple/X4 may be more accurate than I need, but on the other hand I prefer to follow the "industry standard".
 
Am I correct in that quadruple/X4 is the most accurate, and the most typical method used ?
Yes, we don't even offer a 1x and 2x option.

For my application quadruple/X4 may be more accurate than I need, but on the other hand I prefer to follow the "industry standard".
I tell my customers to get all the resolution they can as it makes calculating velocities and accelerations more accurate.

If you are simply using the encoder like a limit switch and not controlling anything it doesn't make much difference.
 
Thanks for your comments Peter.

The application is a measurement of the transport of an uninterrupted stream of parts coming out of a machine.
At a downstream position, a robot has to go in and pick up a part, based on the start-position and the transportation since start.
I need to sense both incremental and summed movement. Small errors will add up.
I will go for the X4 option if there arent any particular negatives to it.
 
I thought the X4 option counted the rising and trailing edge of each A&B pulse which would give 4x the ppr of the encoder for one rev. I use the quad X1 option to give direction and I don't worry about the extra counts for my applications (which are not motion). I don't know if there is an industry standard.
 
I thought the X4 option counted the rising and trailing edge of each A&B pulse which would give 4x the ppr of the encoder for one rev.
In a nutshell that is the advantage, as far as I understand it.
X1: Counting the rising edges of A.
X2: Counting the rising and falling edges of A.
X4: Counting the rising and falling edges of both A and B.

Still it raises the question why anyone would want to use the lower resolutions. The "speed" of both A and B pulses is the same in any case, so the only difference is in the resolution.
 
That's a good question "why not". I guess for me in most cases I found it made no difference . Kinda like a 12bit analog card vs a 15bit rarely does it matter.
Although we use a higher 10000 ppr encoder for our positioning applications.
Cheers!
 
That's a good question "why not". I guess for me in most cases I found it made no difference . Kinda like a 12bit analog card vs a 15bit rarely does it matter.
It does matter when trying to use the derivative gain when controlling temperature. Much of what people call noise is really just quantizing an analog signal into digital steps.

Although we use a higher 10000 ppr encoder for our positioning applications.
Cheers!
and I usually recommend using a much higher resolution encoder than that.
 
I would suspect it plays into register rollover. That's the only reason I can think of off the top of my head.

Also, the counter may have a pulse frequency limit that decreases if the X4 evaluation is selected. For example, the max input frequency of a 1746-HSCE2 is 250kHz in X4 evaluation, 500kHz in 2X evaluation and 1MHz in 1X evaluation. Your combination of speed and encoder resoultion may require a slower evaluation.

Keith
 
I would suspect it plays into register rollover.
I have to consider this, no matter the resolution. With the lower resolution, it will happen less frequent, but it does not stop from happening.

Also, the counter may have a pulse frequency limit that decreases if the X4 evaluation is selected. For example, the max input frequency of a 1746-HSCE2 is 250kHz in X4 evaluation, 500kHz in 2X evaluation and 1MHz in 1X evaluation. Your combination of speed and encoder resoultion may require a slower evaluation.
Are you sure about this ? The pulses come at the same speed, irrespective of what mode the counter module is set to. I am sure that X4 mode is more difficult to implement, but it is not my problem, I just chose the counter module. As I see it, if the counter module supports the higher resolution mode, one should just go for the highest resolution.
edit: You write that the HSCE2 module is limited this way, but the Siemens 1COUNT module is not. So I guess it varies with the vendor.
 
Last edited:
Originally posted by JesperMP:

As I see it, if the counter module supports the higher resolution mode, one should just go for the highest resolution.

In your case that would be true. From what I could tell in your description you have a continuous unidirectional application. So, as you said, rollover is inevitable and you have to deal with it. But, for the sake of argument, assume we are working on a bidirectional linear application. The encoder present in the application will end up producing 6,500,000,000 counts through the full travel in X4 mode. Assume I have more than enough resolution for my application. In this case I have three options:
Deal with the rollover
Change the encoder
Change to X2 decode mode
I personally would change the decode mode.

We all tend to ask questions and evaluate answers in the context of our own applications. But that was not the way your question was initially posed. It was posed very genericly. While I should have known the decode method doesn't affect your case (it is impossible to find anything on the Siemens website, BTW) the rollover restriction, or lack thereof, was an unknown.

Keith
 
We all tend to ask questions and evaluate answers in the context of our own applications. But that was not the way your question was initially posed. It was posed very genericly. While I should have known the decode method doesn't affect your case (it is impossible to find anything on the Siemens website, BTW) the rollover restriction, or lack thereof, was an unknown.
You are right of course.
 

Similar Topics

Hello, friends, I am trying to upgrade a system that uses an Onrom incremental encoder (E6B2-CWZ6C) connected to a Danfoss VFD (FC360), but now...
Replies
4
Views
272
Good Morning Gents. L35E, RSL5000 V20.18 I have a quick question for you regarding a single turn encoder I am using for a new project. I am...
Replies
6
Views
2,368
Hi, This is the first time I have setup a single ended encoder on a compact logix PLC. I wired in the pull up resistors and can see the A and B...
Replies
2
Views
2,837
I have an encoder that gives its position by 9bits gray code (512 steps) is there an easy way to make a software (in ladder?) to se if the encoder...
Replies
6
Views
2,609
I have an incremental encoder with line driver complementary outputs. I would like to wire it to the built-in high speed input on a Micrologix...
Replies
3
Views
5,444
Back
Top Bottom