Table of contents |

# KMotion Coordinated Motion

KMotion allows linear and circular coordinated motions to be performed in real time.

Path segments are downloaded into a buffer within the KMotion board. This buffer is called the Coordinated Motion Buffer and may contain up to MAX_SEGMENTS (40,000) motion segments. Segments are defined by a linear or circular path as well as a parametric equation (3rd order) which describes the motion along the path as a function of time. Often the same path may be defined in the several segments in order to utilize different parametric equations for different sections of the path. As shown above, one section of a path might undergo acceleration while another section of a path might maintain constant velocity. Buffered I/O Bit Commands (SetBitBuf, ClearBitBuf, or SetStateBitBuf) may also be downloaded into the buffer before, after, or between segments. This allows I/O to occur (i.e. switching on or off a LASER) at exact times while the motion is being performed. Virtual I/O bits may also be set or cleared to trigger other programs to perform customized functions.

Script commands are supported to:

- Open the Coordinated Motion Buffer - OpenBuf
- Download Linear, Arcs, or Buffered Bit commands to the buffer - Linear, LinearHex, Arc, ArcHex, ArcXZ, ArcHexXZ, ArcYZ, ArcHexYZ SetBitBuf, ClearBitBuf, or SetStateBitBuf
- Launch execution of the Coordinated Motion Buffer - ExecBuf
- Check the status of the Coordinated Motion Buffer - CheckDoneBuf
- Check how much of the Coordinated Motion Buffer has been Executed -ExecTime

## Coordinate System

KMotion Coordinated Motion commands operate on a defined coordinate system. The coordinate system is a mapping of the X, Y , Z, A, B, and C axes to specific KMotion Axes Channels using the DefineCS or DefineCSEX command. If all 6 axes are not required in the coordinate system, then the unused axes may be assigned a channel number of -1 to indicate that the axis is unassigned.

The MoveXYZABC and CheckDoneXYZABC commands also move and check the assigned channel axis that have been defined in the Coordinate System.

## GCode, Coordinated Motion Library, Trajectory Planner

In most cases a KMotion user will not compute and download Coordinated Motion segments directly. Instead the GCode library or Coordinated Motion Library functions may be used to simply define a path with a defined maximum velocity and acceleration, and the Trajectory Planner will automatically compute the necessary coordinated motion segments for the path.