Hi
this is my first post
Please can anyone help me with getting values from system variables?
I am building a machine to grind stump grinder teeth and am trying to learn G code as I go.
Although nothing like a Mill I am using Machmil profile
So far I have managed to get over lots of problems as they came up
But I am stuck
I am using an optical switch as a probe to find depth of Z axis (to determine wear on cutter to be ground)
I am running Mach3 (Version R3.043.062) with a USB breakout board
The digitizer light comes on when the switch is triggered
When I try to read #2002 for the z position I get zero
I have included some sample code
When the machine runs the cutter moves till the light on the switch comes on then returns
And then moves the z axis to 2
g21
#50=3
a4.5 f200
g1 x193 y2 f600
g1 z1
g4 p1
g31 z20 f200
#50=[#2002+2]
g4 p1
z1.25
z#50
m30
(null line to load code)
I have looked at the forum chats and no one else seems to have trouble reading system variables
Am I being dumb or doing something stupid?
Please help