Hello Guest it is January 28, 2020, 07:43:00 AM

Author Topic: Zero tool height.  (Read 15007 times)

0 Members and 1 Guest are viewing this topic.

Zero tool height.
« on: December 26, 2013, 09:15:07 AM »
I'm having real trouble with setting the zero tool height.
I have followed a few threads here on machsupport forum and on you tube but still cannot get it to work correct can someone please help.
This is what I have first my breakout board is a HG07 and is wired as instructed with a 250 resistor, with the probe as port 1 pin 12 the E-Stop is on port 1 pin 15, this is as the instruction that came with the board and I have checked this with other instalment instruction that came with my stepper motor drivers.

My Mach 3 setup is in metric ( MM.)
The Machine touch plate is brass which is 0.80mm thick.

I first press enable button script next I press the Auto tool zero, this opens a Hidden script editor  window I paste this to the box.

Z zeroing macro by Scott Worden - Timber Lake Creations (and a little "Probe Var" tip from Brian ;-).

CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
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

I save script when the box closes.
when I try to run the auto tool zero I get error no feed speed. and the Z axis vibrates up and down very quick.

I changed the
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
to this PlateThickness = GetUserDRO(0.80) 'You could put your z-plate thickness here instead
and changed the
ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.
to this ProbeFeed = GetUserDRO(20) 'You could put a probing feedrate here instead.

Can someone tell me what I'm doing wrong. as This is a large learning curve for me, and I would like to understand it.
also could you please adjust the script to the correct values ie. Plate thickness and speed in metric.

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Zero tool height.
« Reply #1 on: December 26, 2013, 09:49:11 AM »
Use these instead, as you're doing it wrong.

PlateThickness = 0.8
ProbeFeed = 20
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Zero tool height.
« Reply #2 on: December 26, 2013, 10:30:10 AM »
Hi ger21,
Thanks for the quick answer.
So instead of this line       PlateThickness = GetUserDRO(0.80) 'You could put your z-plate thickness here instead     
 All I should have is this.
 
PlateThickness = 0.8
and the same as the next line
Probefeed=20

Is this correct, I can delete all the rest of the two lines?

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Zero tool height.
« Reply #3 on: December 26, 2013, 10:34:49 AM »
Yes
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Zero tool height.
« Reply #4 on: December 27, 2013, 11:01:03 AM »
Hi ger21,
Many thanks for your help I got it working this afternoon, Changed a couple of things set the  Probefeed = 100
Code "G31Z-5 F" &ProbeFeed is now changed to Code "G31Z-15 F" &ProbeFeed
and Code "G0 Z2.0" 'Change the Z retract height here is now changed to Code "G0 Z12.0" 'Change the Z retract height here

The only thing I'm not sure is when I lower the Z axis just off the work piece, I have to ZERO the Z before pressing the Auto Tool Zero to get it working correct, I just thought the script would automatically do this. Don't get me wrong I'm happy with the way it's working, it's just a question why and if there was a way to add this to the script.

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Zero tool height.
« Reply #5 on: December 27, 2013, 11:38:38 AM »
I don't have the code handy, but you want to check if your in G90 or G91 mode, then set to G91 mode, and after zeroing, set it back.
Since most people never run incremental code G91, It's probably safe to add
Code "G91" at the top, and Code "G90" at the bottom.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Zero tool height.
« Reply #6 on: December 28, 2013, 05:12:34 AM »
Many thanks for all your help and advice, That's another bit sorted.
Mike.

Offline Eli

*
  •  13 13
    • View Profile
Re: Zero tool height.
« Reply #7 on: March 02, 2014, 04:05:27 PM »
I set my machine for plasma and router. I also have a Z height problem. I know "0" about "G"code. I have a G540 with 4 outlets, 3 of which are used by limit switches and I need to Z the tool height and then set the edges of the starting corners. I'm 80 and have been working on my machine for 2 years. Two heart attacks and several strokes have not stopped me from cutting my first piece. I soldered a wire from my only open inlet to a flatened penny and ground the bit that when I make contact reads 1-12 but when I click on the flashing "auto tool zero", it reads not yet implementd. I hate to take the machine with me if it does not work.
Re: Zero tool height.
« Reply #8 on: March 03, 2014, 03:59:26 AM »
Hi Eli,
This is the Easiest way to explain how to configure the input for the probe and to enable the button script. have a look at this youtube video its not mine but it did help me out. If this video does not help I can wright it out set by step the way  I set mine up.     http://www.youtube.com/watch?v=l5ijj_Gn2zw  
have a look. and see how you get on.

Offline Eli

*
  •  13 13
    • View Profile
Re: Zero tool height.
« Reply #9 on: March 03, 2014, 11:39:18 AM »
As a J3 flyer in 1958, thank you, even if it does not work. Eli