Hello Guest it is March 29, 2024, 03:07:56 AM

Author Topic: About Mach4 Touch Module and Probing  (Read 1450 times)

0 Members and 1 Guest are viewing this topic.

About Mach4 Touch Module and Probing
« on: August 29, 2021, 05:02:31 AM »
I think it has a similar function.
How do you use Mach4's "Touch Module" and "Probing" properly?
Is there a big difference between the two?

Please let me know.
Re: About Mach4 Touch Module and Probing
« Reply #1 on: August 29, 2021, 10:40:17 PM »
mach4 had a function called "Surface Map Wizard".
Perhaps Probing is the number one basic way to handle mach4, I think.
https://www.youtube.com/watch?v=M4o6dfQrAo8

But in my case, "not all axis have been reference"
Re: About Mach4 Touch Module and Probing
« Reply #2 on: August 30, 2021, 12:22:55 AM »
Hi,
Mach4 has a module called mcTouchOff, which as no doubt you have discovered allows you to automate such things
as touching off to a workpiece corner say, or a boss or some other feature, very handy.

The module is in fact a Lua routine which is viewable and editable and based on the repeated use of g31, the Gcode
probe command. Once you understand how g31 works you can easily write you own Gcode probing routines much like
mcTouchOff.

mcMapSurface is a wizard not a module. In this particular case the compiled code is published but not the source code.
Therefore you cannot view or edit it. What certainly is true is that it makes use of g31 to probe the surface at regular intervals
and thereby generate the data required to 'flatten the surface' in software. Even were the source code published I'm guessing you
could see regular Lua code for the probing routine and it would look similar to mcTouchOff  but what would not make sense is that
Machs trajectory planner must interact with mcMapSurface in order to modulate the Z axis, and that interaction will almost certainly
require C code rather than Lua.

You may have noticed that in Mach4CoreAPI.chm that nearly all APIs have both C syntax AND Lua syntax, but not so with the
mcMotion...APIs, they have C syntax only. As mcMapSurface is as much concerned with motion as it is about probing a surface
much of the wizard would be unrecognisable to anyone familiar with Lua.

The hierarchy is:
g31 probe command, enacted in realtime on the controller board,
mcTouchOff Lua code probing routines to automate the required g31 probe commands,
mcMapSurface a proprietary wizard that uses g31 to gather surface data and interacts with Machs trajectory planner to 'flatten' a surface.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: About Mach4 Touch Module and Probing
« Reply #3 on: August 30, 2021, 01:58:29 AM »
Answer Hello Craig.
Is Craig's area now around 1 am?
It seems that my house and Mr. Craig's house are far apart.


> The hierarchy is:
g31 probe command, enacted in realtime on the controller board,
mcTouchOff Lua code probing routines to automate the required g31 probe commands,
mcMapSurface a proprietary wizard that uses g31 to gather surface data and interacts with Machs trajectory planner to'flatten' a surface.

I felt that the G31 probe command was sufficient. Thank you for your clear explanation. Thank you.
Re: About Mach4 Touch Module and Probing
« Reply #4 on: August 30, 2021, 03:10:25 AM »
Hello Craig.

I checked G31 of G Code.
In Japan, G31 is described as a skip function.
If X, Y, Z input the measurement signal to Mach4 before reaching the end point coordinates, Mach4 seems to measure without stopping.

Therefore, I thought it was necessary to manually set up Swich for measurement.
Re: About Mach4 Touch Module and Probing
« Reply #5 on: August 30, 2021, 03:44:04 AM »
Hi,

Quote
In Japan, G31 is described as a skip function.

I don't think that is correct, it is a 'Feed until skip'. This is for example the Fanuc21 interpretation which Mach4 follows closely.

Quote
G31   Feed until skip function           Used for probes and tool length measurement systems.

The command causes feed, at the prevailing feed rate, until an event, then skip the remainder of the move.

Quote
If X, Y, Z input the measurement signal to Mach4 before reaching the end point coordinates, Mach4 seems to measure without stopping.

I don't believe this is correct either. Ordinarily Machs Gcode interpreter would have several lines of Gcode in its buffer called look-ahead.
The trajectory planner can therefore do things like blend one move into the next without stopping, called CV mode. With a g31 block however
Mach cannot look-ahead because it has to make a move at the prevailing feed rate until the probe event, whereon the machine must
stop, the controller must report 'AllStopped' followed by the x,y,z location.....and abort the remainder of the move. It's this abort
the remaining move means that Mach cannot have further move instructions in the pipeline because otherwise there would be a time gap between
the probe event and the next scheduled move after the g31 block. This variable time gap would crash the motion controller which MUST
have time-continuous move instructions, even if the move instuction is nil, ie 'don't move' but it must get such an instruction every millisecond,
any gap in that stream of instructions will crash the controller.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: About Mach4 Touch Module and Probing
« Reply #6 on: August 30, 2021, 07:47:04 AM »
Thank you.
For Probing Calibration, I will try it on a real milling machine in the future.
Of course, no manual switch is attached.