05-03-2017 04:18 AM
Hi I'm working on a project where I would like a motor to turn a specific amount. At the moment i have a pulse counter which indicates the amount of pulses the motor has received(n), and therefore the amount of rotation/distance. I would like to input a desired number of counts(k) and make the motor turn according to the input.
What is the best way to go about doing this?
Personally i would like to add a desired amount of counts(k) to the current value of the counter(n), then moving the motor until the counter reaches the desired value of n+k. However I'm having trouble implementing this method as when i move the motor, the counter value changes (n'), so the desired value also changes to n'+k (essentially always off by a constant(k)). I need a way of storing the value of the motor counter(n) so that i can compare n' to n+k
I hope this makes sense...
Thanks in advance
05-03-2017 04:36 AM
05-03-2017 04:56 AM - edited 05-03-2017 04:59 AM
Thanks for the reply!
Im pretty new to LabView and i dont fully understand the shift registers (at least for my context). I understand that it can iterate from a previous value, but im not sure how i would go about storing the desired value to compare later. Can the same value be used for all the iterations?
Any helpful links or examples related to the context will be appreciated thanks
05-03-2017 05:01 AM
@hhsskk wrote:
i dont fully understand the shift registers (at least for my context).