Greetings everyone.
I have an university project which i have to complete that is to implement a PID speed controll of an induction motor with a PLC. The PLC in question is a Siemens S7-200 and im programming in Ladder.
I am stuck with this step for some time,that is to measure the real motor RPM from the encoder. The encoder is an icremental one that outputs 1024 pulses by shaft revolution. To catch this pulses im using a high speed counter(HSC).
Im trying to get there using a 2 timer cascade that will toggle ON and OFF a variable for some desired time. The idea is: when this variable is OFF the HSC is OFF as its current value is set to 0; when the control variable is set to ON the HSC will count until the control variable is OFF again. At this time the HSC current value(CV) should be stored and the HSC is put in stop.
Now, dividing stored CV by the time the HSC has counted, we get the number of pulses per second(PPS); PPS*60=PPM(pulses per minute); RPM=PPM/1024. My difficulty is not in the math implementation, its in the HSC controll sequence.
I have done some routines for this but im having troubble getting correct measurements.
I would like to ask if there is a standard way (or an alternate way)to get RPMs from incremental encoders. I will be glad if someone can help me.
Best regards,
casT-.
I have an university project which i have to complete that is to implement a PID speed controll of an induction motor with a PLC. The PLC in question is a Siemens S7-200 and im programming in Ladder.
I am stuck with this step for some time,that is to measure the real motor RPM from the encoder. The encoder is an icremental one that outputs 1024 pulses by shaft revolution. To catch this pulses im using a high speed counter(HSC).
Im trying to get there using a 2 timer cascade that will toggle ON and OFF a variable for some desired time. The idea is: when this variable is OFF the HSC is OFF as its current value is set to 0; when the control variable is set to ON the HSC will count until the control variable is OFF again. At this time the HSC current value(CV) should be stored and the HSC is put in stop.
Now, dividing stored CV by the time the HSC has counted, we get the number of pulses per second(PPS); PPS*60=PPM(pulses per minute); RPM=PPM/1024. My difficulty is not in the math implementation, its in the HSC controll sequence.
I have done some routines for this but im having troubble getting correct measurements.
I would like to ask if there is a standard way (or an alternate way)to get RPMs from incremental encoders. I will be glad if someone can help me.
Best regards,
casT-.