Presentation is loading. Please wait.

Presentation is loading. Please wait.

CNC Router Programming Some basics for FIRST Robotics.

Similar presentations


Presentation on theme: "CNC Router Programming Some basics for FIRST Robotics."— Presentation transcript:

1 CNC Router Programming Some basics for FIRST Robotics

2 ROBOTICS ACADEMY: FRC CNC Router Safety First Safety glasses at all times in the shop Router – As with any router, ensure it is unplugged prior to changing or touching the tool. Mill table – Standard setup practices Position cross head out of the way Disable cross head with the E-stop Mill table – Standard operating practices Hearing protection Guards up, hands out of the way Be prepared to hit the E-stop if something goes awry

3 ROBOTICS ACADEMY: FRC CNC Router CNC – Computer Numerical Control Programming 1) It’s not hard The CNC “G-Code” is simply connect the dots Commands are lines in a plain text file 2) Attention to detail is essential Simple programming errors can break things Operation 1) It’s not hard Just hit the button and go 2) Attention to detail is essential Watch for binding, hot tooling, programming errors

4 ROBOTICS ACADEMY: FRC CNC Router Basic Controls Our CNC mill software has control over: Location of coordinate system origin Units : in or mm X, Y & Z tool location Cutting velocity Industrial mills also control Cutter selection Cutter rotation start / stop Cutter rotational speed Coolant flow rate Etc…. X Y Z

5 ROBOTICS ACADEMY: FRC CNC Router Basic G-Code Named “G-Code” because most commands begin with “G” G0 X2.3 Y4.2 Z-0.5 Move at high speed to Ending Location G1 X2.3 Y4.2 Z-0.5 Move at controlled speed to Ending Location Each G1 command creates a single line segment The ending location “X”, “Y” and “Z” only need to be specified if they are different than the current location Used for positioning, not cutting Used for cutting or positioning Green numbers are for illustration. The red and black are keywords X Y Z

6 ROBOTICS ACADEMY: FRC CNC Router Connect the dot example (0, 0) (0.5, 0) (0.5, 2.0) (1.5, 2.0) (1.5, 2.5) (-1.0, 2.5) (-1.0, 2.0) (0.0, 2.0) G0 Z0.2 G0 X0.0 Y0.0 Z0.2 G1 X0.0 Y0.0 Z-0.25 G1 X0.5 Y0.0 Z-0.25 G1 X0.5 Y2.0 Z-0.25 G1 X1.5 Y2.0 Z-0.25 G1 X1.5 Y2.5 Z-0.25 G1 X-1.0 Y2.5 Z-0.25 G1 X-1.0 Y2.0 Z-0.25 G1 X0.0 Y2.0 Z-0.25 G1 X0.0 Y0.0 Z-0.25 G0 X0.0 Y0.0 Z0.2 G0 X-2.0 Y4.0 Z0.2 The light colored coordinates can be omitted Hollow “T” shape

7 ROBOTICS ACADEMY: FRC CNC Router Connect the dot example (0, 0) (0.5, 0) (0.5, 2.0) (1.5, 2.0) (1.5, 2.5) (-1.0, 2.5) (-1.0, 2.0) (0.0, 2.0) G0 Z0.2 G0 X0.0 Y0.0 G1 Z-0.25 G1 X0.5 G1 Y2.0 G1 X1.5 G1 Y2.5 G1 X-1.0 G1 Y2.0 G1 X0.0 G1 Y0.0 G0 Z0.2 G0 X-2.0 Y4.0 Raise tool Get tool out of the way Raise tool Set at starting point Lower tool Unneeded coordinates omitted Hollow “T” shape

8 ROBOTICS ACADEMY: FRC CNC Router Circles and arcs in G-Code Circular arcs are the other basic shape that can be cut G2 X2.3 Y4.2 Z-0.5 I1.1 J2.3 K-0.5 Clockwise arc to Ending Location Starting point for arc is previous tool location The “K” center location will always be omitted for the CNC router with Arc center G3 X2.3 Y4.2 Z-0.5 I1.1 J2.3 K-0.5 Counter clockwise arc to Ending Location with Arc center

9 ROBOTICS ACADEMY: FRC CNC Router G0 Z0.2 G0 X1.0 Y4.0414518 G1 Z-0.25 G3 X-1.0 Y0.57735034 I0.0 J2.3094118 G1 X1.0 Y-0.57735034 G2 X-1.0 Y-4.0414518 I0.0 J-2.3094118 G0 Z0.2 G0 X0.0 Y5.0 G1 Z-0.25 G1 Y-5.0 G0 Z0.2 G0 X-4 Y6 Example with arcs and lines Circular arcs have radius 2 and centers Raise tool Initial position Lower tool Raise tool Go to top of line Lower tool Vertical line Raise tool Get out of the way Top arc Line Bot arc

10 ROBOTICS ACADEMY: FRC CNC Router Tool speed control (Non-”G”-Code) Rotation speed of the router Use the manual speed control on the router Translation speed for cutting Use the “F” command Sets speed in “inches/minute” Example G0 Z0.2 G0 X0.0 Y0.0 F5.0 Lower slowly G1 Z-0.25 F15.0Cut faster G1 X0.5 G1 Y2.0 G1 X1.5 …. “F” speed remains in effect until changed Affects G1, G2 & G3 Does not affect G0 Rotation and translation speeds are coupled by the amount of material that can be removed by the cutter without stalling or overheating. If it smokes, melts or grunts, STOP!!

11 ROBOTICS ACADEMY: FRC CNC Router Standard commands in the control file % G20 G40 G50 G53 G90 G90.1 ( Use parentheses to add comments) … Machining related code … M0 M30 % Use “%” at top and bottom First line of code sets operating modes and will likely be the same for all programs. Look them up as an exercise. The “M-Code” numbers says stop and end of program. TIP: The M-codes and % can be used as an incremental debugging tool. Place within a large code to terminate the code early. “Boilerplate” commands for all codes

12 ROBOTICS ACADEMY: FRC CNC Router  G-Code programming is simply a connect the dots text file with a few standard lines at the top and bottom of the file  Our mill cuts wood and can cut aluminum with a sharp tool and coolant  Tool can only cut as deep as the cutting flutes on the tool bit  Dull tools can make wood smoke and melt aluminum  The mill program provides a picture of the tool path and lists the minimum and maximum coordinates found in the program. Use these to double check the program.  Test new code with router off and tool elevated above the workpiece.  Remember to zero the mill coordinates with respect to the workpiece.  Most common error we have encountered is using a G0 instead of a G1. This causes rapid motion which breaks the tool, ruins the part, and scares the operator. Odds and ends

13 ROBOTICS ACADEMY: FRC CNC Router Questions?


Download ppt "CNC Router Programming Some basics for FIRST Robotics."

Similar presentations


Ads by Google