SPRAD20 March 2022 AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1
In order to demonstrate speed loop, there is a short demonstration created to spin motor forward for 10 second, spin motor backward for 10 second, and stop. This is a infinite loop with a counter timing at interrupt frequency. This part of program is shown in Figure 2-44. As the input of speed loop reference is in rad/s of electrical speed, the demonstration input in RPM of mechanical speed need to be converted to electrical speed according to motor properties.