Table of Contents

IAxisSequencer

Namespace
ZCore
INTERFACE IAxisSequencer

When an axis has been switched to sequential movement using EnterSequenceAsync, this object can be used to add new sections to the sequential movement. This section can be

Overwrite Behavior

All operations of the Sequencer have an optional parameter mode, which controls how the movement is queued up. By default mode=AxisSequencerMode.Buffered, which means that the set-point of the operation will be reached. To override an ongoing operation, replacing all queued up operations, mode can be set to: - AxisSequencerMode.Aborting – Immediately interrupts the current movement. - AxisSequencerMode.BlendingLow – Blends the path using the minimum of the dynamic limits (velocity, acceleration, deceleration). - AxisSequencerMode.BlendingPrevious – Blends the path using the active movement's dynamic limits. - AxisSequencerMode.BlendingNext – Blends the path using the dynamic limits of the next movement in the sequence. - AxisSequencerMode.BlendingHigh – Blends the path using the maximum of the dynamic limits.

Tracking

Every operation of the sequence takes an optional token, which can be used as callback for the operation. - If the token gets an error (taskToken.Error), it means that this operation has been canceled, e.g. by overwriting the queue with a new set-point - If the token gets done (taskToken.Done), it means that the corresponding operation has been successfully finished. I.e. the token can be used to track which operation is currently active.

Tokens may be used to track individual or a set of operations: If the token is used for more than 1 operation, canceling any of the operations will put the token into error and successfully executing all associated operations will put the token to done.

Ending Sequential Movement

When an axis is in sequential mode, it remains active even after completing all configured positions. Adding a new set-point, at any time, triggers a new movement. To exit sequential mode, use ExitSequenceAsync:

_axis.ExitSequenceAsync(mode:=AxisSequencerMode.Buffered);

The mode parameter can be used to:

- Immediately terminate the sequence (mode = Aborting).
- Allow a natural completion at the end of a predefined list.

Limitations

The parameter ZCore.ParameterList.MaxAxisSections defines the maximum number of pre-configured movements. However, points can be added dynamically—only positions that have already been reached are no longer counted.

Methods

ExitAsync

METHOD ExitAsync (
 [input] token : ITaskToken,
 [input] mode : AxisSequencerMode)

