Laser Control by Spindle PWM

More
10 Feb 2016 07:00 #69913 by wl888
Replied by wl888 on topic Laser Control by Spindle PWM
Success.... :laugh: I can now, via g code, control the intensity of the Laser.

I started with the M67 command but later changed to the M68 command(instant), I am actually trying both to see if there is an appreciable difference.
In the M68 code guild it says:- not synchronized with movement, and they will break blending. ???What is break blending??
Is this a good reason to use the M67 over M68 or would either do??

Yes, I will be editing the Cam Post to accommodate these changes.

Am now working on putting in the DE-bounce coding into the .hal file. have found the entries necessary for this with 3 limit/home switch input pins, eg 10,11+12 the challenge i have is that i only use 1 input for the 3 axis IE pin13. all limit/homes are strung together.
i understand the coding for 3 independent limit/home switches but I'm not even sure it's possible to do this with only 1 pin as the coding seems to be axis specific eg for X axis ...debounce.0.0.out etc . Have tried several variations but no results yet. have you come across this 1 Pin setup with de-bounce before?? :unsure:

Thanks again for the guidance.
Doug

Please Log in or Create an account to join the conversation.

More
10 Feb 2016 10:11 #69918 by andypugh

I started with the M67 command but later changed to the M68 command(instant), I am actually trying both to see if there is an appreciable difference.
In the M68 code guild it says:- not synchronized with movement, and they will break blending. ???What is break blending??


Movement will be smooth through an M67 command, but the change of the HAL pin value won't happen until the move starts.

If you use M68 at the beginning then they may be a burned spot at the start of the path as the laser turns on before the axis starts to move.
If you use an M67 at the end without a following move then there probably will be a burned spot at the end, because the laser won't turn off.

So, ideally you would use M67 except for the final laser-off command which should be M68.
The following user(s) said Thank You: wl888

Please Log in or Create an account to join the conversation.

More
11 Feb 2016 09:33 #69983 by wl888
Replied by wl888 on topic Laser Control by Spindle PWM
Thanks Andy that clears it up. I will alter the Post to produce the required code. :)

Any thoughts on the 2nd part . IE:

Am now working on putting in the DE-bounce coding into the .hal file. have found the entries necessary for this with 3 limit/home switch input pins, eg 10,11+12 the challenge i have is that i only use 1 input for the 3 axis IE pin13. all limit/homes are strung together.
i understand the coding for 3 independent limit/home switches but I'm not even sure it's possible to do this with only 1 pin as the coding seems to be axis specific eg for X axis ...debounce.0.0.out etc . Have tried several variations but no results yet. have you come across this 1 Pin setup with de-bounce before??


It may be that I have to use 3 independent limit/home pins instead of just the one.
Thanks again
Doug

Please Log in or Create an account to join the conversation.

More
11 Feb 2016 09:47 #69986 by andypugh

Am now working on putting in the DE-bounce coding into the .hal file. have found the entries necessary for this with 3 limit/home switch input pins, eg 10,11+12 the challenge i have is that i only use 1 input for the 3 axis


In that case just use one single-channel debounce.
(you could drive the input of three debounce channels from the same input pin, but that seems like a waste of CPU)

Please Log in or Create an account to join the conversation.

More
12 Feb 2016 07:00 #70030 by wl888
Replied by wl888 on topic Laser Control by Spindle PWM
thanks Andy will look at that .
will be away with work for a couple of days , will implement when i get back.
Thanks Doug :)

Please Log in or Create an account to join the conversation.

More
25 Feb 2016 09:51 - 02 Mar 2016 18:27 #70605 by purged
Replied by purged on topic Laser Control by Spindle PWM
Hey, may I sneak a quick question in to this topic?

I would like to adjust diode laser power with M67 too - but as it is called analog output do I need additional hardware like a DAC? Or is there an easier way to get PWM out of a parallel port pin without slowing the step planner?

EDIT: Ah, it is hal slang isn't it? I am supposed to net the analog output to a pwmgen and then that to an actual physical parallel output pin right? Any examples where something similar is done?

Am I on the right track with something like this in custom.hal?
Last edit: 02 Mar 2016 18:27 by purged.

Please Log in or Create an account to join the conversation.

More
25 Feb 2016 12:45 #70612 by andypugh
I came here to answer and found you had answered your own question :-)

You HAL looks right, from a cursory glance.
The following user(s) said Thank You: purged

Please Log in or Create an account to join the conversation.

More
25 Feb 2016 14:09 - 02 Mar 2016 18:27 #70617 by purged
Replied by purged on topic Laser Control by Spindle PWM
Thanks anyway :)
I have tried it now and it seems to work great. By omitting the frequency and scaling I get



from M67 E0 Q0.5
Attachments:
Last edit: 02 Mar 2016 18:27 by purged.

Please Log in or Create an account to join the conversation.

Time to create page: 0.161 seconds
Powered by Kunena Forum