Duet3D / RepRapFirmware

OO C++ RepRap Firmware
GNU General Public License v3.0
944 stars 535 forks source link

capability to control the ready to use cutting modules such as auto focus laser head or plasma THC #40

Closed mkeyno closed 8 months ago

mkeyno commented 8 years ago

hi , I was wondering if this firmware have capability to control the ready to use cutting modules such as auto focus laser head or plasma THC , I saw couple of effort on Marlin enthusiast to check output sensor the cutting tool and control the stepper motor the module to control height during the printing any comments really appreciated

dc42 commented 8 years ago

Have you looked at the M571 gcode, http://reprap.org/wiki/G-code#M571:_Set_output_on_extrude ? That is already being used to control at least one laser engraver. The FAN0 output is re-purposed when you use M571.

mkeyno commented 8 years ago

thanks @dc42 do you know link or repo which is already use for such purpose

dc42 commented 8 years ago

I'm not sure exactly what you are looking for.The M572 gcode facility has been supported by the standard firmware for a long time. It turns on the FAN0 output with the specified PWM ratio whenever the printer is extruding. So by using it to control a laser, you have a laser engraver. You mentioned controlling the height, but I don't know exactly what you want.

mkeyno commented 8 years ago

sorry if I explain not good , what I looking for is the code implementation(G codes) or firmware implementation of closed feedback loop for height sensor measuring and adjustments of Z-axis for laser or plasma tools, but during posting this ticket , I find some guys in Marlin and Smoothieware follower implemented such feature , I was wonder if yet any attempt has been made for such feature in RepRapFirmware

dc42 commented 8 years ago

No, we haven't implemented that in RRF. What type of height sensor is normally used in this application?

mkeyno commented 8 years ago

In metal cutting laser and plasma CNC , used the capacitor sensor but I find the precise short range laser measurement which is good for both metal and non metal cutting . Normal cutting head consist of laser head , stepper motor and controller, ranged form 1000$ to 3000 $ from Chines supplier , with this feature and this sensor I could cut down more than half for THC CNC machines

T3P3 commented 8 years ago

This just popped up in my news feed: http://hackaday.com/2016/06/05/in-soviet-russia-diy-laser-rangefinder-scan-you/ $18 or less for a laser rangefinder hack that although is for a different application here might work for what you are talking about. how precisely does the surface need to be followed in this sort of laser cutter?

mkeyno commented 8 years ago

thanks @T3P3 Tony for link , really interesting although it is for scan purpose but I'm sure similar approach for single range finder wont be hard , however following is the ticket discuss about this feature and today couple of feature add it to Marlin , but as I never use the RepRap yet , I don't know where should start for such feature

dc42 commented 7 years ago

Support for a laser toolhead is on the work list. From the thread you linked to, the main requirements appear to be:

Anything else?

mkeyno commented 7 years ago

thanks @dc42 but I was aware for such feature for many cnc firmware, but in actual printer need high priority function to bypass G-code for safety and real time control like what is implemented in GRBL and smoothee , for high energetic cnc tools this essential and I could successfully install GRBL on my high power laser cnc machine

dc42 commented 7 years ago

Are you talking about an emergency stop feature that doesn't use gcode, or something else?

mkeyno commented 7 years ago

yes , actually there are features in GRBL which let the user to control job in unexpected circumstances , those have higher priority than Gcode, I mean send the g-code and waiting in ques to process is really unwise action in unexpected events , does RepRapFirmware has such feature ?

raykholo commented 7 years ago

@dc42 Did any progress occur on this development?

I wanted to explain how we are doing it with the Grbl/ Smoothie and LaserWeb at the moment in the hopes that it helps you:

M3 is a straight shot laser turns on, and M5 is a straight turn off. In the CNC world, M3 does also have the S parameter to set the spindle speed...

M4 showed up in grbl, please see here and search for the 3rd instance of "M4" on the page: https://github.com/gnea/grbl/wiki "Dynamic Laser Power Scaling with Speed"

I would suggest leaving M4 out, and recognizing that just M3 is full power on while M3 Sxxx will go at a proportional power level. This gets a bit complicated because the official cnc gcode spec calls for just an M3 with no parameters to resume the previous speed from the last M3 command that had an S word, etc...

As you correctly stated, G0 and G1 are different. G0 is a travel move while G1 is a fire move.

The format Smoothie/ Grbl/ LaserWeb uses is G1 X10 Y10 S0.4 F600 where S is the fire level ranging 0 - 1 in this case. That is really it.

G7 - is this something like streaming pixels directly for raster? This has been a controversial subject between several firmware teams for some time now... Presently high throughput rasters are still being done over the very high quantity of G1 line segments.

M649 - what settings do you have in mind?

With no disrespect intended to anyone, I would not use Marlin as an example of how to do laser streaming. Right now GRBL and Smoothie are what most people are using with LaserWeb4 using primarily the G0 and G1 lines.

In addition to the wiki link above, this one about the grbl laser mode explains a lot: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Laser-Mode This explains the CNC vs Laser nuances,

Cheers, Ray Kholodovsky Cohesion3D

T3P3 commented 1 year ago

@raykholo I am going though and housekeeping old issues.

There have been significant additions to RRF since your input on this issue:

In laser mode (see M452) G0 is a move w/o laser firing G1 Snnn ; nnn = laser power

(from RRF 3.5.0beta3_ In laser mode a G1 command may now have up to eight S parameters to specify the laser power at uniform intervals along the move (raster clustering) (So the request for G7 is probably redundant)

M3 Snnn ;laser power (laser mode). In laser mode, the relationship between the S parameter and laser power depends on the R parameter that was specified in the M452 command.

In addition there is a specific feature request to allow for a low power mode for laser focus: https://github.com/Duet3D/RepRapFirmware/issues/697

I would be interested if there are any outstanding requirements for Laser support in RRF?

T3P3 commented 8 months ago

please reopen if still relevant