Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Pedio on August 29, 2015, 01:42:21 PM

Title: Probing on new Mach 4 screens
Post by: Pedio on August 29, 2015, 01:42:21 PM
Maybe I am just being dense  ??? but I can't seem to get the probing to work on the new Mach 4. I can get a G31 command entered into the MDI to work. It moves down and when I ground the probe it stops. Thoughts about what I am doing wrong. I would love to get the auto tool touch off working.
Title: Re: Probing on new Mach 4 screens
Post by: dude1 on August 29, 2015, 08:37:28 PM
have set it up, button to the right of auto home button. auto tool setting`s
Title: Re: Probing on new Mach 4 screens
Post by: Pedio on August 29, 2015, 09:17:13 PM
I have tried. Not sure what the Gcode setting is for. I typed in 31 thinking that a G31 probe is what is called for. Any thoughts or a screen shot of a sample set up would be appreciated.
Title: Re: Probing on new Mach 4 screens
Post by: dude1 on August 29, 2015, 09:32:50 PM
I have not had time to test it my self try G31 it shows in the .ini file what you set it to
Title: Re: Probing on new Mach 4 screens
Post by: Pedio on August 30, 2015, 01:26:31 PM
Tried entering G31 into the setup box. Nothing happened...   thoughts?
Title: Re: Probing on new Mach 4 screens
Post by: Pedio on September 01, 2015, 08:11:58 AM
Has anyone made autotool touch off work on these new screens? I would like to know if I should keep trying or wait for the next release.

Title: Re: Probing on new Mach 4 screens
Post by: Bx3mE on October 24, 2015, 06:32:10 PM
I am also having issues with this. ( And a lot of other stuff :D )

I made g31 work by double inverting the probe signal once in ESS plugin and once in Mach Config then g31 worked - guess two wrongs do make a right :D

Now i have red through the lua script and it seems all good and also the screen setup. but for me M4 says "No scripting engine found for C:\Mach4.......\mcProbing.lua" when debugging same for mcAutoTool.lua

So scripting engine seems to be the bad guy for now - still investigating....
Title: Re: Probing on new Mach 4 screens
Post by: DazTheGas on October 24, 2015, 06:54:20 PM
check your plugins and make sure you have the lua plugin activated.

DazTheGas
Title: Re: Probing on new Mach 4 screens
Post by: Bx3mE on October 25, 2015, 05:11:49 AM
Yep found it! Now i have the script running but no movement. When i run the debugger it says:

Failed reading from the debugger socket. Debugger wxLUASOCKET_DEBUGGEE_EVENT_ERROR
Got a socket error trying to read. Address '172.17.2.159'. Port 62704.
Got a socket error trying to read. Address '172.17.2.159'. Port 62704.

for the mcAutoTool.lua

and

At Breakpoint line: 7 file: C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001.mcs
mcLua ERROR: Lua: Error while running chunk
[string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:7: attempt to index global 'mm' (a nil value)
stack traceback:
   [string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:7: in function 'm7001'
   [string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:17: in main chunk


mcLua ERROR: Lua: Error while running chunk

What am i doing wrong?
Title: Re: Probing on new Mach 4 screens
Post by: DazTheGas on October 25, 2015, 05:49:04 AM
I see your trying to run the autotool script from the modules directory, unfortunately this will not work, if you look in your screen load script within the screen editor you will see that before the autotool loads it loads another file called mastermodule, this holds the mm commands.

DazTheGas
Title: Re: Probing on new Mach 4 screens
Post by: Bx3mE on October 25, 2015, 06:12:09 AM
Can i not have the autotool script as a module or is it for running in debug i have to move it?

mm -> Master modult = i got it :D
Title: Re: Probing on new Mach 4 screens
Post by: Shige on January 21, 2016, 01:10:24 PM
Hello, everyone. I'm tryng to run the "T Lamontagne" script for "auto tool zero" (If I'm not mistaken, is the same script that you are talking. If not, my appologyze -_-!) and following your comments. In the Probing.lua, the command mm.ReturnCode(CA) is used many times but I can't find where is declared. I debugged the script but when arrives at mm.ReturnCode(CA) crashes. Could you give me a clue to find it or to correct it?
Title: Re: Probing on new Mach 4 screens
Post by: DazTheGas on January 21, 2016, 02:18:17 PM
all the modules are loaded in the screen load script, found in the scree editor.

Code: [Select]
    --Master module
    package.loaded.MasterModule = nil
    mm = require "mcMasterModule"
   
    --Probing module
    package.loaded.Probing = nil
    prb = require "mcProbing"
    --mc.mcCntlSetLastError(inst, "Probe Version " .. prb.Version());

    --AutoTool module
    package.loaded.AutoTool = nil
    at = require "mcAutoTool"

DazTheGas
Title: Re: Probing on new Mach 4 screens
Post by: Irony on February 26, 2016, 02:09:06 PM
Yep found it! Now i have the script running but no movement. When i run the debugger it says:

Failed reading from the debugger socket. Debugger wxLUASOCKET_DEBUGGEE_EVENT_ERROR
Got a socket error trying to read. Address '172.17.2.159'. Port 62704.
Got a socket error trying to read. Address '172.17.2.159'. Port 62704.

for the mcAutoTool.lua

and

At Breakpoint line: 7 file: C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001.mcs
mcLua ERROR: Lua: Error while running chunk
[string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:7: attempt to index global 'mm' (a nil value)
stack traceback:
   [string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:7: in function 'm7001'
   [string "C:\Mach4Hobby\Profiles\Mach4Mill\Macros\m7001..."]:17: in main chunk


mcLua ERROR: Lua: Error while running chunk

What am i doing wrong?

I have the same problem, but I don't understand what finally needs to be done to get it running. Can anyone explain in detail what needs to be done/changed?

Thanks a lot!
Marc