Hello Guest it is December 12, 2019, 01:48:10 PM

Author Topic: MACH4 LUA scripts disappear after upgrading to new version  (Read 1595 times)

0 Members and 1 Guest are viewing this topic.

MACH4 LUA scripts disappear after upgrading to new version
« on: October 25, 2016, 06:25:30 PM »
Guys,

Quick question I could not find in the manuals.  I had several scripts written and working and decided to upgrade to the latest version of MACH4.  I save my XML file and when I installed the new version I put my old XML file in the director and all the axis and everything worked except all my LUA code just disappeared.  Does this get saved in some other file that I forgot to save?  Thanks

Russ
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #1 on: October 25, 2016, 07:27:39 PM »
You mention XML files, whereas Mach4 uses profiles that contain INI files among others.

There is more to a Mach4 environment than just the INI file. It is better to generate a
Package Profile (see Help > Support > Packaged Profile), and then use the Mach4 Loader
to import the profile.


Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #2 on: October 25, 2016, 09:13:38 PM »
Steve,
Thanks.  My profile was Mach4mill, but I will read up on it this evening.  I did save the .ini  file that is why all the motors, homing stuff all worked.

Russ
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #3 on: October 25, 2016, 09:34:10 PM »
Please please PLEASE... do not save your changes in the standard Mach4 profiles (i.e. Mach4Mill, Mach4Lathe, Mach4Router, etc.).  As you have found out, they WILL get overwritten when you install a different Mach4 version.  Open the Mach4 Loader, select the profile then click on the "Copy Profile" button.

Likewise, if you have any custom changes to the screen set (custom buttons or Lua code), copy the screen set to some other name.  I'm not in front of a PC with Mach4 at the moment, but from the screen editor I think it is something obvious like "File->Save As" (or *some* menu then "save as").

Bob
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #4 on: October 25, 2016, 09:45:34 PM »
Bob,
Thanks that is what I did wrong.  I always copy the ini file but that did not save all the LUA code put in WX.  I need to figure that part out as well.

Russ
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #5 on: October 25, 2016, 09:49:29 PM »
That is exactly why you should use a Packaged Profile. It saves everything, including Lua scripts,
screen edits, and so on.

.... and as Bob said, be sure to create a profile with your own name so it does not get overwritten
when you update. The standard examples get overwritten at install time.

Steve Stallings
www.PMDX.com
For PMDX product support, please use PMDX forum or direct email for quickest response. We do not use this forum as our primary product support site.
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #6 on: October 25, 2016, 10:00:59 PM »
Thanks that is what I did wrong.  I always copy the ini file but that did not save all the LUA code put in WX.  I need to figure that part out as well.

I also forgot about free-standing macros (for example, if you have an M6 tool change macro), these live in the YourProfileName/Macros directory.  Likewise, tool tables and fixture tables have their own subdirectories in the profile.  I mention this just to emphasize that you don't just need to copy/save individual files, or Lua code out of the screen set, but the entire profile.

Bob

Offline Stuart

*
  •  203 203
    • View Profile
Re: MACH4 LUA scripts disappear after upgrading to new version
« Reply #7 on: October 26, 2016, 02:24:57 AM »
Many thanks Bob for this important information

Stuart