how to modify GRBL for Z axis to tool ON OFF

daveczrn
Posts: 42
Joined: Thu Jul 05, 2012 11:06 am

Re: how to modify GRBL for Z axis to tool ON OFF

Post by daveczrn » Wed Oct 10, 2012 3:21 am

Check out buildlog.net. there are plenty of guys using mach3 over there to laser engrave with.

LineKernel
Posts: 65
Joined: Sun May 20, 2012 11:42 am
Location: France-Avignon
Contact:

Re: how to modify GRBL for Z axis to tool ON OFF

Post by LineKernel » Wed Oct 10, 2012 11:09 am

thanks Fibo
i was more asking how to do it , in software side , like in pycam
so i wont have to modify grbl , or wont have to use 2 arduino

also i should have wrote that i am running under windows

i think i ll make a post in the software side of the forum , also i am following "someguy" that is trying to do the same kind of thing with a plasma cutter

LineKernel
Posts: 65
Joined: Sun May 20, 2012 11:42 am
Location: France-Avignon
Contact:

Re: how to modify GRBL for Z axis to tool ON OFF

Post by LineKernel » Wed Oct 10, 2012 11:23 am

@jhllt67
thanks i will take a look at Cambam , the only thing is , i dont really understand so much about the gcode header , i only tried pycam with gcode sender
and there is too much things in the header for me to understand it all for now ...
but i ll take a look
thanks

@daveczrn
yes thanks , but i will try to use non commercial software


i start thinking , it could be not that difficult to do a "replace" on the .txt (understand gcode) file
what would you guys use for doing an automatic "replace" ?
also if i find a way to do it in pycam , i ll post !

Cheers

fito
Posts: 79
Joined: Thu Aug 09, 2012 5:45 am

Re: how to modify GRBL for Z axis to tool ON OFF

Post by fito » Wed Oct 10, 2012 5:10 pm

I've been using heekscnc and it uses post-processors to output gcode specific to different machines. Creating a new post processor from the emc2 post processor with the refenrences to z-axis move replaced by tool on or tool off shouldn't be terribly hard- I type this with no python experience.

If you wanted to edit the the generated gcode file it should be easy to replace the instances of z-axis with the appropriate tool on/off command. If there are alot of z moves you may want to use a script to do the replacement.
Adolfo Cortés
ShapeOko 649

Nero
Posts: 1
Joined: Fri May 03, 2013 4:36 pm

Re: how to modify GRBL for Z axis to tool ON OFF

Post by Nero » Fri May 03, 2013 5:02 pm

Hi,

Sorry for my bad english i try my best and hope you guys understand me.

Ok this Topic is old but i had the same problem as LineKernel and it is now working fine.
So is thought i post the changes i made in the gcode.c so others can use it.

It is just a minor change nothing big and it only does turn on/off pin12 wen z >/<= 0.

First at line 178 change

Code: Select all

          case 3: gc.spindle_direction = 1; break;
          case 4: gc.spindle_direction = -1; break;
          case 5: gc.spindle_direction = 0; break;
to

Code: Select all

          case 3: gc.spindle_direction = 0; break;
          case 4: gc.spindle_direction = 0; break;
          case 5: gc.spindle_direction = 0; break;
Now it will always be off.

And in line 236 before the

Code: Select all

break;
add this

Code: Select all

      if (value >= 0) gc.spindle_direction = 0;
      if (value < 0)  gc.spindle_direction = 1;
Now you can use pin12 as a on/off switch.

I hope it helps

SnapFracturePop
Posts: 67
Joined: Fri May 04, 2012 5:13 pm
Location: Davenport, IA

Re: how to modify GRBL for Z axis to tool ON OFF

Post by SnapFracturePop » Thu Jun 13, 2013 6:15 pm

I wrote a script that makes a few modifications for laser-friendliness:
http://qcgeek.com/laseroko/

*turns laser on at every g1/g2/g3
*turns laser off at every g0
*removes all Z movement
*removes all F speed changes

Typically I use Inkscape to draw the shape, the Inkscape GCode plugin to generate the commands (make sure it's only one pass), run the resulting GCode through the Laseroko script, modify the single F command depending on my material, then cut! Or, run through http://qcgeek.com/laseroko/draw.php to preview.
Shapeoko #384: dual-Y, outside-belt, ACME-Z,1000mm Y, drag chain cable management, insert-nut style base board, 800mw IR laser cutter, & 3d-printing with Qu-Bd & Printrboard.

Post Reply