Laser engrave plugin enhancements

Here is where you can request new features or special features.

Laser engrave plugin enhancements

Postby Mark81 » Thu Dec 26, 2019 8:25 am

Hi,
I would propose some enhancements to the laser plugin. At the moment, it's too much limited for a real use.
Here some of the main improvements I could suggest.
Of course, many of them might be already there!
And I may be blind and I don't see them! Please correct me if they are already available! :roll:

  • let the feed override work: currently if you change the feed override during a laser job, nothing happens. It would be useful to change it on the fly, like any other job.
  • [bug]: when you start cycle, it moves from the actual position to the starting point selected (i.e. center, bottom-left, etc...). But this makes no sense to me. The starting point should be referred to the origin (0, 0). Otherwise, every time you start a cycle (without manually G0 X0Y0Z0) the next starting points move further and further
  • show the current Q value during lasering: in the same way during machining you see the current spindle speed
  • it would be very useful to show the calculated Q value when moving the mouse pointer on the image
  • to test the output I often need to engrave small portions of the image. Please allow to select an area (rectangular is enough, anyway other shapes are nice to have) and send to UCCNC only that area instead of the whole image
  • add a "move to" function: click on a point on the image and move (X, Y) to the related coordinates. I often mix laser and milling operations, so I have to check precisely where a specific point on the image will be on the stock. Right now it's almost impossible.
  • add options for scan directions: at the moment only vertical and horizontal are available. At least add diagonals (both directions)
  • as another user said, skip with G0 areas where the calculated Q value is below a threshold and its length is above another one (to avoid G0 for just few pixels that will cause abrupt accelerations only)
  • add a calibration curve: the resulting gray-scale is not linear with the Q value. You may say: "change your image according", but this is just a workaround. The goal is to have the same gray scale on both monitor and engraving, so the best is the other way around: show an editable curve that define the relationship between the pixel brightness (0-255 on X axis) and the Q value (0-100% on Y axis)
  • add a header/footer section: pressing "start cycle" is not enough on some machine to enable the laser operations... For example I need to send several g-code before start lasering.
  • show the progress coloring the lines already engraved on the image
  • let the users to save/load jobs: right now I have to write down all the parameters to remember how to engrave every single file...
  • add a "Dynamic Laser Power" features like GRBL M4 to compensate ramps

OR AS AN ALTERNATIVE to all the above:

tell us how to write a g-code that works in the same way of the plugin.
I tried in this way, following the available documentation:

Code: Select all
G0 X77.4000 Y45.8000 Z0.0000 F3000
G0 X42.8000 M10 Q0
G1 X42.6000 M10 Q2
G1 X42.4000 M10 Q93
G1 X42.2000 M10 Q132
G1 X42.0000 M10 Q184
G1 X41.8000 M10 Q202
G1 X41.6000 M10 Q211
G1 X41.4000 M10 Q224
G1 X41.2000 M10 Q227
G1 X40.8000 M10 Q250
G1 X40.6000 M10 Q248
G1 X40.4000 M10 Q208
G1 X40.2000 M10 Q194
G1 X40.0000 M10 Q177
G1 X39.8000 M10 Q135
G1 X39.6000 M10 Q118
G1 X39.4000 M10 Q79
G1 X39.2000 M10 Q53
G1 X39.0000 M10 Q37
G1 X38.8000 M10 Q48
G1 X38.6000 M10 Q44
G1 X38.4000 M10 Q42
G1 X38.0000 M10 Q46
G1 X37.8000 M10 Q51
G1 X37.6000 M10 Q58
G1 X37.4000 M10 Q39
G1 X37.2000 M10 Q35
G1 X37.0000 M10 Q39
G1 X36.8000 M10 Q43
G1 X36.4000 M10 Q48
G1 X36.2000 M10 Q41
G1 X36.0000 M10 Q47
G1 X35.8000 M10 Q53
G1 X35.6000 M10 Q81
G1 X35.4000 M10 Q97
G1 X35.2000 M10 Q40
G1 X35.0000 M10 Q42
G1 X34.8000 M10 Q49
G1 X34.6000 M10 Q47
G1 X34.4000 M10 Q60
G1 X34.2000 M10 Q36
G1 X34.0000 M10 Q39
G1 X33.8000 M10 Q52
G1 X33.6000 M10 Q81
G1 X33.4000 M10 Q115
G1 X33.2000 M10 Q80
G1 X33.0000 M10 Q48
G1 X32.8000 M10 Q51
G1 X32.6000 M10 Q48
...


