For me, all this points to encoder alignment problems. In speed mode, the speed controller generates a command for the torque controller. In torque mode, you do this yourself. Why should that make a difference to the generated torque... I guess that the encoder alignment is wrong, and randomly you get little torque, or none. As if it is 90 degrees out of phase.
You're right, it should not make any difference.
But in torque mode I can align the encoder and the motor rotor rotates just like in the video I showed you.
[EDIT]If I rotate the shaft with my hand, it starts to rotate ...
p.s. I'm sure that you are very close to reaching the goal
Thanks for your help !!
p.p.s. if you manage today to bring full torque to the shaft, and continue working with a lab supply, I strongly suggest that you add overvoltage protection to the DC bus, like a beefy 28V zener diode. Otherwise, you'll likely blow the circuit, and possibly your lab supply, when first attempting a deceleration from full rpm to zero with full torque. The regenerated electrical energy will pump up your DC bus capacitors.
The EVB I am using now does not support more than 2.8A. But in the future, when I move to a circuit that has more power, I'll take that into account. Thank you.
p.p.p.s: another question. How do you plan to control the motor in your system? Do you want to keep the entire ST software as it is and send commands via RS232 like STMCWB is doing, or do you plan to implement your own control software? If the second, then I can compile you an extract of how I do it, and the library primitives and structures you need for that.
In a future design I want to create my communication protocol and leave the original as well.
I am going to use a selection jumper. If the jumper is on, then the firmware will use all the ST functions to communicate with the STMCWB. If the jumper is off, the firmware will use my protocol, with simpler frames: set speed, set direction, currents, checksum and little else.
If you could show me how you did it would be great!
You deserve 2 of the best Portuguese beers!