I know it is not the retract, it is something else. Bounce, delay or something causing it not be accurate. Just not sure what to do.
Printable View
I know it is not the retract, it is something else. Bounce, delay or something causing it not be accurate. Just not sure what to do.
Temporarily, slow down the feed rate to 1 or 2% with the over-ride and see it should still do exactly the same.
If not you have a mechanical problem. Maybe Z backlash due to a loose coupling?
ok I will try to slow it down more, currently at 4 IPM. It is not a backlash issue, I can hold within a .001" I have a dial indicator on it, and it reads the same every time I set the tool hight. But when I remove the plate, and go to Z0 I can slide a piece of thick paper under the tool every time.
If you are getting consistent results then all you need do is adjust the plate thickness in the DRO till the result is spot on.
Plate thickness as measured is a starting point. Always needs to be tweeked a bit for accurate results.
Every system is going to have a unique amount of time (in micro seconds) for the signal to get to Mach and for the value to be pulled and placed in the variable.
Hence the need to adjust the plate thickness.
Greg
Yep, my plate is 1.55mm thick but I have it set as 1.4mm in the DRO to get the right height.
Sorry John, I was responding to Donald who was getting consistent but not accurate results.
Greg
Yeah I know, I was just backing up what you said by saying what I did :)
No worries John.
Always nice to have a little backup. :)
Greg
No problemo :)
I can't believe I took so long to put one of these together. I was frightened off by not understanding how the BoB worked. I'm still stumbling through Mach3 but, now I have one, I wouldn't go without it.
Thanks guys. I think I got it.
My plate is .064" thick and I had to set it in the script to .075"
Now, I just gotta play with it and see how well it helps me out now.
I avoided tool changes till now, maybe it is time to try a 4 flute EM for a finishing pass on some 6061.
Updated zero script.
If by chance G91 is in effect when running the original script it would not work as expected.
Although I never use G91 it is best to cover that possibility. Some users may have experienced this problem.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
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 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" '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 (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
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 aplicable
Exit Sub
End If <!-- / message --><!-- controls --> http://www.cnczone.com/forums/images/buttons/quote.gif
I don't think I need to worry about it, but was is G91?
John
G90 is absolute and G91 is incremental.
Look at the Gcodes tab in Mach3 it gives a good explanation.
Greg
Hi Greg.
On occasions I use G91.
A subroutine like the zero setter's job is to change something. The Z offset.
If the subroutine requires the machine to be in a certain state, (like you save the feed rate, and change it temporarily then restore it) then the original state needs to be saved and restored. A subroutine, on return, should only have changed what it's intended purpose was, then restore all other conditions.
Also, if the original mode was G1, then it should be restored to G1 before returning. If you have been using MDI to do some moves, etc, and require to reset a tool, then if the machine ends up in G0 mode without a warning then the inevitable crash can be done by the operator before the penny drops.
Good, work, but still work in progress. (IMHO)
I Think it is OK to leave the machine in a changed state if you warn the operator with a dialog box that must be confirmed, just like 'machine outside limits'.
Just the thoughts of a programmer from when there was not even keyboards.
Neil
Neil
Your point is well made. Even though in two years of using it like it is and never striking those scenarios.
How is this? It takes care of resetting the G90/G91 to whatever it was before.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentMode = GetOemLED(48) 'Get the current G90/G91 state
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 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" '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 (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z20 F800" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
If CurrentMode = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
Now to tell the truth I haven't, as yet, discovered how to query the G0/G1 state.
Any ideas?
Greg
EDIT: On second thought it leaves the G1 as the active state. I am comfortable with that. That will do me. :) <!-- / message --><!-- controls --> http://www.cnczone.com/forums/images/buttons/quote.gif
Greg.
Nice fix. Thanks
After a little investigation, but I have not tested it, GetOemDRO(819)
If this does not work I will investigate further,
Neil
OK you have gone to the trouble of finding the DRO number (it is not on the wiki list) so I guess I better do something with it. (nuts)
So here is zero script number 1089 :)
Incorporates returning the Abs/Inc and Rapid/Feedrate states to whatever they were found to be in prior to running the script.
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
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 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" '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 (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z20 F800" 'put the Z retract height you want here
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 aplicable
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
Exit Sub
This should address the concerns you had Neil.
Personally I was only concerned with the issue of starting in G91 screwing things up but it makes sense to cover all known bases.
Greg
Greg:
Thanks for the new tool setter code. Glad to see you're sticking behind your "product" and making improvements for us all. Much appreciated.
I haven't tried it yet but I had a real startling experience this evening with the old version of the tool setter and the latest beta Mach V3.043.
I ran the beta Mach because it fixes a problem with tool offsets. When I ran the old tool setter it performed properly - but - just after it finished retracting my standard 0.2", my Z axis gave out a real SCREAM of steps. Luckily they came out so fast the axis did not actually move. In fact the strange thing was the DRO's did not change either. It happened both times I tried it, then I chickened out trying it any more.
I guess the problem could be (probably is) Mach but then it might be some incompatibility betwen your tool setter code and the new Mach as well.
Mabe you should give it a try.
BTW
I also had Mach issue a scream of X axis steps just moving the table which wouldn't be anything to do with the tool setter.
Sage
Thanks Sage
I am however a bit uncomfortable calling this "My Product"
The original code that I started with came from Scott Worden. All I have done is modify it to suit myself and do a bit of a write up to encourage others to use it.
I have not used the development version of Mach. It is put up for testing only. Very much a beta version. I use the release candidate.
Greg
Not to worry. I found some other issues with the beta version as well. Apparently the tool offset code still has a few bugs. Yes it is beta and I've set it aside for now.
Thanks
Sage