Hello Guest it is March 29, 2024, 10:07:38 AM

Author Topic: Lua Fails Me  (Read 3016 times)

0 Members and 1 Guest are viewing this topic.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Lua Fails Me
« Reply #10 on: January 20, 2018, 01:05:09 PM »
ALL of the files in the marcos directory get compiled.  Get rid of any file in that directory with a m6691() function.  Move then into a "save" child directory or something. 

Steve
Re: Lua Fails Me
« Reply #11 on: January 20, 2018, 01:20:16 PM »
Exited mach, removed the 'test.sav' which had the m6691() defined, deleted all mcc and bak files and started mach4, ran m6691 in the mdi and still same result.

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Lua Fails Me
« Reply #12 on: January 20, 2018, 01:43:55 PM »
There is a file in that directory with m6691() defined, trust me.  :)

You can open the mcLua.mcc file with an editor and search on m6691 and it will be in there.  How did it get there?  Some source file had it in there! 

If you delete all of the mcc files, this should rebuild mcLua.mcc from scratch (from the source files) the first time Cycle Start is pressed.  Then search the mcLua.mcc and see if m6691 is in there.  If it is, then some source file is causing it to appear, guaranteed.  Nothing else will insert that function into the mcLua.mcc.  That directory is the whole playground and nothing else is cached anywhere.

You can verify this by creating a new profile.  Not a copy of this profile, but a new one.  Then check its' mcLua.mcc and there will be no reference to m6691 at all in it. 

Steve
Re: Lua Fails Me
« Reply #13 on: January 20, 2018, 03:33:28 PM »
Steve,

I totally believe you.

Attached is the actual file m6691.mcs as it stands now.

When I remove this from the macros directory, delete all mcs and bak files, load mach and  run m6691 from the mdi, nothing happens as expected.

Copy the m6691.mcs back into the macros directory, go into the operator->edit/debug scripts and select m6691.mcs the file opens, F7 to compile, save, close, run m6691 from the mdi... and... the spindle starts, the x moves in and then travels the Z just as in the code from my first entry here.

I know it is not possible... but it is happening.

RT

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Lua Fails Me
« Reply #14 on: January 20, 2018, 05:30:01 PM »
Ok, try this...  save all of the files in the macro directory to another directory for safe keeping.  Then put that slimmed down version of m6691.mcs in there.  It should be the only file in the macros directory.  No mcLua.mcc or anything else.  Then launch Mach and do a do nothing command, such as G91 X0, and press cycle start.  At this point, you should have three files in the profile's macro directory; m6691.mcs, m6691.mcc, and mcLua.mcc.  Then MDI the m6691 and see what you get. 

Steve
Re: Lua Fails Me
« Reply #15 on: January 20, 2018, 06:01:02 PM »
As usual you are correct  ::)

Adding back one macro at a time  I found one m7791 that had the m6691 defined in it.  Right about now I wish I had remembered about those utilities to scan all files for a string.  That probably should have been one of the first attacks.  Guess I need to brush up on my ms-dos skills again.

Thank you for your patience Steve. 

RT

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Lua Fails Me
« Reply #16 on: January 20, 2018, 06:05:48 PM »
I glad you got it solved.  Now it is onward and upward!

I use a file manager called Servant Salamander.  It is a Norton Commander clone for Windows and it has a recursive search for strings in files.  A really nice tool. 

Steve