Monday, December 8, 2008

example program with all 3 basic motion

 In this particular example, we are milling around the outside of a workpiece contour. Notice that we are using a one inch diameter endmill for machining the contour and we are programming the very center of the end mill. Later, during key concept number four, we will discuss a way to actually program the workpiece contour (not the cutter centerline path). While you may not understand all commands given in this program, concentrate on understanding what is happening in the motion commands (G00, G01, and G02/G03). With study, you should be able to see what is happening. Messages in parentheses are provided to document what is happening in each command.

    O0002 (Program number) 
    N005 G54 G90 S350 M03 (Select coordinate system, absolute mode, and start spindle CW at 350 RPM) 
    N010 G00 X-.625 Y-.25 (Rapid to point 1) 
    N015 G43 H01 Z-.25 (Instate tool length compensation, rapid tool down to work surface) 
    N020 G01 X5.25 F3.5 (Machine in straight motion to point 2) 
    N025 G03 X6.25 Y.75 R1.0 (CCW circular motion to point 3) 
    N030 G01 Y3.25 (Machine in straight motion to point 4) 
    N035 G03 X5.25 Y4.25 R1.0 (CCW circular motion to point 5) 
    N040 G01 X.75 (Machine in straight motion to point 6) 
    N045 G03 X-.25 Y3.25 R1.0 (CCW circular motion to point 7) 
    N050 G01 Y.75 ((Machine in straight motion to point 8) 
    N055 G03 X.75 Y-.25 R1.0 (CCW circular motion to point 9) 
    N060 G00 Z.1 (Rapid away from workpiece in Z) 
    N065 G91 G28 Z0 (Go to the machine's reference point in Z) 
    N070 M30 (End of program) 

Keep in mind that CNC controls do vary with regard to limitations with motion types. For example, some controls have strict rules governing how much of a full circle you are allowed to make within one circular command. Some require directional vectors for circular motion commands instead of allowing the R word. Some even incorporate automatic corner rounding and chamfering, minimizing the number of motion commands that must be given. Though you must be prepared for variations, and you must reference your control manufacturer's programming manual to find out more about your machine's motion commands, at least this presentation has shown you the basics of motion commands and you should be able to adapt to your particular machine and control with relative ease. 

No comments: