Hi,
I am trying to use one motor’s velocity to control another motor’s using INPUT_MODE_MIRROR .But the speed of two motors were same and axis1 is not rotating at the pre-set -9 turn/s.So what happened?
I gave command like this:
odrv0.axis0.controller.config.control_mode = CONTROL_MODE_VELOCITY_CONTROL
odrv0.axis0.controller.config.input_mode = INPUT_MODE_PASSTHROUGH
odrv0.axis1.controller.config.axis_to_mirror = 0
odrv0.axis1.controller.config.mirror_ratio = -0.9
odrv0.axis1.controller.config.input_mode = INPUT_MODE_MIRROR
odrv0.axis0.controller.input_vel = 10
Yes.No matter what the velocity set differential is, both will remain at the same speed. Since there is an effect of the two motor mechanics in my design, does this mean that it is the PID parameter settings that need to be adjusted😭?
Can you confirm axis1 is in velocity control mode? I see mirror_ratio is -0.9, and the vel_setpoint = -9 turns/sec, but it’s actually rotating at -10. That means either position control is overriding the tracking, or your mechanism is locking these two together.
Yes,I have set axis0 and axis1 both in velocity mode since then.And axis 0’s velocity is 10, axis1 's velocity is -9.You can see the velocity estimate plot,they rotate in the opposite direction at the same spped which is between 9 and 10.And at last thet rotate in 9.
While the phase current plot shows that their current both increase until axis0 get its current lim.
The mechanism is the output of each motor is connected to a planetary reducer, and the ring gears mesh with each other,so one motor controls a reducer’s sun gear and one motor controls a reducer’s ring gear.The differential velocity can rotate the planetary gears.The simulation of this mechanism works fine.
So I dont know why these two motors can not rotate at their set speed.Is the pid parameter settings wrong?