Author Topic: Anyone understands this Gcode ?  (Read 2540 times)

0 Members and 1 Guest are viewing this topic.

Offline PartialDischargeTopic starter

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: 00
Anyone understands this Gcode ?
« on: January 21, 2024, 08:39:46 am »
I have a laser engraver to which Lightburns sends a square to burn.
The square is 20mm by 3mm and a spacing of 0,5mm in between lines is set. The software does indeed Y movements of 0.5mm and X laser engravings of 20mm, but there are G1 commands at 0% power I don't understand:

G1 X12.5S0
G1 X20S50
G1 X12.5S0

Anyone knows?

Code: [Select]
; LightBurn 1.4.05
; GRBL device profile, absolute coords
; Bounds: X36.2 Y53.78 to X81.2 Y64.28

;USER START SCRIPT
$L
G90
G0 F240000
;M116A2B-4
;USER START SCRIPT

G00 G17 G40 G21 G54
G90
M4
; Scan @ 500 mm/sec, 5% power
M8
G0 X81.2Y64.282
; Layer C00
G91
G1 X-12.5F30000S0
G1 X-20S50
G1 X-12.5S0
G1 Y-0.5S0
G1 X12.5S0
G1 X20S50
G1 X12.5S0
G1 Y-0.5S0
G1 X-12.5S0
G1 X-20S50
G1 X-12.5S0
G1 Y-0.5S0
G1 X12.5S0
G1 X20S50
G1 X12.5S0
G1 Y-0.5S0
« Last Edit: January 21, 2024, 09:04:49 am by PartialDischarge »
 

Offline PartialDischargeTopic starter

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: 00
Re: Anyone understands this Gcode ?
« Reply #1 on: January 21, 2024, 08:48:37 am »
Departing 12.5mm from each side seems like a strategy from the program to increase line definition maybe?
Could not find any setting in the program that defines this 12.5mm
 
The following users thanked this post: RichardS

Offline abeyer

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: us
Re: Anyone understands this Gcode ?
« Reply #2 on: January 22, 2024, 12:34:51 am »
This is there to compensate for acceleration/deceleration limits of your laser head. The mechanical bits can't instantaneously stop and reverse direction, so it will generate gcode to move (with the laser off) outside the bounds of your engraving area so that the machine will already be up to speed in the correct direction before enabling the laser. Otherwise you would accelerate and decelerate within the bounds of your engraving while the laser was on, leading to the edges of your engraved area having a longer dwell time under the laser and thus getting over-engraved. (It's also possible to achieve something similar by reducing the power relative to the acceleration curves, though I don't know if lightburn supports that.)

I don't specifically know how to configure this in lightburn, but my guess would be it's not necessarily a direct thing you control, but rather it's calculating the necessary over-travel distance needed based on the acceleration parameters of your hardware that are defined in its profile.
 
The following users thanked this post: PartialDischarge

Offline PartialDischargeTopic starter

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: 00
Re: Anyone understands this Gcode ?
« Reply #3 on: January 22, 2024, 05:59:59 am »
This particular engraver can do 4000mm/s so probably this behaviour is coded in Lightburn as good practice for every machine.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf