Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Cbyrdtopper on March 27, 2018, 10:42:49 AM

Title: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 10:42:49 AM
I'm running Build 3713.
I'm trying to debug some macros but it isn't doing anything in Mach4. 

For example; I made a simple mc.mccntlSetLastError (inst, "Message") test macro.

I debug this and it doesn't display.  I run the macro from MDI and it runs fine.

I have this macro set up exactly as it usually is, with the Debug stuff at the end of the macro.

Is there anything that needs to be done to set this up? 
Title: Re: Zero Brane not working properly.
Post by: Chaoticone on March 27, 2018, 10:59:56 AM
Not sure if the typo is the problem or not but you do have one.

Should be mc.mcCntlSetLastError (inst, "Message")
Not mc.mccntlSetLastError (inst, "Message")

Lua is case sensitive.

I have not seen the issue with ZeroBrain myself.
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 11:36:45 AM
Hey Brett,
I have it correct in the Macro.  I just typed it wrong on this post.
I'm not sure why it isn't working. 
I Opened up the stock mill profile and still no luck.  Again, I could run the macro from MDI but it wouldn't debug and make Mach do something. 
It debugs like it should; I put some arithmetic in the macro to test the debugger, it did everything correctly.  Still didn't do anything in Mach4.
Title: Re: Zero Brane not working properly.
Post by: Chaoticone on March 27, 2018, 01:21:21 PM
I just wrote a m2000 test macro. Works fine from mdi and as I step through it in editor. Writes to the status bar and all. Rename the file to get rid of everything between the last 0 and the dot so its just m2000.mcs

Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 01:53:52 PM
No luck.  Still runs fine in MDI.  It still will not display in debugging.
hmm...
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 01:55:09 PM
I'm just assuming this is the correct message that I should be receiving on execution. 
Is this correct?

Program starting as '"C:\Mach4Hobby\ZeroBraneStudio\bin\lua52.exe" -e "io.stdout:setvbuf('no')" -e "do;package.cpath=[[C:\Mach4Hobby\Modules/?.dll;C:\Mach4Hobby\ZeroBraneStudio\bin/clibs52/?.dll]];package.path=[[C:\Mach4Hobby\Modules/?.lua;]]..package.path;mc=require('machipc');mc.mcIpcInit('localhost');scr=require('screenipc');scr.scIpcInit('localhost');require('wx');__IN_EDITOR__=1;__MINSTANCE__=2304;end" "C:\Mach4Hobby\Profiles\Chad\Macros\m307.mcs"'.
Program 'lua52.exe' started in 'C:\Mach4Hobby' (pid: 3804).
Program completed in 0.41 seconds (pid: 3804).
Title: Re: Zero Brane not working properly.
Post by: Chaoticone on March 27, 2018, 03:24:58 PM
Not what mine looks like............

Program starting as '"C:\Mach4Industrial\ZeroBraneStudio\bin\lua52.exe" -e "io.stdout:setvbuf('no')" "C:\Users\me\AppData\Local\Temp\.9764.tmp"'.
Program 'lua52.exe' started in 'C:\Mach4Industrial\Profiles\Test\Macros' (pid: 2132).
Debugging session started in 'C:\Mach4Industrial\Profiles\Test\Macros\'.
Debugging session completed (traced 0 instructions).
Program completed in 1.30 seconds (pid: 2132).
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 03:45:28 PM
Hmm....
You know, I did see Steve talking to someone about Zero Brane so I tried to download it and try it out. 

I wonder if I need to go back and delete that and see if that fixes my problem.
Title: Re: Zero Brane not working properly.
Post by: Chaoticone on March 27, 2018, 03:50:19 PM
That's probably not a bad idea either way.
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 03:57:26 PM
Okay, So I did delete it.  It isn't on my computer anywhere.
So I have no Idea what to do.....
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on March 27, 2018, 04:04:52 PM
When I stepped through my macro, I get the same message that you put on here.
So that is the same.  Just no results on Mach4 still.  I am using Hobby.  That shouldn't matter though I wouldn't think.
Title: Re: Zero Brane not working properly.
Post by: Chaoticone on March 27, 2018, 04:28:49 PM
I'm not sure either. All I do is open Mach, go to operator, Edit/Debug scripts and browse to the macro I want to step through and it all works good. You might want to delete any .mcc or .bak files in that macros directory before launching Mach just for safe measure.
Title: Re: Zero Brane not working properly.
Post by: Cbyrdtopper on April 21, 2018, 03:32:23 PM
I downloaded build 3756 today to see what was new. 
Zero Brane is working properly now.  No idea what was going on in the other build.