Canned cycles are predefined operations that simplify the programming of CNC machines. They allow the programmer to specify a series of parameters that control the movement and actions of the machine, such as drilling, tapping, boring, etc. Canned cycles can save time and reduce errors by avoiding the need to write repetitive code for each operation.
However, sometimes the programmer may want to cancel a canned cycle and resume normal programming. This is where the G80 code comes in handy. G80 is a modal code that cancels the current canned cycle and returns the machine to the G00 (rapid positioning) mode.
Usage format
The G80 code can be used in the following format:
G80
There are no parameters required for the G80 code. It can be placed anywhere in the program, as long as it is not inside a canned cycle. The G80 code will cancel the last active canned cycle and restore the G00 mode.
Explanation
The G80 code is useful for situations where the programmer wants to switch from a canned cycle to a normal programming mode. For example, if the programmer wants to drill a series of holes using a canned cycle, but then wants to move the tool to a different location or perform a different operation, they can use the G80 code to cancel the canned cycle and resume normal programming.
The G80 code can also be used to prevent errors or confusion when using multiple canned cycles in the same program. For example, if the programmer wants to use a different canned cycle for each hole, they can use the G80 code to cancel the previous canned cycle before starting the next one. This way, the machine will not mix up the parameters of different canned cycles and cause unexpected results.
The G80 code is a modal code, which means that it remains active until it is changed by another code. Therefore, the programmer does not need to repeat the G80 code after each canned cycle, unless they want to use another canned cycle later in the program.
Example
Here is an example of a CNC program that uses the G80 code to cancel a canned cycle:
N10 G90 G54 G00 X0 Y0 Z5
(Set absolute coordinates, work offset, and rapid move to initial position)
N20 M06 T1
(Change tool to drill bit)
N30 S1200 M03
(Set spindle speed and direction)
N40 G43 H1 Z2
(Activate tool length compensation and move tool to clearance plane)
N50 G81 Z-10 R2 F100
(Start drilling canned cycle with depth, retract, and feed rate)
N60 X10 Y10
(Drill first hole)
N70 X20 Y10
(Drill second hole)
N80 X20 Y20
(Drill third hole)
N90 G80
(Cancel drilling canned cycle and return to G00 mode)
N100 G00 Z5
(Rapid move to clearance plane)
N110 M05
(Stop spindle)
N120 M30
(End of program)