2026-04-27 8:25 AM
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
Solved! Go to Solution.
2026-04-27 8:45 AM
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.
2026-04-27 8:45 AM
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.
2026-04-28 2:41 AM
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