Laser power off until M10 operation

Post anything you want to discuss with others about the software.

Laser power off until M10 operation

Postby courtjester » Tue Jun 28, 2022 6:48 pm

I finally have my add on laser working except for one thing. I am using a 400ETH, 1.2115 software and lightburn 1.0 (GRBL-M3) and a manual laser power on (switch for the 12 Volt power to the laser module) Neje A40640 laser. What I am having a problem with is the laser will fire randomly and when the G-code is running, this leaves unwanted etching on the project. I have a dot where it starts from and between letters (or places where the laser should be off). I have tried different setting in the Lightburn loader menu, not that. Next I thought I would pin a relay to M3 but that only happens once at the start of the G-code. I did not have this problem in the initial setup using a Arduino and GRBL, but I need to used the UCCNC electronics and software for other operations on my CNC table.
What do other member use to power the laser on/off???
courtjester
 
Posts: 22
Joined: Fri Aug 28, 2020 6:28 pm

Re: Laser power off until M10 operation

Postby formantjim » Tue Jun 28, 2022 8:12 pm

Here is a selection of code from my setup with a laser attached to my CNC machine, My laser has a TTL input to switch it on and then it has a PWM pin which is driven from a pin and port on my ETH300.

The M3 starts the laser but the M10 controls the power. Here you can see I'm doing some cutting so the power is Q255 and then is stopped by the M11 command. The laser can only fire if both M3 is on and some value of M10 is greater than 0.
I would check your code to see if the M11 command follows the M10 between letters.

I too am using the same 1.2115 software and lightburn plugin and it performs perfectly. The laserengrave plugin within UCCNC is truly a fantastic piece of software, produces photos with amazing detail.


laser code.png
formantjim
 
Posts: 76
Joined: Fri May 31, 2019 5:28 pm

Re: Laser power off until M10 operation

Postby courtjester » Wed Jun 29, 2022 12:58 am

Hi Tim
Thanks for the reply, attached is my G-code after the conversion and it seems to be very similar. I think you are saying you use the M3 to control the power on for the laser, and the M10 is for the modulation of the laser. I will try that in the morning. Do you see the !!invalid "S" parameter !! message in your G-code header as seen in mine?? Another odd thing when using the Laserengraver it does not display the G-code to look at. I had tried that but it was before I had the laser pin enabled and the power was max and just burned full blast so no image could be seen, I will try that again.
One other question what pin are you using for the M3. I also use the table for Plasma and the relay on the card is for torch on trigger. I will generate another profile for laser and use another pin and relay for the M3 laser power.
Have fun
Tom
test g-code.JPG
courtjester
 
Posts: 22
Joined: Fri Aug 28, 2020 6:28 pm

Re: Laser power off until M10 operation

Postby formantjim » Wed Jun 29, 2022 1:15 pm

Yes that is correct M3 fires a pin to initialise the laser and then M10 QXXX determines the power being 0 to 255 via another pin that is modulated via PWM.

The Laserengrave Plugin yes does not show any gcode for some reason but just works!

Looking at your Gcode you do indeed need to use a separate Pin to modulate the laser for the M10 command to work properly if you notice you have a line that states Cut 50% power but then a few lines down you have M10 Q137.5 which is clearly not the 50% that was given before. You need to use the Lightburn Plugin to convert the Lightburn "Gcode" to UCCNC "Gcode" then I think you will have correct control. Yes the invalid "S" parameter is the spindle speed command it does not understand so make sure you do your design work in Lightburn then save the Gcode and then use the Lightburn plugin to do the conversion.
formantjim
 
Posts: 76
Joined: Fri May 31, 2019 5:28 pm

Re: Laser power off until M10 operation

Postby courtjester » Wed Jun 29, 2022 3:31 pm

Ok what corrected the problem of the laser power being on was I had the input pin for the modulation switched. It should not have fired as I told it to use pin 17 (B dir) on the BOB but had connected it to pin 4 (B step). When I told it to use pin 4 for the laser modulation in UCCNC it only fires the laser under G-code commands and turns off as it should. Thanks for the info here and other posts I looked at about Lightburn laser setup and operation, it seems 1.2115 and using GRBL-M3 in lightburn made things work :lol:
courtjester
 
Posts: 22
Joined: Fri Aug 28, 2020 6:28 pm

Re: Laser power off until M10 operation

Postby formantjim » Thu Jun 30, 2022 6:20 pm

Good to hear! Glad you got it sorted.
formantjim
 
Posts: 76
Joined: Fri May 31, 2019 5:28 pm

Re: Laser power off until M10 operation

Postby marteng » Wed Oct 05, 2022 3:07 pm

Hello guys, I know this thread is a few month's old, however am planning to install a CO2 laser on my CNC router and having done some research have been told that when using PWM there is some or may be some delay in firing the laser in relation to position. I am not sure how true this is but since i am still setting up, i thought maybe can have some guidance from your expertise on how to go about this or which route I should consider to take.
My main objective is to cut through but since I wouldn't rule out the need for photo engraving, might as well cater for this too. I currently run the CNC with Mach3 but intend to switch to UCCNC for better compatibility with my UC300ETH-5LPT ethernet motion controller and DG4S-16035 servo drives.
I have no idea what setup I need in terms of software, postprocessor etc, so any advice would be much appreciated.
Thanks
Marten
marteng
 
Posts: 42
Joined: Fri Sep 16, 2016 1:57 pm
Location: Malta


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 14 guests