Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Cbyrdtopper on June 07, 2021, 12:10:40 PM

Title: Save tool table information.
Post by: Cbyrdtopper on June 07, 2021, 12:10:40 PM
So, I've got a mill that had some issues about freezing and closing Mach4 more often than I liked.  We got a new computer on it and that pretty much took care of the issues.
My biggest hassle when this happened was the tool table not saving when Mach4 closed unexpectedly.  I would have to re probe all of my tools again.
I was looking for a way to save my tool table information continuously in the PLC script ever so often and then automatically load in that information on startup.

I found this API call...mcToolSaveFile

If I ran this every time I set a tool offset, would this save my information and then load the new file on startup?

I don't get into LUA much anymore.  I have almost everything already written and I just transfer it all to new machines when we get them ready.

Title: Re: Save tool table information.
Post by: smurph on June 10, 2021, 04:50:37 PM
So, I've got a mill that had some issues about freezing and closing Mach4 more often than I liked.  We got a new computer on it and that pretty much took care of the issues.
My biggest hassle when this happened was the tool table not saving when Mach4 closed unexpectedly.  I would have to re probe all of my tools again.
I was looking for a way to save my tool table information continuously in the PLC script ever so often and then automatically load in that information on startup.

I found this API call...mcToolSaveFile

If I ran this every time I set a tool offset, would this save my information and then load the new file on startup?

I don't get into LUA much anymore.  I have almost everything already written and I just transfer it all to new machines when we get them ready.

Chad,

Yes, that is the API call to use.  It will pull all of the current offsets out of the system variables and write them out to your profile's ToolTable.tls file. 

Steve
Title: Re: Save tool table information.
Post by: Cbyrdtopper on June 11, 2021, 08:23:41 AM
Awesome!  I’m gonna get this out into my macro. Thanks Steve!