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 mayhem2408 » Thu Oct 18, 2018 9:31 pm

Robertspark wrote:Hmm, I suspect that the laser is not able to be directly driven from uccnc, and again you need another piece of hardware that will fire the laser quicker relative to the pwm signal.

The problem I am having is not the speed of switching the laser as it is more than capable of turning on and off at the speed commanded by the UC100. I can command the laser to turn on and for 10x faster at a much higher resolution using a GRBL-Mega controller and the laser is in perfect sync. What type of hardware you referring to?

Robertspark wrote:The carrier wave from the uc100 if it is set on 100khz kernel loop cannot be any quicker than
100,000 / 255 *2.... So 784 Hz.

I agree to some point. My tests involve Q0 and Q255. Nothing in-between. I simply want the laser on or off. I am not changing the intensity of the laser. I should be able to set the PWM frequency to 5000Hz and still be able to achieve that.
Robertspark wrote:Because of the way the uc100 will fill the pwm signal with a 1 or zero on every kernel loop and use the pwm signal to provide 255 steps

As mentioned, I do not require 255 steps for this test. I only need 2, 0% and 100%. Intensity is not being used in this test.

The issue I am having is not the speed of the PWM signal, it is the timing and as mentioned in an earlier post, There appears to be a lag from when the M10 Qxxx command is sent and then the PWM pin signal actualy changes. And it gets so out of sync at speed that a Q0 may get missed and the laser does not turn off. The Laser driver simply reacts within 100ns to a TTL pulse. The timing issue is occuring in the UC100.
mayhem2408
 
Posts: 51
Joined: Tue Sep 11, 2018 12:06 am

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

Postby mayhem2408 » Thu Oct 18, 2018 9:49 pm

beefy wrote:Haven't read through all of the thread but has the use of a logic analyser been mentioned for testing.

You can get them on Ebay for not too much.

When I first bought a UC400 several years ago, I did a whole bunch of timing tests with a $10 logic analyser, and found a bug or two with M10, etc. Balazs very quickly got these bugs fixed, and subsequent testing showed M10 output switching in perfect sync with the step pulses. I'd use a very short distance (few cm) and calculate how many step pulses (based on steps/mm setting) I'd expect to happen before the M10 output become active, and likewise when M11 would turn the output off. Then I'd look at the logic analyser results and tediously count the steps, checking exactly where the M10/M11 output was turned on/off. It was bang on the mark every time.

With a logic analyser it's easy to check the input signal to your breakout board and the corresponding output signal and check how much lag between the two.

Even the cheapy $10 logic analysers are supposed to run up to 20Mhz speed.

Keith.

The timing issue does not seem to be directly related to stepper pulses because as I slow the feed down, the problem becomes less noticeable.
Pulse Width Test 0.1mm UCCNC F2000 F1000.jpg


I have a 2 channel occiloscope and will try to set it up today to run some tests. I have already tested the laser driver itself and know that the input TTL to output laser current timming is perfect. It is a high quality Hi speed laser driver.

This is a laser driver test done a couple of years ago. The test was a 50% duty cycle at 50KHz. A lot faster than even my GRBL-Mega and 50x faster than my UC100 output.
Capture2.JPG
mayhem2408
 
Posts: 51
Joined: Tue Sep 11, 2018 12:06 am

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

Postby mayhem2408 » Thu Oct 18, 2018 11:52 pm

I have redone the alignment and timing test but with bidirectional rastering disabled to try to eliminate backlash issues in the test. Each scan line travels from left to right. This is to may and make it a bit easier to see what it happening.

For GRBL, the timing and alignment is pretty good. Errors can be attributed to backlash and any play in the system. But it is so close at this scale it is undetectable by eye. You will notice on the 0.5mm and 1mm lines, the timing is very good.
20181019_100011s.jpg


UCCNC/UC100 seems to be starting late on each line and seems to come good by the end of the line. You will notice on the 0.5mm line, the first on pulse doesn't start until after the off pulse should have occured, the off pulse is ignored and the laser remains on until the next off pulse, but by the 3rd pulse it seems OK. And on the 1mm line, the first pulse does start until over half its length, but the second pulse seems OK.
20181019_102445s.jpg
mayhem2408
 
Posts: 51
Joined: Tue Sep 11, 2018 12:06 am

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

Postby Robertspark » Fri Oct 19, 2018 2:40 am

Given you don't need to vary the own

Have you tried running just M10 to turn the laser on (no q variable) and M11 to turn the laser off
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1014
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

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

