U S E R M A N U A L
22
Jan 26, 2015, AN709-00011-1v0-E
6.2.2.2
Encoder Check Run
Click the debugger button
to connect the J-link, and pass the global structure
‘Qprc_RunPars’ into the Live Watch in the IAR debug online.
Connect PC and hardware with J-LINK, and give motor any target speed more than 0 to run motor.
Wait until motor stops running, find structure
“Qprc_RunPars” in file “observer_encoder.h”, and record value
of variable
“Qprc_RunPars .i8_Swapbit” and “Qprc_RunPars .i32Q22_AngleToZeroInx”
Table 6-8: Global Structure for Encoder Check
Encoder A/B order bit
Zero-match completion flg
Zero-position angle
Estimated speed by encoder
Modify
“SWAPBIT” definition in “hardware_config.h”, set it the same value as “Qprc_RunPars .i8_Swapbit”.
Modify
“QPRC_ZERO_ANGLE” definition in “hardware_config.h”. Set it the same value as
“Qprc_RunPars .i32Q22_AngleToZeroInx”.
Redefine
“ZEROMATHCEN” to 1.
Encoder check is complete.
6.2.3
Run Motor
When the encoder angle has been checked, the motor can be started for the demo show.
(1) Check the basic motor and HW parameter setting in the user interfaces. If the setting does not match
the real HW and washing machine parameter, there will be an unexpected running error in the motor
running.
(2) Compile project and download program to inverter board by the J-link.
①
Click button
A
that is shown in Figure 6-9 to connect the J-link and download the FW into the MCU,
②
Click button
B
shown in Figure 6-10
to
run the FW online.
③ Y
ou can enter the none-zero speed value to start the motor in the structure that is shown as
C
in
For example, when the variable ‘MotorCtrl_stcRunPar.i16TargetSpeedRpm = 90’ by your online input, the
speed of the servo motor will run to 90rpm.
Do not click button D in Figure 6-11 while motor in running status.