Background

There are a wide variety of applications where CNC machines are used, including CNC routers, 3D printing, pick and place machines, and laser cutters. The motor control principles used in CNC machines can be used in other applications that require precise position control such as camera motion rigs. An actuator is any electromechanical device that can convert electrical signals to physical movement. Actuators used in CNC machines include stepper motors, hydraulic actuators and servo motors.

CNC machines are normally controlled in a format known as G-code. G-code describes, in an abstracted form, how the machine should move, how fast it should move and other operation details. For example, the G-code instruction X10 Y20 would instruct the machine to position the end effector (e.g., a 3D printer nozzle) 10 units in the x axis and 20 units in the y axis from the origin point.

A complete listing and explanation of the G-code commands implemented in this application can be found in the G-code section of this application note. Since G-code is provided in a generic form, and the exact details of the motion (i.e., how to move the actuators) are left up to the device, the same instruction set can be used in a wide variety of devices.