You could write a simple program or script, even in basic, to parse the g code file after it is generated, and insert a few lines of code before and after a M06. Make it lift the Z to a certain height and return afterwards.
It may even be possible to insert this into your post-processor function, depending on the versatility of the program. Regards Roland 2009/12/1 Hubert Bahr <h...@hbahr.org> > I had this same problem and wanted to use MDI to move the table and Z axis > to make the tool change and zero the Z axis. Leslie Newell created a > revised hal_manualtoolchange which I have attached. The exchanges that > explain it were under "Using MDI during a Program?" starting about june 24 > 09 should be in the Archives. I guess we need to get it on the Wiki > sometime. This works very nicely for me. Since MDI keeps track of the > location when you hit continue it moves to the proper locations and > continues. Some time I forget to rezero the Z axis so I started doing to > make a mdi z move to verify that everything is as planned before hitting > continue. Also make sure when you zero that you are in state. The zeroing > dialog defaults to G54 when quite often you are working in G55 so you need > to set it to G55 to correctly set the offset. > > Hubert > > > > Michael Grundvig wrote: > >> Note: I posted this on CNCzone.com last night, but I think I'll get a >> better response here. Sorry for the cross-post. >> >> I feel like a fool but I don't get the trick with tool-changing. I use >> CamBam to create the gcode for a series of operations that require a couple >> of different endmills. I assign them different tool IDs as part of the >> process. When I run the gcode, EMC2 prompts me to change the bits >> mid-operation at the right time as expected. It gives me the little "change >> the tool" dialog with a continue button. Pressing the continue button causes >> things to continue as expected. >> >> The problem is that I don't have control over the machine at that point to >> actually change the endmill. I need to raise the z-axis to get the endmill >> into the collect and then I need to touch off the z-axis. Any help or walk >> through of this process would be great as it's currently driving me crazy. >> >> I've tried pausing the operation with the dialog up but I still don't get >> manual control. I've also tried stopping the operation but I can't figure >> out how to get it to resume at the line where it left off properly. I know >> this is probably something super simple and I'm being a fool but it's got me >> stumped. >> >> I've heard reference of a "go to line" ability somewhere but I've not seen >> how to use it. It seems horrible that I can't touch off in the middle of a >> running program. This is pretty critical for those of us that don't have a >> tooling that can be established in a tool table. I know this is available in >> Mach3. >> >> Apparently there is also a "tool change position" that can be set >> somewhere - I'm assuming that can't be done via the Step Conf wizard so it >> must be in one of the configuration files. Setting it will be of little use >> if I can't conveniently resume the same file again. >> >> Any help is greatly appreciated! Thanks! >> >> -Mike >> >> ------------------------------------------------------------------------------ >> Join us December 9, 2009 for the Red Hat Virtual Experience, >> a free event focused on virtualization and cloud computing. Attend >> in-depth sessions from your desk. Your couch. Anywhere. >> http://p.sf.net/sfu/redhat-sfdev2dev >> _______________________________________________ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> >> > > > #!/usr/bin/python > import sys, os > import gettext > BASE = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "..")) > gettext.install("axis", localedir=os.path.join(BASE, "share", "locale"), > unicode=True) > > import emc, hal > import rs274.options > iniFile = emc.ini(os.environ['INI_FILE_NAME']) > emc.nmlfile = os.path.join(os.path.dirname(os.environ['INI_FILE_NAME']), > iniFile.find("EMC", "NML_FILE")) > > emcStat = emc.stat(); > emcCmd = emc.command() > > def do_change(n): > emcStat.poll() > curLine = emcStat.current_line > if n: > message = _("Insert tool %d and click continue when ready") % n > else: > message = _("Remove the tool and click continue when ready") > app.wm_withdraw() > app.update() > if curLine >=0: > emcCmd.abort() > h.changed = True > app.tk.call("nf_dialog", ".tool_change", > _("Tool change"), message, "info", 0, _("Continue")) > if curLine >=0: > emcCmd.mode(emc.MODE_AUTO) > emcCmd.auto(emc.AUTO_RUN, curLine + 1) > else: > h.changed = True > app.update() > > h = hal.component("hal_manualtoolchange") > h.newpin("number", hal.HAL_S32, hal.HAL_IN) > h.newpin("change", hal.HAL_BIT, hal.HAL_IN) > h.newpin("changed", hal.HAL_BIT, hal.HAL_OUT) > h.ready() > > import Tkinter, nf, rs274.options > > app = Tkinter.Tk(className="AxisToolChanger") > app.wm_geometry("-60-60") > app.wm_title(_("AXIS Manual Toolchanger")) > rs274.options.install(app) > nf.start(app); nf.makecommand(app, "_", _) > app.wm_protocol("WM_DELETE_WINDOW", app.wm_withdraw) > lab = Tkinter.Message(app, aspect=500, text = _("\ > This window is part of the AXIS manual toolchanger. It is safe to close \ > or iconify this window, or it will close automatically after a few > seconds.")) > lab.pack() > > def withdraw(): > app.wm_withdraw() > app.bind("<Expose>", lambda event: app.wm_withdraw()) > > app.after(10 * 1000, withdraw) > > try: > while 1: > change = h.change > if change and not h.changed: > do_change(h.number) > elif not change: > h.changed = False > app.after(100) > app.update() > except KeyboardInterrupt: > pass > > > ------------------------------------------------------------------------------ > Join us December 9, 2009 for the Red Hat Virtual Experience, > a free event focused on virtualization and cloud computing. > Attend in-depth sessions from your desk. Your couch. Anywhere. > http://p.sf.net/sfu/redhat-sfdev2dev > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > > ------------------------------------------------------------------------------ Join us December 9, 2009 for the Red Hat Virtual Experience, a free event focused on virtualization and cloud computing. Attend in-depth sessions from your desk. Your couch. Anywhere. http://p.sf.net/sfu/redhat-sfdev2dev _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users