the position control on roboclaw 2X30A
Re: the position control on roboclaw 2X30A
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.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.
our motor's encoder value is 502 pulse per circle. However, the pulse showed in test program is nearly 4000000. I think that is the problem which lets the motor always rotate.
As a result, how can I set the pulse values?
thanks again
- Attachments
-
- encoder count2.PNG (8.49 KiB) Viewed 5644 times
-
- encoder count.PNG (17.92 KiB) Viewed 5644 times
-
- program to test the encorder.PNG (13.94 KiB) Viewed 5644 times
Re: the position control on roboclaw 2X30A
Meanwhile, this is my test program file.
- Basicmicro Support
- Posts: 1594
- Joined: Thu Feb 26, 2015 9:45 pm
Re: the position control on roboclaw 2X30A
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.
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.