Changes

Jump to: navigation, search

Laser Manual

1,499 bytes added, 17:16, 3 November 2018
/* Graster Conversion Workflow */ update instructions for graster2
To create raster jobs, use Graster:
httphttps://github.com/jedediahIgorYeremin/graster/tree/laser
'''Warning:''' you cannot use The old version of graster could not be touched off, graster2 can! You can check what version your file uses by checking the .raster.ngc file for "touch offM101" or "M102" feature of EMC with a Graster job, it will not work and bad stuff will probably happen. ''Before starting a job, make sure the coordinate system is latter implies you're using graster2. To reset by going totouch off position for the old graster: '' Machine -> Zero Coordinate System -> P1 ''(the first option)''.
Graster is already installed on the laser PC you should use it there, if possible, because it is still a bit tricky to install.
To use it:
# Load the image onto the laser printer.<br/><pre>scp image.png hacklab@laser.hacklab.to:~/my-folder/image.png</pre># SSH into the laser printercomputer or use the local terminal.# Run the script on your image.<br/><pre>..~/grastergraster2/graster.rb image.png</pre>
# The output results in three files: <br/>&nbsp;&nbsp;&nbsp;&nbsp;image.png.cut.ngc - A box cutout of the image. <br/>&nbsp;&nbsp;&nbsp;&nbsp;image.png.raster.gmask - The gmask file with laser instructions.<br/>&nbsp;&nbsp;&nbsp;&nbsp;'''image.png.raster.ngc''' - This is the main Gcode file that you want to load into the cutter.
 ==== Graster Job Output/Running ====Graster output consists of a cut G-code file (filename.cut.ngc), a raster G-code file (filename.raster.ngc) and a mask file (filename.raster.gmask).* The cut file is a simple g-code sequence that just cuts out the outer perimeter rectangle of the image/job. You can use this to align your work, cut the outline in a piece of scrap paper, then place your work piece on the outline.* The raster g-code file consists of a constant raster pattern covering the entire surface of the piece. It's normal for this to appear as a solid white box when loaded into AXIS (if you zoom in you will see the constant pattern).* Once the raster job starts in AXIS, it executes the 'M102' g-code command, which is set up to launch the Graster Streamer. The g-code itself just tells the laser head to move back and forth over and over, and the Graster Streamer actually streams the bitmap data to it (via the mask file).* If you need to stop a job, press the Stop button on AXIS and then press the Cancel button on the Graster Streamer if it's still open.  ====Advanced Graster info====
To run Graster yourself, '''you will need Ruby 1.9, not Ruby 1.8'''. At present, the version of 1.9 in the Debian/Ubuntu repository is '''very old''', do not install it. You will have to build Ruby 1.9 (or later) from source (http://www.ruby-lang.org/en/downloads/). You will also need to install RubyGems and a gem called rmagick (which is used to read image files). This is all a bit of a hassle and a simpler install method is planned for ''The Future''.
dpi: [500, 500]
on_range: [0.0, 0.5]
feed: 300
cut_feed: 20
offset: [0.0, 0.0]
overshoot: 0.5
offset: [1.0, 1.0]
repeat: [1, 1]
tile_size: [3, 1]
tile_spacing: [0.125, 0.125]
feed: 120
cut_feed: 20
corner_radius: 0.125
</pre>
'''dpi''': The resolution you want to draw the image at, in dots-per-inch. The laser's natural resolution is 500x500 1000x1000 so you should probably use a factor of that for best results: 1000, 500, 250. Lower resolution = less run time. This means that 500 pixels in your image will be one inch on the laser. If you want it bigger, you should scale up the image in an image editing program that has good filtering or better yet, get a higher quality source image.
'''on_range''': The range of lightness values for which the laser will be on. Images are converted to greyscale with range 0..1 and tested against this range. Since the laser tends to darken things, the default is to laser dark pixels.
'''overshootfeed''': The stepper motors that move the laser can't start and stop instantly, they need time accelerate and decelerate. When drawing raster linesFeed rate for rastering, you want to the laser to be moving at a constant speed from one end all the way to the other. We overshoot the end of the image so the X axis motor can change direction without affecting it later in the burnraster. The default value seems to be enough for even ngc by editing the fastest speedF number.
'''offsetcut_feed''': The location of the bottom left corner of the image, relative to the bottom left corner of the laser table. This allows you to reposition the whole image. EMC has a similar feature in AXIS but you can't use that feature with Graster. Feed rate for cutout
'''repeatovershoot''': Number of times to repeat graster2 ignores this and calculates the image in optimal value at run time! Old graster: The stepper motors that move the X laser can't start and stop instantly, they need time accelerate and Y directionsdecelerate. YupWhen drawing raster lines, this lets you burn want to the laser to be moving at a whole batch of things instead of just constant speed from oneend all the way to the other. We overshoot the end of the image so the X axis motor can change direction without affecting the burn. The default value seems to be enough for even the fastest speed.
TODO'''offset''':The location of the bottom left corner of the image, relative to the bottom left corner of the laser table. This allows you to reposition the whole image. This existed to allow the old graster to overshoot correctly. Not it should probably stay at [0, 0] since you can offset the job anywhere with AXIS touch off. '''repeat''': Number of times to repeat the image in the X and Y directions. Yup, this lets you burn a whole batch of things instead of just one.
'''tile_size''': Size of repeated images
'''tile_spacing''': Gap between repeated images
'''feedcorner_radius''': Feed rate Corner radius of cutout, 0 for rasteringpointy corners
'''cut_feed''': Feed rate for cutout==== Graster Troubleshooting ====
===== Filled rectangle engraved instead of image =====* Make sure your image has a white background. Transparent background is sometimes interpreted as black. ===== Left/Right edge of etch are darker than middle =====* Not enough overshoot distance. Turn feed override down to <=100%. The calculated overshoot value is optimized for the file'''corner_radius'''s F feed rate at 100% override. If you want faster feed, edit the F value in the file. For old graster: Corner radius turn feed down or edit overshoot setting in the graster config file and re-run it. ===== LinuxCNC complains about exceeding axis limits =====* The overshoot on the left side goes into negative X, so jobs can't be touched off all the way on the left edge of cutoutthe table. AXIS should show how much overshoot room you need, 0 for pointy cornersmove your work by at least that distance and re-touch-off.
==== Graster Job Output/Running ====
Graster output consists of a cut G-code file (filename.cut.ngc), a raster G-code file (filename.raster.ngc) and a mask file (filename.raster.gmask).
* The cut file is a simple g-code sequence that just cuts out the outer perimeter rectangle of the image/job.
* The raster g-code file consists of a constant raster pattern covering the entire surface of the piece. It's normal for this to appear as a solid white box when loaded into AXIS (if you zoom in you will see the constant pattern).
* Once the raster job starts in AXIS, it executes the 'M101' g-code command, which is set up to launch the Graster Streamer. The g-code itself just tells the laser head to move back and forth over and over, and the Graster Streamer actually streams the bitmap data to it (via the mask file).
=== DXF Conversion Workflow ===
See: https://github.com/IgorYeremin/fusion-postproc
 
== Getting your files on the laser ==