Hello Guest it is March 28, 2024, 06:29:57 AM

Author Topic: Phantom Lua Script running on load  (Read 6551 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

*
  •  6,965 6,965
    • View Profile
Phantom Lua Script running on load
« on: January 29, 2015, 09:22:50 PM »
OK I created a small Lua script to send a file to the printer, Works fine.

NOW when every I load Mach4 it RUNS this script. I have moved the script out to the desktop but it still runs.

Any idea where MACH4 HID this script and WHY is it running on load ??

I have searched but cannot find it in mach4.

(;-) TP

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Phantom Lua Script running on load
« Reply #1 on: January 29, 2015, 10:25:09 PM »
OK I found the copy of the script BUT why is it RUNNING on mach4 load ??  DOes it run all scripts on load ????

(;- TP

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Phantom Lua Script running on load
« Reply #2 on: February 18, 2015, 08:25:43 AM »
OK I found the copy of the script BUT why is it RUNNING on mach4 load ??  DOes it run all scripts on load ????

(;- TP

Note that is response is NOT from actual experience, but maybe worth parroting.

I recall reading somewhere that MACH4 compiles ALL available scripts into ONE master which it then runs on startup. If that is the case, then the question remains as to what would trigger a recompile (with your macro unavailable) which would theoretically make a new master sans your deleted script.

If nothing else, the 'master compiled script' process that I am recalling (from where I have no idea), would explain the script continuing to run after being removed from the folder.

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Phantom Lua Script running on load
« Reply #3 on: February 18, 2015, 09:13:02 AM »
Just another parrot.................. found this in my notes. Hopefully its useful to you.
Quote
> Lua: Error occurred while opening file cannot open
> C:\Mach4Hobby\Profiles\Mach4Mill\Macros\mcLua.mcc: No such file or
> directory
>
> I looked for this file in the install directory, and sub directories
> and could not find it.

This means that a script in your macro directory has an error.  The mcLus.mcc file is built from all of the *.mcs files.  It is like building a EXE.  .cpp files make .obj file.  Then all .obj files get linked in to make the .exe. So in the world of LUA, it takes all of the *.mcs files and compiles them into *.mcc files.  If all of that works without an error in one of the *.msc files, it links all of the *.mcc files into the one big chunk file that we call mcLua.mcc.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Phantom Lua Script running on load
« Reply #4 on: February 18, 2015, 09:40:04 AM »
Thanks!

This may be what I was remembering. It would appear then that deleting McLua.mcc would be the trigger to recompile another 'master'.

 . . . . on second thought . . .  renaming the file would be far safer . . .  ;)

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Phantom Lua Script running on load
« Reply #5 on: February 18, 2015, 12:27:38 PM »
Well I have learned working with Les at SheetCam that LUA scripts are all compiled ready to run on Mach4 load. IF the script does not have Functions() to act as a stop then the script will RUN  on compiling(opening Mach4).

Just a thought, (;-) TP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Phantom Lua Script running on load
« Reply #6 on: February 18, 2015, 01:41:11 PM »
You can also do a key word search (something from in your script), in your .ini file, to see if you have any script in there.

Scott
fun times

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Phantom Lua Script running on load
« Reply #7 on: February 20, 2015, 07:27:56 PM »
Posting here because I think it is related to this thread.

Getting this error. fresh install of 2214. How is this possible? Shouldn't MACH4 just recompile and make a new master?

Offline dude1

*
  •  1,253 1,253
    • View Profile
Re: Phantom Lua Script running on load
« Reply #8 on: February 20, 2015, 11:32:14 PM »
 I had that once different version I just remove all .mcc file from the macro folder and it came right

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Phantom Lua Script running on load
« Reply #9 on: February 21, 2015, 05:57:29 AM »
I did a fresh install of 2214 to a new folder (C:/Mach4/) and it is now running G-code.

The other install (C:/Mach4Hobby/) had been written over with new revs a couple of times and had a smoothstepper ESS installed at one point and also TCP Modbus. I removed the smoothstepper plug ins and disabled TCP Modbus, but nothing worked, so I did not know what the problem was.

It appears now that MachMAD is the culprit. The install created an other profile and McLua.mcc is no longer present in the original profile, but does exist in the new machMAD profile. Apparently there are some steps that I missed in the MAD install.