Handling controls of the BLDC motor
4.5
You were able to rotate the BLDC motor by using the microcontroller macro. Then, try to control the
rotation speed, brake, and rotation direction now.
In the sample program, the controls are handled in the infinite loop inside the main function shown in
"Figure 4-11 Main function".
The rotation speed is determined according to the temperature sensor or input from programmed variables,
and the brake is applied whether SW3 is pressed. The direction of motor rotation is determined according
to the position of SW5. "Figure 4-14 Motor controls flowchart" illustrates how the controls are handled.
Speed calculation with the temperature sensor
Start
Infinite loop
false
Use of the temperature sensor
true
false
Press of SW3
true
Brake applied
false
SW set to the right
true
Right rotation
Figure 4-14 Motor controls flowchart
- 78 -
AN07-00180-3E
Speed calculation with the programmed variables
Brake released
Left rotation