Line Speed using encoder.

Mark Buskell

Member
Join Date
Sep 2003
Location
Florida
Posts
892
I have an encoder (1024 pulses) going into a Control Logix. I basically capture the pulses every second. Subtract the new pulses from the last recorded pulses. Divide by the circumference and mutiply by 60. That gives me the FPM for the line speed.

Another programmer uses the ramp method. They have a 1024 pulse encoder to. They are basically scaling 4-20 (3277 to 16383) to 0 to 160 FPM.

I am using an HSC card and they are using an analog input module.

I have noticed at lower speeds my display will show the line speed at 1 FPM faster than his. For example 45 vrs 46. At higher speeds the displays match. I suspect that they have a zero offset error that is causing this, but then again it could be me and how I do it.

The difference in the displays is no big deal, the line works perfectly.

My question is how do others compute the line speed and do you
have any opionions about how they do it versus my method.
 
I suspect rounding differences. Try multiplying by 60 THEN dividing by the circumference. Another is, after subtracting, do all math in floating point. Make sure to multiply by 60.0 not just 60. These may provide some change.
 
How do you do it?

Do you use the CST to get the Delta T?
Are you in a high priority task?

Can you post the relative portion of your CLX File (even PDF it)?
 
Divide by circumference?

The person using the analog tach has an advantage at low speeds because he has resolutions as fine as almost 0.01 fpm. What does one count per second represent in fpm with your encoder?

The analog device has much higher resolution at low speeds. Does the display show hundreths or tenths? There could be only a small difference between the encoder and tach readings where one reads 46 fpm and the other reads 45.999 fpm but it shows as 45.

A lot of control systems use a tach feed back to get more accurate velocities. The tach feed back was used for the inner velocity loop and the encoder feedback was used for the position loop. The analog tach will always be more precise when scaled correctly, especially at low speeds.

I have a customer that encoders where we get 288000 counts per revolution. Now that is hard to beat.

As for calculating lines speeds I do it like you except my scale factor would be circumference/counts per revolution so I would multiply by the circumference. I nomally use a low pass filter. Now I use a four pole Butterworth filter. I would look at the filters available on the Contrologix.
 
Thanks for your replies. I will the methods about dividing and using a floating point of 60.0. We do display it in a whole number only, so it might be as Peter suggested and just a rounding thing.
 
Mark, if you are using the Logix platform, see the attached file...

This should give you a very good indication of speed/frequency (if you aren't absolutely crawling, that is) from an HSC.

I wrote this a while ago, because I was annoyed at the 'Jitter' I was seeing in my simple rate logic. This version takes advantage of the fact that the Logix HSC supplies a highly accurate timestamp of every sample, so it almost completely eliminates the jitter in the rate calculation.
 
Hi Mark, just reading your post and maybe im missing something obvious but why is the need to subtract new pulses from the last recorded result?
 
Hi Mark, just reading your post and maybe im missing something obvious but why is the need to subtract new pulses from the last recorded result?

To get the number of pulses during the sample period.
The counter isn't reset every sample period, that takes too much time, and can miss counts. By letting the counter free-run, and just taking the delta between this scan and last scan (or cycle time), you don't lose any counts.
 
Thanks for the explanation mark, it make sense. I have similar application where I want to display line speed in meters/min to a hmi. I have a 5ppr encoder attached to measuring wheel, which is fixed to a driven roller. Can I apply the same calculation to get meter/min.
 

Similar Topics

Any suggestions to this are appreciated. I am thinking about setting up a PID loop (I'm new to PID and PLC stuff, take it easy on me if you will)...
Replies
25
Views
9,096
I've got the perfect project to serve as my first servo programming project. I'm in the process of gathering information and talking through my...
Replies
3
Views
1,520
Hello Board, I've been developing a footage counter system for a continuous strip product... The product is extruded and pulled for cooling over...
Replies
37
Views
14,664
I need to display the line speed of a filler on the HMI. I guess at one point the PC based HMI was able to display line speed in Bottles Per...
Replies
3
Views
1,672
I'm working on a design for a cutting machine. This system gets synchronized with the production line speed, Do the cutting and come back to the...
Replies
4
Views
2,519
Back
Top Bottom