This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

HV_ACI Sensored Current Model



Hi all,

I’m having some trouble trying to complete my HV_ACI Sensored project. When I get to LEVEL 5 I figure out that the variable cm1.Theta gets freeze.

I wrote the following code to select the input to the park1 module (angle):

if(thetaSelector == 0)

       park1.Angle = rg1.Out;

else{

       park1.Angle = cm1.Theta;

When I select rg1.Out the motor spins perfectly well (and the current module generates the ramp) but as soon as I change the angle input to cm1.Theta the motor gets stuck.

The problem is that if the module CUR_MOD_MACRO is connected to the PARK_MACRO, the variable theta stops making the corresponding ramp. This problem continues weather the motor is stopped or if it is already spinning when I make the change from rg1.Out to cm1.Theta.

Thanks in advance,

Matías

  • you need to make sure cm1.Theta is giving a proper rotating reference as the motor rotates. at a minimum create an alignment so it overlaps (matches) the ramp gen across several rotational cycles.

    if you plot the two Thetas what do they look like?