Hello Guest it is March 05, 2021, 09:38:11 PM

Author Topic: Any help on Z-Zero routine script?  (Read 2614 times)

0 Members and 1 Guest are viewing this topic.

Any help on Z-Zero routine script?
« on: March 01, 2016, 04:40:11 PM »
Hi there, bee nusing mach3 for a bout a year and at one time had a script working for zeroing my Z by clicking Auto Tool Zero and then G-Code.  Somehow that script got wiped out, and I can't remember how to set it up again.

I've also recently changed to metric units in Mach.

Here is a pic of the screen:
Re: Any help on Z-Zero routine script?
« Reply #1 on: March 01, 2016, 04:42:56 PM »
keep getting the message "cannot probe with zero feed rate"  Block = G31Z-5 F0

Offline ger21

*
  • *
  •  6,289 6,289
    • View Profile
    • The CNC Woodworker
Re: Any help on Z-Zero routine script?
« Reply #2 on: March 01, 2016, 05:04:51 PM »
F0 = 0 feedrate
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Any help on Z-Zero routine script?
« Reply #3 on: March 01, 2016, 05:06:55 PM »
F0 = 0 feedrate

Thank you, how do I correct that?  I try entering different feed rates on Alt-1 screen and it keeps going back to zero.

Offline ger21

*
  • *
  •  6,289 6,289
    • View Profile
    • The CNC Woodworker
Re: Any help on Z-Zero routine script?
« Reply #4 on: March 01, 2016, 05:54:40 PM »
Are you hitting the Enter key?
What Screenset are you using?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Any help on Z-Zero routine script?
« Reply #5 on: March 01, 2016, 05:55:38 PM »
Here is what I have, the "10" is suppose to represent 10mm.

Code: [Select]
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) '10
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.


Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-5 F" &ProbeFeed
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z2.0" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If


 Sorry for being a kook!

Help me get this going and you will have a friend for life!  What? Pretty lame pickup line?
Re: Any help on Z-Zero routine script?
« Reply #6 on: March 01, 2016, 06:00:03 PM »
Yea, I can get a Feed Rate entered. Then, as soon as I click "Auto Tool Zero" it zeros out the Feed Rate.


Screenset is bone stock. 
Re: Any help on Z-Zero routine script?
« Reply #7 on: March 01, 2016, 06:37:29 PM »
Maybe screenset 2010 will fix my problem.

Offline ger21

*
  • *
  •  6,289 6,289
    • View Profile
    • The CNC Woodworker
Re: Any help on Z-Zero routine script?
« Reply #8 on: March 01, 2016, 06:55:50 PM »
The Stock Screen doesn't have a Probe Feedrate DRO???

Change this:
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.
To this:

ProbeFeed = 10
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Any help on Z-Zero routine script?
« Reply #9 on: March 01, 2016, 06:59:16 PM »
Your code has this line in it

ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.

That will be what sets your feedrate, if you do not have a DRO for probe feedrate then you have two choices, you can create a User DRO with the OEM code 1152 or you can enter a value directly into the VB itself.
For the latter if you replaced the GetUserDRO(1152) with a value you wish the feedrate to be then it should work.
Example if you changed that line to

ProbeFeed = 10

then it should probe at 10 units per minute.

Hood

Edit, see Ger beat me to it :D