Postby Robertspark » Fri Oct 19, 2018 4:06 pm

Can you post the example code you are running, I have a couple more ideas now (I am away at present)
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1014
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

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

Postby Robertspark » Fri Oct 19, 2018 4:25 pm

These are all just guesses.... Again I'm not a laser user more a plasma user

If you go to configuration >>> spindle

2/3rds down the LHS of the screen is a setting
M3ondelay=0

Can you change it to 1000

I wanted to look at your code because you only need to use M3 once at the start of your code

And M5 once at the end of your code

Within the code you can run M10/M11 as many times as you want.
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1014
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

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

Postby Robertspark » Fri Oct 19, 2018 6:55 pm

It looks very much like motion is beginning and then M10 is firing

Instead of M10 being active and waiting for motion, and then as soon as motion begins for the M10 output pin.

You mentioned federates such as 1000 and 2000 units / min)

Looking at your axis acceleration settings , X, y and z are all 400 units/s/s (I see you have an a axis too.. not sure what that is doing {I am reading the raw text file}.

None of these are particularly "fast" or "quick" (which is great because the UC motion controllers should be able to deal with this just fine)

{Surprised cncdrive have been so quiet?}
Rob
Einstein ― “If you can't explain it to a six year old, you don't understand it yourself”
...working my way through the 1000+ ways things don't work to find the one that does
UC400eth, UC300eth, UCCNC v1.2106, Neuron Lite
UCCNC v1.2105 Macro Manual
Robertspark
 
Posts: 1014
Joined: Sat Sep 03, 2016 4:27 pm
Location: Nr Liverpool, England

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

Postby mayhem2408 » Fri Oct 19, 2018 7:55 pm

Robertspark wrote:These are all just guesses.... Again I'm not a laser user more a plasma user

If you go to configuration >>> spindle

2/3rds down the LHS of the screen is a setting
M3ondelay=0

Can you change it to 1000

I wanted to look at your code because you only need to use M3 once at the start of your code

And M5 once at the end of your code

Within the code you can run M10/M11 as many times as you want.

This is the UCCNC and GRBL gode. My Stepcraft machine come with a profile for lasers and they set the M3 Delay to 0 so that the laser does not turn on and wait 1000ms for the M10 Q0 or M11 to turn it off. That would be dangerous.
Attachments
Pulse Width Test 0.1mm GRBL GRID OmniDir.txt
(7.2 KiB) Downloaded 13 times
Pulse Width Test 0.1mm UCCNC GRID OmniDir.txt
(9.82 KiB) Downloaded 18 times
mayhem2408
 
Posts: 51
Joined: Tue Sep 11, 2018 12:06 am

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

Postby Vmax549 » Fri Oct 19, 2018 9:40 pm

Have you tried it in a sequence like this?

M3
M11
G1 F2000
G0 X-5 Y-2.6
M10 Q255
G1 X5 Y-2.6
M11

G0 X-5 Y2.3
M10 Q255
G1 X5 Y2.3
M11

or perhaps like this

M3
M10 Q0
G1 F2000
G0 X-5 Y-2.6
M10 Q255 G0 X5 Y-2.6
M11 G0 X-5 Y2.3
M10 Q255 G1 X5 Y2.3
M11

Just a thought, (;-) TP
Vmax549
 
Posts: 1380
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

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

Postby mayhem2408 » Sat Oct 20, 2018 3:24 am

Vmax549 wrote:Have you tried it in a sequence like this?

M3
M11
G1 F2000
G0 X-5 Y-2.6
M10 Q255
G1 X5 Y-2.6
M11

G0 X-5 Y2.3
M10 Q255
G1 X5 Y2.3
M11

I have tried M10 S0 and M11 before and it didn't change the outcome.

Vmax549 wrote:or perhaps like this

M3
M10 Q0
G1 F2000
G0 X-5 Y-2.6
M10 Q255 G0 X5 Y-2.6
M11 G0 X-5 Y2.3
M10 Q255 G1 X5 Y2.3
M11

Just a thought, (;-) TP

It produced the same result
Attachments
Pulse Width Test 0.1mm UCCNC GRID OmniDir Vmax549.txt
(8.46 KiB) Downloaded 8 times
mayhem2408
 
Posts: 51
Joined: Tue Sep 11, 2018 12:06 am

PreviousNext

Return to Ask a question from support here

Who is online

Users browsing this forum: extent, Google [Bot] and 8 guests