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.

SpinTAC position control and position move

Hello, Chris and Adam,

(1) Now I use lab13a to run my motor. I will change the position reference step by step.

void ST_runPosCtl(ST_Handle handle, CTRL_Handle ctrlHandle)
{
ST_Obj *stObj = (ST_Obj *) handle;

// provide the updated references to the SpinTAC Position Control
//STPOSCTL_setPositionReference_mrev(stObj->posCtlHandle, 0);
STPOSCTL_setPositionReference_mrev(stObj->posCtlHandle, _IQ24(motor_pos_reference));

STPOSCTL_setVelocityReference(stObj->posCtlHandle, 0);

STPOSCTL_setAccelerationReference(stObj->posCtlHandle, 0);

// provide the feedback to the SpinTAC Position Control
STPOSCTL_setPositionFeedback_mrev(stObj->posCtlHandle, STPOSCONV_getPosition_mrev(stObj->posConvHandle));

// Run SpinTAC Position Control
STPOSCTL_run(stObj->posCtlHandle);

// Provide SpinTAC Position Control Torque Output to the FOC
CTRL_setIq_ref_pu(ctrlHandle, STPOSCTL_getTorqueReference(stObj->posCtlHandle));
}

Here both of the velocity reference and acceleration reference are set to 0 by default. So I want to know what is the maximum motor speed and its acceleration value in this default setting?

Also I try to change this velocity reference value, but it seems that it can not work. Can I set the velocity reference value and the acceleration reference value in lab13a(only position control, not include position move)?

(2)

In lab13b, spintac position control and postion move are include. This example drives the motor to run 1.5 revolutions. the motoro position is not an absolute value. Finally the motor will stop.

Before the motor stops, Can I change its position goal to a new value and make it run to a new position?

Is there a minimum motor speed for the position move? 

Thank you

Fei

 

 

  • Fei

    Fei Yan1 said:
    Here both of the velocity reference and acceleration reference are set to 0 by default. So I want to know what is the maximum motor speed and its acceleration value in this default setting?

    The maximum motor speed and acceleration is more limited by your motor and system and not the controller.  In the lab 13a example we keep the velocity reference and acceleration reference at 0, but in lab 13b we use profile generator in order to create those references.

    Fei Yan1 said:
    Also I try to change this velocity reference value, but it seems that it can not work. Can I set the velocity reference value and the acceleration reference value in lab13a(only position control, not include position move)?

    You can change these values in lab 13a.  It is important that you are using the right units.  Those  inputs assume the scaled values for speed.  In the spintac_position.h file there is a #define that can provide this scaling.  Keep in mind that these inputs are direct feedforwards to the controller, so if you set them incorrectly it could result in unintentional behavior.

    Fei Yan1 said:

    In lab13b, spintac position control and postion move are include. This example drives the motor to run 1.5 revolutions. the motoro position is not an absolute value. Finally the motor will stop.

    Before the motor stops, Can I change its position goal to a new value and make it run to a new position?

    No, the profile generator only supports single point to single point movements.  You can stop a current movement, but you are not able to start a new profile until the current profile is complete.

    Fei Yan1 said:
    Is there a minimum motor speed for the position move?

    There is a minimum, but it is dependent on the chosen acceleration/deceleration and jerk limits as well as the base speed scaling.  It is difficult for me to give an absolute lower limit on speed due to these interacting parameters.  The Move component will saturate the velocity limit to current lower bound based on the configured limits.  In tests we can routinely run at less than 1rpm for velocity limit.