I have started this new topic as a follow on from the Laser Project (
https://cambamcnc.com/forum/index.php?topic=8372.0) where there has been a long discussion on how to setup a laser on a CNC router and undertake laser engraving to represent greyscale images. That topic has provided much of the background for this new topic in the Plugins section, so I won’t be repeating here what has been previously discussed.
The purpose here is an attempt to pull some of these prior discussions together into an operational procedure to attempt these laser engraving tasks. My interest was triggered after I purchased a 15W (notional) diode laser of Chinese origin, then went through the process of connecting it up to my Mach3-based controller to see what was possible.
Setting up the laser depends on being able to control it, turning it ON/OFF and vary its power output using the PWM signal available in the controller board. In CamBam this is facilitated by way of a special purpose post-processor that inserts the required G-Code commands, into the G-Code output file, to turn the laser ON/OFF as required. You may need to tailor this post-processor to suit your particular hardware setup.
With that done, simple engraving and cutting is a matter of setting the required power, feed rates and number of pass parameters in the MOP and using the required post-processor to produce the G-Code file. To produce a greyscale image, it is a little more complex. The CamBam models are typically formed by scanning a greyscale image using a height map generator or something similar. Essentially there are two approaches: one is to vary the output power depending on the Z-values, the other is to vary the feed rate depending on the Z-values to achieve a similar effect.
In the preceding topic, the first of these approaches was facilitated by way of a post-processor post build command application that performed this mapping task automatically from the post-processor. I have attempted here to provide an easy-to-use option that is provided as a CamBam plugin. After producing the required G-Gode output file using the laser post-processor, the plugin can be used to select either of the above strategies and to set various parameters for the grey-scale mapping. I have found it more convenient to use the plugin option as it allows for the easy testing of the options available.
I also have a postprocessor command line application version, and this option can be set up to run automatically, but any parameter settings must be done in the post-processor specification. It may be possible pass these parameter values from a MOP specification as Post Build Command Args (perhaps using macros), but I haven’t yet figured out how to do that. Any help would be appreciated. If this could be achieved, then this more automated option may better suit some.
I am attaching V1.0.0 for evaluation, comments and feedback. A sample engraved image (on MDF board) is also provided.
Version 1.0.1 now attached.
New version 1.0.2 now attached, see later discussion for details