Hello Guest it is April 16, 2024, 06:39:09 AM

Author Topic: m6 macro  (Read 591 times)

0 Members and 1 Guest are viewing this topic.

m6 macro
« on: September 22, 2022, 08:39:52 AM »
 Attached  m6 macro works in Mach 4 V4612  ,  but does not work in V4809 , any ideas .

   Thanks

     Ed
Re: m6 macro
« Reply #1 on: September 27, 2022, 11:46:12 PM »
Hi,
I don't see any glaring faults that would cause what you describe.

There was a time, a year or so ago when Mach4 adopted the 5.3 version of Lua whereas previously it had used the 5.2 version. There were just enough subtle differences
between 5.2 and 5.3 that some Lua code would not run on the latest Mach build. I've not heard that complaint for some time, but this could be an example of that thing.

What you need to do is run the m6 macro step by step with the ZeroBrane editor and observe the results. It will become obvious which instructions are failing....and that
will inform you as to the corrective solution.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: m6 macro
« Reply #2 on: September 28, 2022, 08:37:05 AM »
 Thanks   .  Ed
Re: m6 macro
« Reply #3 on: September 30, 2022, 02:05:56 AM »
if you use hobby ( maybe also industrial but not sure) i suggest you to replace all "inst" to"0"
in old lua when you declare inst on top its was ok for all code  ,but then its become only on the main root not inside loops and function
in any case hobby not support more then one thread and always inst its 0 ,try
second advice its put in yours code in susspect line you think can be problem the comand
mc.mcCntlSetLastError(0, "Line *********")
so you can easy run MDI and debug yours function