Laser Manual: Difference between revisions

Jump to navigation Jump to search
6,015 bytes added ,  3 November 2018
→‎Troubleshooting: How to reset LinuxCNC state, remove instructions about old blower
(→‎Troubleshooting: How to reset LinuxCNC state, remove instructions about old blower)
 
(26 intermediate revisions by 7 users not shown)
Line 3: Line 3:
== History ==
== History ==


You can find the [http://www.andrewkilpatrick.org/blog/?page_id=914 history of the laser project] on [http://andrewkilpatrick.org Andrew Kilpatrick's site].
You can find the [https://web.archive.org/web/20160731124052/http://www.andrewkilpatrick.org/?p=laser_cutter history of the laser project] on [http://andrewkilpatrick.org Andrew Kilpatrick's site].


== Capabilities ==
== Capabilities ==


Our laser is controlled by a Linux package called [http://www.linuxcnc.org/ EMC2]. To drive the laser, EMC2 plays [http://en.wikipedia.org/wiki/G-code G-code] files. G-code is not very standardized, so you should read up on the [http://www.linuxcnc.org/docview/html//gcode.html specific variety of g-code used by EMC2].
Our laser is controlled by a Linux package called [http://www.linuxcnc.org/ LinuxCNC]. To drive the laser, LinuxCNC plays [http://en.wikipedia.org/wiki/G-code G-code] files. G-code is not very standardized, so you should read up on the [http://www.linuxcnc.org/docview/html//gcode.html specific variety of g-code used by LinuxCNC].


The position of the laser is controlled by the X and Y axes, and the height of the table is the W axis. Motion on all axes is made of discreet steps and can be reproduced extremely accurately. The X and Y axes move 500 steps per inch and the W axis moves 2000 steps per inch. The laser cut area is about 22" x 17"
The position of the laser is controlled by the X and Y axes, and the height of the table is the W axis. Motion on all axes is made of discreet steps and can be reproduced extremely accurately. The X and Y axes move 1000 steps per inch and the W axis moves 4000 steps per inch.


The actual laser beam can be set to 15 different power levels using the switches on the panel. The max power rating is 25 Watts, and as of mid 2013 it has been measured at approximately this by Canadian Avenger. The power level can also be more finely controlled with G-code. To get a sharp line/cut, the laser needs to be focused. This is done by adjusting the W axis (the table) until the surface of your workpiece is exactly 2 inches from the lower surface of the lens. There is a white plastic post that can be used to measure this. From the base of the large end of the post to the top of the tapered part is 2 inches.
The actual laser beam can be set to 15 different power levels using the switches on the panel. The max power rating is 25 Watts, and as of mid 2013 it has been measured at approximately this by Canadian Avenger. The power level can also be more finely controlled with G-code. To get a sharp line/cut, the laser needs to be focused. This is done by adjusting the W axis (the table) until the surface of your workpiece is exactly 2 inches from the lower surface of the lens. There is a white plastic post that can be used to measure this. From the base of the large end of the post to the top of the tapered part is 2 inches.
=== Size/Dimensions ===
* Max workpiece size: 24" x 18"
* Max laser cut area: 23.5" x 18"
* Bed vertical travel: 8" (no end stops! be careful not to drive it into the ends of travel!)


== General Workflow Overview ==
== General Workflow Overview ==
# Obtain/create source work (either raster or vector).
# Obtain/create source work (either raster or vector).
# Convert source work to g-code which the laser understands. Inkscape provides an [http://wiki.hacklab.to/LaserManual#Inkscape_Example_.28a_good_way_to_get_started.29 easy way to get started].
# Convert source work to g-code which the laser understands. Inkscape provides an [[#Inkscape_Example_.28a_good_way_to_get_started.29|easy way to get started]].
## If raster image (any major format) use the [[#Graster Conversion Workflow|graster workflow]].
## If raster image (any major format) use the [[#Graster Conversion Workflow|graster workflow]].
## If SVG use SVGtoGCODE workflow.
## If SVG use [[#SVG_Conversion_Workflow|SVGtoGCODE workflow]] or [[#Inkscape_gcodetools_Workflow|Inkscape gcodetools workflow]].
## If DXF use dxg2gcode workflow.
## If DXF use [[#DXF_Conversion_Workflow|dxg2gcode workflow]].
## If TrueType font/text use TrueType Tracer workflow (then DXF workflow if outputting DXF)
## If TrueType font/text use TrueType Tracer workflow (then DXF workflow if outputting DXF)
## If other, find/create tools to convert source work to g-code.
## If other, find/create tools to convert source work to g-code.
# Load g-code into AXIS on the laser controller PC.
# Load g-code into AXIS on the laser controller PC.
# Place workpiece into laser.
# Place workpiece into laser.
# Set beam power to OFF using override switch.
# Set beam power to SAFE using override switch.
# Ready laser power control system by rotating control knob on the grey panel to READY.
# Power ON laser control panel. The 'AMP ENABLE' and 'LASER ON' LEDs will blink once and turn off.
# Power ON laser control panel. The 'AMP ENABLE' and 'LASER ON' LEDs will blink once and turn off.
# Toggle machine power in AXIS to ON.  The 'AMP ENABLE' LED should come on.
# Toggle machine power in AXIS to ON.  The 'AMP ENABLE' LED should come on.
# Home all axes.
# Home all axes.
# Focus laser to proper workpiece height (using white focus aid peg as a reference) using manual control of the W axis.
# Focus laser to proper workpiece height (using white focus aid peg as a reference) using manual control of the W axis.
# Ready laser power control system by rotating control knob on the grey panel to READY.
# Activate blower and laser tube by pressing and holding START on the grey panel until the blower starts.
# Activate blower and laser tube by pressing and holding START on the grey panel until the blower starts.
# Check the Feed Override slider to make sure the job will run at the speed you desire.
# Check the Feed Override slider to make sure the job will run at the speed you desire.
# Check the Spindle Override slider to make sure correct laser output power.
# Set desired laser power and disable beam override.
# Set desired laser power and disable beam override.
# Start job in AXIS, keeping an eye on the work and being ready to hit the E-STOP switch if anything goes amiss.
# Start job in AXIS, keeping an eye on the work and being ready to hit the E-STOP switch if anything goes amiss.
# When job completes, set beam override back to ON and power OFF laser control panel.
# When job completes, set beam override back to SAFE.
# If you're done for the day, switch the control knob to STANDBY. If you're planning to laser more, just hit the STOP button. Either way will shut the tube off but leave the blower running until the fumes are all exhausted.
# If you're done for the day, switch the control knob to STANDBY. If you're planning to laser more, just hit the STOP button. Either way will shut the tube off but leave the blower running until the fumes are all exhausted.
# Remove workpiece and marvel at how well the lazzor worked!
# Remove workpiece and marvel at how well the lazzor worked!
Line 53: Line 60:
*Do not laser your body.
*Do not laser your body.


*Wear safety goggles if you are running the laser with the cover open, for some reason.  But don't do this.
*Wear laser safety goggles if you are running the laser with the cover open, for some reason.  But don't do this.
** You don't need safety goggles when using the laser normally.
** You don't need safety goggles when using the laser normally.
=== Techniques ===
==== HowTo: Load your image for laser cutting ====
To send your gcode (cut) or png (etch-and-cut) image to the linux machine that runs the laser:
# scp your image to your account on shell.hacklab.to. This puts your image somewhere the laser can get at it.
#*On Windows, the best program for this is WinSCP. You can get it here: http://winscp.net/eng/index.php)
#*On linux, run this (eg) from the command line: <code>scp supernerd@shell.hacklab.to :thisismyimage.png</code>
# At the laser machine, open a terminal.
# Navigate to the graster directory, and run graster on the image. Graster will generate both a cut job and an etch job from the image.


== Converting Files ==
== Converting Files ==
Line 79: Line 74:


To create raster jobs, use Graster:
To create raster jobs, use Graster:
http://github.com/jedediah/graster
https://github.com/IgorYeremin/graster/tree/laser


'''Warning:''' you cannot use the "touch off" 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 reset by going to'' Machine -> Zero Coordinate System -> P1 ''(the first option)''.
'''Warning:''' 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 "M101" or "M102", the latter implies you're using graster2. To reset touch off position for the old graster: ''Machine -> Zero Coordinate System -> P1 ''(the first option)''.


Graster is already installed on the laser PC in the bathroom and you should use it there, if possible, because it is still a bit tricky to install.
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/</pre>
# SSH into the laser computer or use the local terminal.
# Run the script on your image.<br/><pre>~/graster2/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''.
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''.


Run graster.rb for usage instructions.
Run graster.rb for detailed usage instructions.


The image can be any common format.. PNG is probably best. A job can be configured with command line options or a configuration file. You can generate a default config file with the -g option. A config file looks like this:
The image can be any common format.. PNG is probably best. A job can be configured with command line options or a configuration file. You can generate a default config file with the -g option. A config file looks like this:
Line 94: Line 107:
dpi: [500, 500]
dpi: [500, 500]
on_range: [0.0, 0.5]
on_range: [0.0, 0.5]
feed: 300
cut_feed: 20
offset: [0.0, 0.0]
overshoot: 0.5
overshoot: 0.5
offset: [1.0, 1.0]
repeat: [1, 1]
repeat: [1, 1]
tile_size: [3, 1]
tile_size: [3, 1]
tile_spacing: [0.125, 0.125]
tile_spacing: [0.125, 0.125]
feed: 120
cut_feed: 20
corner_radius: 0.125
corner_radius: 0.125
</pre>
</pre>


'''dpi''': The resolution you want to draw the image at, in dots-per-inch. The laser's natural resolution is 500x500 so you should probably use that for best results. 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.
'''dpi''': The resolution you want to draw the image at, in dots-per-inch. The laser's natural resolution is 1000x1000 so you should probably use a factor of that: 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.
'''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.


'''overshoot''': The stepper motors that move the laser can't start and stop instantly, they need time accelerate and decelerate. When drawing raster lines, 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 the burn. The default value seems to be enough for even the fastest speed.
'''feed''': Feed rate for rastering, you can change it later in the raster.ngc by editing the F number.


'''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. EMC has a similar feature in AXIS but you can't use that feature with Graster.  
'''cut_feed''': Feed rate for cutout
 
'''overshoot''': graster2 ignores this and calculates the optimal value at run time! Old graster: The stepper motors that move the laser can't start and stop instantly, they need time accelerate and decelerate. When drawing raster lines, 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 the burn. The default value seems to be enough for even the fastest speed.
 
'''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.
'''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.
TODO:


'''tile_size''': Size of repeated images
'''tile_size''': Size of repeated images
Line 120: Line 135:
'''tile_spacing''': Gap between repeated images
'''tile_spacing''': Gap between repeated images


'''feed''': Feed rate for rastering
'''corner_radius''': Corner radius of cutout, 0 for pointy corners
 
==== Graster Troubleshooting ====
 
===== Filled rectangle engraved instead of image =====
* Make sure your image has a white background. Transparent background is sometimes interpreted as black.


'''cut_feed''': Feed rate for cutout
===== 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's F feed rate at 100% override. If you want faster feed, edit the F value in the file. For old graster: turn feed down or edit overshoot setting in the graster config file and re-run it.


'''corner_radius''': Corner radius of cutout, 0 for pointy corners
===== 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 the table. AXIS should show how much overshoot room you need, move 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 ===
=== DXF Conversion Workflow ===
Line 136: Line 153:
* I have used this python [http://code.google.com/p/dxf2gcode/ dxf2gcode] converter.  It's pretty rough feeling, but if you set it up properly you can make gcode that works on the laser. Sometimes it has trouble with curves and makes invalid gcode, but it's open source so you can fix it!
* I have used this python [http://code.google.com/p/dxf2gcode/ dxf2gcode] converter.  It's pretty rough feeling, but if you set it up properly you can make gcode that works on the laser. Sometimes it has trouble with curves and makes invalid gcode, but it's open source so you can fix it!
* I have found that DXF files from CAD programs other than QCad cause the dxf2gcode converter to break. Your mileage may vary!
* I have found that DXF files from CAD programs other than QCad cause the dxf2gcode converter to break. Your mileage may vary!
* SarahEmm uses RibbonSoft/QCad's [http://www.qcad.org/camexpert.html CAM Expert] package with the laser!  This is basically QCad with a g-code module glued on, which is non-free, non-open, but works.  She wouldn't recommend it these days though, as it's expensive, essentially unmaintained software that the company isn't putting any development effort into anymore.  Ask her if you want the 'lazzor' machine definition which generates g-code that's complete and ready to load into AXIS on the laser, though.


====dxf2gcode configuration====
====dxf2gcode configuration====
Line 224: Line 240:
=== SVG Conversion Workflow ===
=== SVG Conversion Workflow ===


* Avatar-X developed an SVG to Gcode converter. It runs in Windows and is available from svn here: [https://avbrand.com:8443/svn/hacklab/Avatar-X/SVN%20to%20GCODE/releases/ avbrand svn] with a username and password of guest/guest.  Avatar-X is no longer a Hacklab member so I'm not sure how long this will be around or supported.  This tool does not work properly with Inkscape SVGs generated using the 'trace image' feature to trace a raster image.  All of the paths are all jumbled up upon importing to the SVGtoGCODE tool.
* Av developed an SVG to GCode converter. It natively runs in Windows and runs in macOS/Mac OS X (standalone emulator) and Linux (via Wine) and is available here: https://github.com/avwuff/SVG-to-GCode
 
* the SVG converter works well with files from [http://www.inkscape.org/ Inkscape] which is free on many platforms and I think also installed on pubtoob.
* the SVG converter works well with files from [http://www.inkscape.org/ Inkscape] which is free on many platforms and I think also installed on pubtoob.


=== TrueType Font Workflow ===
=== TrueType Font Workflow ===
* The [http://www.timeguy.com/cradek/truetype TrueType Tracer] is an open-source tool that takes a truetype font and some desired text, and spits out either g-code or a DXF.  This has been used to generate a DXF that was then loaded into CAM Expert to generate g-code, the direct g-code output from the tool hasn't been tried yet.
* The [http://www.timeguy.com/cradek/truetype TrueType Tracer] is an open-source tool that takes a truetype font and some desired text, and spits out either g-code or a DXF.  This has been used to generate a DXF that was then loaded into CAM Expert to generate g-code, the direct g-code output from the tool hasn't been tried yet.
=== Fusion360 Workflow ===
See: https://github.com/IgorYeremin/fusion-postproc
== Getting your files on the laser ==
To send your gcode (cut) or png (etch-and-cut) image to the linux machine that runs the laser:
# scp your image to your laser.hacklab.to. (You must be on the members WiFi or Ethernet network)
# *On Windows, the best program for this is WinSCP. You can get it here: http://winscp.net/eng/index.php)
# *On linux, run this (eg) from the command line: <code>scp thisismyimage.png hacklab@laser.hacklab.to:~/myfolder/</code>
Alternatively, you can use a USB drive. There should be one plugged into or hanging off the front of the laser computer.


== Hardware Overview ==
== Hardware Overview ==
Line 243: Line 275:
* Top row (left to right)
* Top row (left to right)
** Red ''LASER ON'' LED.  This indicates that the laser beam will be ON, if the overrides further down the path are disabled.  This LED is useful for checking jobs before turning the beam on for the first time.
** Red ''LASER ON'' LED.  This indicates that the laser beam will be ON, if the overrides further down the path are disabled.  This LED is useful for checking jobs before turning the beam on for the first time.
** Yellow ''AMP ENABLED'' LED.  This indicates that the laser control board is receiving a 'keepalive' signal from EMC2/AXIS, and the machine is 'powered on' from the PC's point of view.  When flashing, the machine is stopped due to an emergency stop signal or open interlock switch.
** Yellow ''AMP ENABLED'' LED.  This indicates that the laser control board is receiving a 'keepalive' signal from LinuxCNC/AXIS, and the machine is 'powered on' from the PC's point of view.  When flashing, the machine is stopped due to an emergency stop signal or open interlock switch.
** ''E-STOP'' (emergency stop) toggle switch.  When in the down/OFF position, the machine operate normally.  When toggled up/ON, the machine and EMC2/AXIS are put into emergency stop mode, all movement is stopped, and the laser beam is turned off.
** ''E-STOP'' (emergency stop) toggle switch.  When in the down/OFF position, the machine operate normally.  When toggled up/ON, the machine and LinuxCNC/AXIS are put into emergency stop mode, all movement is stopped, and the laser beam is turned off.
* Bottom row (left to right)
* Bottom row (left to right)
** Four ''LASER PWR'' (laser beam power level) toggle switches.  These control the actual beam output power, in binary.  Add up the numbers of all switches that are up/ON in order to get the output power level selected.
** Four ''LASER PWR'' (laser beam power level) toggle switches.  These control the actual beam output power, in binary.  Add up the numbers of all switches that are up/ON in order to get the output power level selected.
Line 265: Line 297:
** PLC - Controls power to the laser tube, blower, and light outside the room, and monitors pressure in the ducts.
** PLC - Controls power to the laser tube, blower, and light outside the room, and monitors pressure in the ducts.


== EMC2 ==
Further details here:
[[Laser Power Controller]]
 
=== Electronics ===
Details on laser internal schematics and code documented here: [[Laser_Electronics]]
 
== LinuxCNC operation ==


=== Homing ===
=== Homing ===


EMC 2.3 requires all axes to be homed before running any program. If you don't see little crosshairs next to the coordinates of all 4 axes, just click "Home all". If, for some reason, the gantry gets moved while AXIS is running, you need to "Home all" again because EMC2 has no way of knowing that the carriage is not in the position it thinks it's in.
EMC 2.3 requires all axes to be homed before running any program. If you don't see little crosshairs next to the coordinates of all 4 axes, just click "Home all". If, for some reason, the gantry gets moved while AXIS is running, you need to "Home all" again because LinuxCNC has no way of knowing that the carriage is not in the position it thinks it's in.


=== Focussing ===
=== Focussing ===
Line 278: Line 316:


There is a small white plastic post near the laser that can be used to measure the height. Place the fat end on the surface of your workpiece and the flat part of the notch against the side of the lens. If the post doesn't reach the lens or the lens is below the notch, make a coarse adjustment as necessary. '''Be careful not to bring the lens down on top of the post.''' When the lens is in the notch, raise the table in small steps while looking straight down at the post through the window. As soon as it moves away from the lens, back up one step.  For cutting through thicker material, you want the laser's focus point to be 'inside' the material, so once you have the focus dialed in using the post, move the table up by half the thickness of the material.
There is a small white plastic post near the laser that can be used to measure the height. Place the fat end on the surface of your workpiece and the flat part of the notch against the side of the lens. If the post doesn't reach the lens or the lens is below the notch, make a coarse adjustment as necessary. '''Be careful not to bring the lens down on top of the post.''' When the lens is in the notch, raise the table in small steps while looking straight down at the post through the window. As soon as it moves away from the lens, back up one step.  For cutting through thicker material, you want the laser's focus point to be 'inside' the material, so once you have the focus dialed in using the post, move the table up by half the thickness of the material.
=== G-code ===


=== How Our Laser Uses G-code ===
=== How Our Laser Uses G-code ===


X axis: gantry right/left, 500 dpi <br />
X axis: gantry right/left, 1000 dpi <br />
Y axis: gantry far/near, 500 dpi <br />
Y axis: gantry far/near, 1000 dpi <br />
W axis: table up/down, 2000 dpi <br />
W axis: table up/down, 4000 dpi <br />


The laser is wired to ''spindle on/off'' (M3/M5) '''and''' either of the following: <br />
The laser is wired to ''spindle on/off'' ([http://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m3-m4-m5 M3/M5]) '''and''' either of the following: <br />
''move Z axis to -0.002/+0.002'' (on/off respectively) <br />
''move Z axis to -0.002/+0.002'' (on/off respectively) <br />
'''or''' <br />
'''or''' <br />
use "digital out" commands ''"M62 P0" / "M63 P0"'' for on/off, respectively <br />
use "digital out" commands [http://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m62-m65 ''"M62 P0" / "M63 P0"''] for on/off, respectively <br />


That is to say, the laser is on if and only if the spindle is on and one or both of the Z axis and digital out are on.
That is to say, the laser is on if and only if the spindle is on and one or both of the Z axis and digital out are on.


Controlling the laser with the Z axis can be tricky because EMC2 thinks that there is a moving physical object attached to the axis and tries to constrain its motion. The M62/M63 commands are realtime and instantaneous, meaning that they can be used to turn the laser on/off without affecting X/Y motion, at least in theory. You can put these commands on the same line as a motion command, in which case the laser will be turned on/off at the *beginning* of the motion.
Controlling the laser with the Z axis can be tricky because LinuxCNC thinks that there is a moving physical object attached to the axis and tries to constrain its motion. The M62/M63 commands are realtime and instantaneous, meaning that they can be used to turn the laser on/off without affecting X/Y motion, at least in theory. You can put these commands on the same line as a motion command, in which case the laser will be turned on/off at the *beginning* of the motion.


'''''The following feature still needs a bit of tweaking. Don't use it for anything serious yet:''''' The power of the laser can be controlled from G-code by setting the spindle speed with S#, where the number is between 0 and 1. This will effectively be multiplied by the power level set with the hardware switches. Power level set with the S command is fairly detailed, with at least 50 distinguishable levels. The power can be set so low that it only leaves a faint mark on paper.
=== Control laser power from G-code ===
 
The power of the laser can be controlled from G-code by setting the spindle speed with S#, where the number is between 0 and 1. This will effectively be multiplied by the power level set with the hardware switches. Power level set with the S command is fairly detailed, with at least 50 distinguishable levels. The power can be set so low that it only leaves a faint mark on paper. Additionally, the S number can be modified with the Spindle Override slider next to the Feed Override slider.
 
total output power = 25 watts * S_value * (switches_value / 15) * spindle_override
 
example: switches set to 1+2+3 = 6, S0.5, spindle override = 100%, total output power = 25 watts * 0.5 * (6/15) * 1.0 = 5 watts
 
Setting S * spindle override > 1 does not output more than 25W of power :(


A G-code program for our laser should look something like this:
A G-code program for our laser should look something like this:


G20                (units are inches)
  M63 P0            (start with laser off)
  M63 P0            (start with laser off)
  G0 Z0.002          (ditto)
  G0 Z0.002          (ditto)
  G0 X2.5 Y3        (move to start position)
  G0 X2.5 Y3        (move to start position)
  F60                (set feed rate)
  F60                (set feed rate)
  M3 S1              (enable laser and set to full power)
  M3 '''S0.5'''            (enable laser and set to 50% power)
  G1 X7.5 Y3 M62 P0  (turn laser on and start controlled movement)
  G1 X7.5 Y3 M62 P0  (turn laser on and start controlled movement)
  ...
  ...
  G0 X0 Y17.5 M63 P0 (turn laser off and move gantry out of the way)
  G0 X0 Y17.5 M63 P0 (turn laser off and move gantry out of the way)
  M5                (disable laser)
  M5                (disable laser)
'''S1'''                (always set power scale back to 100% for the next job)
  M2                (end program)
  M2                (end program)


Since EMC2 automatically turns off the spindle when a program stops, there should be no danger of the laser ever being on unexpectedly. However, just to be safe, you should turn off all laser related signals at the beginning and end of every program.
Since LinuxCNC automatically turns off the spindle when a program stops, there should be no danger of the laser ever being on unexpectedly. However, just to be safe, you should turn off all laser related signals at the beginning and end of every program.
 
=== Speed-independent power ===
 
The laser cuts corners slower than straight lines because of finite acceleration. This results in the cut being uneven, deeper and wider in the corners, and straights not cutting all the way through. To compensate for this, the laser now has an additional mode: Speed-independent power. The laser will scale the power output based on actual cutting speed, and you should get exactly the same depth of cut and kerf everywhere.
 
Power settings become more complicated in this mode because of quirks in LinuxCNC's motion planner.
S# is still used to set it, but the value is not just fractional power between 0.0 and 1.0, but is fractional power per inch per second.
Because the power and speed are tied together in this mode, the F number now does not set the feed directly, but sets the maximum feed, and actual feed is set using [http://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m52 Adaptive feed control]. Since F is a maximum, you can set it to F3000 for any file and let adaptive feed will run the job as fast as possible while delivering the requested power.
 
G-code to use this mode:
 
G20                (units are inches)
M63 P0            (start with laser off)
G0 Z0.002          (ditto)
G0 X2.5 Y3        (move to start position)
(set manual power switches to all on, 15/15)
'''F3000'''              (set '''MAX''' feed rate)
'''M4''' S0.5            (enable laser in speed-independent power, 12.5 W/inch/second output)
'''M52 P1'''            (enable adaptive feed control)
G1 X7.5 Y3 M62 P0  (turn laser on and start controlled movement)
...
G0 X0 Y17.5 M63 P0 (turn laser off and move gantry out of the way)
M5                (disable laser)
S1                (always set power scale back to 100% for the next job)
'''M52 P0'''            (disable adaptive feed control)
M2                (end program)
 
This example ends up setting the adaptive feed to 120 in/min (2 in/s), and outputting 25W when the laser is at speed.
* <code>S0.25</code> would be full power at 240 in/min
* <code>S4</code> - full power at 15 in/min
 
In theory, this means there's an S# number that will cut through a specific material, then S#*2 will cut through double the thickness of the same material.
In practice, this works with cutting acrylic, but etching wood seems to be more sensitive to the speed rather than total power applied. This is why the F value is still useful.
 
* <code>S1 F60</code> will apply full power at 60in/min
* <code>S1 F30</code> will apply half power at 30in/min (the same total power, but over a longer period of time)
 
The Spindle Override slider can modify the S valued at run time, and with the adaptive feed enabled, will modify the feed rate to maintain maximum cutting speed. The Feed Override slider will behave counter-intuitively, setting it to >100% will not do anything unless your F is low enough for adaptive feed to not engage. Setting it <100% will make the feed slower, but since this is the speed-independent power mode, the output power will adjust to maintain the same W/in/s.


== Troubleshooting ==
== Troubleshooting ==
=== Resetting LinuxCNC state ===
* The previous job might've left LinuxCNC in a non-standard state, reset it by using the following commands in the MDI tab:
M2    (end program, reset most states)
M65 P0 (beam off)
M52 P0 (disable adaptive feed)
S1    (reset power factor to 100%)
* Set Feed and Spindle override sliders to 100%


=== Beam does not turn on/stays on all the time during Graster job ===
=== Beam does not turn on/stays on all the time during Graster job ===
* Ensure the coordinate system is reset by going to '''Machine -> Zero Coordinate System -> P1'''. You can't use the "touch off" feature of AXIS with Graster.
* Make sure there are no stray Graster Streamer windows open, multiple windows will fight for the graster buffer and output garbage
* (Note: This applies to the old graster, not graster2) Ensure the coordinate system is reset by going to '''Machine -> Zero Coordinate System -> P1'''. You can't use the "touch off" feature of AXIS with Graster.


=== Gantry moves as desired, but no beam is output ===
=== Gantry moves as desired, but no beam is output ===
* Check to ensure the beam override switch is not on.
* Check to ensure the beam override switch is set to Armed.
* Check to ensure that a non-zero power level has been selected.
* Check to ensure that a non-zero power level has been selected.
* Switch Axis to show "Machine Coordinate View" and make sure the Z axis is touched off at the machine's zero point.  if Z is touched off high or low, the laser control could be erratic.
* Switch Axis to show "Machine Coordinate View" and make sure the Z axis is touched off at the machine's zero point.  if Z is touched off high or low, the laser control could be erratic.
* Switch to the MDI [F5] tab and enter the following commands in the MDI Command window, clicking "Go" after each: M3, S1
* Switch to the MDI [F5] tab and enter the following commands in the MDI Command window, clicking "Go" after each: M3, S1
* Run the sed command at the bottom of this wiki page (includes the M3 S1 from above)
* Run the sed command at the bottom of this wiki page (includes the M3 S1 from above)
* Check to make sure the red light outside the laser room is on and spinning. If it is not, speak to someone who has previous laser experience.
* Check to make sure the green Laser light on the control box is on. If it is not, speak to someone who has previous laser experience.


=== Aborting a test/job ===
=== Aborting a test/job ===
* If streaming a graster job, the easiest way to abort the job, without having to kill processes manually, is to hit the big ESTOP switch
* If streaming a graster job, the easiest way to abort the job, without having to kill processes manually, is to hit the big ESTOP switch
=== Ventilation system makes a soft buzzing and the lights dim when turned on, air is not moved ===
* This happened on March 28, 2010, and again in early 2013.
* '''Ensure the motor is unplugged before performing any further troubleshooting!'''
* Untape the side of the ventilation motor 'can' closest to the wall, and bend the metal back some so you can see the pulley on the motor and the belt that drives the blower.
* Spin the blower by hand (push/pull the belt along).  If it does not spin freely, investigate why.
* Ensure nothing (metal, loose tape) is interfering with the belt, ensure nobody has anything that will get caught in the belt/blower/motor, and plug in the ventilation system.  This manual manipulation resolved the issue the previous time it happened.
* If this resolved the issue, put the ventilation system back together, taping up any openings that might let air in/out in the wrong place.
* If this did not resolve the issue, troubleshoot further.
* Mail the members list to let everyone know it happened again, so we can troubleshoot what might be happening and try to resolve it.


=== Gantry moves much faster or slower than expected ===
=== Gantry moves much faster or slower than expected ===
Line 348: Line 431:
** DUCT OVERPRESS - The pressure in the duct is too high. Check for clogs in the duct.
** DUCT OVERPRESS - The pressure in the duct is too high. Check for clogs in the duct.
** BATT LOW - The backup battery in the PLC is low. Replace it or contact the operations team to do so.
** BATT LOW - The backup battery in the PLC is low. Replace it or contact the operations team to do so.
=== Mirror misalignment (double laser beam or only cutting on one side of bed) ===
* The first mirror (on the left of X carriage) has been going out of alignment recently for unknown reasons
* This causes the laser to hit the second mirror (on head) off-centre
* '''Get help from someone who has fixed this before!'''
* Paper masking tape and firing laser on the minimum power level for a second can be used to see where the beam actually hits
* [[File:Laser_alignment_fail.jpg|200px]]
* Realignment procedure
** Parts diagram:
** [[File:Laser_first_mirror_alignment.jpg|200px]]
** Loosen the two locking setscrews
** Rotate mirror a fraction of a degree
** Check alignment by firing at tape
** Repeat until laser hits the same spot on the opening for the second mirror when the head is at leftmost and rightmost positions along the slide
** Slowly snug setscrews to fix position
** Re-check alignment
** Repeat whole process if needed


== Materials Reference Tables ==
== Materials Reference Tables ==


The laser cutter can cut up to about 33.0cm x 58.5cm (13" x 23").
The laser cutting area is 23.5" x 18" (596.9mm x 457.2mm).


=== Materials ===
=== Materials ===
Line 360: Line 460:
! Material !! Aliases !! Outcome !! Recommendation !! Maximum Thickness Cut !! Suggested Feed Rate  (in/min) and Power Level
! Material !! Aliases !! Outcome !! Recommendation !! Maximum Thickness Cut !! Suggested Feed Rate  (in/min) and Power Level
|-
|-
| Acrylic || PMMA, Plexiglas, Perspex, Lucite || Very good results from light etching to cutting with minmal smoke || Great to use in laser. || 6mm or almost 1/4" || F4-F20, depending on thickness and colour. Full power.
| Acrylic || PMMA, Plexiglas, Perspex, Lucite || Very good results from light etching to cutting with minmal smoke || Great to use in laser. || 6mm or almost 1/4" || F4-F20, depending on thickness and colour. Full power for cut. Etch at 2 power.
|-
|-
| Acrylic - 0.020" to 0.060" || n/a || Works great for stencils || Available at Gwartzman's (20" x 16") || All || Full Power - 0.030" ~35ipm
| Acrylic - 0.020" to 0.060" || n/a || Works great for stencils || Available at Gwartzman's (20" x 16") || All || Full Power - 0.030" ~35ipm
Line 468: Line 568:
6) Bring your file to the laser cutter. You can either move it over manually on a USB stick or send it over electronically. <br />
6) Bring your file to the laser cutter. You can either move it over manually on a USB stick or send it over electronically. <br />
* First, login to the laser's computer (hint: it's the same password as a lot of other things in the lab)<br />
* First, login to the laser's computer (hint: it's the same password as a lot of other things in the lab)<br />
* Open EMC2 if it isn't already opened and running. <br />
* Open LinuxCNC if it isn't already opened and running. <br />
* You now have two main options for accessing your file, either USB stick or upload via the network:<br />
* You now have two main options for accessing your file, either USB stick or upload via the network:<br />
** For USB stick, you'll probably want to try finding your USB stick under "media" in the top level folder. I found mine in /media/disk/ (your mileage may vary) <br />
** For USB stick, you'll probably want to try finding your USB stick under "media" in the top level folder. I found mine in /media/disk/ (your mileage may vary) <br />
Line 479: Line 579:
Coming soon?
Coming soon?


[[LaserProtocol]]
== Manufacturer manuals ==
[[Laser Power Controller]]
 
* [[:File:ULS25-Manual.pdf|ULS-25 Manual]]
* [[:File:ULS-25-50-PS-Revision-B1.pdf|ULS-25PS Manual]]
* [[:File:ULS-25E(R)_Service_Manual.pdf|ULS-25E Service Manual]]
 
== See Also ==
 
* [[Laser Power Controller]]
 
* [[Laser Electronics]]


[[category: Laser]][[category: Documentation]][[Category:Equipment]]
[[category: Laser]][[category: Documentation]][[Category:Equipment]]

Navigation menu