Cnc Programming
-
Upload
ramon-gerardo-varela -
Category
Documents
-
view
732 -
download
11
Transcript of Cnc Programming
1. Insert your disk
2. Select the PROGRAM OPERATIONS:
3. Press the EXTEND [F8] twice
4. Select the MS-DOS [F7]
5. Select the EXTEND [F8] once
6. Select PROGRAM INPUT [F1]
7. Select the FD0: INDEX [F3]
8. Find your program with the arrows:
(you may need to page up/down):
9. Press WRITE twice 10. If your program has been loaded before, you will need to type "Y" when the question arises to copy over the existing file, and then press WRITE
11.Wait until COPY FINISHED appears
12. Select MS-DOS QUIT [F7] button
How to dry run your program:
1. Select the AUTO OPERATIONS
2. Select the PROGRAM SELECT [F1]
3. Input an "*"
4. Press WRITE
5. Find your program with the arrows: (you may need to page up/down):
6. Press WRITE
7. Verify that the machine lock is on
8. Press EXTEND [F8] twice
9. Select STD/EXT GRAPHIC [F1]
10. Press the green CYCLE START
11. Watch your program run12. If your graphic looks too large press RESET to stop the program
13. Then select the NORMAL SCALE [F3]
14. Select the STD/EXT GRAPHIC [F1]
15. Then select the green CYCLE START
16. If your program did not go according to plan; Press EXTEND [F8] twice
17. Select PART PROGRAM [F3]
18. The curser will be in the area of your problem
19. Press the RESET button to remove the turmoil placed on the machine
How to edit your program on the machine:
1. Select the PROGRAM OPERATIONS
2. Select the EDIT [F4]
3. Input a "*"
4. Find your program with the arrows: you may need to page up/down
5. Press WRITE
6. You can now edit your program
7. Press the EDIT QUIT [F7]
8. This did not save the program to your floppy disk
How to save the corrected program to your disk:
1. Select the PROGRAM OPERATIONS
2. Press the EXTEND [F8] twice
3. Select the MS-DOS [F7]
4. Select the EXTEND [F8] once
5. Select PROGRAM OUTPUT [F2]
6. Select the MD1: INDEX [F2]
7. Find your program with the arrows: you may need to page up/down
8. Press WRITE twice
9. You may need to type "Y" if the question arises to copy over the existing file and then press WRITE
10. Wait until COPY FINISHED appears
11. Select MS-DOS QUIT [F7 button
MFG 230 - Computer Aided Manufacturing
Complete code index for the CNC Okuma lathe: letter A B C D E F G H I J K L M N O S SB T U W X Z %
key:
The F values are ______ (unless noted, assume F4.4 for inch and F5.3 for metric). An M in the Modal column means ____, while an
X means ____.
extra info:
All the letters but G and M come right before specification values - a G or M followed by a number will trigger a specific type of behavior while any other letter followed by a number specifies a rate, offset, position, or other such thing.
A
Angle measurement (F4.4 for inch / F5.3 for metric).
B
Angle measurement for threads (F4.4 for inch / F5.3 for
metric).
C Coordinate values on linear axis (F3.3 for inch and metric).
F
Feed rate.
G > there's lots and lots of G-codes, so it gets its own section, below <
H Thread height (LAP) (F4.4 for inch / F5.3 for metric).
I Arc center offset (F4.4 for inch / F5.3 for metric).
J
Lead value for threading (F4.4 for inch / F5.3 for metric).
K Arc center offset (F4.4 for inch / F5.3 for metric).
L Lap command (F4.4 for inch / F5.3 for metric).
M > there's lots and lots of G-codes, so it gets its own section, below <
N Sequence number (F4.0 for inch and metric).
O Program name (F4.0 for inch and metric).
S Spindle speed (F4.0 for inch and metric).
SB M-Tool speed (F4.0 for inch and metric).
T
T____ First 2 digits = Tool #Last 2 digits = Tool offset #
F6.0, F4.0 for inch and metric.
T______ First 2 digits = Tool nose radiusSecond 2 Digits = Tool #Last 2 Digits=Tool offset #
U
Finish amount (LAP) (F4.4 for inch / F5.3 for metric).
W LAP command (F4.4 for inch / F5.3 for metric).
X Diameter dimension word (F4.4 for inch / F5.3 for metric).
Z Longitudinal dimension word (F4.4 for inch / F5.3 for metric).
% Signals the beginning of a program.
G All G code is F3.0 in both inch and metric. MODAL
G00 Positioning M
G01 Linear Interpolation M
G02 Circular Interpolation (CW) M
G03 Circular Interpolation (CCW) M
G04 Dwell X
G20 Home Position Command X
G21 ATC Home Position Command X
G22 Torque skip command X
G28 Torque Limit command cancel X
G29 Torque Limit command X
G30 Skip cycle X
G31 Fixed thread cutting cycle: Longitudinal X
G32 Fixed thread cutting cycle: End Phase X
G33 Fixed thread cutting cycle X
G34 Variable lead thread cutting cycle: Increasing lead X
G35 Variable lead thread cutting cycle: Decreasing lead X
G36 M-tool spindle-feed rod synchronized feeding (forward) X
G37 M-tool spindle-feed rod synchronized feeding (reverse) X
G40 Tool Nose Radius Compensation: CANCEL M
G41 Tool Nose Radius Compensation: LEFT M
G42 Tool Nose Radius Compensation: RIGHT M
G50 Zero Offset. Maximum Spindle Speed Designation M
G62 Mirror image designation X
G64 Mirror image control OFF X
G65 Mirror image control ON X
G72 Compound Fixed Thread Cutting Cycle: Longitudinal M
G71 Compound Fixed Thread Cutting Cycle: Transverse M
G73 Longitudinal Grooving Compound Fixed Cycle M
G74 Transverse Grooving Compound Fixed Cycle M
G75 Automatic Chamfering M
G76 Automatic Rounding M
G77 Tapping compound fixed cycle M
G78 Tapping cycle reversed thread M
G80 End of Shape Designation (LAP) M
G81 Start of Longitudinal Shape Designation (LAP) M
G82 Start of Transverse Shape designation (LAP) M
G83 Start of Blank material shape definition (LAP) M
G84 Change of cutting conditions in bar turning cycle (LAP) M
G85 Call of Rough Bar Turning Cycle (LAP) M
G86 Call of Rough copy Turning Cycle (LAP) M
G87 Call Finish Turning Cycle (LAP) M
G88 Call of continuous thread cutting cycle (LAP) M
G90 Absolute Programming M
G91 Incremental Programming M
G94 Feed Per Minute Mode (MM.MIN) M
G95 Feed Per Minute Mode (MM/REV) M
G96 Constant Cutting Speed "ON" M
G97 Constant Cutting Speed "OFF" M
G101 Linear Interpolation in Contour Generation M
G102 Circular Interpolation in Contour Generation (FACE) (CW) M
G103 Circular Interpolation in Contour Generation (FACE) (CCW) M
G110 Constant speed cutting on turret A M
G112 Circular thread cutting CW M
G113 Circular thread cutting CCW M
G132 Circular Interpolation in Contour Generation (SIDE) (CW) M
G133 Circular Interpolation in Contour Generation (SIDE) (CCW) M
G136 End of Coordinate System Conversion or Y-Axis Mode OFF M
G137 Start of Coordinate System Conversion or Y-Axis Mode OFF M
G140 Designation of Machining Mode Using Main Spindle M
G141 Designation of Machining Mode Using Sub Spindle M
G161 G-code macro function MODIN M
G162 G-code macro function MODIN M
G163 G-code macro function MODIN M
G164 G-code macro function MODIN M
G165 G-code macro function MODIN M
G166 G-code macro function MODIN M
G167 G-code macro function MODIN M
G168 G-code macro function MODIN M
G169 G-code macro function MODIN M
G170 G-code macro function MODIN M
G171 G-code macro function CALL M
G178 Synchronized tapping cycle (forward) M
G179 Synchronized tapping cycle (reverse) M
G180 M-Tool Compound Fixed Cycle: CANCEL M
G181 M-tool Compound Fixed Cycle: DRILLING M
G182 M-tool Compound Fixed Cycle: BORING M
G183 M-tool Compound Fixed Cycle: DEEP HOLE DRILLING M
G184 M-tool Compound Fixed Cycle: TAPPING M
G185 M-Tool Compound Fixed Cycle: LONGITUDINAL THREAD CUTTING M
G186 M-Tool Compound Fixed Cycle: END FACE THREAD CUTTING M
G187M-Tool Compound Fixed Cycle: LONGITUDINAL STRAIGHT THREAD
CUTTINGM
G188M-Tool Compound Fixed Cycle: TRANSVERSE STRAIGHT THREAD
CUTTINGM
G189 M-Tool Compound Fixed Cycle: REAMING/BORING M
G190 M-Tool Compound Fixed Cycle: KEYWAY CUTTING CYCLE M
G191M-Tool Compound Fixed Cycle: LONGITUDINAL KEYWAY CUTTING
CYCLEM
M All M code is F3.0 in both inch and metric. MODAL
M00 Program Stop X
M01 Optional Stop X
M02 End of Program X
M03 Spindle CW M
M04 Spindle CCW M
M05 Spindle Stop M
M06 Tool Change M
M08 Coolant ON M
M09 Coolant OFF M
M12 M-Tool Spindle STOP M
M13 M-Tool Spindle CW M
M14 M-Tool Spindle CCW M
M15 C-Axis Positioning <POS)< TD> M
M16 C-Axis Positioning (NEG) M
M17 CEJ MATIC :Request of Data transfer M
M18 Post-process Gauging RS232C: Request of Data transfer M
M19 Oriented Spindle Stop M
M20Tailstock Barrier OFF or spindle interference monitoring OFF (opposed two-spindle models)
M
M21Tailstock Barrier ON or spindle interference monitoring ON (opposed two-spindle models)
M
M22 Chamfer OFF M
M23 Chamfer ON M
M24 Chuck Barrier OFF, Tool interference OFF M
M25 Chuck Barrier ON, Tool interference ON M
M26 Thread Lead Along Z-Axis M
M27 Thread Lead Along X-Axis M
M28 Tool Interference Check Function OFF M
M29 Tool Interference Check Function ON M
M30 End of Program M
M32 Straight In-feed along thread face mode (on left face) M
M33 Zig-Zag Infeed in Thread Cutting M
M34 Straight In-feed along thread face mode (on right face) M
M40 Spindle gear Range Neutral M
M41 Spindle Gear Range 1 M
M42 Spindle Gear Range 2 M
M48 Spindle Speed Override Ignore Cancel M
M49 Spindle Speed Override Ignore M
M55 Tailstock Spindle Retract M
M56 Tailstock Spindle Advanced M
M58 Chucking Pressure Low M
M59 Chucking Pressure High M
M72 ATC Unit Position at Approach Position M
M73 Thread Cutting Pattern 1 M
M74 Thread Cutting Pattern 2 M
M75 Thread Cutting Pattern 3 M
M76 Parts Catcher Retract M
M77 Parts Catcher Advanced M
M78 Steady Rest Unclamp M
M79 Steady Rest Clamp M
M80 Overcut Advanced M
M81 Overcut Retract M
M83 Chuck Clamp M
M84 Chuck Unclamp M
M85No Return to the Cutting Starting Point after the completion of rough turning cycle (LAP)
M
M86 Turret Indexing direction: CW (reverse) M
M87 Cancel of M86 M
M98 Tailstock Spindle Thrust Low M
M99 Tailstock Spindle Thrust High M
M109 Cancel of M110 M
M110 C-Axis Joint M
M134 Z-Axis Thrust Monitoring OFF M
M135 Z-Axis Thrust Monitoring ON M
M136 Designation of Multiple fixed cycle configuration M
M137 Touch setter interlock release ON M
M138 Touch setter interlock release OFF M
M139 Lead Machining Function - Learning Operation M
M140 Tapping Cycle M-Tool Constant Rotation Answer Ignored M
M141 C-Axis Clamp or not Selection M
M142 Coolant Pressure Low M
M143 Coolant Pressure High M
M146 C-Axis Unclamp M
M147 C-Axis Clamp M
M152 M-Tools Spindle Interlock ON M
M153 M-Tools Spindle Interlock OFF M
M161 Feedrate Override Fix (100%) M
M162 Cancel of M163 M
M163 M-Tools Spindle Speed Override Fix (100%) M
M168 Ignoring M-Tool Spindle Constant Speed Answer M
M169 C-Axis NoClamp M
M191 M-Tool Spindle Orientation Direction Specified CW M
M192 M-Tool Spindle Orientation Direction Specified CCW M
M197 Thread Cutting Phasing Stroke Clear M
M211 Keyway Cutting Style: Minus Direction M
M212 Keyway Cutting Style: ZigZag M
M213 Keyway Cutting Style: Designated Depth Infeed M
M214 Keyway Cutting Style: Equal Depth Infeed M
Okuma lathe code blocks, etc:
1 program name / graphics data
2 startup block
3 tool change command
4 end of program
1 NLAP (rough OD)
2 NLAP (finish OD)
3 drilling (along z-axis, into center of stock)
4 grooving
5 threading
1 arc cutting (type 1)
2 arc cutting (type 2)
3 drilling (x-axis, deep)
4 drilling (z-axis, off-center pattern)
5 squaring the end face
6 keyway end face
7 keyway longitudinal
8 longitudinal thread angle
9 longitudinal thread
10 offset circle
11 straight lines
The one and only COMPLETE PROGRAM EXAMPLE
(uses several of the blocks of example code, including an extra live tooling thread
block).
1:program name & control panel
graphics data
$______.MIN% (the name of your program goes in the blank)DEF WORKPS LC,[-40,0],[40,20]ENDDRAW
--- NOTES --- [-40,0] gives a Z shift of -4.0" and X shift of 0"
[40,20] means a part length of 4.0" and diameter of 2.0"
2:startup
G00 X20 Z20 (rapid move to the home position)G50 S2500 (upper limit on the RPMs)X___Z___S1000 T010101 M03 M42 M08
block G96 or G97 S___ ...continue program...
---NOTES ---
Fill in the blanks for the X and Z values with the clearance position of the first cut.If you use G96, you'll get a constant surface speed; S = CSS.
If you use G97 you need to specify a RPM value; S = desired RPM.
3:tool
change command
G00 X__ Z__ M9 (move for workpiece clearance)G97 S1000 (direct control of RPM)G00 X20 Z20 (tool change position)X__ Z__ S1000 T020202 M03 M08G96 or G97 S____ (back to CCS or direct control of RPM - see notes for the startup block of code for details)
...continue program... --- NOTES ---
The X & Z right before the "G96 or G97" line should be the clearance position for the new tool.
4:end of
program
G97 S1000G00 Z___ (rapid return to clearance position)X20 Z20M02%
1:rough OD barstock
NLAP
(start at rough stock clearance position)G96 (constant surface speed setting)G85 NLAP1 D__ F__ U__ W__NLAP1 G81G00 X0G01 Z0 G42 F___
___________ (profile code)G40 X______ (X -clearance posistion)G80
--- NOTES --- The G85 command triggers the rough cut subroutine - NLAP1 means
that its the subroutine #1, and the D value is the depth of the cut (the depth as diameter).The F value is the roughing feedrate in inches per revolution (IPR), the U value is the OD of the finish (0 .030 typ.), and the W value is the shoulder finish (0 .004 typ.). The G81 command is for longitudinal profile cuts. The G42 command sets tool compensation right - the F value is the finish feedrate. The G40 command turns the tool compensation off. The G80 command signals the end of the subroutine.
2:finish OD barstock
NLAP
(start at rough stock clearance position)G96 (constant surface speed setting)G87 NLAP1
--- NOTES --- The G87 command calls the finish subroutine - this NLAP number matches with the rough NLAP number, thus "NLAP1".
3:drilling
operation
G97 S_______ (direct control of RPM)G00 X__ Z__ (rapid move to start of drill position - be sure to allow for clearance)G74 X0 Z-__ D__ L__ F__ E__G00 X__ Z__ (move to clearance position)
--- NOTES ---
The G74 command signals the start of the drilling cycle. The Z value is the depth value, the D value is the dwell increment (for chip break), the L value is the retraction increment (clearance for the broken chips), the F value is the feedreate in inches per revolution (IPR), and the E value is the dwell time (in seconds).
4:grooving
operation - plunge
G97 S_______ (direct control of RPM)G00 X__ Z__ (rapid move to start of groove position - be sure to allow for clearance)G73 X__ Z__ K__ D__ L__ F__
--- NOTES ---
The G73 signals the start of the grooving cycle. The X value sets the groove depth diameter, the Z value is the finish point z coordinate, the K value specifies the shift amount in the z direction, the D value sets the dwell increment (for chip breakage), the L value is the retraction increment (clearance for the broken chips), and the F value is the feedreate in inches per revolution (IPR).
5:threading operation
G97 S_______ (direct control of RPM)G00 X__ Z__ (rapid move to start of threading position - be sure to allow for clearance)G71X__ Z__ B__ D__ U__ H__ F__ M33M73
--- NOTES ---
The G71 command signals the beginning of a thread cutting cycle. The X value is the minor diameter of the thread, the Z value is the termination point of the thread, the B value is the thread angle, the D value is the depth of the first cut (diameter), the U value is the finish allowance (also in diameter), the H value is the thread height (again in diameter), and the F
value is the thread lead (the feed rate in inches per minute). The M33 means that there will be a zigzag inffed cutting pattern, and M73 sets the infeed depth to pattern #1. (See manual.)