Page 1 of 1

Laser pin question

PostPosted: Sun Feb 12, 2017 7:43 pm
by QuebecCNC
Hi,

I see that I can assign a pin from the UC100 to a laser. Does that give me a second PWM output? I would like to have both my spindle and laser mounted at the same time and if I understand correctly, as long as the post processor outputs the correct G-Code (laser enable instead of spindle enable) it could control the laser? How does it (UCCNC) choose which PWM signal to output?

Thanks

Re: Laser pin question

PostPosted: Sun Feb 12, 2017 8:17 pm
by cncdrive
Yes, the laser output is a different PWM and you can configure it on the Configuration-I/O setup/Laser pin.
The laser PWM will appear on the port pin you setup there.

And yes, you can have the spindle PWM and the laser PWM configured the same time, the only constraint is that you can't configure them to the same output pin, you must have them configured to separate pins.

And yes, the laser and the spindle can be controlled with different codes.
The laser can be controlled with M10/M11 and the spindle PWM can be controlled with the spindle speed S code.

Re: Laser pin question

PostPosted: Sun Feb 12, 2017 8:39 pm
by ger21
Just a note to CNC Drive.
The laser pin is not described or shown in the manual. This should be updated.

Re: Laser pin question

PostPosted: Sun Feb 12, 2017 8:46 pm
by QuebecCNC
So basically M10 255 would be full laser power, M10 128 half power and M11 off? I just have to modify a post processor not to output any spindle signal and output M10/M11?

By the way, I sent you (cncdrive) a PM regarding a licence file.

Thank you

Re: Laser pin question

PostPosted: Wed Feb 15, 2017 9:12 pm
by QuebecCNC
In fact, i guess it would be

S255 M10
S128 M10

And then M11 would turn it off?

Any way to automatically add an X offset when using M10 to account for a spindle mounted laser?

Thank you

Re: Laser pin question

PostPosted: Wed Feb 15, 2017 10:25 pm
by cncdrive
Command S is not syncronous and so it is very slow compared to the M10/M11 commands.
Using the S spindle speed command together with the M10 command is therefor makes no sense.
The M10 has one parameter Q, so the command looks like for example:

M10 Q128

The above example command gives you 50% laser PWM duty cylce.
One more thing is that the M10 is M3 dependent, so you must execute an M3 first (must have the M3 active) for the M10 to work, for example:

M3
.
.
.
M10 Q128
.
.
M10 Q255
.
.
etc.

Re: Laser pin question

PostPosted: Wed Feb 15, 2017 10:27 pm
by cncdrive
Any way to automatically add an X offset when using M10 to account for a spindle mounted laser?


You can always use the offsets. You can any time change the coordinates of the current coordinate system,
just type in a new coordinate into the position DROs or offset DROs.
Also you could automate this with writting a macro which for example reads a position DRO, adds an offset to that number and writes the new value back to the DRO changing the current position or the offset.

Re: Laser pin question

PostPosted: Wed Feb 15, 2017 11:39 pm
by QuebecCNC
cncdrive wrote:Command S is not syncronous and so it is very slow compared to the M10/M11 commands.
Using the S spindle speed command together with the M10 command is therefor makes no sense.
The M10 has one parameter Q, so the command looks like for example:

M10 Q128

The above example command gives you 50% laser PWM duty cylce.
One more thing is that the M10 is M3 dependent, so you must execute an M3 first (must have the M3 active) for the M10 to work, for example:

M3
.
.
.
M10 Q128
.
.
M10 Q255
.
.
etc.


Am I correct in thinking that as long as no "S" parameter is posted with M3, the spindle will not start?

Re: Laser pin question

PostPosted: Mon Feb 20, 2017 11:09 pm
by QuebecCNC
Anyone?

Re: Laser pin question

PostPosted: Tue Feb 21, 2017 5:40 am
by beefy
I've never needed the S command because at present plasma is my only interest.

But as far as I can guess, a spindle normally requires a START signal plus a separate SPEED COMMAND SIGNAL

M3 is your spindle start signal.

If your spindle drive requires either a step and direction signal, or a PWM signal as its' speed command input, then I'd assume it won't rotate if it doesn't have that signal, even if its' got the start signal.

What does your drive documentation say is required, regarding start and speed control inputs.

Keith.