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
- Relative movements and relative movements with constant end-velocity
- Absolute movements and absolute movements with constant end-velocity
- Constant velocity movements
- Moving torque/force controlled
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
tokenITaskTokenmodeAxisSequencerMode:= AxisSequencerMode.BufferedUse
mode=AxisSequencerSectionMode.Abortingto exit the sequential movement as soon as possible andmode=AxisSequencerSectionMode.Bufferedto 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
tokenITaskTokenpositionLREALspeedLREALmodeAxisSequencerMode:= AxisSequencerMode.BufferedaccelerationLREAL:= 00means that the acceleration from the previous section is used, or the default one if no previous section overwrote itdecelerationLREAL:= 00means that the deceleration from the previous section is used, or the default one if no previous section overwrote itjerkLREAL:= 00means 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
tokenITaskTokenpositionLREALspeedLREALmodeAxisSequencerMode:= AxisSequencerMode.BufferedendVelocityLREALdurationLREALControls how long the axis should move with constant velocity (not counting the acceleration phase). Use
0to make it move 'forever', meaning it has to be overwritten with a new section (withAxisSequencerSectionMode.mode <> Buffered).accelerationLREAL:= 00means that the acceleration from the previous section is used, or the default one if no previous section overwrote itdecelerationLREAL:= 00means that the deceleration from the previous section is used, or the default one if no previous section overwrote itjerkLREAL:= 00means 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
tokenITaskTokendistanceLREALspeedLREALmodeAxisSequencerMode:= AxisSequencerMode.BufferedendVelocityLREALdurationLREALControls how long the axis should move with constant velocity (not counting the acceleration phase). Use
0to make it move 'forever', meaning it has to be overwritten with a new section (withAxisSequencerSectionMode.mode <> Buffered).accelerationLREAL:= 00means that the acceleration from the previous section is used, or the default one if no previous section overwrote itdecelerationLREAL:= 00means that the deceleration from the previous section is used, or the default one if no previous section overwrote itjerkLREAL:= 00means 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
tokenITaskTokencurrentLREALTorque set-point the axis should be operated with (
relative:=FALSE) or by which the torque is changed to (relative:=TRUE)currentRampLREAL:= 1Rate of the change of the set-point (e.g. in %/s)
velocityLimitHighLREAL:= 0Upper velocity limit for limitation of the velocity in the mode, force safety reasons
velocityLimitLowLREAL:= 0Lower velocity limit for limitation of the velocity in the mode, force safety reasons
relativeBOOL:= FALSEmodeAxisSequencerMode:= AxisSequencerMode.BuffereddurationLREAL:= 0Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use
0to make it move 'forever', meaning it has to be overwritten with a new section (withAxisSequencerSectionMode.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
tokenITaskTokendistanceLREALspeedLREALmodeAxisSequencerMode:= AxisSequencerMode.BufferedaccelerationLREAL:= 00means that the acceleration from the previous section is used, or the default one if no previous section overwrote itdecelerationLREAL:= 00means that the deceleration from the previous section is used, or the default one if no previous section overwrote itjerkLREAL:= 00means 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
tokenITaskTokenvelocityLREALmodeAxisSequencerMode:= AxisSequencerMode.BuffereddurationLREAL:= 0Controls how long the axis should move with constant velocity (not counting the acceleration phase). Use
0to make it move 'forever', meaning it has to be overwritten with a new section (withAxisSequencerSectionMode.mode <> Buffered).accelerationLREAL:= 00means that the acceleration from the previous section is used, or the default one if no previous section overwrote itdecelerationLREAL:= 00means that the deceleration from the previous section is used, or the default one if no previous section overwrote itjerkLREAL:= 00means that the jerk from the previous section is used, or the default one if no previous section overwrote it