Trajectory interpolator

This chapter describes the TrajectoryInterpolator interface. It represents an entity which interpolates the trajectory calculated by the trajectory generator and determines the setpoint values for each sample.

State machine

Each trajectory follows the profile displayed in figure Trajectory states. The trajectory states are described in table Trajectory states.

Trajectory states

Trajectory states

Trajectory states

Trajectory state

Description

InPosition

DemandPosition does not change

Accelerating

The absolute value of DemandVelocity is increasing

ConstantVelocity

DemandVelocity is constant and unequal to zero

Decelerating

The absolute value of DemandVelocity is decreasing

QuickStop

The trajectory interpolator gives setpoints belonging to a second order trajectory with zero end velocity and minimum distance, while satisfying the QuickstopDeceleration constraint

Signals

Signals present for all trajectory interpolator types are listed in table Generic trajectory interpolator signals.

Generic trajectory interpolator signals

Name

Data type

R/W

Description

DemandAcceleration

Float

R

Acceleration setpoint calculated by trajectory interpolator.

DemandAccelerationLimit

Float

RW

Maximum allowed demand acceleration. Zero disables the protection.

DemandJerk

Float

R

Jerk setpoint calculated by trajectory interpolator.

DemandJerkLimit

Float

RW

Maximum allowed demand jerk. Zero disables the protection.

DemandPosition

Double

R

Position setpoint calculated by trajectory interpolator.

DemandPositionHighLimit

Double

RW

Demand position high limit for software end-switch determination. DemandPositionLowLimit \(\ge\) DemandPositionHighLimit disables the protection.

DemandPositionLowLimit

Double

RW

Demand position low limit for software end-switch determination. DemandPositionLowLimit \(\ge\) DemandPositionHighLimit disables the protection.

DemandVelocity

Float

R

Velocity setpoint calculated by trajectory interpolator.

DemandVelocityLimit

Float

RW

Maximum allowed demand velocity. Zero disables the protection.

RemainingMoveTime

Float

R

Remaining move time for current trajectory. While the trajectory is being calculated: + Infinity.

TargetPosition

Double

R

Target position for the current trajectory (or last when InPosition)

  • Phase 1: until TrajectoryComplete

    • Absolute position moves: provided end position

    • Relative position moves: calculated using provided distance

    • Jog moves: calculated position when velocity reached

    • Smooth- and quickstop moves: calculated end position

  • Phase 2: at TrajectoryComplete and after

    • Position moves with non-zero end-velocity: ± Infinity

    • Jog moves with non-zero velocity: ± Infinity

    • Otherwise: no change

TargetVelocity

Float

R

Target velocity for the current trajectory (or last when InPosition)

  • Position moves: provided end-velocity

  • Jog moves: provided velocity

Events

The trajectory interpolator has the following events:

In position

The in position event is generated when the trajectory state is InPosition.

Trajectory complete

The trajectory complete event is generated when the trajectory state is InPosition for move commands without end velocity, or upon the final transition to trajectory state ConstantVelocity for move commands with end velocity.

See also

TrajectoryInterpolator

XML configuration example of the trajectory interpolator interface.