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.

TMS320F28388D: Where in the FOC code does the motor get rotated?

Part Number: TMS320F28388D
Other Parts Discussed in Thread: MOTORWARE

I've been working with an older version of Motorware to implement and FOC drive using the 28388.

I have my own outer control loop that is called from the main motor interrupt in the example project. I compile it for level 4 and my countrol loop essentially injects a calculated value in to pi_iq.ref. 

This all works just dandy but I want to write my own initial alignment routine as well. The "Wait for encoder" loop does not always move the load to find the index. 

However, if the lsw does NOT equal "ENC_CALIBRATION_DONE", setting pi_iq..ref just keeps the rotor aligned with a pole and the motor does not rotate. 

What is the actual code that causes the  motor to actually rotate?

Thanks. 

David

  • Hi David,

    You are porting a Motorware software project to F2838x device, is that correct? Asking since there are no F2838x device examples in Motorware, most motor solutions for Gen3 devices are in the MCSDK now.

    Which specific Motorware example are you working off? You are using a sensored control solution for incremental encoder?

    This all works just dandy but I want to write my own initial alignment routine as well. The "Wait for encoder" loop does not always move the load to find the index. 

    In "Wait for encoder" state the motor should start in open loop by setting some Iq_ref value to the current controller. If it doesn't move maybe more current (Iq) needs to be set.

    However, if the lsw does NOT equal "ENC_CALIBRATION_DONE", setting pi_iq..ref just keeps the rotor aligned with a pole and the motor does not rotate. 

    "ENC_CALIBRATION_DONE" state change happens when the encoder index is found.

    What is the actual code that causes the  motor to actually rotate?

    Most of the the control is handled in the motor ISR and there should also be a background loop for the state machine and other less critical parameters.

    Best,

    Kevin