Hello everyone/anyone,
I have been trying to measure distance using a quadrature encoder using quadcount on pin 18 of an MC50-110 controller (using the LG template). I am counting up until a target is reached then resetting the count and continuing the process. While bench testing it works quite well, however, I am spinning the encoder shaft by hand. My count reaches it's target, fires my output and resets the count.
The field test did not go as well, my results varied anywhere from an inch to an inch and a half
I logged everything with the service tool(loop time, count, pin 18 freq, target, and my output) and created a graph with excel after exporting to a .csv file. the first thing I noticed was my count was resetting before it reached it's target (sometimes 5 counts before and other times 7-10 counts) my loop time was consistent throughout (2ms) my output was firing consistently and the freq was a bit jagged (27-35).
I have spoken with Plus+1 helpdesk and have tried what they recommended but was hoping someone else has a better way of measuring distance. Maybe an alternative to a quad encoder? I just can't imagine that it could vary that much, my code is not complex and my loop time is exceptionally fast.
Any suggestions are welcome
Thanks