UCCNC M10 Laser not turning off on M10 Q0 Command

If you have a question about the software please ask it here.

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Sat Oct 20, 2018 6:58 am

3d0g wrote:
Robertspark wrote:Instead of M10 being active and waiting for motion, and then as soon as motion begins for the M10 output pin.


M10 waits for nothing. I can turn my laser on and off via M10 / M11 at the MDI. No motion required.


Well it's waiting for something if you look at those images


Terry
With uccnc M10 is on M11 is off (it's opposite to mach3)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Sat Oct 20, 2018 7:33 am

3d0g wrote:
Robertspark wrote:Instead of M10 being active and waiting for motion, and then as soon as motion begins for the M10 output pin.


M10 waits for nothing. I can turn my laser on and off via M10 / M11 at the MDI. No motion required.

Correct. I can type M10 S1 to get a dim laser dot and use it for positioning.

3d0g, can you try running the program attached a few posts back as see if you are getting good results? What Controller are you using?
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Sat Oct 20, 2018 8:15 am

I suggested adding a delay after M3 because it may allow the MCU on the UC controller to sort it's life out.

Remember M3 has no pin assigned and the delay will not do anything to the laser assigned pin (it is the same as adding a G4 P1000)

So the code would look like this

M3
G4 P1000 (if your settings have G4 in msec)
M10 (fire laser)
G1 X....

M11 (laser off)
G0 X...
M10
G1 X...
M11
M5
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Sat Oct 20, 2018 10:57 am

Robertspark wrote:I suggested adding a delay after M3 because it may allow the MCU on the UC controller to sort it's life out.

Remember M3 has no pin assigned and the delay will not do anything to the laser assigned pin (it is the same as adding a G4 P1000)

So the code would look like this

M3
G4 P1000 (if your settings have G4 in msec)
M10 (fire laser)
G1 X....

M11 (laser off)
G0 X...
M10
G1 X...
M11
M5

I only issue the M3 once at the very beginning of the gcode program. This does no explain the problem occurring on each line where there are no M3's
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Sat Oct 20, 2018 12:24 pm

Unfortunately I am away for a week with no pc or CNC to test it on, but have you tried

Changing your laser pin to "0" (from pin 17)

Then going to the spindle configuration tab and setting the pin as "17" for pwm (top rhs of screen)

Change the pwm frequency to 1khz
Change the pwm frequency min to "0" zero
Change the pwm frequency max to "100"

Now you should be able to use "S" codes as per your Arduino board gcode file with "S0" being off and "S100" being fully on.

You will still need to issue M3 at the start of the gcode and M5 at the end of the gcode but the output intensity of the laser "should" vary with the "S" spindle speed code same as Arduino.
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby 3d0g » Sat Oct 20, 2018 12:38 pm

mayhem2408 wrote:3d0g, can you try running the program attached a few posts back as see if you are getting good results? What Controller are you using?


Glad to. Let me wake up and get some coffee in me. I'm using a UC400ETH to a generic parallel BoB, driving CW860 steppers. UC400ETH is direct-attached to the shop PC via crossover cable on a dedicated Ethernet interface.

You want this one run, right?

Pulse Width Test 0.1mm UCCNC GRID OmniDir Vmax549.txt
3d0g
 
Posts: 75
Joined: Sat Apr 14, 2018 1:52 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Sat Oct 20, 2018 6:04 pm

Terry thanks for the thought I've been through all that when I reviewed the posters profile they uploaded
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby Robertspark » Sat Oct 20, 2018 7:06 pm

Yes the OP had the spindle PWM pin set the same as the laser. Changing the spindle PWM pin to zero made no difference
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Sat Oct 20, 2018 8:32 pm

Robertspark wrote:Unfortunately I am away for a week with no pc or CNC to test it on, but have you tried

Changing your laser pin to "0" (from pin 17)

Then going to the spindle configuration tab and setting the pin as "17" for pwm (top rhs of screen)

Change the pwm frequency to 1khz
Change the pwm frequency min to "0" zero
Change the pwm frequency max to "100"

Now you should be able to use "S" codes as per your Arduino board gcode file with "S0" being off and "S100" being fully on.

You will still need to issue M3 at the start of the gcode and M5 at the end of the gcode but the output intensity of the laser "should" vary with the "S" spindle speed code same as Arduino.

This does not work. Using S caused the motion to deaccelerate and accelerate at each S change. This produces poor quality with lasers and can even be dangerous at at high power.
Attachments
Pulse Width Test 0.1mm UCCNC GRID OmniDir S instead of Q.txt
(6.05 KiB) Downloaded 549 times
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

Re: UCCNC M10 Laser not turning off on M10 Q0 Command

Postby mayhem2408 » Sat Oct 20, 2018 8:34 pm

Robertspark wrote:Yes the OP had the spindle PWM pin set the same as the laser. Changing the spindle PWM pin to zero made no difference

This is how Stepcraft have there profile setup and how I was it should be done. But as you have said, changing the spindle PWM pin to zero made no difference.
mayhem2408
 
Posts: 62
Joined: Tue Sep 11, 2018 12:06 am

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 11 guests