mistux Site Admin
Joined: 25 Jun 2004 Posts: 1042 Location: South Bend, Indiana USA
|
Posted: Thu Jun 09, 2005 3:40 pm Post subject: Hurco--G-Code Example Program |
|
|
Preparatory Functions ( " G " Codes )
Preparatory Functions, also known as " G " codes, set various machining modes within the control. There are two basic types of preparatory functions, Modal and One-Shot.
Modal Preparatory Functions
Modal Preparatory Functions establish a machine mode which stays in effect until canceled by another Preparatory Function belonging to the same group. Once a Modal " G " code is programmed, it need not be repeated in successive program blocks.
Valid Preparatory Functions ("G" Codes)
G00 Rapid Traverse Mode (Default)
G01 Linear Interpolation Mode
G02 Clockwise Circular and Helical Interpolation Mode
G03 Counter Clockwise Circular and Helical Interpolation Mode
G04 Dwell (One-Shot; Affects Fixed Cycles)
G09 Precision Cornering (One-Shot)
G17 XY Plane Selection
G19 XZ Plane Selection
G40 Cutter Compensation OFF (Default)
G41 Cutter Compensation Left
G42 Cutter Compensation Right
G61 Precision Cornering Mode ON
G64 Precision Cornering Mode OFF (Default)
G70 English Units of Measure*
G71 Metric Units of Measure*
G80 Fixed Cycle Cancel (Default)
G81 Drill Cycle
G82 Drill with Dwell Cycle
G83 Deep Hole Drilling Cycle
G84 Tapping Cycle
G85 Boring Cycle
G90 Absolute Machining Mode (Default)
G91 Incremental Machining Mode
Miscellaneous Functions
Miscellaneous Functions, or " M " codes, cause machine-related action (i.e. coolant control, tool changes, etc.). Each Miscellaneous Function is explained below.
Valid Miscellaneous Functions (" M " Codes)
M00 Program Stop
M01 Planned Stop
M02 End of Program
M03 Start Spindle Clockwise
M04 Start Spindle Counterclockwise
M05 Spindle OFF (Default)
M06 Change Tool
M07 Mist Coolant ON
M08 Flood Coolant ON
M09 Coolant OFF (Default)
M25 Z-Retract
NC Format Descriptions
Default Values
Upon power up or reset of the control, the system presets the internal mode registers to default Modal Preparatory and Miscellaneous Functions. Default Modal Preparatory Functions are:
G00 Rapid Traverse Mode
G17 XY Plane Selection
G40 Cutter Compensation OFF
G64 Precision Cornering OFF
G75 Multi-Quadrant Circular Interpolation Mode
G80 Fixed Cycle Cancel
G90 Absolute Machining Mode
Default Miscellaneous Functions are:
M05 Spindle OFF
M09 Coolant OFF
"G" Code Program for Example Part.
%
N10 G0 G70 G90 X0. Y0. S500 T1 M6
N12 X0.5 Y0.5 Z0.5 M3
N15 G81 X0.5 Y0.5 Z0.75 F5.
N20 X0.5 Y7.5
N25 X9.5 Y7.5
N30 X9.5 Y0.5
N35 G0 X0. Y0. S1000 T2 M6
N40 G0 X5. Y6.5 Z0.5
N50 G0 G42 X5. Y6.5 M3
N55 G1 Z-0.25 F5.
N65 G2 X5. Y1.5 I5. J4. F10.
N70 X5. Y6.5 I5. J4.
N71 G0 Z0.5
N72 G0 G40 X5. Y6.5
N75 G0 Y10.5 Z3. M2
E |
|