but the movements are not fluids. It seems it decelerates for every G1 command, instead it should not.
So, how looks like the "hidden" gcode generated by the laser plugin?

Thanks in advance for your cooperation! 8-)
Mark81
 
Posts: 42
Joined: Thu Feb 14, 2019 4:38 pm

Re: Laser engrave plugin enhancements

Postby 3d0g » Thu Dec 26, 2019 2:43 pm

I'm sure you'll get a better qualified answer shortly, but as a daily user of laserengrave for a couple years now, I can take a shot at most of these.

First and foremost, laserengrave doesn't generate or use gcode. The data is all proprietary and internal to UCCNC. As such, there is no Q value and it would be extremely counter-productive anyway as the laser signal is already being pulsed to generate the output. If you want to throttle laser power, that needs to be done based on your hardware. Mine has a CO2 laser with a power supply that takes a 0-5V analog or PWM input to set power output. I use the spindle PWM output of UCCNC to drive it. Works great.

  • let the feed override work: currently if you change the feed override during a laser job, nothing happens. It would be useful to change it on the fly, like any other job. I could see this being useful but in reality, I've already determined the fastest optimal feedrate for my machine. Any slower just wastes time.
  • [bug]: when you start cycle, it moves from the actual position to the starting point selected (i.e. center, bottom-left, etc...). But this makes no sense to me. The starting point should be referred to the origin (0, 0). Otherwise, every time you start a cycle (without manually G0 X0Y0Z0) the next starting points move further and further STRONGLY disagree! Raster jobs are typically matched with a cut and the raster origin must match the cut gcode origin. While typically that's 'home' of the current selected offset, depending on the object it may not always be the case.
  • to test the output I often need to engrave small portions of the image. Please allow to select an area (rectangular is enough, anyway other shapes are nice to have) and send to UCCNC only that area instead of the whole image A crop tool w/in laserengrave might be useful, but I suspect you'll need less testing with experience. I know the optimal settings for the materials I use so it's just set-and-go.
  • add a "move to" function: click on a point on the image and move (X, Y) to the related coordinates. I often mix laser and milling operations, so I have to check precisely where a specific point on the image will be on the stock. Right now it's almost impossible. See above. This is precisely why engrave and cut origins must be coordinated. If your cut origin is X0Y0, your engrave must be the same. Yes, that means your engrave jpg will very likely have whitespace. This is also exactly why the center origin for engraving is useful in some jobs.
  • add options for scan directions: at the moment only vertical and horizontal are available. At least add diagonals (both directions) For certain machines this would indeed be useful. I have too much mass on the gantry so high-speed Y movements would be a nightmare. I've built my X gantry cart as light as possible for maximum feedrate.
  • as another user said, skip with G0 areas where the calculated Q value is below a threshold and its length is above another one (to avoid G0 for just few pixels that will cause abrupt accelerations only) Skipping raster rows that contain no data would indeed be a real timesaver for certain jobs.
  • add a calibration curve: the resulting gray-scale is not linear with the Q value. You may say: "change your image according", but this is just a workaround. The goal is to have the same gray scale on both monitor and engraving, so the best is the other way around: show an editable curve that define the relationship between the pixel brightness (0-255 on X axis) and the Q value (0-100% on Y axis) Again, there is no real concept of PWM here. Sounds like you need a way to regulate your laser output. For example, I use 5mA (20% spindle speed) for engraving acrylic and 20mA (100% spindle speed) for glass.
  • add a header/footer section: pressing "start cycle" is not enough on some machine to enable the laser operations... For example I need to send several g-code before start lasering. Agreed. I did a macro for all my engraving setup code that then calls the laserengave plugin. Works fine, but for those that don't want to code, having an option to enter setup code in the laserengrave UI would be nice.
  • show the progress coloring the lines already engraved on the image Could be handy.
  • let the users to save/load jobs: right now I have to write down all the parameters to remember how to engrave every single file... Agreed. Would be nice to be able to load a config file that then referenced the jpg, workspace dimensions and origin all in one go for repetitive jobs.
  • add a "Dynamic Laser Power" features like GRBL M4 to compensate ramps Not sure I understand "ramps", but using spindle speed to set laser power is readily doable.
