Tool/software: Code Composer Studio
if (SpeedLoopCount==SpeedLoopPrescaler)
{
pi_spd.Ref = rc1.SetpointValue;
// pi_spd.Ref = SpeedRef;
pi_spd.Fbk = speed1.Speed;
PI_MACRO(pi_spd);
SpeedLoopCount=1;
}
Why the original program:pi_spd.Ref = rc1.SetpointValue ? In the control diagram. We can see that the input of pid_spd.Ref is SpeedRef?