cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 PMSM FOC set Speed in rpm

dominik
Senior
Posted on October 15, 2014 at 15:25

Hi

I need to set the speed in my application in rpm. Better in tenth of rpm.

I found the routine: UI_ExecSpeedRamp()

To use this function in my file what I need to implement and define?

bool UI_ExecSpeedRamp(CUI this, int32_t wFinalMecSpeedRPM, uint16_t hDurationms);

The CUI how do I implement this one? And which header do I need?

If I use the function:

oUI = UI_NewObject(MC_NULL);

I get the Error:

Error[Li005]: no definition for ''UI_NewObject''

Thanks a lot, best Regards
4 REPLIES 4
Gigi
Senior
Posted on October 16, 2014 at 09:07

Ciao,

Take a look at the software examples that are present in the folder:

Project\STM32_SDK_Examples

And in particular to the Potentiometer or Ramp example.

Ciao

Gigi

dominik
Senior
Posted on October 16, 2014 at 16:38

Ciao Gigi

Thanks for your reply. Where Do I find this project folder?

(STM32_SDK_Examples)

And is no example project avalable to use the function ''UI_NewObject'' ?

Best Regards

Gigi
Senior
Posted on October 22, 2014 at 09:02

Ciao

The interface of the MC firmware is the MCI and MCT. The UI function are just utilities.

I suggest is to forget the UI_NewObject and follow the examples.

Of course I'm referring of the SDK v4.0 if you don't find them, probably you are using an old version of the lib. You can anyhow to download the new one from the web and take the example as reference.

Ciao

Gigi

chenshuaime
Associate
Posted on November 20, 2014 at 15:53

I am using a  and research 

on single shunt FOC technology of the 

Motor Control library V2.0.

  Now Ihave some questions to consult.

First , I donot quite understand the function of SVPWM_1ShuntCalcDutyCycles (Volt_Components Stat_Volt_Input) in stm32f10x_svpwm_1shunt.Cthe 

subfunction 

SVPWM_1PWMDutyAdj ,From Um0492of  boundary2 boundary3 . An ST patented technique for current sampling in the “Boundary�? regions has been implemented in the firmware .From the preach PPT, I know an ST patented : when unable to sample a phase of the current, by insert a valid in vectorV7 to sample the current and keep a constant .

  According to my when the aim vector in the,we need to adjust the not dvDutyValues.hTimePhA, beasuse the dvDutyValues.hTimePhB is the least duty cycle in SECTOR_5 or SECTOR_6,so I have difficulty understanding the lib code. the code about BOUNDARY_2 also confuse.me.

Continue to look at the code , if (dvDutyValues.hTimePhA > 0xEFFF)  what is the 0XEFF mean and is how to get this value.

Continue dowm ,about the sample point in this application the tim1 is PWM1 mode in this lib, the first point is Compare match in up count ,the second point occurs in down count,  is this understanding correct ?

THANKS 

Part oft he lib code

 // Adjust the lower

    {

        switch (bSector)

        {     

 case 

               case  :  

 bInverted_pwm_new = INVERT_A;

                         -=HTMIN;

                        break;

       ………………………..

        }

}

          dvDutyValues.hTimePhA = DMABURSTMIN_A