Skip to main content
Texram
Associate III
July 17, 2024
Question

Function Return Value/Unit in Motor Control Code

  • July 17, 2024
  • 1 reply
  • 544 views

Hi,

I'm using 6 Step Motor Control and wonder what's the unit of the returned value from STC_GetDutyCycleRef() in speed_ctrl.c?

I set the reference speed to 1000rpm. After I started running a motor, I saw the returned value from STC_GetDutyCycleRef(), ramping up to 3200 from 0.

I would expect the returned value from STC_GetDutyCycleRef() to be 0 - 100 (%).

What's the unit of the returned value from STC_GetDutyCycleRef() ?

 

Texram_0-1721250679388.png

Thanks

 

    1 reply

    Texram
    TexramAuthor
    Associate III
    July 17, 2024

    Similar questions to other Motor Control APIs (defined in mc_api.c/.h)

    For instance, what's the unit of the returned value from MC_GetMecSpeedReferenceMotor1()?

    In the debug mode, I read the value of MC_GetMecSpeedReferenceMotor1() is about 165, but Motor Pilot reports about 1000rmp.