Programming a CNC machine can be accomplished in several ways, the two most popular are G code and conversational language. G code is a standardised language that can be used on all CNC machines regardless of the manufacturer. Conversational language differs by manufacturers and is a simple way to program a process that automatically converts the information into G code for you. Whether you use conversational language or G code, you must be fully aware of what codes perform what processes to correctly cut material with a CNC, or computer numerical control, machine.
Set the home line of the program. This command line will note the home position of the machine, coolant on or off and other various commands that are needed before the cutting begins. The spindle maximum speed and feed rate are also usually in this first line to limit the speed and feed rate based on the material you are cutting.
Move the tool into position for the first cutting process with a G0 code. G0 will move the tool into position for cutting and start the process of descending into place for the next line of G code. You can dictate the feed rapid rate using the override on the control or designate the percentage in the line next to the G0 command.
Place the tool-path code in the following lines after the G0 line of code. Tool path lines will have up to four G code positions and up to four M codes for miscellaneous commands such as the spindle orientation, coolant on or off, or dwell commands. You can designate the type of cut as well as the feed rate for the cut. F codes signify the feed rate in distance per minute.
Use the first line of the program to confirm the material you are cutting. Many computer control units will establish a maximum speed and feed rate using this information. You can also set the home position for when there are tool changes and turn the coolant on and off on the first line.
Enter the first type of cutting process and the tool number you will use for the cutting itself. The machine will automatically refer to the tool offset page to make adjustments, but it will use the numbers in the line to make the cuts. There are set entry and exit parameters that the conversational language will use to set up the cut. Repeat this procedure for the rest of the cuts that need to be made.
Set the program end. The last line of the program will let the machine know where to place the tool that is in the spindle when the program is done. You can send the tool home, have it dwell above the piece for the next operation or any combination based on the information in the last line, including repeating or jumping to other lines in the program itself.