Hi everyone,
This is my first post in this forum but I have been around reading and learning, thanks to all
I have built my diy CNC and everything is fine using Mach3 with USB control board. Recently, I decided to add a laser to my machine, and I managed to make it working ok, but I have issue with early laser turning off.
Let me explain the wiring, I had to use relay as the laser needs 12v, and it's controlled by an output pin (M3/M5).
I have connected PWM pin with the laser to control its power (using S command).
As relay has some delays, I couldn't use command M11/M10. Instead, I used M3 command to turn on relay (laser is powered now) with S0 command to make no beam firing, then I used PWM to turn on/off the laser beam; S0 to cut it off and S10~S100 (depends on power I need) to turn on.
I have created a test G-code that make 4 lines with different feed rate each (start from left slowest) as follow:
(1001)
G90
G64
G54
G43 H65
M3 S0
G4 P2
G0 X-5. Y-10.
S100
G1 Y10. F100
S0
G0 X0. Y-10.
S100
G1 Y10. F200
S0
G0 X5. Y-10.
S100
G1 Y10. F300
S0
G0 X10. Y-10.
S100
G1 Y10. F400
S0
M5
G0 G53 Z0.
G0 X0. Y0.
M30
The result is that the higher feed rate I use the earlier laser will turn off as per attached photo, is this delay a limitation with mach3 same as M3/M5 as well? I have tried to write some text, but it will not connect lines as it's cutting off early.