Hello Guest it is March 29, 2024, 02:44:55 AM

Author Topic: macro failed to compile  (Read 2108 times)

0 Members and 1 Guest are viewing this topic.

macro failed to compile
« on: July 21, 2020, 01:37:20 PM »
Putting together a 3 axis gantry mainly for engraving. Mach4(demo), ESS, Gecko drives. Got motors tuned & calibrated but when I try to load any of the demo gcode files I get
"a macro failed to compile while loading"
What am I missing?
Thanks
lsneon
Re: macro failed to compile
« Reply #1 on: July 21, 2020, 10:38:36 PM »
did you add m function by yourself? or  add any script on screen set?
if so ,then you need cheak where is bad lua syntax

Re: macro failed to compile
« Reply #2 on: July 22, 2020, 10:56:01 PM »
did you add m function by yourself

not knowingly.
these are the gcode samples that come with Mach4 (roadrunner, etc) or font engrave wizards and
the gcode just will not load, all I get is the compile error.
Re: macro failed to compile
« Reply #3 on: December 09, 2020, 10:22:52 PM »
The same is true for me.

I have the same control and drive hardware you do.
Re: macro failed to compile
« Reply #4 on: December 10, 2020, 02:45:42 AM »
Hiu,
I doubt its the controller or drive hardware.

Mach is complaining that one piece of all the bits of code it has to compile and merge into one large runtime program is failing to compile.
That in turn prevents the runtime file from completing and Mach won't run.

Either you have a corrupted copy of Mach or more likely a corrupt screenset/GUI. Have you modified any code in the screenset?

In almost every case in the event of a compile time error the Lua compiler will do a diagnostic dump which includes the location
of the offending code. Can you post a sreenshot of the diagnostic?

Craig

'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: macro failed to compile
« Reply #5 on: December 10, 2020, 11:46:44 AM »
I have changed nothing concerning the GUI.  I'm a newbie and don't even know how.

Warp9 people did send me a profile to load, and I had to change some things for the machine to home, etc.

At the bottom of the screen it says in History:  Path "C:\Mach4Hobby\Profiles\ESS G40 VFD\Macros\" not valid.

If you tell me how to look at this diagnostic dump I will show it.  I suppose you should also tell me the quickest way to post a screenshot for this message board app. 

I apologize for my ignorance. 
Re: macro failed to compile
« Reply #6 on: December 10, 2020, 01:33:05 PM »
Hi,
then I think that one or more of the macros that has been bundled with the profile is corrupt.

Try deleting the profile and then see if Mach will compile and load.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: macro failed to compile
« Reply #7 on: December 10, 2020, 01:39:33 PM »
Hi,
a little more thought about this....

Up until about a year ago the 'flavour or dialect' of Lua used in Mach, the language used for scripting and macros,
was Lua 5.2.

Since then Mach has been modified to run Lua 5.3.

While the differences between 5.2 and 5.3 are small many program chunks written under 5.2 will not compile under
the later 5.3 compiler.

My guess is tha its not so much that you have corrupt software but that it was written and compiled with an earlier release compiler.
The same solution applies, delete the offending chunk and compile whats left over.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline jbuehn

*
  •  101 101
    • View Profile
Re: macro failed to compile
« Reply #8 on: December 10, 2020, 02:33:00 PM »
Not sure if I'm remembering correctly, but was there something on the forums a while ago about not being able to have spaces in the profile name?
Re: macro failed to compile
« Reply #9 on: December 10, 2020, 03:35:23 PM »
I copied the profile and gave it a new name without spaces and that did not fix the problem.