Halts the sequential movement. Calling this method will (eventually) exit the sequential mode of the axis, which in in turn results in the axis to be ´NOT BUSY´.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (MoveSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#MoveSequenceAsync].

Inputs

token ITaskToken
mode AxisSequencerMode := AxisSequencerMode.Buffered

Use mode=AxisSequencerSectionMode.Aborting to exit the sequential movement as soon as possible and mode=AxisSequencerSectionMode.Buffered to finish queued up sections before exiting the mode.

MoveAbsoluteAsync

METHOD MoveAbsoluteAsync (
 [input] token : ITaskToken,
 [input] position : LREAL,
 [input] speed : LREAL,
 [input] mode : AxisSequencerMode,
 [input] acceleration : LREAL,
 [input] deceleration : LREAL,
 [input] jerk : LREAL)

Add a new section to the sequential movement, which performs absolute movement to a given position.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
position LREAL
speed LREAL
mode AxisSequencerMode := AxisSequencerMode.Buffered
acceleration LREAL := 0

0 means that the acceleration from the previous section is used, or the default one if no previous section overwrote it

deceleration LREAL := 0

0 means that the deceleration from the previous section is used, or the default one if no previous section overwrote it

jerk LREAL := 0

0 means that the jerk from the previous section is used, or the default one if no previous section overwrote it

MoveContinousAbsoluteAsync

METHOD MoveContinousAbsoluteAsync (
 [input] token : ITaskToken,
 [input] position : LREAL,
 [input] speed : LREAL,
 [input] mode : AxisSequencerMode,
 [input] endVelocity : LREAL,
 [input] duration : LREAL,
 [input] acceleration : LREAL,
 [input] deceleration : LREAL,
 [input] jerk : LREAL)

Add a new section to the sequential movement, which performs absolute movement to a given position and continues moving with constant velocity.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
position LREAL
speed LREAL
mode AxisSequencerMode := AxisSequencerMode.Buffered
endVelocity LREAL
duration LREAL

Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use 0 to make it move 'forever', meaning it has to be overwritten with a new section (with AxisSequencerSectionMode.mode <> Buffered).

acceleration LREAL := 0

0 means that the acceleration from the previous section is used, or the default one if no previous section overwrote it

deceleration LREAL := 0

0 means that the deceleration from the previous section is used, or the default one if no previous section overwrote it

jerk LREAL := 0

0 means that the jerk from the previous section is used, or the default one if no previous section overwrote it

MoveContinousRelativeAsync

METHOD MoveContinousRelativeAsync (
 [input] token : ITaskToken,
 [input] distance : LREAL,
 [input] speed : LREAL,
 [input] mode : AxisSequencerMode,
 [input] endVelocity : LREAL,
 [input] duration : LREAL,
 [input] acceleration : LREAL,
 [input] deceleration : LREAL,
 [input] jerk : LREAL)

Add a new section to the sequential movement, which performs relative movement and continues moving with constant velocity.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
distance LREAL
speed LREAL
mode AxisSequencerMode := AxisSequencerMode.Buffered
endVelocity LREAL
duration LREAL

Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use 0 to make it move 'forever', meaning it has to be overwritten with a new section (with AxisSequencerSectionMode.mode <> Buffered).

acceleration LREAL := 0

0 means that the acceleration from the previous section is used, or the default one if no previous section overwrote it

deceleration LREAL := 0

0 means that the deceleration from the previous section is used, or the default one if no previous section overwrote it

jerk LREAL := 0

0 means that the jerk from the previous section is used, or the default one if no previous section overwrote it

MoveCurrentAsync

METHOD MoveCurrentAsync (
 [input] token : ITaskToken,
 [input] current : LREAL,
 [input] currentRamp : LREAL,
 [input] velocityLimitHigh : LREAL,
 [input] velocityLimitLow : LREAL,
 [input] relative : BOOL,
 [input] mode : AxisSequencerMode,
 [input] duration : LREAL)

Add a new section to the sequential movement, which performs movement with constant torque/force.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
current LREAL

Torque set-point the axis should be operated with (relative:=FALSE) or by which the torque is changed to (relative:=TRUE)

currentRamp LREAL := 1

Rate of the change of the set-point (e.g. in %/s)

velocityLimitHigh LREAL := 0

Upper velocity limit for limitation of the velocity in the mode, force safety reasons

velocityLimitLow LREAL := 0

Lower velocity limit for limitation of the velocity in the mode, force safety reasons

relative BOOL := FALSE
mode AxisSequencerMode := AxisSequencerMode.Buffered
duration LREAL := 0

Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use 0 to make it move 'forever', meaning it has to be overwritten with a new section (with AxisSequencerSectionMode.mode <> Buffered).

MoveRelativeAsync

METHOD MoveRelativeAsync (
 [input] token : ITaskToken,
 [input] distance : LREAL,
 [input] speed : LREAL,
 [input] mode : AxisSequencerMode,
 [input] acceleration : LREAL,
 [input] deceleration : LREAL,
 [input] jerk : LREAL)

Add a new section to the sequential movement, which performs a relative movement.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
distance LREAL
speed LREAL
mode AxisSequencerMode := AxisSequencerMode.Buffered
acceleration LREAL := 0

0 means that the acceleration from the previous section is used, or the default one if no previous section overwrote it

deceleration LREAL := 0

0 means that the deceleration from the previous section is used, or the default one if no previous section overwrote it

jerk LREAL := 0

0 means that the jerk from the previous section is used, or the default one if no previous section overwrote it

MoveVelocityAsync

METHOD MoveVelocityAsync (
 [input] token : ITaskToken,
 [input] velocity : LREAL,
 [input] mode : AxisSequencerMode,
 [input] duration : LREAL,
 [input] acceleration : LREAL,
 [input] deceleration : LREAL,
 [input] jerk : LREAL)

Add a new section to the sequential movement, which performs movement with constant velocity and no given endpoint.

Note

This method should only be called after putting the axis into the sequential mode, e.g. directly after issueing (EnterSequenceAsync)[xref:ZEquipment.IAxisMoveSequence#EnterSequenceAsync].

Inputs

token ITaskToken
velocity LREAL
mode AxisSequencerMode := AxisSequencerMode.Buffered
duration LREAL := 0

Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use 0 to make it move 'forever', meaning it has to be overwritten with a new section (with AxisSequencerSectionMode.mode <> Buffered).

acceleration LREAL := 0

0 means that the acceleration from the previous section is used, or the default one if no previous section overwrote it

deceleration LREAL := 0

0 means that the deceleration from the previous section is used, or the default one if no previous section overwrote it

jerk LREAL := 0

0 means that the jerk from the previous section is used, or the default one if no previous section overwrote it