Skip to content

3.3 Settings Gcode

jorgerobles edited this page Apr 29, 2018 · 4 revisions

The GCode settings establishes the code to put at the start and end of the Gcode file along with other settings such as turning on and off a spindle for CNC and a PWM max value for lasers.

Gcode Start - put any code here that you want to execute before the first CAM operation

Gcode End - put any code here that you want to execute after all of the CAM operations have complete

Gcode Homing - the homing sequence executed when you click the Home Laser button on the Jog screen

Tool on - Executes to turn the tool on before the first operation starts

Tool off - Executes to turn the tool off after the last operation completes

PWM Max S Value - Maximum S value that the Gcode will create. This will work in conjunction with your max power setting in the CAM tab and the max pwm in your hardware config if available

Check Size Power - Percentage of power when using the Check Size feature on the control tab ( values in the image just for reference, your actual value might differ )

Tool Test Power - Percentage of power when using the Laser Test feature on the control tab ( values in the image just for reference, your actual value might differ )

Tool Test Duration - Duration in ms for the Laser Test. 0 for toggle

Gcode Generation

  • Gcode Generation threads - Higher number of threads demands powerful host computer, but increases performance on large files with lots of operations.
  • Gcode Linearization factor - Lower number increases precision on load and gcode calculation on curve feature heavy documents. Select 0.1 for Ultra-high (slow), 1 for Normal (fast) and 2 for Low Precision (fastest).

Please reference your controller documentation and firmware documentation for the proper values to enter into these fields if you have any questions. The values shown below were for a Cohesion 3D mini controller running the Smoothie firmware-cnc.bin firmware. Your settings may vary.

Detailed Settings Description

LASER INTENSITY tells LW4 which letter to use in the gcode for the laser intensity. Usually this is "S", but there are some firmwares like old Marlin that need something else here.

The switch also is used for Marlin to generate a separate gcode line for the S value, instead of embeding the value in the G1/G2/G3 line.

PWM MIN S VALUE and PWM MAX S VALUE tells LW4 the min and max S values to use in the gcode. Min is usualy 0, but in some occations you could want to have a higher value. For example to hold the laser tube active (with very low power) for faster reaction. The max value is depending on the firmware. On Smoothieware it is usualy 1, on Grbl 1000. On machines that do not have a pot, this can also be used to limit the power to like 80% for longer tube life.

CHECK-SIZE POWER is the power in % to use for the "CHECK SIZE" function. This is mostly used only on diode lasers with a power setting that doesn't leave a mark on the part, so you could see the outline during the operation. On CO2 lasers, this should be 0, because you don't see the beam and don't want to burn the outline.

TOOL TEST POWER sets the power in % for the "LASER TEST" button and TOOL TEST DURATION sets the duration in ms. On CO2 lasers I would set 100% and something like 20ms, so a single button klick on LASER TEST will fire the laser for 20ms with the power set by the pot. On diode lasers, I suggest to set 1-5% (as low as possible to still see the beam) and 0ms. This way you can manually toggle the beam on and off (without leaving a mark on the part).