Laser Control by Spindle PWM

More
10 years 8 months ago #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
10 years 8 months ago #69986 by andypugh

wl888 wrote: 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
10 years 8 months ago #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
10 years 8 months ago - 10 years 7 months ago #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: 10 years 7 months ago by purged.

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

More
10 years 8 months ago #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
10 years 8 months ago - 10 years 7 months ago #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
Last edit: 10 years 7 months ago by purged.

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

Time to create page: 0.082 seconds
Powered by Kunena Forum