MPIAxisSettleParams

Definition: MPIAxisSettleParams

          typedef struct MPIAxisSettleParams {
              struct {
                  double    distance;
                  double    speed;
              } tolerance;
              double        time; /* seconds */
              MPI_BOOL	onStop;
              MPI_BOOL	onEStop;
              MPI_BOOL	onEStopCmdEqAct;
          } MPIAxisSettleParams;
Change History: Modified in 04.00 and 03.03.00. 
tolerance.distance Value, in counts, from the move target position at which the controller sets the "in fine position" status flag. This parameter is used as part of the Axis settling criteria to determine when a point-to-point motion is complete and when MPIEventTypeMOTION_DONE and MPIEventTypeSETTLEDevents are generated.
tolerance.speed Value, in counts/second, from the final move velocity at which the controller sets the "at velocity" status flag. This parameter is used as part of the Axis settling criteria to determine when:

a position-based move is complete and an MPIEventTypeMOTION_DONE event is generated.

a velocity move is complete and an MPIEventTypeMOTION_AT_VELOCITY event is generated.

an axis is settled and an MPIEventTypeSETTLED event is generated.

Note: Always enter a Tolerance Velocity value that is a multiple of the controller sample rate. The controller will then receive velocity in counts/controller sample. 1 Counts/second = (1 counts/second) * (1/sample rate(Hz)) = (1/sample rate) counts/controller sample.

Note: Value is truncated to the next smallest integer. Example: With a sample rate of 2000Hz:

a Tolerance Velocity value of 500 counts/second = 0.25 = 0 count/controller sample (after truncation).

a Tolerance Velocity value of 2000 counts/second = 1 count/controller sample.

time Duration in seconds that an axis must satisfy the distance and/or speed tolerance, before the respective status flag is set.
settleOnStop

If TRUE, the controller will use settle on stop mode. If FALSE, the controller will not use the settle on stop mode.When in settleOnStop mode and a STOP event has occurred, the axis will stay in an MPIStateSTOPPING state until:

The settling criteria are satisfied AND.

The stop duration for the axis' Motion Supervisor has elapsed.

This state can be read with mpiAxisStatus(MPIAxis axis, MPIStatus *status, void *external).

The value to look for is (MPIState) status.state. If settleOnStop = FALSE, the axis will stay in an MPIStateSTOPPING state only until the stop duration for the axis' Motion Supervisor has elapsed.

settleOnEstop

If TRUE, the controller will use settle on Estop mode. If FALSE, the controller will not use the settle on Estop mode.When in settleOnEstop mode and a ESTOP event has occurred, the axis will stay in an MPIStateSTOPPING_ERROR state until:

The settling criteria are satisfied AND.

The Estop duration for the axis' Motion Supervisor has elapsed.

This state can be read with mpiAxisStatus(MPIAxis axis, MPIStatus *status, void *external).

The value to look for is (MPIState) status.state. If settleOnEStop = FALSE, the axis will stay in an MPIStateSTOPPING_ERROR state only until the Estop duration for the axis' Motion Supervisor has elapsed.

settleOnEstopCmdEqAct

If TRUE, the controller will use settle on EstopCmdEqAct mode. If FALSE, the controller will not use the settle on EstopCmdEqAct mode.***settleOnEstopCmdEqAct mode is not recommended***SettleOnEstopCmdEqAct is an alternative to Estop mode. When this mode is enabled, the following things happen:

During normal motion, there is no difference.

During an Estop, Cmd Eq Act action, the command position is set equal to the actual position from the previous servo sample. This can have a damping effect in some systems with some tuning parameters, causing the stage to slow. The behavior of the stage in this mode can be vastly different than in normal servoing mode. Approach this mode with great caution. The axis will stay in this mode for the amount of time that the Axis' Motion Supervisor Estop time.

After the Estop time elapses, the axis' motors will disable the amplifiers

Description

Sample Code

/*
    Set the settling time of an axis.  Sample usage:   
    returnValue =        
        setAxisSettlingTime(axis, 0.05);
*/
long setAxisSettlingTime(MPIAxis axis, double settlingTime)
{
    MPIAxisConfig config;    
    long returnValue;    

    returnValue =        
        mpiAxisConfigGet(axis, &config, NULL);    

    if (returnValue == MPIMessageOK)    
    {        
        config.inPosition.settlingTime = settlingTime;       
        returnValue =            
            mpiAxisConfigSet(axis, &config, NULL);    
}    

    return returnValue; 
}

See Also

MPIAxisConfig
Axis Tolerances and Related Events: How Motion Related Events are Generated
Configuration of IN_POSITION and Done Events after STOP or E_STOP Events