Skip to main content
Associate III
February 24, 2024
Solved

Speed monitoring and Single stepping a motor

  • February 24, 2024
  • 2 replies
  • 1443 views

I am running a 28 pole 20A nominal motor using x-Nucleo IHM08M1 and a nucleo -G431RB. I have been doing a number of tests verifying locked rotor current/torque and checking the effect of different settings of proportional gain. 
I am using Stm32CubeMonitor to monitor all the variables.

I am using 6 step control. and Hall devices for sensing

My understanding seems to be progressing. answers to the following two questions would assist me greatly.

1/        When I use the following code to monitor the speed 

 

MC_ProgramSpeedRampMotor1(1,0);

MC_StartMotor1();

for (int i = 1; i <= 200; i++)

{

Faults =MC_GetOccurredFaultsMotor1();

speed = MC_GetAverageMecSpeedMotor1_F();

HAL_Delay(50);

}

MC_StopMotor1();

I get integer values for speed and in multiples of 6. eg the speed value jumps from 0 to 6 to 12 etc whereas I am expecting a float as an answer. 

The final speed is 36 rpm whereas I expect it to be 6 rpm.

What am I doing wrong?

 

2/      At 28 poles x 6 steps gives me 168 positions per rotation and with a 300 mm Outside diameter rotor I expect to be able to do position control giving me approximately a 3mm resolution.

How do I single step this motor or move it a set number of steps.

 

Thanks

Roy

 

    This topic has been closed for replies.
    Best answer by RoyStevens

    Clearly I  am not getting any response to this  question. So I will close it off. With regard to the speed being integer values in multiples of 6 I think this is related to the speed unit of 0.1Hz  which is 6rpm. So I will ask the question again in a new post and hopefully will get a response.

    2 replies

    Associate III
    March 1, 2024

    Could some kind soul point me in the right direction on this - thanks

    Associate III
    March 7, 2024

    Can AnyBody help?

    RoyStevensAuthorBest answer
    Associate III
    March 14, 2024

    Clearly I  am not getting any response to this  question. So I will close it off. With regard to the speed being integer values in multiples of 6 I think this is related to the speed unit of 0.1Hz  which is 6rpm. So I will ask the question again in a new post and hopefully will get a response.