Hello Guest it is March 29, 2024, 05:35:53 AM

Author Topic: can't get proper Z  (Read 799 times)

0 Members and 1 Guest are viewing this topic.

can't get proper Z
« on: October 31, 2022, 05:13:22 PM »
Hi
I am unable to get proper Z-Zero using either a Button Script in the Tool Information pane with the script linked below, nor with the Hoss Touch Screen Set. In either approach, I set plate height to .250. It descends down to plate , touches and then retracts to what the readout says is one inch. It's not, putting a 1-2-3 block next to the bit, it's up 75 inch (eyeball) When I then remove the touch plate and hit "Go to Zero, it descends down to .125 off the table and says its at Zero.
At wits end.
Luke


Button Script:
https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbTRhVWY4TmNVcU9zd01LVTUwRjZBVG9oYzB1d3xBQ3Jtc0trOTJsQXBOVERWNHJwY2FmMnQwdHJxdUc3aTZWQlZpWnV1UnRtajg4ajA5Qi1rdHdock9pQzljQVFrVldpYlk0WW1NbVdlZlRBampLRktGaUpoUkNHdnZjVEhVbG9fbGF3eGVJTF9scm5hd1JtUU5RWQ&q=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F0B2hPzRSbcroXSU9veTVwUjhfbjQ%2Fview%3Fusp%3Ddrivesdk%26resourcekey%3D0-DZxLflGjPpAxE9f8a8q0og&v=G4DeVa8rzA0

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: can't get proper Z
« Reply #1 on: October 31, 2022, 08:57:23 PM »
Its better to post your script here for us to look at.
Without engineers the world stops

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: can't get proper Z
« Reply #2 on: November 01, 2022, 02:38:24 PM »
here is your code:
Code: [Select]
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) 'Get the current G0/G1 state

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 P3" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4. F4" '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 exact 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 (2, .060) ' change .060 to your plate thickness and then adjust for final accuracy
Sleep 200 'Pause for Dro to update.
Code "G1 Z1. F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
End If

If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If

If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If   

there are two things witch can cause your problem.

1st: the code is reading Var(2002)  for the exact hitpoint of the probe.
most "cheaper" motion controller are not handling this var's correctly.

2nd: you wrote that you set the plateheight to 0.250 but in the code it is hardcoded to 0.060,
so this might also cause your problem
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: can't get proper Z
« Reply #3 on: November 01, 2022, 05:32:33 PM »
Hi. Thank you for this. I believe my issue was by steps on the Z axis were not set correctly. I got everything nailed down.
Thanks for the quick replies
Best
Luke