Skip to main content
Associate
April 27, 2026
Solved

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

  • April 27, 2026
  • 2 replies
  • 240 views

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

 

Best answer by GMA

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.

2 replies

GMA
GMAAnswer
Technical Moderator
April 27, 2026

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
Associate
April 28, 2026

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