Motion states

When you use motion functions, you'll notice some parameters presenting repeatedly. These parameters are used to check the moving states and errors. They are useful for getting the states of the movement, identifying whether the movement is completed, or checking what problem the axis is running into.

Some parameters are shared by single-axis and multi-axis functions. Some are for only single-axis or multi-axis.

Common parameters

BufferMode: defines how to blend the velocity of two functions. See the McBufferMode type.

When you send a sequence of motion commands, the first command can use mcAborting, mcBuffered, or mcCanceled, because there is no command before the first. mcAborting doesn't affect the following commands. For more information about how to use mcBuffered, see Motion queue > Send a sequence.

If the motion command doesn't have BufferMode, it will always use mcAborting.

KsCommandStatus

The following parameters are described in the KsCommandStatus structure, which is used to present the state of a KINGSTAR command.

Done: it becomes TRUE when a discrete move is done. For more information about the discrete move, see Discrete Motion in Single axis states.

Busy: it becomes TRUE as soon as the function is running, until the move is finished or failed.

Active: it is TRUE as long as the move is controlling the axis.

CommandAborted: it becomes TRUE when the move is cancelled, or aborted by another function.

Error: it is TRUE when an error occurred.

ErrorID: it shows an error code that is defined in the KsError type.

InVelocity: for a single axis, it becomes TRUE when the axis reaches the commanded velocity. For an axis group, every axis' commanded velocity is reached.

Single-axis parameters

EndVelocity: it becomes TRUE when the axis has traveled the commanded distance and is running at the given end velocity.

Multi-axis parameters

InSync: the position synchronization state of axes. Used for the camRamp mode in cam motion. For more information about camRamp, see the McCamStartMode type.

TRUE: the positions of the master and slave axes are synchronized.

FALSE: the slave axis is synchronizing with the master axis.

InGear: the velocity synchronization state of axes.

TRUE: the velocity of the master and slave axes is synchronized.

FALSE: the slave axis is synchronizing with the master axis.