OT: Extra Encoder Counts

kamenges

Member
Join Date
Nov 2002
Location
Green Bay, WI
Posts
4,332
One of the guys I work with is on an install. He is attempting to read a signal off a Red Lion RPGC 100 ppr pulse generator with an AB 1756-HSC module. He is getting more counts than he expects to get. This pulse generator has a 1 foot circumference wheel and the machine is running up to 750 FPM.

At this point we believe the issue is 'noise' on the pulse generator signal. We have an o-scope here that he is taking with him tomorrow to scope the input. However, if it is noise we are a little stuck. The 1756-HSC has a filter you can use. However, it has a fixed cut-off frequency of 70 Hz. That's too slow for us. We are in the area of 1250 pulses per second.

I'm trying to get a jump on solutions if it does turn out to be noise. Does anyone know of a fre-standing signal conditioner designed specifically for cleaning up encoder noise? BEI makes something that performs an internal quadrature decode that cleans up channel jitter. I don't have a quadrature encoder, however. That is my fall-back at this point. I'm thinking about a high pole count low pass Bessel filter but that may introduce as many issues as it solves.

Also, can anyone tell me why Rockwell would put a frequency selectable low pass filter in the 1794-VHSC but not put the same thing in the 1756-HSC? One would think the 1756- HSC, being part of the flagship platform, would have all the bells and whistles.

Thanks,
Keith
 
I doubt I could say much that you have not thought about but here goes anyway.

Is your cable impedance matched and low capacitance?
Is it possible it is in the wrong mode?
Is the phase generator got a signal length duration of 500ns or longer?
Is the ground connected, try disconnecting it.
Have you doublechecked to verify the wheel diameter is accurate?

I am sure that you have done all this but I stated it just to be sure.

I looked at the manual but could not find anything informative on the filter except Filter constant - 30ms, which I do not understand yet.
 
Uhhh, what's the problem?

100PPR * 750 RPM = 75000 Pulses Per Minute / 60 = 1250 Pulses Per Second (Hz)

(which is in the in general, what you are reading)

Or, are you getting more than 1250 Hz?

I'm confused.
 
Last edited:
If, at 750 FPM, you are getting more than 1250 Hz, how much more? Just a rough idea with the frequency counter function on a Fluke DMM or equivilant would be a help here.
 
Originally posted by rdrast:

If, at 750 FPM, you are getting more than 1250 Hz, how much more?

It's pretty variable. To get any kind of usable number they have a long time constant 1st order filter on the values coming back from the counter card. That number is running about 10% higher than expected.


Originally posted by rdrast:

Just a rough idea with the frequency counter function on a Fluke DMM or equivilant would be a help here.

Granted. This guy went in kind of unprepared. He didn't expect this kind of problem. He is local so he can get stuff from here, which is why I said:

We have an o-scope here that he is taking with him tomorrow to scope the input.

and:

I'm trying to get a jump on solutions if it does turn out to be noise.

I was hoping someone knew a source for a filter off the top of their head.

Ron, your points in order:

Cable - no, we didn't use any particularly special cable. Just good, old fashioned Belden 8770 3-conductor shileded cable. This is a good point, though, since he didn't specifically say he gets counts when the encoder isn't turning.

Wrong Mode - We checked that one a few times. He is operating in counter mode and doing his own distance difference between scans of a periodic task.

Signal Duration - The pulse generator will produce a roughly 50% duty cycle signal. So at max speed I woould expect to get about a 400 microsecond on-time. We will know for sure tomorrow.

Ground - We haven't played with that much. The card and pulse generator are tied to a common power supply but that power supply is used for other things too.

Wheel diameter - He checked that a couple of times just to make sure he measured right. It is what we expect.

Thanks for the ideas.

Keith
 
Try putting your own pull up resistor at the card. Use minimum value for sensor (40ma. ?) max ma. draw.

How wlong is the cable ?

Be sure to check cards DIP switch settings.

It may be his plc program, not reading the count correctly / math / interval changing.
 
Ground - We haven't played with that much. The card and pulse generator are tied to a common power supply but that power supply is used for other things too.

Id check what else that power supply is used for or just connect a seperate clean supply and test again, I got caught by this a while back.
 
kamenges,
Mr Obvious wants to know if the 1756-HSC module is setup, expecting the terminal to be pulled low instead of the normal pushed high? These RedLion units got me the the last time I messed around with them. Ideally a signal this fast should be push/pull. Like Dave2 said you may need to push it high at the module yourself with a 5K resistor. The 1756-HSC usermanual shows a 4700 ohm resistor at the encoder end of the cable though. Tied into Z- / z+
MY 0.02 cents
RPGC_100.JPG

1756_HSC.JPG




BD
 
Is this a line driver (Differential) encoder? or single ended? What is the power supply voltage?

AND... on ControlLogix, if I'm using a counter to determine rate, I put the rate-calculator in a periodic task (generally 100ms or so), and this is important... I use the delta time from the HSC Module itself to determine the actual period; I don't rely on the 100ms task.

