Page 2 of 2

Re: the position control on roboclaw 2X30A

Posted: Wed Nov 20, 2019 3:37 pm
by gc967
Basicmicro Support wrote: Wed Nov 20, 2019 8:49 am Only the Position setting needed to be changed. Changing the other types may have broken something else. I recommend you download the labview driver again and modify JUST the Position value type. U32 or I32 is fine.
thanks for your advice. Yesterday, I tied to test the encoder count of our motor and I found that the count value from the motor controller was much larger than that set in our motor encoder.

our motor's encoder value is 502 pulse per circle. However, the pulse showed in test program is nearly 4000000.Image I think that is the problem which lets the motor always rotate.

As a result, how can I set the pulse values?

thanks again

Re: the position control on roboclaw 2X30A

Posted: Wed Nov 20, 2019 3:38 pm
by gc967
Meanwhile, this is my test program file.
Untitled 7.zip
(10 KiB) Downloaded 372 times

Re: the position control on roboclaw 2X30A

Posted: Thu Nov 21, 2019 10:07 am
by Basicmicro Support
You need to look at your actual encoder pulses. They must be extremely noisy to produce such a high pulse count. Use a scope to look at the encoder pulse signal while running the motor at a known power(use PWM Settings to run the motor). The encoder pulses should be square waves with no unexpected spikes.

Or your math is off. For example if you have a 100 line encoder, that is 400 counts per rotation and if you have a 50:1 gear ratio that is 50 * 400 = 20000 counts per rotation of the output shaft.