## Any learning "examples" of grbl? Tutorials?

Discussion about the arduino based g-code interpreter, grbl
kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

### Any learning "examples" of grbl? Tutorials?

Is there anyplace I can find some small simple programs written in grbl gcode for the arduinio that explains what the program is doing? Like a tutorial?
It will help me understand the gcode better.

Thanks
K

cvoinescu
Posts: 4442
Joined: Thu Jul 19, 2012 6:50 pm
Location: Camberley, UK
Contact:

### Re: Any learning "examples" of grbl? Tutorials?

There's not much to it, really. G-code commands start with G or M followed by a number. Many G-code commands have coordinates for one or more axes, written as X, Y or Z followed by a number. Spaces are optional, so G0 X5 Y7.3 Z-1.0 can also be written G0X5Y7.3Z-1.0. There's one command per line. There are four essential commands:
• G0 is rapid move. It moves the machine to the given coordinates, with the expectation that no machining takes place during the move (tool not in contact with the stock). Unless the mode is changed by other G-code commands, the coordinates are absolute: G0 X10 moves to X=10, G0 X10 again does nothing because you're already at X=10. If coordinates for two or more axes are given, the machine moves in a straight line to the specified point. Starting from X=0, Y=0, the command G0 X10 Y10 moves diagonally to X=10, Y=10. Even if the axes have different maximum speeds and accelerations, the machine still moves them in a coordinated fashion, so that the move is linear. Only the axes specified move; the others do not change position.
• G1 is linear move. It moves the machine to the given coordinates, with the expectation that the tool would be cutting. It's exactly like G0, except it has an extra parameter, F, that gives the feed rate (the speed at which to move). The speed is expressed in units per minute (mm per minute or inches per minute, depending on mode -- default mm/min). So, with the machine at X=0, Y=0, the command G1 X100 Y100 F200 moves it diagonally to X=100, Y=100, a distance of about 141 mm, at 200 mm/min, so it takes about 43 seconds to get there.
• G2 and G3 are arc moves (clockwise and counter-clockwise), and they're described very well here. I would use only the I J form and not even bother with the R form.
Proud owner of ShapeOko #709, eShapeOko #0, and of store.amberspyglass.co.uk

kristenanne77
Posts: 432
Joined: Thu May 08, 2014 11:34 am

### Re: Any learning "examples" of grbl? Tutorials?

Thanks Its a start!

K