Run the code by going to Run → Resume or clicking the Resume button in the tool bar. Check the following:
- systemVars.flagEnableSystem should be set
to 1 after a fixed time, meaning the offset calibration has been done. The fault
flags, motorVars_M1.faultMtrUse.all, should be equal to 0.
- To run the motor with current closed-loop
control, set the variable motorVars_M1.flagEnableRunAndIdentify to 1 in
the Expressions window. The motor will run with closed-loop control using
the angle from the angle generator at a setting speed in the variable
motorVars_M1.speedRef_Hz. Check the value of
motorVars_M1.speed_Hz to confirm that the two values are very
close.
- Change the value of Idq_set_A.value[1] in
the Expressions window to set the reference torque current. The motor phase
current will be increasing with the same percentage accordingly.
- Set the variable
motorVars_M1.flagEnableRunAndIdentify to 0 to stop the motor.
Terminate the debug session and power off the power supply to the inverter
board.