Design Futures Lab

G-Code Challenge

Now you have made some basic tool paths take a quick step back and familiarizing yourself with G-Code. Do some research online, post one of your toolpaths and have a look at it, and practice writing a bit of code with the following challenge: Write your Initials in G-Code by hand coding it.

Here are a few links to give you an intro into G-code, as always, I encourage you to find more yourself:

Don’t get too bogged down in all the details , but check out the Below and use something like https://ncviewer.com/ to compile and view your toolpath to make sure its drawing out your initials! If your doing this as a class exercise please submit your G-code as text, and a screengrab of the initials you drew

Gcode.PNG

G-Code Challenge requirements

(All of these should be present in your g-code)

In addition to writing the G-Code to draw our of your initials, here are some extra info you need to code into your file. Look around for the various G and M codes that do these and put these into your program. This will help you identify these functions in future when reviewing the G-code generated by fusion 360 or any CAM software.

If you need help determining what G-codes are, look at the articles above, or google for a g-code referance

  1. Please use Absolute positioning for this exercise
  2. Specify mm as the units of measure
  3. Please use tool 98
  4. running at a spindle speed of 9000 rpm
  5. at a Controlled feedrate of 4000 mm/m
  6. in the World Co-ordinate system of G55
  7. The Material is 16mm thick, and the depth of cut should be 2mm deep into that.
  8. You can do any size you like, but suggest you make the Letters of your initials 50mm In height.
  9. Please start by retracting the tool in the Z axis to a safe distance, Moving at a rapid feedrate to a safe height above your chosen start point of your first initial, and include and optional stop just before the tool plunges down and begins tracing your initials.

Some suggested steps

You can use https://ncviewer.com/ to test as you go, you can also write your G-Code there.

1.Start with a hand drawing

Before you start coding, get some paper and sketch out a simple drawing of your initials:

  • Use grid paper, or draw a simple grid on your paper first in a light color
  • For your first time keep the initials blocky and strait. If you found this simple, consider including some Arcs!

In a different color annotate your drawing:

  • Note the co-ordinates at the end points of each line (x,y)
  • At the middle of each line use a number to allocate in the order which you would like to draw the lines
  • Use an arrow, to mark the direction you would like to draw in.

2.Use a text editor or https://ncviewer.com/ to Start coding the a 'body' like section focusing on the XY moves first:

  • Use the above drawing to annotate the X and Y moves. Remember modality , if the value of X doesn’t change from one line the next, there is no need to insert a duplicate value for X on that line.
  • When you need to start a line in a different location to the end of the previous line, you will need to retract the Z to a safe height, make a rapid move to the start point of your new line and then plunge down. Just start by inserting a (comment line) to note this for now and then add them all at the once you have finished all of the XY moves..

3.When your finished drawing the X and Y moves Go back through the code and Add your Z heights:

  • the height should be below the material when your 'cutting' or 'drawing' your initials
  • the height should move up and down to a safe height above the materials whenever its moving to the next drawn line.
  • As a rule of thumb when plunging Z moves should be at least half the feed rate XY moves as a basic rule of thumb.
  • When Moving upward, a Z height can retract upwards as a Rapid move.
  • If your finding this easy, See if you can add a small profiling ramp to get down to the cut depth instead of plunging.

4. Add a 'header' like section calling all of the requirements above that apply to the entire tool path and not specifically to a spcific mode and any other settings you can think of

5.Add a 'footer' that retracts the Z, returns home, and does all of the 'end of routine' tasks

Make sure to add Add comment lines () to describes all of these above important moments in your text.

6. Use https://ncviewer.com/ To compile and preview and screengrab your toolpath!