Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: thespindoctor on April 29, 2017, 07:14:24 PM

Title: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 29, 2017, 07:14:24 PM
The G code documentation for Mach4 mill says variable 5062 is loaded with a position during a G31 move and 5072 is the same data for a second probe during a G31.1 move.
However the mcProbing.lua program on lines 683 and 684 returns absolute position and machine position for 5062 and 5092 respectively.  This is also what was listed in a document of variable values.
I will do some testing to see what is true now that I can run multiple probes in my system using ESS controller.  Has anyone else looked into this?
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: Fledermaus on April 30, 2017, 07:10:56 AM
For G31.0, variables 5061-5063 hold the absolute probe strike positions for X, Y and Z respectively. 5071-5073 similarly hold the machine positions for the probe strike.

Sorry I can't help with G31.1.

Allan
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 08:25:52 AM
So I typed incorrectly, yes 5061-5063 and 5071-5073.

I will do a test to see what comes up for G31.1 on a second probe.  If the probing lua module is correctly written then  it looks like it will be machine and absolute positions for whatever probe is being used rather than reserving 5061-5063 for probe1 and 5071-5073 for probe 2.  I guess  the ESS plugin author is responsible for what actually happens.  Therefor it might differ from control to control!
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: Fledermaus on April 30, 2017, 09:20:02 AM
I look forward to your test result. Like you, I would think that all probes should use these same 6 variables, otherwise the probing module isn't going to work.
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: smurph on April 30, 2017, 02:24:17 PM
I don't see that in the documentation.  What doc file are you referring to?  The one I'm speaking of is "Mill GCode Programming.pdf", page 19.  There is a table showing the system variables that are updated.  5061-5066 are for the current fixture coordinates.  5071-5076 are for G53 coordinates.  This is correct.

You may be looking at some old docs.  Especially if your browser cached an old file from the website.

We ship the manuals in the distribution (<Installation Dir>/Docs) .  Those are the ones you want to look to anyway, as they will match the build that you are using.  Looking at current docs on an older build might not be prudent. 

Steve
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: Fledermaus on April 30, 2017, 03:34:17 PM
Steve

These come from the probing module and appear to be borne out when using it with Probe (G31.0).

Allan
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 03:59:30 PM
I agree on page 19 (newer Mill GCode Programming manual) than I was looking at)
G31 User Position 5061-5066
G31 Machine Position 5072-2076

First, the probing module "probing.lua" uses the terms Absolute and Machine position rather than User and Machine Position.  This is a bit confusing.  I am familiar with absolute, machine, and relative coordinates.
Am I confused?

Also, can we assume that G31.1, G31.2, G31.3, G31.4 will use the same variables?  Could this be a problem related to how the plugin is programmed?  I don't feel I can assume the plugin was written with coordinates in the proper variables.

Thanks
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 04:04:33 PM
this from the Warp9 forum on having fixed the plugin for the ESS for multiple probes.
I assume both sets of positions are loaded for whatever probe is being used.

Quote
Probe Work Position X 5061
Probe Work Position Y 5062
Probe Work Position Z 5063
Probe Work Position A 5064
Probe Work Position B 5065
Probe Work Position C 5066

Probe Machine Position X 5071
Probe Machine Position Y 5072
Probe Machine Position Z 5073
Probe Machine Position A 5074
Probe Machine Position B 5075
Probe Machine Position C 5076

So does what does Work position mean?
What does Machine position mean?

Thanks
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 04:14:01 PM
I think I figured it out.

G53 is machine coordinates also known as absolute coordintes?  In other words no offsets have been applied and the positions are coordinates relative to machine zero.  These values will be stored during probing in the variables 5071-5076
Work or user fixture coordinates are offset according to the users fixtures indicated by G54-G59.  G52 would be another type of fixture offset that I have never used.  Thus the coordinates stored during probing to variables 5061-5066 would be relative to the zero of the fixture.

That helps me.  I hope it helps someone else out there too.   If this is wrong, please correct me!

Thanks
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 04:22:09 PM
Here is where the confusion came from.  Below is the code from the mcProbing.lua module Probing.SingleSurfY function.

Code: [Select]
local MeasPointABS = mc.mcCntlGetPoundVar(inst, 5062)
local MeasPointMACH = mc.mcCntlGetPoundVar(inst, 5072)

Here ABS would be absolute and I would think machine coordinates relative to machine zero.
I would expect MACH to be the coordinates relative to the fixture zero.

See the problem?  The plugin from Warp9 uses the terms Work Position and Machine Position.  The plugin uses ABS and MACH. which is just the opposite of what the G Code programming manual states.
The manual uses G31 User Position and G31 Machine Position.

G53 would be machine or absolute position from machine zero.  G54etc would be fixture or user or offset position not ABS.

I'm done for now...
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: Fledermaus on April 30, 2017, 04:39:11 PM
506x are the user coordinates. I'm not sure whether these relate to G54 or whether the current fixture offset is used - I have only tested with G54.

507x are the machine coordinates. I agree that the probing module is confusing.

Allan
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: thespindoctor on April 30, 2017, 06:45:01 PM
Alan, makes sense to me.  I still have not been able to test a good fixture offset.
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: smurph on May 01, 2017, 03:22:01 PM
The term absolute is used because the positions in those variables are always absolute.  G53 is always absolute.  However, work offset coordinates (G54-G59, etc..) can be called out as incremental or absolute depending on G90/G91.  What they are trying to convey is that no matter if you are probing in G91 mode, those variables will always be the absolute positions. 

For example.
G90 G00 X1
G91 G31 X1 F10

Say the probe struck at X==1.5.  The value in 5061 will be 1.5 and not 0.5. 

Steve
Title: Re: Probing Question PoundVar 5062 amd 5072
Post by: Fledermaus on May 01, 2017, 03:41:27 PM
Steve, I see where you're coming from. . Thanks for that clarification.

Allan