Help with laser power control with M67/M68 pwm

More
18 Apr 2016 14:45 - 18 Apr 2016 16:44 #73537 by TejasDragon
I am trying to get a laser running on my lathe with pwm laser power control. The lathe has been running for a couple of years
with XZ axis. I have it set up as a XYZA when using it as a rotary but just wright XZA to gcode. I have had it working fine using m62/m65 for
on/off. But I have had no luck getting pwm to work on it. If someone could take a look at my startup files and give me a clue
I would appreciate it.

Henry
Attachments:
Last edit: 18 Apr 2016 16:44 by TejasDragon.

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

More
18 Apr 2016 22:17 #73570 by andypugh
You don't seem to have "addf"-ed the pwmgen functions to a thread.

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

More
19 Apr 2016 23:03 #73622 by TejasDragon
Still do not have it, I have read through the docs, but at this point I do not get most of the way
Hal works. I added the "addf" like I found on a site that says this works for him. But when
I try to load it in the part that says
"net motion.spindle-on => pwmgen.01.enable"
It wants a signal name, at this point I have no clue.

The attachments are what I have in the current start up files.
Henry
Attachments:

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

More
19 Apr 2016 23:59 #73623 by andypugh

"net motion.spindle-on => pwmgen.01.enable"
It wants a signal name, at this point I have no clue.


Every "net" command needs a signal name. The format is
net signal pin pin pin pin pin
With as many pins as you want. The pins must actually exist. The signal name can be anything.
You can use the same signal on as many lines as you like. But each HAL pin can only appear on one line.
So, to connect one output to many inputs, you use the signal name, not the pin name.

Signals can be used to link pins in different files too, so for example:
In one file you might have:
net my-gui-signal mux2.0.sel
Then in the postgui halfile you can cpnnect that up with
net my-gui-signal pyvcp.button1

And that will connect a pyVCP gui button to a mux selector pin.
The following user(s) said Thank You: Wirewrap

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

More
20 Apr 2016 02:35 #73627 by TejasDragon
thanks for the help I got it. This is what made it work in the hal file.

loadrt pwmgen output_type=0
addf pwmgen.update servo-thread
addf pwmgen.make-pulses base-thread

setp pwmgen.0.enable TRUE

net analogout motion.analog-out-00 => pwmgen.0.value
net laserpwm pwmgen.0.pwm => parport.0.pin-01-out

Henry

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

Time to create page: 0.076 seconds
Powered by Kunena Forum