This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28069M: eQEP and Lab12a issue

Part Number: TMS320F28069M


Hello,

I'm building prototype based on TMS320F28069M and I'm experimenting with the launchpad. I've attached a custom made optical encoder to my motor shaft and I'm trying to run lab12a. Until now the motor runs flawlessly with all the InstaSPIN-FOC labs and InstaSPIN-Motion labs up to 5c. Then I switch to lab12a and the motor cannot identify the inertial and friction. The encoder connection is working properly as I can see the st_obj.vel.conv.Pos_erev counting upwards to 1000 (my encoder has 1000 lines) and the resetting. However the encoder doesn't have an index indicator, but I guess this is obsolete at this point. When I enable the driver as I do in the other labs and set the gMotorVars.SpinTAC.VelIdGoalSpeed_krpm to the motor's maximum speed then gMotorVars.SpinTAC.VelIdRun to 1 I cannot get the motor spinning. It actually tries to spin and I can see some counts from the encoder on the oscilloscope in the beginning of the identification process, but then I get the error 2004. What I've tried till now is to change the motor phase connections in order to try to spin it in the other direction and reduce the gMotorVars.SpinTAC.VelIdGoalSpeed_krpm to lower value. The result is still the same - motor making a very little effort to spin and then holding very tightly it's still position until the end of the identification. I noticed that the applied torque is like 0.25 and not getting any greater than this. Would you recommend me what to check and how to get the motor spinning with the eQEP module enabled?

Best,
Georgi

  • For sensored instaSPIN-motion, it is very important to ensure that the physical connections are done correctly on motor and encoder, and it is important for the setup and configuration of the ENC module in user.h that the number of lines on the encoder be provided. For PMSM, the lab will do the calibration angle of the encoder which need the index signal from encoder. So the lab can't work well if there is no right index signal from encoder.
  • I've done the connections properly and also tried all the rotation directions. The motor does not spin even for a single turn so I think the index signal is not playing a role in this setup. My encoder is 1000 lines and I've put 1000 lines in the configuration.
  • I can confirm the encoder signal is good. By checking st_obj.vel.conv.Pos_erev and rotating the shaft manually I can confirm the counter goes up to 1 and then start from the beginning. The motor would not spin in either direction.
  • Ok, I was able to run successfully lab12a. It turned out that I had missed to follow the instructions in lab5c and copy user.h to the instaspin-motion directory. My motor is under position control now.