Laser Manual: Difference between revisions

Jump to navigation Jump to search
2,932 bytes added ,  3 November 2018
→‎Troubleshooting: How to reset LinuxCNC state, remove instructions about old blower
m (→‎How Our Laser Uses G-code: update resolution, link to linuxcnc gcode documentation)
(→‎Troubleshooting: How to reset LinuxCNC state, remove instructions about old blower)
 
(2 intermediate revisions by the same user not shown)
Line 316: 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 ===
Line 334: Line 332:
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.
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 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.
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 ===

Navigation menu