Hello Guest it is April 16, 2024, 02:00:28 PM

Author Topic: Persistent Parameters  (Read 8488 times)

0 Members and 1 Guest are viewing this topic.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Persistent Parameters
« Reply #10 on: November 10, 2012, 05:20:30 PM »
You really should be using a UserDRO, I think the range is 1200-2000. There's no guarantees that any OEMDRO's will allow you to store your own values.
I wasn't aware of an alternate .xml. I just checked. I have about 25 profiles on this PC, as I do a lot of testing for other peoples problems. The only one that an an .xml in the macro folder is my main profile. But, the date on it is 2 years old, and I run Mach3 with that profile several times per week.

As I said, try using a User DRO above 1200, and the value should be saved in the regular .xml
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Persistent Parameters
« Reply #11 on: November 11, 2012, 11:00:02 AM »
Good'ay
I've spent an hour or so this morning with a fresh mind and here are my findings; I tried the User DRO way of going, I can set it and retrieve it in one session, but when I close Mach down and re-start it I loose it.  Checking 2 different PC's and 2 different configurations neither has any User DRO's in the XML files.

Setting and Getting Vars works about the same and I can find the value in the XML, but not the XML in the main Mach directory but rather in a XML file in the macros\profile directory, trouble is when the new iteration of Mach starts it reads the XML in the Mach directory and returns the default value.  Why these work for you and not me leaves me baffled but I know if it won't work for me it probably won't work for someone else so I can't rely on it, which is disappointing.  Don't get me wrong, I still think Mach is a great program, especially considering bang for your buck.  I've devised a way around this for my app but it would be nice if I could depend on setting a Var or Param and get it days later via the XML.  Why are there 2 XML's, why does it write to one and read from the other?

Thanks for listening, if you've got any further ideas I'd like to hear them, and bottom line if we can help make Mach better it is to everyone's advantage.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Persistent Parameters
« Reply #12 on: November 11, 2012, 11:28:42 AM »
(;-)  The active XML will be the one in the active directory. IF you are using mach3millXYZ  then the active xml should reside in that directory as well. How else is MACH3 to know what you have setup ?  The xml in the mach3 directlry will be a default XML not the active.

Now IF you do a defalut setup of mach3 as installed then the xml MAY reside in the default dir C:\mach3.

It is MY understanding that when using User dros  they will not be saved UNLESS they are active in a screenSet. I will test that for you.

#Vars in the range of 500-600 ARE saved every time to the "active" XML. Here it has NEVER failed to do so.

(;-) TP
Re: Persistent Parameters
« Reply #13 on: November 11, 2012, 11:56:07 AM »
This is most likely my problem but I've gone round and round so much now I'm confused honestly.  Why is the XML in the Mach3\macro\profile directory?  It contains the right value but when Mach is re-started it evidentally doesn't read from that file since it doesn't return that value.  Could I be missing a whole sub directory to the Mach3 directory?  Also the 2 XML's are different sizes but both have the same mod date/time stamp.
Pretty confused right now!  Could you give me an example of the path to your active directory containing the XML?  On 3 different configs the only place the XML's are in the main Mach3 directory and in the macros\profile directory.  Thanks again.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Persistent Parameters
« Reply #14 on: November 11, 2012, 11:59:04 AM »
OK more input IF you are using say Userdro(2000) and expect to find it in the xml you will not find it as such. Art created a unique save function for such and it is NOT saved directly into the XML as the original ID.

For instance I created a Userdro(2000) dro and input data of 9999. IF you look for the Usedro#2000 in the saved xml you will not find it as such. In this case the actual value was saved in OemDro2_747. Changed that value to 8888 saved then reload mach3 and the value in userdro(2000) is now 8888.

It does NOT really matter HOW he saved it as LONG as he did. (;-).

You do have to have persistant dros checked(;-).

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Persistent Parameters
« Reply #15 on: November 11, 2012, 12:02:51 PM »
Look at you MACH3  ICON where you load MACH3. Right click on it then click properties. At the end of the string you should have a P/ string that POINTS to the active XML that MACh3 uses to run with. WHERE does yours point to c:\Mach3  or C:\Mach3\MAch3mill  ?

You can literaly have dozens of MACH3 versions set up to run from different profiles BUT MACH3 will ONLY run the one it is pointed to.

(;-) TP

Re: Persistent Parameters
« Reply #16 on: November 11, 2012, 03:52:29 PM »
Well a long day but I finally got it and learned a bit in the offing.  No matter what I did the use of SetVar and GetVar, the best easiest way to do what I've been trying to do, upon closing Mach would write the value to the XML that was in the Mach3\macros\profile directory. I even deleted this file a couple of times but it would re-write itself on closing.  When I re-started Mach it would read the value of the Var from the XML in the Mach3 directory, that was with version 3.042.033.  Finally I decided to try version 3.043.066 and it worked like a charm, no XML in the Mach3\macros\profile directory!  So Gerry when you asked if I was using an old version of Mach I guess we should have taken it more to heart.  Maybe I can get back to making chips tomorrow.  Thanks for your help gentlemen.