On 07/20/2014 05:49 AM, Jeff Epler wrote: > Untested, and assuming I understand what is going on: > > after "start" add "waitusr gDROui" and "unload all". This causes > execution of the .hal script to wait until gDROui exits, then unloads > everything. (I think there's also an implicit "unload all" in halrun, > so on second thought this may not be necessary if you're using halrun as > opposed to halcmd). > > Without "waitusr", then you run off the end of the script with HAL still > loaded. It's not surprising that you have to use something like "halrun > -U" to clean things up. (though I am the tiniest bit surprised that the > automatic "unload all" in halrun doesn't close the glade window for you, > leading to a window that appears and then immediately goes away) > > Jeff
Thank you for your reply Jeff. I have a couple options. I can use "halrun -I -f gDRO.hal" which brings up the UI window and the halcmd prompt. When I close the window, I can type "quit" at the prompt and this closes the halrun session. This works fine but is inconvenient. I would like to use "halrun -f gDRO.hal", without the -I flag, and have "waitusr gDRO", "stop", and "unload all" in my gDRO.hal file. The problem is that when I close the window, the halrun prompt doesn't come back in the halrun session, because I'm not in interactive mode, and the "stop", and "unload all" don't get invoked for some reason. I suspect the main cause is that I don't use "loadusr -Wn gDRO gladevcp ..." to load my ui files. I just call "loadusr -Wn gDRO ./gDRO.hal" which opens and runs everything fine, but I suspect gladevcp has code that works with halrun to close processes down properly. I suppose I could use gladevcp, but I haven't seen any complete examples where gladevcp is not used with AXIS or invoking linuxcnc. Michael did send this link: http://www.linuxcnc.org/docs/devel/html/hal/hal-examples.html#_stand_alone_hal but I haven't taken the time yet to sort it out and rewrite my files to match. I think I'll do that today. Thanks for the help. -- Kirk Wallace http://www.wallacecompany.com/machine_shop/ http://www.wallacecompany.com/E45/ ------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
