Calculating speed per sec ( a rolling count)

mutabi

Member
Join Date
May 2009
Location
OH
Posts
90
Ok guys, I hope I make myself clear when asking this. I am looking to calculate the speed that a product if moving through a machine. And put that speed on a panelview.

We are using an encoder to measure the distance. So I could start a timer, and at time 1 sec copy the encoder count somewhere, and do the same at time 5 seconds and calculate the speed by using speed = distance/time.

And I believe that would work, except I was wondering if it would be possible to have a rolling number. So for example when the timer reaches 6 seconds, I use the encoder count from time 2 seconds and 6 seconds, to calculate my speed, and keep doing it that way so the panelview keeps being updated every second.

How would I go about doing that? or is there an easier way that I havent thought of?

I will be using an AB PLC 5. Thanks guys
 
Are you using a high speed counter module, like the 1771-VHSC ?

You are on the right track calculating velocity by dividing the change is position by the change in time.

A 16-bit controller like the PLC-5 can present some math challenges when dealing with large count values.
 
Yes I am using a high speed counter module. I have calculated that there are 132 encoder counts per inch. So I can get the distance. In terms of numbers, the highest encoder count I would see, is approx 30000 encoder counts, if thats any help.
 
One simple method might be to jumper the encoder inputs so that they feed two different counter channels on the 1771-VHSC (it has four channels). Then you could run the other channel in Rate mode and it would report the frequency of the input back to the PLC-5, while the normal function of the 1771-VHSC to measure position continues on the other channel.
 

Similar Topics

Seems like this should be a simple thing but I’m struggling with it. The basis is that I am trying to detect if a linear assembly is stopped or...
Replies
6
Views
3,084
Unitronics Samba plc I am working on a system that uses the High Speed input on a plc to calculate the rpm of a shaft. It is having issues with...
Replies
20
Views
5,486
I want to measure the period of a 60Hz signal with .001 Hz accuracy resolution. The Schneider M430 high speed counter BMX EHC 0200 has a...
Replies
15
Views
8,222
I've been trying to measure shaft speed with a 120 tooth speed wheel, a bi-directional powered pickup, and a 1756-HSC/B counter card. I am...
Replies
4
Views
3,288
Dear Friends; I want to calculate the speed of sheet produced by corrugator machine. For this purpose, I want to make 6 holes in a measuring...
Replies
5
Views
4,403
Back
Top Bottom