cancel
Showing results for 
Search instead for 
Did you mean: 

Control in Open Loop Voltage mode for B-G431-ESC1 via UART2

rossbossbran
Associate

Hi,

I'm trying to control a BLDC motor connected to B-G431-ESC1 driver in Open Loop Voltage mode. With Motor Pilot control there's no problems. I'm not able to find the correct HAL commands to use for:

A) Set Open Loop Voltage mode ( 

B) Set the reference voltage

C) Set the speed in RPM

Start, Stop, Ack Fault commands are ok. AI gave me a lot of indications but nothing seems work ok. 

Many thanks who will help me.

Bye 

 

Rossano

 

1 ACCEPTED SOLUTION

Accepted Solutions
GMA
ST Employee

Hello @rossbossbran,

Refer to the Firmware usage via APIs section in the Open loop description and usage chapter, available through Workbench tool > About > Documentations > Documentation > User manual.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

View solution in original post

2 REPLIES 2
GMA
ST Employee

Hello @rossbossbran,

Refer to the Firmware usage via APIs section in the Open loop description and usage chapter, available through Workbench tool > About > Documentations > Documentation > User manual.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA
rossbossbran
Associate

GMA, many thanks

At now all seems run.

HAL commands are:

To set Open Loop Voltage -> MCI_SetOpenLoopVoltageMode(&Mci[M1]);

To set the voltage -> OL_UpdateVoltage(&OpenLoop_ParamsM1,((target_voltage * 32767) / 100)); target_value is my variable.

To set the speed ->  MC_ProgramSpeedRampMotor1(ccr_val, 0); ccr_val is my variable.

To start -> MC_StartMotor1();

To stop -> MC_StopMotor1();

Bye

Rossano