velocity
liftstoring
Posts: 2
hello i want to measer the·speed of a machine in meter per sec.we like to use a encoder with about 600 pulse·have somebody a idee to start with it.
greetings erik·
greetings erik·
Comments
So far as babysteps though....try reading in some pulses.· Just to see if you can do it!
Then procede from there!· is it 600pulses per revolution?· Do you have gearing attached?
You'll want to know the distance traveled per revolution....then it's just a matter of distance over time and you have velocity!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Look in the Pbasic help file.· There are a couple of examples in there with some related code and how to set up your circuit.
Ya know what....can that....you should probably use the Count command!
This will count the number of pulses on a given pin for a specified time.
Count <pin> <duration> <variable>
ECinput con 0
ECduration var byte
ECtime var word
ECduration = 10·· ' this is in multiples of 1ms...so 10 = 10mS
count ECinput, ECduration, ECtime
Now you need to know the distance traveled in one complete rotation of your encoder....then divide that by 600 then multiply that to the number of counts.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
http://members.rogers.com/steve.brady
http://www.geocities.com/paulsopenstage
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."