Accessories and program-ming are important fundamentals of CNC machining.

A well-trained programmer is key to unlocking the capabilities of a computer numerical control (CNC) machine. In addition to the basic CNC components and direction of motion discussed in Part I last month, accessories and programming choices are important fundamentals. Mastery of these functions demonstrates the programmer's understanding of the CNC and provides the tools for optimum performance.

Accessorize with common sense
Knowing what a CNC machine can do also means knowing what it can't do. That's where accessories come into play. Many CNC machines are equipped with add-ons or enhancements such as probing systems, tool length measuring devices, post-process gaging systems and automatic pallet changers. The secret to accessorizing is knowing what a particular application demands. Some CNC machine accessories are made and supported by the machine tool builder and are documented in the machine tool builder's manual, while information about aftermarket accessories is in a separate manual.

Get with the program
When getting acquainted with a CNC machine, a programmer first needs to learn which functions of the CNC are programmable and what commands control the programmable functions. Many machine functions must be manually activated. With some CNC milling machines, for example, the only programmable function is axis motion, while all other functions--from the spindle speed and direction to coolant delivery method and tool changes--are performed by the operator. Conversely, with full-blown CNC machines, almost everything is programmable and the operator may only be required to load and remove workpieces.

Start with the machine tool builder's manual, which will state what functions of the machine are programmable. Following are some common programmable functions, along with their related programming commands:

  • Spindle control. An "S" command specifies the spindle speed that is set in revolutions per minute for machining centers. M03 turns the spindle on in a clockwise manner. M04 turns the spindle on in a counterclockwise manner. M05 turns the spindle off. Turning centers also have a constant surface speed feature, which allows the spindle speed to be specified in surface feet per minute or meters per minute.
  • Automatic tool changer, machining centers. A "T" command tells the machine which tool station is to be placed in the spindle. On most machines, M06 tells the machine to actually make the tool change.
  • Tool change, turning centers. A four-digit "T" command changes tools on most turning centers. The first two digits of the T command specify the turret station number and the second two digits specify the offset number to be used with the tool. T0101, for example, specifies tool station number one with offset number one.
  • Coolant control. M08 turns on flood coolant. If available, M07 turns on mist coolant. M09 turns off the coolant.
  • Automatic pallet changer. An M60 command is commonly used to make pallet changes.

Programmable functions vary from one machine to the next, as do the programming commands. For best results, check the M codes list in the machine tool builder's manual, which are commonly used by the machine tool builder to provide programmable ON/OFF switches for machine functions.