Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: Cbyrdtopper on April 27, 2015, 05:50:05 PM
-
According to Mach3 Version 3.x Macro Programmers Reference Manual you can save your XML in a macro. I can't seem to get this to work in my macros. Sub Code(“SAVE_XML”) this is
what is said to use to do this.
Anyone ever use it?
--Chad
-
Code("SAVE_XML")
Still works fine here. It simply saves the current open XML back to itself. You will only know it because of the new DATE of the XML file.
The file name remains the same.
(;-) TP
-
What I am looking for is a way to save my tool magazine positions. I have a 24 tool magazine and it changes 2 tools at once. So I am having to keep track of different magazine positions constantly for tools. I am using DROs on a custom screen and it works great. But we're afraid of power failure and losing tool positions in the magazine. This code would be more of a convenience for us if we can get it to work. Is there anything special I have to do? I have it written Code(“SAVE_XML”). Is this correct? I'll try it again and look at the date and time to see if it is doing what is should.
Thanks
-Chad
-
I would not rely on it to do what you want. You should be writing the tool info to a seperate data file on the fly . That way every time it changes you write to the file. In the event of an interuption you can back up to the last known data set.
Or you COULD just do an update of the XML. With the tool data in DROs it is automatically saved in the XML so it would work and would be easy to work with. Just each time the tool data changes save the xml. It takes about 2 secs to do the XML save.
YOUR choice, (;-) TP
-
That's what I was trying to do inside the macro. Update my XML. What about the separate data file? For my tool magazine positions other than DROs on the screen? Or just an update of what I have?
-
Try the XML save first. It works fine here. A seperate data file can be a bit complicated.
(;-) TP