I've found by doing this, I completely eliminate jitters. I'd attach some sample code, but I don't seem to have any on this computer. If you'd like, I'll post it tomorrow.
 
Thanks for the replies.


This encoder is a single channel open collector device. The power supply is 24 VDC. I am not wiring it the way the manual shows. I am using the A0 channel only. I have A0(12-24V) [terminal 14] connected to 24VDC. I have the encoder 'output' connected to A0(RET) [terminal 18]. The encoder common is the same common as the 24 VDC supplying terminal 14.

I'm not aware of any DIP switches on the 17856-HSC. Are there any?

I was told by the guy on site later today that he started up another piece of equipment in the line and the encoder frequency returned by the HSC was even more variable than before. This definitely appears to be a noise issue. The encoder is probably 100 feet as the crow flies from the counter card. Figure 150 feet of cable.

We'll see what the scope info tells us tomorrow but I'm pretty sure of what we will see. I will have him try to get an isolated supply for the encoder and counter card as a start. That's pretty easy for us to do. I will also have him try a more typical wiring method with an external pull-up resistor and the encoder signal line going to the A0(12-24) terminal. I don't see how that will provide any more positive drive that I have now, though. I will also have hime double-check shield connections and find out how painful it will be to run another cable a little more suited to encoder signals.

rdrast, I agree that your suggestion is a better approach to get the correct time delta on the position change. I will probably have our guy make thins change after we get past the encoder noise problems.

Thanks again,
Keith
 
There is one other thing you may want to check too. In the paper industry we used this type setup all the time and there can be problems from "bounce" of the wheel i.e. if the wheel in on material like paper or cloth it may bounce and inertia ( I think that is how to describe it) may allow the wheel to spin slightly faster then normal. We had to use mounting brackets that had spring tension to maintain constant contact with the paper.
 
kamenges said:
This encoder is a single channel open collector device.
You should always specify encoders with differential outputs and use encoder cards with differential inputs. 150' of cable? Oh my. You should also be chasing down a differential encoder as well as a scope. No scope? Oops.

It is easy to get noise on the wires and since they are not differential the noise can easily cause extra counts. 150 ft antenna's pick up a lot of noise.

However, it is hard to believe that it is noise because a good encoder card can detect the illegal change of state that noise will generate. Noise will random generate any of the 4 states. The encoder card should detect changes between a'b and ab' or ab and a'b' and signal an error if the problem is truly noise. Can it? Maybe not.

Does the counter detect counts when the shaft is stopped?
 
Originally posted by Peter Nachtwey:

However, it is hard to believe that it is noise because a good encoder card can detect the illegal change of state that noise will generate.

Oh, if only it could. Alas, the encoder is a single channel encoder. There is no B channel to compare to. So, yes, if you were looking for a study in what NOT to do with encoder interfaces, here it is. We are connecting a single channel open collector encoder to an encoder card capable of relatively high speed detection (1 MHz) through 150 feet of general purpose shielded cable. Oh, and this encoder card? All it has for a filter selection is a mechanical switch debounce filter. 30 msec time constant or nothing. I agree. We deserve everything we are getting.

I think we will ultimately need to go to a more appropriate encoder. We have a couple laying around here we can use.

Keith
 
Note: I'm basing everything on bikerdude's schematic posted above.
A 4700 ohm resistor only gives 1mA. That's way too low for 150 feet of cable. Try 1K for 5mA, or 470 for 10mA. The source supply is 5 volts. The threshold for the HSC input is probably 2.2 to 2.7 volts. You'll probably see that your signal is 3 volts or less.
The resistance of the wire is going to be a problem with a pullup at the HSC end. If you try to go too high on current, the pullup voltage will get dropped across the line. 1K might be better than 470.
The best way is to do the pullup at the encoder, but that requires another wire. You could add a dedicated (isolated) 5 volt supply at the encoder, and eliminate the pullup connection inside the HSC card.
Increasing current also increases noise immunity.

Lead resistance is the problem. I'm not convinced that a quadrature encoder is the solution. Maybe try a 2.2K resistor as well. Get your pulses up to 4 volts or higher (at the HSC), and I'm sure your problems will go away.
 
Last edited:

Similar Topics

Hello, I have a question on an OCR application I am doing. I am reading in 16 characters that come from a camera into the plc in its input words...
Replies
4
Views
1,274
Hi, I have been given the task of creating a system for which i will need 3 Rs232 comms ports and 1 ethernet port. A few years ago i completed a...
Replies
3
Views
1,745
Hi, I've got a 1769 controller which is talking to various different components on a local network, I want this controller to talk to another AB...
Replies
7
Views
2,819
hi, i try to send barcode to controllogix (it working with freescan with time out but not serial interface control) i can send command on the clv...
Replies
0
Views
1,343
Hello everyone, We have can counting sensors on all our lines, i am sure all of us know why. So, one of our lines has started counting more cans...
Replies
12
Views
3,254
Back
Top Bottom