cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with changing the torque regulation torque

YLoui
Associate

Hello,

We have a problem with the controller wehn changing the torque regulation torque. This problem happens randomly but very frequent. 

When the motor stops we change the current regulation torque from 1300 mA to 250 mA. And some times we can see some sudden movement and the motor seems to keep the previous current torque regulation (1300) but it reports 250 mA and after some seconds (around 5) it falls to overheating error. 

Can you help us to point out the correct way we should change the torque regulation current when the motor is idle and also when it is moving?

I based the development from the example you provide on the page for the board: 

https://my.st.com/content/my_st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32cube-expansion-packages/x-cube-spn1.license=1570696122672.product=X-CUBE-SPN1.version=1.10.0.html 

We are currently using the STM32F303RC with the exact layout of the X-NUCLEO_IHM01A1.

The function that is used to change the torque is: SetAnalogValue(0, L6474_TVAL, current_mA) that is on the example provided on the link above, and the parameters we use to reproduce the error are the followings:

L6474_Init_t params = 

 { 2000,               /// Acceleration rate in step/s2. Range: (0..+inf).

  1000,               /// Deceleration rate in step/s2. Range: (0..+inf).

  2000,               /// Maximum speed in step/s. Range: (30..10000].

  800,               /// Minimum speed in step/s. Range: [30..10000).

  500,             /// Torque regulation current in mA. (TVAL register) Range: 31.25mA to 4000mA.

  750,               /// Overcurrent threshold (OCD_TH register). Range: 375mA to 6000mA.

  L6474_CONFIG_OC_SD_ENABLE,    /// Overcurrent shutwdown (OC_SD field of CONFIG register).

  L6474_CONFIG_EN_TQREG_TVAL_USED, /// Torque regulation method (EN_TQREG field of CONFIG register).

  L6474_STEP_SEL_1_16,       /// Step selection (STEP_SEL field of STEP_MODE register).

  L6474_SYNC_SEL_1_2,        /// Sync selection (SYNC_SEL field of STEP_MODE register).

  L6474_FAST_STEP_12us,      /// Fall time value (T_FAST field of T_FAST register). Range: 2us to 32us.

  L6474_TOFF_FAST_8us,   /// Maximum fast decay time (T_OFF field of T_FAST register). Range: 2us to 32us.

  3,                /// Minimum ON time in us (TON_MIN register). Range: 0.5us to 64us.

  21,                /// Minimum OFF time in us (TOFF_MIN register). Range: 0.5us to 64us.

  L6474_CONFIG_TOFF_044us,     /// Target Swicthing Period (field TOFF of CONFIG register).

  L6474_CONFIG_SR_320V_us,     /// Slew rate (POW_SR field of CONFIG register).

  L6474_CONFIG_INT_16MHZ,      /// Clock setting (OSC_CLK_SEL field of CONFIG register).

  (L6474_ALARM_EN_OVERCURRENT | L6474_ALARM_EN_THERMAL_SHUTDOWN | L6474_ALARM_EN_THERMAL_WARNING

  | L6474_ALARM_EN_UNDERVOLTAGE | L6474_ALARM_EN_SW_TURN_ON | L6474_ALARM_EN_WRONG_NPERF_CMD) /// Alarm (ALARM_EN register).

};

0 REPLIES 0