You need to refine that question a bit. Are you looking for a hardware solution or are you looking for someone to give you a free program? How fast is the shaft rotating? Do you want to calculate rpm, do you want an over speed alarm, or do you want loss of rotation detection?
The key to getting a good answer is asking a good question.
As Tom said, we need more information on what you are trying to do. However, if you just want to know if something is spinning you can use a prox to count the time between teeth on a sprocket if the teeth aren't moving too fast for your PLC input card to detect them. Basically, just have a timer that restarts every time the prox is made. When the timer times out, it should indicate that the shaft has stopped. If the shaft is moving with any speed, you will need to use a high speed counter, then its just a matter of pulling the frequency out of it.
What is best way to pick up shaft rotation. I know using a prox. switch, picking up the teeth. I need to know a good program using RSLogix 500.
Thanks
I am running a sugar mill I need to know went the shaft stops.
I just need someone to put me in right path in the RSlogix program , do I go with a HSC?
Whether or not you need to use a high speed counter module depends on the speed you have to deal with. If the prox signals change state faster than the PLC's scan time, you need the HSC.
For example, lets say you have a prox mounted so that it detects a 20 tooth gear mounted on the shaft. Lets also say that it is mounted so that the on and off times are exactly the same. At 60 RPM you get 20 on/off cycles of the prox, 50 milliseconds per cycle. That's 25 milliseconds on, 25 milliseconds off. You should be able to detect that with the prox wired to a standard input module.
At 600 RPM the duration of a cycle drops to 5 millseconds, 2.5 mS on/2,5 mS off. You'll need a HSC module for that.
Do the same analysis on the setup you plan to use to make your decision.
And if you do the math as Steve pointed out, and it is "close", be sure to account for switching latency of the proximity sensor and potential for variations too.
As for the program, I normally use a timer that is always running when I want to detect the failure, and then reset it on the rising and falling edge of the sensor. If your sensor on and off times are unequal, then use two separate timers.
If the timer(s) times out, then you have a failure.
If all you want to do is to detect whether the shaft has come to a dead stop or not, then there is no need for an HSC module.Use JSR to call a routine when the Stop button has been pressed.
Then in that routine use two timers - One for detecting how long the "Tooth" signal has been high and another for detecting how long the "Tooth" signal has been low. Set appropriate preset times (say 1 sec for the "Tooth" high one and 5 sec for the "Tooth" low one). If either of the timers time out, then you can quite safely say that the shaft has come to a stop.
Actually, also add a considerable delay between when the stop button has been pressed and when the Sub-routine gets called to make sure that the shaft has slowed down enough to bypass the need of an HSC.