Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started 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?
-
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
-
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!
-
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.
-
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
-
Steve
These come from the probing module and appear to be borne out when using it with Probe (G31.0).
Allan
-
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
-
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.
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
-
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
-
Here is where the confusion came from. Below is the code from the mcProbing.lua module Probing.SingleSurfY function.
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...
-
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
-
Alan, makes sense to me. I still have not been able to test a good fixture offset.
-
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
-
Steve, I see where you're coming from. . Thanks for that clarification.
Allan