Part Number: LAUNCHXL-F280049C
Other Parts Discussed in Thread: BOOSTXL-DRV8320RS, C2000WARE
Hi:
I am using:
LAUNCHXL-F280049C
BOOSTXL-DRV8320RS
CCS10.1.0.00010
C2000Ware_MotorControl_SDK_3_00_01_00
with a small BLDC motor.
Lab is05 worked to id my motor, and changing motorVars.speedRef_Hz in the
expressions watch window controls the speed as expected.
However, setting motorVars.speedRef_Hz to a negative value does not
reverse rotation direction!
Instead of reversing direction, the motor accelerates to a high speed in the same direction.
The speed seems limited only by the DC bus input voltage, as if I had
set motorVars.speedRef_Hz to a very high positive value.
I have uploaded a video of this incorrect behavior to:
slic.to/.../reversing.mp4
You can see speedRef_Hz increased from 20, to 40, to 50 with motorVars.speed_Hz
following appropriately. Then when speedRef_Hz is set to -50,
speed_Hz incorrectly increases to a large value.
It seems perhaps the negative number is being interpreted as a large unsigned value?
How can I fix this?
Thanks.
Relevant values from my user.h for my motor are:
#define USER_MOTOR_TYPE MOTOR_TYPE_PM
#define USER_MOTOR_NUM_POLE_PAIRS (4)
#define USER_MOTOR_Rr_Ohm (NULL)
#define USER_MOTOR_Rs_Ohm (0.05776)
#define USER_MOTOR_Ls_d_H (0.0000822)
#define USER_MOTOR_Ls_q_H (0.0000822)
#define USER_MOTOR_RATED_FLUX_VpHz (0.0664435104)
#define USER_MOTOR_MAGNETIZING_CURRENT_A (NULL)
#define USER_MOTOR_RES_EST_CURRENT_A (2.0)
#define USER_MOTOR_IND_EST_CURRENT_A (-1.5)
#define USER_MOTOR_MAX_CURRENT_A (6.0)
#define USER_MOTOR_FLUX_EXC_FREQ_Hz (20.0)
#define USER_MOTOR_NUM_ENC_SLOTS (NULL)
#define USER_MOTOR_INERTIA_Kgm2 (NULL)
#define USER_MOTOR_RATED_VOLTAGE_V (7.0)
#define USER_MOTOR_RATED_SPEED_KRPM (5.27)
#define USER_MOTOR_FREQ_MIN_HZ (5.0)
#define USER_MOTOR_FREQ_MAX_HZ (1400.0)
#define USER_MOTOR_FREQ_LOW_HZ (10.0)
#define USER_MOTOR_FREQ_HIGH_HZ (200.0)
#define USER_MOTOR_VOLT_MIN_V (20.0)
#define USER_MOTOR_VOLT_MAX_V (57.0)