Hello Guest it is December 13, 2019, 02:39:56 AM

Author Topic: Help! I need gcode to respond to an input.  (Read 1049 times)

0 Members and 1 Guest are viewing this topic.

Help! I need gcode to respond to an input.
« on: October 11, 2018, 03:39:02 PM »
I am new to forums so please forgive me for faux paux.
   I am new to milling and I am having problems consistently engraving at a uniform depth. Here is my setup, Rhino 5 to created DXF file, Sheet cam to generate gcode, mach3 mill to feed a Chinese 6040 router. (Router is surprisingly stiff) .
   Here is my problem, my material height varies slightly from  the table due to material warpage. The solution I wish to implement is a follows: I am using a 3/8" pvc backer board, an insulating material, I will clamp my brass to be engraved to the backer board with small pieces of plastic to insulate the brass from the clamp. I will sense the continuity between the engraving cutter and the brass thus detecting when the cutter first touches the brass, I can use the detection to make an input to Mach3.
   I need help on the gcode. I need a snippet of code that I would put before each G01 Z-<engrave depth I had put in>. I can use find and replace in word pad to insert the gcode snippet. Upon sensing, the gcode would set Z=0 (Top of material) and then set engraving cut depth.
   The gcode then looks at an input to Mach3 and resets Z=0. Thus my question is, what gcode do I use to look at the input activated by the continuity and set the Z=0?
   If all this works I will share my results. Thanks guys!

Offline ZASto

*
  •  195 195
    • View Profile
Re: Help! I need gcode to respond to an input.
« Reply #1 on: October 11, 2018, 04:51:21 PM »
Make no mistake between my personality and my attitude.
My personality is who I am.
My attitude depends on who you are.
Re: Help! I need gcode to respond to an input.
« Reply #2 on: October 11, 2018, 08:20:11 PM »
Try: https://www.autoleveller.co.uk/
Thanks, I will look into this solution.
Al Pollard

Offline Chaoticone

*
  • *
  •  5,634 5,634
  • Precision Chaos
    • View Profile
Re: Help! I need gcode to respond to an input.
« Reply #3 on: October 12, 2018, 10:25:48 AM »
We have developed a surface mapping wizard for Mach4 that I think will be out in the next release. It will do exactly what your looking for (compensate for differences in Z height). I know this doesn't help with Mach3 but development of Mach3 ended years ago.

The MapSurface wizard is pretty slick. You can set the min and max positions to map in X and Y, set the resolution of the units and mapping grid, select the one of 4 possible probes you want to use, etc. You should also be able to lay a map on top of another map. In other words you could do a coarse mape of a big table (say 5' X 10') at something reasonable like a 6 inch grid. Then when you want to do a highly accurate area (say 3" X 3" for a PCB) you could map just that area at some insane resolution grid (like every .010 inch) and enable that map to route your PCB. Here are some screenies of what it looks like.

Since the map points are dependent on knowing where the X, Y and Z are you get a warning it any enabled axis hasn't been homed (referenced). You can ignore it (but i wouldn't) or leave, reference the machine then run it.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Help! I need gcode to respond to an input.
« Reply #4 on: October 15, 2018, 10:31:46 AM »
We have developed a surface mapping wizard for Mach4 that I think will be out in the next release. It will do exactly what your looking for (compensate for differences in Z height). I know this doesn't help with Mach3 but development of Mach3 ended years ago.

The MapSurface wizard is pretty slick. You can set the min and max positions to map in X and Y, set the resolution of the units and mapping grid, select the one of 4 possible probes you want to use, etc. You should also be able to lay a map on top of another map. In other words you could do a coarse mape of a big table (say 5' X 10') at something reasonable like a 6 inch grid. Then when you want to do a highly accurate area (say 3" X 3" for a PCB) you could map just that area at some insane resolution grid (like every .010 inch) and enable that map to route your PCB. Here are some screenies of what it looks like.

Since the map points are dependent on knowing where the X, Y and Z are you get a warning it any enabled axis hasn't been homed (referenced). You can ignore it (but i wouldn't) or leave, reference the machine then run it.
Thanks, when do you expect this to be available?