Calculating speed measurement from encoder pulses

kemppioy

Member
Join Date
Oct 2005
Location
Dallas
Posts
72
Hello,

Could someone tell me code for calculating encoder pulses to speed measurement with S7 PLC? I have an encoder that gives 1000 pulses per revolution. I am not so sure how to check the rollover and make the difference. Also, how can I check the encoder pulses and if they are not moving anymore, set an output that they have stopped?

Thanks

PK
 
Not famillar with the S7, however there should be a bit/flag in the counter register that will tell you if the counter value is =, <, or > as compaired to the last scan. If not you can record the value of the current scan and then compair it to the next scan.

Rollover: If the count is increasing and suddenly the current count is less then the previous count = rollover.

Speed: Presuming theres a 1 second clock bit, you compare the the values at 1 second intervals (subtract the 1st recorded value from the current value). D/1000 * 60 = rpm.
 
Salam (hello)
after i saw ur request i think u will find some importants information in this link
http://support.automation.siemens.com/CH/llisapi.dll?filteron=on&csquery0=314+ifm&aktprim=0&extranet=standard&func=cslib.csinfo&lang=fr&nodeid0=10805065&objaction=csbrowse&objid=10805065&siteid=cseus&subtype=133300
that's is a document of 314 IFM this kind of PLCs ( IFM means PLC with an integral functions as hight frequence counter and INPUTs of Process Alarm and for positioning that last one can help you to command a Motor by a pulse coder )
i hope that document help you

good luck
 
hello

Hello,

Thanks for your input. I am using a 318-2 processor. I was also wondering where I could find some kind of speed measurement SFC and others that are not in the standard library for future reference.

Thanks

PK
 
hi

If you are using FM350(6ES7 350-1AH03-0AE0,single channel) and have installed the CD which comes with it,you can use the all the blocks of project zEN23_FMx50-1 which can be found at "Sample Projects" of Simatic Manager.
Under Hardware configuration of the FM 350 select "A+B" for monitoring and select "RPM measurement" under operating modes.
 
Thanks

Hello,

Thanks for everyone's help with this issue. I finally figured out how to use the timed interrupt file for taking the actual pulses and subtracting the previous stored pulses and then converting it to the correct engineering units to show meters/min. I was not able to find any bits on the FM350 card that triggered when the counter value was higher, equal to or less than the previous count. I also did not find any selection for RPM measurement in the setup of the FM350 counter card. Regardless it works now so thanks for your help!

PK
 

Similar Topics

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,226
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,092
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,513
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,291
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...
Replies
3
Views
3,422
Back
Top Bottom