Thursday, November 4, 2010

G Code in CNC Programming

G-codes are also called preparatory codes, and are any word in a CNC program that begins with the letter "G". Generally it is a code telling the machine tool what type of action to perform, such as:
- Rapid move
- Controlled feed move in a straight line or arc
- Series of controlled feed moves that would result in a hole being bored, a workpiece cut (routed) to a specific dimension, or a decorative profile shape added to the edge of a workpiece.
- set tool information such as offset.


A number following address G determines the meaning of the command for the concerned block.
G codes are divided into the following two types.
1. One-shot G code
    The G code is effective only in block in which it is specified
    Example :
      N011 G00 X0 Y0 M5; 
        N012 G49 Z250.0 T15 M6;
        N013 G43 Z0 H15;
        N014 S20 M3;
        N015 G99 G82 X550.0 Y–450.0 Z–130.0 R–97.0 P300 F70;
      The G82 also known as drilling cycle is use only one shot.

2. Modal G code
    The G code is effective until another G code of the same group is specified
    Example :
      N010 G01 X0.0 Y0.0 F500 ;
        N020 Z50.0;
        N030 X20.0;
        N040 X25.0 Y15.0;
        N050 GO X0.0 Y0.0:
  
       The G01 is effective in range N010 - N040, until there is another G comand or program end.
     

No comments:

Post a Comment