Page 1 of 1

Using footswitch to pulse a LASER <answered>

Posted: Thu Dec 02, 2021 5:38 pm
by simmonds
I have built a CNC LASER welder around a 1kW Chinese Fiber laser. The LASER head (with galvo wobble) is mounted to a stepper-driven gantry. I am using an Acorn controller. It works very nicely and I will be happy to share more info if anyone is interested.
CNC Welder.jpg
Custom VCP.jpg
It would be convenient to add a "spot weld" capability activated by a footswitch connected to a spare input on the Acorn.

My laser's power-level is set by the spindle analog output and it can be turned on/off by M3/M5 commands.

I would like to configure my controller so that a program would wait for a footswitch closure and then turned the LASER (spindle) on for a preset period of time then wait for another footswitch closure. Ideally, we would be able to jog the axes manually while the program was waiting, but that may be asking too much.

Any suggestons about the best strategy for implementing this behavior?

Re: Using footswitch to pulse a LASER

Posted: Thu Dec 02, 2021 6:37 pm
by cnckeith
nice looking! Please post a fresh report.zip

Re: Using footswitch to pulse a LASER

Posted: Thu Dec 02, 2021 7:41 pm
by simmonds
Here is a fresh report.
Since this is a rather generic question, I did not think it would be helpful.
Sorry.

Re: Using footswitch to pulse a LASER

Posted: Fri Dec 03, 2021 2:30 pm
by centroidsupport
Are you going to just jog from point to point between footswitch closures, running a program or both? Should footswitch closures be ignored while running a job and/or in MDI?

Does only output #1 turn on (currently assigned as SpinFWD) via the footswitch? ie.. you will select the other options via the VCP

Re: Using footswitch to pulse a LASER

Posted: Fri Dec 03, 2021 8:28 pm
by simmonds
Yes, I would just jog to the weld-head to the desired location (as identified by the red dot) and pulse the LASER. I could also just move the part by hand since it does not need to be clamped down.

Output #1 is assigned to SpinFWD.

As I think about this more, it is probably better if the footswitch was enabled (only) when we were not running a program. Perhaps the pulses could be triggered in a user-defined macro invoked from a VCP button. Then jogging would probably be available as normal.

When the macro is running, could it watch a (currently unused) input and send something like: M3, G4 P0.2, M5, then wait for another input. I do not know if macros can work this way, having never used them.

I assume that pressing RESET would end the macro.

Re: Using footswitch to pulse a LASER

Posted: Sun Dec 05, 2021 7:16 pm
by simmonds
Forgot to answer your last queeston...
All other actions (e.g. argon flood and lens-protecting air blast) can be done using VCP buttons.
But as you were perhaps hinting, would be very elegant to turn on the argon and air, wait a moment, do the pulse, wait a moment, then turn them off.

Would it be best practice to modify the PLC itself to accomplish all this rather than trying to do it in an mfunc macro file?

Re: Using footswitch to pulse a LASER

Posted: Tue Dec 07, 2021 10:50 am
by Allin1Chris
Could have a macro that waits for operator.

If all functions can be activated by an M-code of some sort then should be no issue using a macro.

Can use M200 to instruct the user to jog to location, Perhaps something like this.

Code: Select all

M200 "Jog to spot weld location\nPress Cycle Start when finished"
M101 /50001 ;Wait for Footpedal Input to Turn ON(Assumption here is Input 1)
M3 S1000 ; Fires Laser
M100 /50001 ;Wait for Footpedal Input to Turn OFF (Assumption here is Input 1)
M5 ; Turn off Laser
Something like this in a macro may be what your looking for.

Re: Using footswitch to pulse a LASER

Posted: Wed Dec 08, 2021 12:52 pm
by simmonds
I had not looked at the M100 / M101 codes. Very nice! Using them in a macro or program with a loop would make this simple. Thanks.
I would use a G4 to accurately time the LASER pulse, but the basic idea is the same.