Hey guys, I need some help, as I am VERY confused.
I am merely trying to track bottles on a conveyor line using a Bit Shift function, with a photoeye setting the value of the passed bit, and an encoder pulse triggering the actual shifting of the data. I am relatively new to PLCs and haven't really used encoders before.
My initial thought was that if the encoder pulsed multiple times during the course of 1 logic scan, I would not be able to track every pulse. So I selected hardware such that encoder pulse time>logic scan time. I bought a 60 ppr encoder, which gives me ~0.25" resolution in regard to the conveyor line. With the speed our conveyor runs at, I should get a pulse every .0172 seconds. I changed the response time in my MicroLogix 1200 to 25 microseconds to better catch pulses. I believe my logic scan times now sit around 0.0005 seconds.
But I have a problem: my pulse counts are too low at high speeds. Let's say that at low speeds I measure 2 feet to be equal to 96 encoder pulses; if I then count pulses at full operating speed, I may only count 75 encoder pulses for that same 2 feet.
I am assuming I am missing encoder pulses out the wazoo. Is my entire approach to this problem wrong?
I have attached a trend from the PLC showing the distribution of encoder pulses AT A CONSTANT SPEED, as well as my simple logic to "catch" pulses.
Thanks
I am merely trying to track bottles on a conveyor line using a Bit Shift function, with a photoeye setting the value of the passed bit, and an encoder pulse triggering the actual shifting of the data. I am relatively new to PLCs and haven't really used encoders before.
My initial thought was that if the encoder pulsed multiple times during the course of 1 logic scan, I would not be able to track every pulse. So I selected hardware such that encoder pulse time>logic scan time. I bought a 60 ppr encoder, which gives me ~0.25" resolution in regard to the conveyor line. With the speed our conveyor runs at, I should get a pulse every .0172 seconds. I changed the response time in my MicroLogix 1200 to 25 microseconds to better catch pulses. I believe my logic scan times now sit around 0.0005 seconds.
But I have a problem: my pulse counts are too low at high speeds. Let's say that at low speeds I measure 2 feet to be equal to 96 encoder pulses; if I then count pulses at full operating speed, I may only count 75 encoder pulses for that same 2 feet.
I am assuming I am missing encoder pulses out the wazoo. Is my entire approach to this problem wrong?
I have attached a trend from the PLC showing the distribution of encoder pulses AT A CONSTANT SPEED, as well as my simple logic to "catch" pulses.
Thanks
Last edited: