Chat with us, powered by LiveChat
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

How to Work with the G-code

What commands to use when working with the Endurance laser

In order to make a contour image for engraving or cutting, we advise to prepare the G-code in advance.
The properly made G-code will allow you to choose the optimal parameters for cutting or engraving.

There are 2 plug-ins that will allow you to prepare a high-quality G-code from the Inkscape program:
• Endurance Laser G-code
• J Tech Photonic Laser tool

Both plug-ins and the Inkscape program are available on the Endurance website:

Download center – lasers

Some time ago we made a video demonstrating how to prepare an image for laser engraving and cutting using Inkscape
watch our YouTube channel

In this article I’d like to tell about the G-code and commands to be used.

The commands are devided into two groups:
G – Preparatory (main) commands;
М – Auxiliary (technological) commands.

Parameters of these commands:
X – Coordinate of the trajectory point along the X axis [G0 X100 Y0 Z0]
Y – Coordinate of the trajectory point along the Y axis [G0 X0 Y100 Z0]
Z – Coordinate of the trajectory point along the X axis [G0 X0 Y0 Z100]
E – Coordinate of the plastic extrusion point [G1 E100 F100]
P – Command parameter [M300 S5000 P280]
S – Command parameter [G04 S15]
F – Command parameter, feed (speed) [G1 Y10 X10 F1000]
G – commands
G0 – Idle pass [G 0 X 10]
G1 – Coordinated movement along the X Y Z E axes [G 1 X 10]
G4 – Pause in seconds [G4 S15]
G28 – Home command – head parking [G28 Y0 X0 Z0]
G90 – Use of absolute coordinates [G90]
G91 – Use of relative coordinates [G91]
G92 – Setting of the present given position [G92]

Additional list of commands (checked for GRBL 0.9i)

G-code Name – description
G00 Fast positioning
G01 Linear interpolation
G02 Clockwise interpolation
G03 Counter clockwise interpolation
G04 Dwell
G10 Programmed data input
G17 XY surface selection
G18 ZX surface selection
G19 YZ surface selection
G20 Programming in inches
G21 Programmimg in mm
G28 Home position return (zero)
G30 Seconary home return (ref pt)
G40 Tool radius correction off
G43 Negative tool hight shift compensation
G49 Tool length correction compensation
G53 Device’s coordinate system
G54-G59 Work coordinate systems (WCS)
G61 Correct stop, modal
G80 Cancel completed cycle
G90 Absolute programmimg
G90 Fixed cycle for roughing (Z-axis accent)
G91 Incremental programming
G92 The position register from zero to the top of the tool
G92 Threading cycle, simple cycle
G94 Feed rate per minute
M00 Mandatory stop
M02 End of program
M03 Spindle on (clockwise rotation)
M04 Spindle off (counter clockwise rotation)
M05 Spindle (laser) stop
M08 Cooling system
M09 Cooling off
M30 End of program with return to the top part of the program

How to work with with the G-code for the Endurance MakeBlock XY engraver
G00 // positioning
G04 P0 // pause, delay setting at 0.
M05 S0 // laser off
G90 G21 // step specifying in mm.

G00 X5 Y5 // positioning along X and Y.
G04 P0 // pause, delay setting at 0.
M03 S255 // laser turning on and max.power setting
G04 P0 // pause, delay setting at 0.

G01 X50 Y10 F1500 // laser head shift by 5 cm along X and by 1 cm along Y, speed setting at 1500
G04 P0 // pause, delay setting at 0.
M05 S0 // laser turning off

G04 P0 // pause, delay setting at 0.
M05 S0 // laser turning off
G00 // positioning

M02 // end of the program

Useful links and materials about G-code

Follow us in social media

How to Work with the G-code
How to Work with the G-code

Please share with your friends

If you have any questions or concerns, please share with us!

  1. (please, enter a valid email)

Endurance lasers special deal

  1. (please, enter a valid email)

Subscribe to our news and stay updated!