To the best I can tell so far is this happens the first time I touch off the Z after starting LinuxCNC. The symptom is that it thinks the stock is about .1 inch positive on the Z more that it really is. I am using a touch-plate that is .9728" thick. I found where Z value is stored in the linuxcnc.var file. If I do the touch-off a second time it is correct. I also think this may happen when I load a new ngc file but have not confirmed that yet. I am running version 2.7.13. Below is the ngc routine that is used for touch-off. Anyone have an idea of what might be happing?
Thanks
Values in the linuxcnc.var
5223 -9.328046 Incorrect
5223 -9.423468 Correct
<pre>
o100 sub
G20
( Set current Z position to 0 so that we will always be moving down )
G10 L20 P0 Z0
( Probe to Z-.5 at F2 [Uses machine units, I work in inch, this is meant to be slow!] )
G38.2 Z-.25 f2
( Set Z0 at point where probe triggers with offset of +.9728 [this is the thickness of my touch plate.] )
(G10 L20 = Set Coordinate System // P - coordinate system 0-9 0 = Not active)
G10 L20 P0 Z1.007
( Rapid up to Z.5 above the material )
(G10 L20 P1)
(Use machine coordinates)
G90
G53 G0
(Incremental mode)
G91
(Rapid Z up 1 inches)
G0 Z1
o100 endsub
</pre>