I have very recently retrofitted an old Huntron Prober into a laser engraver. I have reused the prober's hardware (steppers, timing belt drives and linear rails) and an old Xylotec board I had gathering dust. It didn't take much to control the 3 axis motion so that part is done. I bought a 5.6W 455nm laser diode with integrated ps regulation board. It came with a module to accept PWM input for control of the laser power levels.
It was pretty easy getting the laser controlled using M3/M5 and PWM output (Sxxxx) to turn it on/off at modulated power levels. Engraving vectors was pretty simple. I produced some simple engravings on wood and am pleased with that result. I then turned to raster engraving and ran into headaches.
I found that raster engraving is well outside of my comfort zone and technical experience (cnc router, mill, lathe). So far I have experimented with various photo editors (inkscape and gimp) along with some editing/postprocessing (ImageToGcode, 3dpBurner Image2Gcode, and a trial PicEngrave Pro6). The images that I have engraved all seem "overcooked". I then engraved some grayscale bars to see how my laser power control was functioning and observed some black bands at the beginning/end of each grayscale change.
It appears that physics comes into play.

Code to turn the laser on a a specific power level followed by a short move command (0.25") results in the laser firing and it "overcooks" until the machine can process the move instruction and accelerate to the proper feed rate. (just guessing here but this assumption seems reasonable to me) I can only imagine that for moves of 1 pixel in length it is not possible to do anything but burn too long. The machine cannot accel/decel anywhere near fast enough to prevent that burning.
I have looked at the graster solution (
wiki.linuxcnc.org/cgi-bin/wiki.pl?Rastering_With_A_Laser
) to synchronize the laser with the motion but I am using PWM output not a converted step/dir on an unused axis. Frankly, I don't think I'm capable of editing my HAL to successfully use that solution with my configuration. If anyone has any experience and advise to share with graster solution, I'd appreciate any help I can get.
I have read in this forum about speeds on parallel ports and MESA hardware which makes my head spin a bit. My PWM freq is 1KHz but can go up to 3KHz. (Measured with o'scope.) I can see the power levels vary with changes to the Sxxx param so I believe all of that is working properly. I used MESA hardware on my lathe and mill (LCNC) and Mach3 with Cxx/smooth stepper boards for my router. I realized that the Xylotec board is not the best choice of electronics but it was in handy and I had no idea how far I'd get so I chose the low buck route. I will likely use different electronics on my next laser machine (bigger work envelope and higher power diode) IF I can solve this raster engraving challenge.
I have not yet tried to implement M62 to synchronize the laser firing with the motion but am thinking that may be my next step.
Any help or comments would be appreciated. I can provide pics of the machine and output product. I can provide HAL and INI files if anyone is interested.
Mark