"toolchain" basic questions

Discuss Laser CNC Software Issues

"toolchain" basic questions

Postby bill.french » Fri Nov 18, 2011 7:14 pm

I've been "restoring" an old Full Spectrum Laser 40w cutter. I have the XY motion working through EMC2. I need to figure out the specifics of the machine for EMC, but it does move!!

So, what are the particulars for creating gcode for a laser? Am I wasting my time with EMC2? Are there particular setup guidlines for using EMC2 with a laser someone can point me to?

Also, what are folks using to generate gcode that works with lasers, so that instead of lifting a tool and moving and lowering, it shuts of the laser, moves, and turns the laser back on?

What other considerations are there? Like, the delay with the laser turning on? Shoudl the head be moving at a constant speed? Acceleration?

Are these tweaks in EMC2? Or higher up the toolchain? What's you're toolchain?

Sorry so many questions!! I've been browsing around and have not been able to tie it all together.
bill.french
 
Posts: 46
Joined: Wed Nov 16, 2011 5:54 pm

Re: "toolchain" basic questions

Postby BenJackson » Fri Nov 18, 2011 7:30 pm

I'm running my 2.x with EMC2.

I have multiple ways set up to fire the laser. One is M62/63 digital IO which I can use if I have good control over gcode output. Another is an imaginary Z axis which fires whenever the Z<0. I can use that with any milling CAM as a skinny endmill with very fast/short plunge moves.

Power is via M68 analog IO with PDM (pulse density modulation).

I made an EMC2 loadable module to do pulsed cutting for wood.

For cutting purposes there is effectively no delay turning the laser on/off. Even engraving at the speeds the 2.x can achieve I haven't seen delay as a factor in quality.
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm

Re: "toolchain" basic questions

Postby bill.french » Fri Nov 18, 2011 8:03 pm

Sweet. Is the imaginary z axis thing (which makes sense to me) something you configure in EMC2? Can you point me in the direction?
bill.french
 
Posts: 46
Joined: Wed Nov 16, 2011 5:54 pm

Re: "toolchain" basic questions

Postby BenJackson » Fri Nov 18, 2011 8:31 pm

EMC2 is incredibly flexible. The HAL files let you wire together all the modules in any way you want. I will give you a condensed answer but if you need more detail feel free to ask.

To make a fake axis in EMC you will be removing the "motor" component for that axis (which normally would be a stepper or servo+encoder). The desired position (driven ultimately by gcode) is axis.2.motor-pos-cmd (0 is X, 1 is Y, etc). To make it appear as if some perfect motor drive is connected to Z you tie that directly to the position feedback axis.2.motor-pos-fb:

Code: Select all
net zpos-cmd-fb <= axis.2.motor-pos-cmd => axis.2.motor-pos-fb


With that line in your HAL you can "G1 Z..." and Z will update instantly but nothing outside the machine will happen. That position is available to HAL modules as axis.2.joint-pos-fb. You need to tie that to a comparator:

Code: Select all
loadrt comp names=laser-magic-z-comp
addf laser-magic-z-comp servo-thread
net zpos-fb <= axis.2.joint-pos-fb => laser-magic-z-comp.in0
setp laser-magic-z-comp.in1 0.0
net laser-magic-z <= laser-magic-z-comp.out


Now the net laser-magic-z is true whenever Z<0.0. This has the same effect as if you were able to edit the code for servo-thread and add a statement like "if axis.2.joint-pos-fb < 0 then laser-magic-z = true else false".

At that point you can tie laser-magic-z directly to your laser firing pin if you like. Or you can drive additional logic to do something more complex (eg OR in some other signal, or like I do, AND in the spindle control so the laser can't fire if the "spindle" is off).
BenJackson
 
Posts: 522
Joined: Fri Apr 15, 2011 6:13 pm


Return to Software

Who is online

Users browsing this forum: No registered users and 10 guests

cron