Matlab-Simulink with 2 motors


I just tried to control two 5065 motors with the Matlab-Simulink model in external mode with a raspberry pi , you can find the model here. With my first motor on axis0, everything works great. When i plugged a second motor and coupled their axis derecty at each other and run the model with both motors, the velocity of motor0, for example, never reaches the input velocity. I use constant Blocks for it. First the velocity goes up directy to the setpoint but drops slowly to round about the half of the desired velocity. What is wrong threre? Thanks :slight_smile:

I am trying now something new now. Instead of one model for both motors I created two different Simulink models: one for Axis0 in velocity mode and the other for Axis1 in current mode. I want the motor on axis0 to drive in a certain velocity while the other motor on axis2 is the load with a certain current. The Axis0 model works great, I have no problems there. But the Axis1 model does not even react, when I set the current input. Both models are equally configurated except the input mode. Maybe there is something wrong with the Odrive-Simulink block.

Where did you get an ODrive Simulink block?

See my first post. I got it from here.