Hello Guest it is April 25, 2024, 02:22:53 AM

Author Topic: Mach 4 question  (Read 4032 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach 4 question
« Reply #40 on: September 04, 2021, 04:15:54 AM »
Hi,
the error is exactly as I have described previously, that is that the g31 move is reaching its terminal WITHOUT having encountered
a probe event.

The routine you are using has multiple g31 probe blocks, at least one of those blocks is misconfigured such the the g31 block
terminates before the probe encounters the surface it was supposed to detect. You need to open the Lua code file and trace it until
you find how or why the g31 is misconfigured.

You could start by causing each g31 block to issue either a wx.Message block or a status bar message, that would at least tell you which of
the g31 blocks is misconfigured. You might also try compiling a log file, it too should assist in determining where in the Lua file
the faulting g31 is located.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 4 question
« Reply #41 on: September 04, 2021, 04:29:08 AM »
Could you tell me where the g31 lua code is located. Shouldn't it be configured from standard? I don't think I've messed with that?
Or is that a macro I need to install?
« Last Edit: September 04, 2021, 04:32:11 AM by gyrojeremy »
Re: Mach 4 question
« Reply #42 on: September 04, 2021, 04:35:34 AM »
Hi,
g31 is a native Gcode, and is most unlikely to be faulty, from your description and Toshio.K's at least some of the g31 code block have executed
successfully, ergo the g31 code is being correctly interpreted by the Machs interpreter and executing in conjunction with your motion controller.

The probing routine you are using is a part of the mcProbing module:

Mach4Hobby/Modules/mcProbing.mcs

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 4 question
« Reply #43 on: September 04, 2021, 04:46:01 AM »
Brilliant!! Thanks Craig. I'll try to make sense of that and see what I can do.
Re: Mach 4 question
« Reply #44 on: September 04, 2021, 04:49:00 AM »
mr. gyrojeremy.
Hello.
If the current obstacle is resolved, please let me know how to solve it.
Thanking you in advance.

Offline nc42

*
  •  20 20
    • View Profile
Re: Mach 4 question
« Reply #45 on: September 06, 2021, 11:35:49 AM »
Just having a look and it seems the issue is that it is doing a g31 for the Z movement to the measure height and just probe erroring when it reaches that height and hasnt touched off anything

Offline nc42

*
  •  20 20
    • View Profile
Re: Mach 4 question
« Reply #46 on: September 06, 2021, 02:09:04 PM »
Code: [Select]
rc = mc.mcCntlGcodeExecuteWait(inst, string.format("G%.1f Z%.4f F%.1f", ProbeCode, ZMeasPos, FastFeed))
mm.ReturnCode(rc)
rc = Probing.CheckProbe(1, ProbeCode); if not rc then; do return end; end

if you replace the two instances of the above code in the mcProbing.lua with :

Code: [Select]
rc = mc.mcCntlGcodeExecuteWait(inst, string.format("G0 Z%.4f F%.1f", ZMeasPos, SlowFeed))
mm.ReturnCode(rc)

double check before full use as I'm no lua expert but it seemed to work for me

Re: Mach 4 question
« Reply #47 on: September 07, 2021, 04:33:12 AM »
Mr.nc42.
Hello.

Please look at the photo.
Apparently it was successful.
Thank you.
Thank you.
I was worried because I don't understand the Lua language.
This solved it.