Mach3 laser with UC300ETH

Forum for Discussing Mach3/4 related issues

Mach3 laser with UC300ETH

Postby Masterdrive » Fri Jan 10, 2025 10:34 am

Hi @ all,

I've been running my setup (Mach3 with UC300ETH and a 1.5kW spindle controlled via VFD) without any issues for years.
Mostly for wood and aluminum machining.
End of last year, I came across an inexpensive 10W laser, and gave it a try for some fine wood-cutting and engraving.

I tried setting up the laser based on documentation I found throughout the internet... and that's where I am now.
Currently, the laser 12V is connected to it's dedicated power supply.
The PWM is connected to port 3 pins 1 (PWM) and 25 (GND)
In Mach3, Spindle step is set to port 3 pin 1, same as output#2, and M3/M5 set to output#2 with PWM enabled and dwell 0.

With this, I'm able to cut and engrave... but with issues:
Due to the nature of M3/M5, even with dwell=0 there is a slight delay.
This leads to engraving showing gaps, and the parts being still attached with ~0.1mm where the cut starts/end.
175.jpg
175.jpg (12.75 KiB) Viewed 1955 times

When I set the dwell to 1 second, it will cut the parts nicely... but engraving will also start cutting the parts...

Example G-Code:
Code: Select all
G0 Z0.1
G0 X0.0 Y-0.05
G1 Z-0.1
M3 S100
G1 F50.0 X10.0
G3 X10.05 Y0.0 I0.0 J0.05
G1 Y20.0
G3 X10.0 Y20.05 I-0.05 J0.0
G1 X0.0
G3 X-0.05 Y20.0 I0.0 J-0.05
G1 Y0.0
G3 X0.0 Y-0.05 I0.05 J0.0
M5
G0 Z0.1


I tried using M11/M10 commands in Mach3, but they don't work as expected.
With M11P2, the laser will only light up for a brief moment on the fist move, and will stay off for all consecutive moves.
All posts I found in the forum for M10/M11, the users either already were on UCCNC, or switched to UCCNC in the end... which I honestly want to avoid.

So I'd gladly accept some feedback if my wiring/configuration is wrong, or if this is still a known limitation.

UC300ETH with
- PluginVer. 1.022
- BL Ver. 1.000
- FW Ver. 1.035
- HW ID 0002
and Mach3 R3.043
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm

Re: Mach3 laser with UC300ETH

Postby cncdrive » Fri Jan 10, 2025 1:47 pm

It is important for Mach3 to make a movement after the M10/M11 command, because how it works in Mach3 is it attaches the M10/11 command to the movement command.
Your issue is probably that after switching the M10 there is no G1 or G2 or G3, but there is a G0.
cncdrive
Site Admin
 
Posts: 4997
Joined: Tue Aug 12, 2014 11:17 pm

Re: Mach3 laser with UC300ETH

Postby Masterdrive » Fri Jan 10, 2025 3:22 pm

... unfortunately not... that was one of my initial thoughts as well...
the code pasted above was basically made by replacing the M11P2 commands with M3 S100 (and the M10P2 with the M5) in the laser postprocessor
and there is a G1 F50.0 X10.0 directly afterwards.

The laser also briefly lights up (also when the commands are entered manually via MDI and there is a minute of time between them), so I suppose movement is recognized as is should and the combination M11 + G1 is recognized.
I'm wondering though why the laser won't stay on...
If I then enter M10 + M11 + G1 again, same repeats... laser briefly flashes...
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm

Re: Mach3 laser with UC300ETH

Postby cncdrive » Mon Jan 13, 2025 11:28 am

I forwarded this report to my plugin developer collegue now.
cncdrive
Site Admin
 
Posts: 4997
Joined: Tue Aug 12, 2014 11:17 pm

Re: Mach3 laser with UC300ETH

Postby Masterdrive » Thu Jan 16, 2025 1:54 pm

... did some parallel investigation, also looking for answers in the Mach3 community forum.
One thing I found out is that signals won't work reliably when having both PWM/Spindle and M3/M5 configured for the same port/pin.
As mentioned in my initial post, I had both of them set to port 3, pin 1.

I did some trial and error to figure out what would work... but there are caveats to all...

I' currently have
- spindle (PWM) to port 3 pin 1
- M3/M5 (output #1) to port 3 pin 2, switching 12V via a relay
- M11/M10 (output #2) to port 3 pin 3
and have connected pin 1 and pin 3 with logic AND (double NAND 74LS00)

With this, M11/M10 functionality is as expected (M11 + movement will turn laser on, M10 + movement will turn it off).
However, there is still a slight delay... not as much as with M3/M5, but with engraving still visible.

I found a post in the Mach3 forum mentioning:
with the Mach3 Plugin for the UC400ETH motion controller. There appears to be some unwanted delays in the M11Px / M10Px switching times which are preventing acceptable laser operation

but I don't know whether this issue is also present in the UC300-ETH (the name is similar though :-) )

BTW:
I also tried switching the laser on/off by simply using the Sxxx command... but that won't work with Mach3 as well, since any Sxxx will make the axis stop moving for a brief moment, burning small holes in the engraving.

Would be great if this can be worked out :-)
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm

Re: Mach3 laser with UC300ETH

Postby Tweakie.CNC » Thu Jan 16, 2025 3:01 pm

Hi Masterdrive,

I think this thread refers; viewtopic.php?f=22&t=3071

Tweakie.
User avatar
Tweakie.CNC
 
Posts: 127
Joined: Wed Jul 31, 2019 7:58 am
Location: London UK

Re: Mach3 laser with UC300ETH

Postby Masterdrive » Thu Jan 16, 2025 3:50 pm

Hi Tweakie,

yes... that's exactly the issue...
However, I came across your post over here machsupport.com...#msg285543 when searching whether it is related to gating the two outputs (PWM + M11/M10)... but apparently, it was not.

Maybe CNC Drive has an update :-)

KR, MD
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm

Re: Mach3 laser with UC300ETH

Postby cncdrive » Thu Jan 16, 2025 5:38 pm

I forwarded this to my plugin developer collegue.
cncdrive
Site Admin
 
Posts: 4997
Joined: Tue Aug 12, 2014 11:17 pm

Re: Mach3 laser with UC300ETH

Postby Masterdrive » Fri Jan 17, 2025 11:34 am

Thanks for all the support @ CNC Drive
I can only imagine how hideous it is supporting Mach3, which is neither well designed nor well written
But Mach3 is still strong :-)
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm

Re: Mach3 laser with UC300ETH

Postby Masterdrive » Thu Jan 30, 2025 6:47 pm

I did some additional testing, but I'm not able to compensate for the delay yet.
A simple
Code: Select all
M3 S100
G1 X0 Y0 F300
M11P2
G1 X10
M10P2
G1 Y10
M5

will produce something like that:
20250128_220734.jpg
20250128_220734.jpg (7.72 KiB) Viewed 910 times

With feed-rate 300, the distance the laser was still on was ~1mm, which would be 200ms.

The only thing left to try is introducing additional Z moves that at least have a duration of those ~200ms to prevent overburn while cutting... don't know if there is a workaround for engraving at all...
Masterdrive
 
Posts: 6
Joined: Thu Jan 09, 2025 12:32 pm


Return to Mach3/4 Discussions

Who is online

Users browsing this forum: No registered users and 3 guests