Debugging/GUI/Python My Dual Motor Torque Control via CAN - TI-Launchpad

Hello, we have a few Questions about the Project: Dual Motor Torque Control GitHub - open-dynamic-robot-initiative/mw_dual_motor_torque_ctrl

First of all something basic:

Can we let only one motor spin and be connected, or does it have to be two for this project?

Now to the other problems:

How is the workflow when we want to run this project without the CAN Interface? We understood that it should work similarly to the TI labs but something is not working. When we activate all the debugging settings (Silicon-Realtime, Auto-refresh), start the debugging and then set the enableSys and run_identify to 1, nothing happens. Even when we increase the iqRef_A or activate the enableAlignment.

Do we need to change the Debugging configurations? We tried to change the expressions from the release-folder, but the motor didn ’t spin. We also tried using the GUI online and offline, but couldn’t. In the Web-Version an error with the .js-File occured and in CCS nothing happened, pressing on the play button of the GUI. We connected the .out-File of the Release - Folder.

The Virtual Spring Mode doesn’t work, either. We tried enabling the spring mode in the code by setting gFlag_enableVirtualSpring[2] = {true, true} and while debugging in the Expressions View.

All we know is, that the wiring of the motor is correct, because another TI-Project let it spin.

We also want to try, to control the motor via CAN via a Nvidia Jetson Board. So we only wanted to use the CAN interface from the Nvidia Jetson Board via Transceiver to the Launchpad for testing that Project and some Python Code. For that we used that code https://github.com/open-dynamic-robot-initiative/blmc_drivers/files/4856546/BLMC_CAN_Interface-010720.pdf

In that code there is also a passage about other examples, but we have no access see image

Thanks for any help and kind Regards

Elli and Co.

Hi Elli and Co.,

Can we let only one motor spin and be connected, or does it have to be two for this project?

Yes, a single motor setup works.

How is the workflow when we want to run this project without the CAN Interface? We understood that it should work similarly to the TI labs but something is not working. When we activate all the debugging settings (Silicon-Realtime, Auto-refresh), start the debugging and then set the enableSys and run_identify to 1, nothing happens. Even when we increase the iqRef_A or activate the enableAlignment.

This is the code I use to test a motor module attached to a TI development board without CAN. Put these lines of code at the beginning of the main function:

    gMotorVars[HAL_MTR1].Flag_enableSys = true;  // enable the system in general
    gMotorVars[HAL_MTR1].Flag_Run_Identify = true;  // enable the motor
    gFlag_enableVirtualSpring[HAL_MTR1] = true;

This is only for motor 1.

Do we need to change the Debugging configurations?

What do you mean by “Debugging configuration”?

The Virtual Spring Mode doesn’t work, either. We tried enabling the spring mode in the code by setting gFlag_enableVirtualSpring[2] = {true, true} and while debugging in the Expressions View.

When you enable the virtual spring mode, did you also enable the motors and the Flag_Run_Identify flag (see above)? Just enabling the spring mode is not enough.

All we know is, that the wiring of the motor is correct, because another TI-Project let it spin.

Which ti-project did you try exactly?

In that code there is also a passage about other examples, but we have no access see image

I pinged the author and asked if we can move the code to the open-source github repo.

Best,
Julian

Forum-Eintrag: Antwort:
Hi Julian,

thanks for your fast reply. I am sorry for the late reply, this is a student project, which came to an end for this semester, there will be an official break till Octubre 2021 and now is exam period. We wanted to get the ball rolling for next semester.

We changed what you said and there was still no spinning. In that post Steering BLDC Motor with RT-Ubuntu PC - #20 by tlemarec you mentioned the wiring, is it possible that the motor spins in the TI-Labs 4, 5a, 5b and 6b, even if the wiring is wrong? Because when we tried the Dual Motor Torque Control, with the expressions changed as you said, the motor moved jumpy, how the other person commented in that post. But there was also the error “rude retry”, is that normal?

I have meant with “Debugging configuration”, the “Debug Configurations” → picture:

Do you use the “Default-Setup”?
I also did the procedure of TI to configure a Debug-Mode for GUI and used the .out-File of the Release-Folder, when asked. In the description they used an .out-File of a TI-Lab.

I forgot to mention our hardware setup for Debugging and GUI:
Windows 10 and Code Composer Studio V10.

Best Regards!
Elli & Co.

hi Elli & co,

you mentioned the wiring, is it possible that the motor spins in the TI-Labs 4, 5a, 5b and 6b, even if the wiring is wrong?

I don’t know what the labs 4-6b are doing exactly. Have you tried to switch the wiring on the motors (switch any two pairs) and see if the motor is rotating then?

Just to check: You have a full module setup with encoder and motor? You will need the encoder connected to spin the motor when using our code.

Also to check: You are using a TI development board and you have all the jumpers removed and the switches set as described here? https://github.com/open-dynamic-robot-initiative/open_robot_actuator_hardware/blob/master/electronics/ti_electronics/README.md#preparing-the-launchpad

Do you use the “Default-Setup”?

Yes, I use the default setup. That means, I pull the repo, import the project to Code Composer Studio and flash the software.

Best,
Julian

1 Like

For that we used that code https://github.com/open-dynamic-robot-initiative/blmc_drivers/files/4856546/BLMC_CAN_Interface-010720.pdf

The code is now available here:

https://github.com/open-dynamic-robot-initiative/python_blmc

Note that the code is quite old and I am not sure it will run out of the box.

Best,
Julian