Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Derrick Salmon on September 07, 2013, 04:09:26 PM

Title: Mach3 variable list
Post by: Derrick Salmon on September 07, 2013, 04:09:26 PM
Please.  Can someone point me to a doc that lists the Mach3 internal variables, such as used in getvar(2002) to get the location of the z probe with contacting a touch plate.

I've looked everywhere I can think of and don't see a list or explanations of what they represent.  It would be a great help in understanding how the many scripts available on the forum work.

thanks in advance


Derrick
Title: Re: Mach3 variable list
Post by: BR549 on September 07, 2013, 05:15:55 PM
There are ONLY a handfull that are actually documented.

#2000 = Probe Tripped Value of X
#2001 = Probe Tripped Value of Y
#2002 = Probe Tripped Value of Z
#2003 = Probe Tripped Value of A

NOTE: These values are Probe Tip compensated IF you enter a value for Tip Radius. IF the value is left 0.000 then NO comp is applied to The Tripped Values.

(;-) TP
Title: Re: Mach3 variable list
Post by: ger21 on September 07, 2013, 08:12:58 PM
There's also a few listed in the manual which specify the work offsets.
Title: Re: Mach3 variable list
Post by: BR549 on September 07, 2013, 09:01:23 PM
HIYA Ger, I have never been able to pull ANY of those Vars listed in teh Manual Up in Mach3. I don't think they were ever implimented.

Could be wrong but I just tried it again with

5161   ----> G28 X value
5181 -----> G30 X value
5222 -----> G54 X offset value

They always come up as ZERO (0) not matter what it was set to.

Note : EVEN if they worked what good would they be without conditional Gcode ???? That MIGHT be why they do not work, for me at least.

Just a thought, (;-) TP
Title: Re: Mach3 variable list
Post by: ger21 on September 07, 2013, 10:59:07 PM
The offset values work for me. I use them in my Auto Zero macro, to set the Z axis the same regardless of the current offset.


If CurrentOffset = 1 Then
ZOffset=GetVar(5223)
ElseIf CurrentOffset = 2 Then
ZOffset=GetVar(5243)
ElseIf CurrentOffset = 3 Then
ZOffset=GetVar(5263)
ElseIf CurrentOffset = 4 Then
ZOffset=GetVar(5283)
ElseIf CurrentOffset = 5 Then
ZOffset=GetVar(5303)
ElseIf CurrentOffset = 6 Then
ZOffset=GetVar(5323)
End If


For X = 5223 To 5323 Step 20
SetVar(X, ZOffset)
Next X
Sleep(250)
Title: Re: Mach3 variable list
Post by: BR549 on September 07, 2013, 11:17:53 PM
AH for the most part I have been looking at the wrong ranges of VARs (;-). You are correct.

If you ever need it I have a report generator that runs in Mach CB that gives the values of ALL the Vars up to 20,000.

Thanks for the Update, (;-) TP

Title: Re: Mach3 variable list
Post by: BR549 on September 07, 2013, 11:34:54 PM
I can't see where the G28 or G30 vars work. Do you know of any others that can be added to the list ?

There is a range of vars that are linked to OemDros and vise versa.

(;-) TP
Title: Re: Mach3 variable list
Post by: BR549 on September 08, 2013, 11:11:13 AM
These have been confirmed

5211 - 5216  -------> G92 AND G52 offsets

15103 - 15108  ----->  X-C axis scale factor

Fixture offsets as per the Manual ------> OK

Still looking for more.

(;-) TP