1097
« on: November 30, 2019, 05:40:39 AM »
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-40 F60" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (1.6, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z10" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
by reading your something look a bit strange
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
is Setting the variable PlateThickness to whatever UserDro(1151) is.
Call SetDro (1.6, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
should be the code where the new Z-axis Offset is set.
IHMO it should be
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
or if you do not use the variable
Call SetDro (2, 1.6) 'set the Z axis DRO to 1.6mm fix