Hello Guest it is May 13, 2021, 01:41:18 AM

Author Topic: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_  (Read 170 times)

0 Members and 1 Guest are viewing this topic.

Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« on: February 08, 2021, 03:02:28 PM »
I use Mach4 with a Pokeys54CNC in my homemade router. Sometimes I install a 5.5W led laser to make some engraving.
To use the laser, I created a new profile, I turn the laser on/off M3/M5 using one of the relays outputs and use pin 20 for PWM control with the S command.

It works nicely for cutting or black and white engraving, but this works badly when engraving gray scales. The issue is that when you have a set of instructions like the one shown below, the machine stops in each line, the speed is not constant, and instead of engraving, it burns the stock.

The cheap Arduino GRBL controller has an option they call "Laser Mode" in which an S command after G1, G2, or G3 does not stop the motion!

Is there a way to do this with Mach4?


G0 X4 Y2 S0
G1 X3.8 Y2.2 S216
X3.6 Y2.4 S232
X3.4 Y2.6 S241
X3.2 Y2.8 S279
X3 Y3 S260
X2.8 Y3.2 S257
X2.6 Y3.4 S326
X2.4 Y3.6 S304
X2.2 Y3.8 S291
X2 Y4 S250
X1.8 Y4.2 S229
X1.6 Y4.4 S191
G0 X1.2 Y5 S0

 
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #1 on: February 08, 2021, 03:19:31 PM »
it could be done but the issue is we would need to make another interpreter. The problem is that we have to deal with all the "stuff" a lathe, mill and router need when changing speeds. We even have code for a lathe to wait for the RPM to come up or down. :)

We are doing some lathe Dev work so that could be done. Is that the new hip way to do laser ?
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #2 on: February 08, 2021, 03:44:33 PM »
Brian,

Thanks for your fast response! Al low-cost Chinese LED lasers work the same. There is a cheap Arduino-based board that connects via USB to a PC with a GRBL Laser opensource controller with 3 axis stepper drive included. They need an on/off command to enable the laser and the rest is done with the S command to a PWM output.

I actually use the wait time for the spindle when using my router with a rotary axis but, unfortunately, the wait is a bad thing for laser engraving.

My laser profile works very nice except for the issue above. I hope you can find a solution I can test.

Thanks again.

Carlos

Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #3 on: February 08, 2021, 03:56:15 PM »
Making a new interpreter is cake. Granted it is a big cake... So don't expect anything over night but we will do this... This is way simpler than what I wanted to do !

Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #4 on: February 08, 2021, 07:50:35 PM »
Had a chat with the other programmer and we have the analog out in sync with the GCode. It is not using the S command so that will be the change. The good news is all the parts are in place! Just need to put them together another way ;)
« Last Edit: February 09, 2021, 12:10:39 AM by Brian Barker »
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #5 on: February 08, 2021, 07:57:56 PM »
Had a chat with the other programmer and we have the analog out in sync with the GCode. It is not using the S command so that will be the change. The good news is am the parts are in place! Just need to put them together another way ;)

 :) Great news, for me and for your organization. I am sure that with this option you will sell a lot of licenses! I will be the first to make a lot of noise  :D :D :D
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #6 on: February 09, 2021, 12:12:19 AM »
If anything it will at least be fun. We do have a Co2 laser we test on. What are you using for cam software?
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #7 on: February 09, 2021, 06:26:43 AM »
If anything it will at least be fun. We do have a Co2 laser we test on. What are you using for cam software?

The easiest way to CAM photos to create a raster G code is by downloading the GRBL Laser freeware, there,  you can open any JPG, PNG, or PDF picture file and create a raster, and then export the G code and make minor manual edits to work with Mach and Pokeys. With Inkscape, you can also generate the G code but you need a little more work for manual post-process.

For my normal milling and routing, I use Autodesk Inventor Cam or Fusion360 depending on what platform I used for design.
Re: Laser Mode i.e. do not stop motion after a G01 G2 or G3 X_ Y_ S_
« Reply #8 on: February 09, 2021, 06:53:54 AM »
If anything it will at least be fun. We do have a Co2 laser we test on. What are you using for cam software?

I forgot to tell you that with CO2 and fiber Laser you also besides the PWM output you need an immediate or sync output to turn on/off the laser. This is not needed with the cheap blue light Led lasers, in this case, you simply send an M3 at the beginning of the program and an M5 at the end of the program.