3d0g
 
Posts: 75
Joined: Sat Apr 14, 2018 1:52 am

Re: Laser engrave plugin enhancements

Postby Mark81 » Thu Dec 26, 2019 3:26 pm

Hi, thanks for your answer.

Just few clarifications.
I use a 6W 445 nm laser diode that is controlled by PWM. Here my setup: a relé is connected to the MIST output (M7/M9) to provide power supply. So, to power the laser I need to:

Code: Select all
M3 S0 // enable the spindle with 0 speed in order to
M7     // enable the MIST output


Then I can use M10 Qx to control the "fast PWM (laser) output" as described in the manual.

[bug]: when you start cycle, it moves from the actual position to the starting point selected (i.e. center, bottom-left, etc...). But this makes no sense to me. The starting point should be referred to the origin (0, 0). Otherwise, every time you start a cycle (without manually G0 X0Y0Z0) the next starting points move further and further STRONGLY disagree! Raster jobs are typically matched with a cut and the raster origin must match the cut gcode origin. While typically that's 'home' of the current selected offset, depending on the object it may not always be the case.


I'm sorry, but perhaps I described it badly.
I agree with you, in fact I marked it as "bug" because it doesn't work as expected, or at least I cannot understand it's logic.

Let say to load a common milling gcode. You set your offsets (i.e. G54) to a specific point that represent the work zero coordinates.
Now, no matter how many times you run the job, it will always use that reference. In other words, if you repeat the job again and again it always machine the same points.

Instead, when using the laser engrave plugin, the reference point is not your current offset (X0, Y0) but your current position!
As said, that means if you run a laser job it moves away from the current position, every time. To have consistent runnings, you must go back to 0,0 every single time - manually.
I hope you understand what I meant. I apologize my English is not so good.

About the scan direction: I was thinking about aesthetics features. Sometimes, when you raster a picture, it's nice to have the scan lines at different angles than 0° or 90°.


Last question: if the laser plugin doesn't generate any g-code, and it's not possible to use any external laser CAM to provide g-code (that works for rastering), is the source code available or is there at least a documentation of how to write another plugin like this?
Mark81
 
Posts: 42
Joined: Thu Feb 14, 2019 4:38 pm

Re: Laser engrave plugin enhancements

Postby 3d0g » Thu Dec 26, 2019 4:18 pm

Ah, OK. Realize there is no REAL power control of most diode lasers. They're either on or off, in your case at 6W.

Yes, the manual refers to Q for laser "power". I really wish it didn't do that. While pulsing the laser output does vary the AVERAGE energy put into material, it's still full-on or full-off. At a high enough feedrate, a given Q PWM WILL produce a dotted line. On my laser, where I can set the actual output anywhere from 0 to 100W either manually or via spindle speed, I can engrave onto anything from paper to crystal.

Laserengrave is already pulsing the laser signal to produce the desired engrave output. Further PWM pulsing would corrupt the image. So unfortunately in your instance, 6W output is 6W. There is no adjustment. I have heard of folks playing with beam focus a bit to moderate the output.

I agree completely on the raster angles suggestion - just that it's not useful for my machine. If I really wanted to do a diagonal engrave, I'd rotate the material.

There are indeed dedicated CAM tools for laser engraving. Picengrave comes to mind. I never had much luck with them, from both performance and image quality. Considering they output actual gcode, you'd be fighting all the acceleration and interpretation features of UCCNC. Would definitely take a lot of tuning and those settings would likely be very different than what you'd want for cutting.

As for combining engrave and cut operations. Perhaps an example will help. Goal is to engrave the text and cut the border. Note the 0X0Y origin:

Image

Here's the png I need to engrave with the laserengrave origin point set to lower, left:

Image

So my overall workflow is something like this...
1. Place material, home and zero X and Y for chosen offset.
2. Run engrave job
3. Goto Zero
4. Load gcode job for cut
5. Run cut job
6. Open beer and enjoy
3d0g
 
Posts: 75
Joined: Sat Apr 14, 2018 1:52 am


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 1 guest