Firmware Configuration

Using the WorkBee PLH3D Mount and Magnetic Docking Station facilitates connecting the laser head, but also decreases the available work area by a small amount. To avoid damage to the laser head mount, it is necessary to set the X-axis minimum to 25mm.

  1. Launch WorkBee Control. In File Management/System open the file called config.g.

WorkBee Firmware Configuration for Laser Engraving

  1. Copy the G-code line that sets the axis minimum.

G-Code Line Set at WorkBee

  1. Close config.g without saving and then open customconfig.g.

Custom Configurations for WorkBee

  1. Paste the copied command and change the X value to 25. Save changes.

Limiting X-Axis at WorkBee

Now, your X-axis minimum is limited to 25 mm (in machine coordinates). Bear that in mind when the laser is not in use. Set working coordinates only when the machine position in the X-axis is equal or higher than 25.

When a PLH3D-6W laser head is mounted, an additional 50 mm in the X-axis has to be added. So the minimum limit in this axis will be 75mm.

Generating G-code

For RepRap Firmware 3.0 and above, you need to generate the appropriate G-code using the following commands in order to laser cut and engrave:

M452 C"!exp.heater3" R255 S1  F1000

 Laser uses heater3 pin,  with max PWM value 255 (laser power is sticky across G1 commands),  and a PWM frequency of 1000 Hz

M3

 Activate Laser

M3 Sxx

 Activate Laser with PWM value xx

M5

Deactivate Laser


The first three commands should be placed at the beginning of the G-code file (in the header). The fourth command should be at the end of file (in the footer). The ā€œSā€ command has to be at least in every line where laser power is being changed (except G0 lines, because G0 automatically turns off laser).  

When Duet is in laser mode (M452), the laser is turned on only during G1, G2 and G3 commands. Please note that M3 Sxx sets the laser power but does not switch it on. 

To see a G-code example, please refer to Appendix 2.