Machsupport Forum
Mach Discussion => FAQs => Topic started by: Bush Flyer 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.
-
Use these instead, as you're doing it wrong.
PlateThickness = 0.8
ProbeFeed = 20
-
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?
-
Yes
-
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.
-
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.
-
Many thanks for all your help and advice, That's another bit sorted.
Mike.
-
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.
-
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.
-
As a J3 flyer in 1958, thank you, even if it does not work. Eli
-
Hi Bush flyer. I have used that video before, that's where I kept getting "Not yet Implemented". I made some changes with the wiring to the limit switches and i got rid of the Not yet Implemented and now I get 4 lines of DoButton(24) Now on the ststus bottom I get "error on line 1 "Argument Not optional."
" " (23)
" (22)
" (25)
DoOEMButton (133)
" (134)
(135)
I'm not sure if I have a G540 problem or a Mach 3 problem. I bought a plug and play kiit thinking I would not have a problem with wires all over. The only wires I had to make was with the limit switches, which work fine. Eli
-
Hi Bush flyer. I have used that video before, that's where I kept getting "Not yet Implemented". I made some changes with the wiring to the limit switches and i got rid of the Not yet Implemented and now I get 4 lines of DoButton(24) Now on the ststus bottom I get "error on line 1 "Argument Not optional."
" " (23)
" (22)
" (25)
DoOEMButton (133)
" (134)
(135)
I'm not sure if I have a G540 problem or a Mach 3 problem. I bought a plug and play kiit thinking I would not have a problem with wires all over. The only wires I had to make was with the limit switches, which work fine. Eli
-
You have to add the code to the button yourself. It would appear that you somehow copied some of the Ref All script into your auto zero button. You need to get an auto zero script.
Then go to Operator > Edit button script. Click on the auto zero button, and paste in your auto zero script. Then File >Save in the script editor.
-
Thank you Gerry. I copied one and when my basement warms up I'll give it a shot. Eli
-
Mike,
I am in the same position you were a wee while ago. I am trying to figure out the zeroing procedure for my new router. Is there any chance that you could post the code you are using now for me to see? I would be really really grateful!
I am also looking to find out how I go about setting the machine up to implement tool changes. Also to return the gantry to the rear of the table when the job is finished so that I can remove and replace materials without the gantry getting in the way....
Any help would be appreciated.
-
Mike,
I am in the same position you were a wee while ago. I am trying to figure out the zeroing procedure for my new router. Is there any chance that you could post the code you are using now for me to see? I would be really really grateful!
I am also looking to find out how I go about setting the machine up to implement tool changes. Also to return the gantry to the rear of the table when the job is finished so that I can remove and replace materials without the gantry getting in the way....
Any help would be appreciated.
My 2010 Screenset does all those things.
-
This is what I have as my script, it is set up as a metric script. you can change the plate to whatever thickness of plate you have. After you have finished setting up auto tool zero and are testing it make sure the touch plate will stop the Z axis by touching the plate, with your clip before testing it by lowering to the work piece. Also when testing auto tool Z lower the Z axis to near the work piece, then zero the Z axis before you press the auto tool zero, if the Z axis travels in the wrong direction you may have forgot to zero the Z axis I got caught out with this when I first tried it.
I am pretty sure this is how I have the script, but I will check later on today. Hope this helps.
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 = 0.80
ProbeFeed = 100
Code "G90 F" &ProbeFeed
If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-15 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 Z12.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 have just copied the script straight from my Mach3. The thickness of my brass plate was changed to 0.63 that is where you put in the thickness of your plate. I hope this helps if not I will try to help as much as I can. Just now I am learning all about chip load there's lots to learn. Let me know how you get on.
Mike.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = 0.63
ProbeFeed = 100
Code "G90 F" &ProbeFeed
If GetOemLed (825)=0 Then
Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-15 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 Z12.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
-
Hi Mike,
Thanks for that, much appreciated. I will give it a go tomorrow. I found a document on the onsrud website that was pretty good with regard to chip calculations. I could be completely wrong on this as I have just started as well but it seemed to make sense. I see you are in Elgin, just up the road!
Ger, I like your screen it is much cleaner. I think I will be making a purchase. When watching your youtube video I noticed you have two touchplates. I take it you can just use one with your Z zero function.
Thanks, Stu
-
For single tool auto zeroing, you only need to use one. The second plate is required to do automatic auto zeroing during a tool change.
-
I tried running the script today. Bit of brief history here, I purchased this CNC and am trying to set up the mach 3 myself. Whenever I tried to use the remote control that has a probe macro whenever the tool hit the plate it gave an e-stop.
I put the code in for the Auto tool zero to try it from Mach3 screen. The code half worked and it registered that the touch plate is 12.0mm thick (which it is) once. Ever since then it is just giving an e-stop message. I tried an auto pin check to see if I had the right pin allocated for the probe as I was told to set it to pin 7 by the manufacturer. Mach thinks it should be 10. I checked to see what else was allocated to pin 10 and of course it is the e-stop. So can I sort this via the software or will I have to change a wire position in the break out board or elsewhere? I have a feeling that the probe and all the limit switches are wired together. Is this the correct configuration?
I tried to find out via the Mach manual but I am struggling a bit if I am being honest.
-
You just go into Config > Ports and Pins, and assign the proper pin #s to trhe inputs you're using. You shouldn't have to move any wires.
But, you can't have the limits and probe on the same input. You'd trip the limits when the probe activated. The Probe needs to be on it's own pin.
-
Thanks Ger, I will put it back to pin 7 then. I was getting an e-stop when using pin 7 as well which is why I ran the automatic pin check. I suppose it makes sense that it would find pin 10 having re-read the manual and that all the limit switches can be wired together. I must be missing something in my settings. Finding the problem is the problem!
Would having it at active high / active low make a difference?
-
The Probe won't work on Pin 7. If you look at the bottom of the Input Pins page, it says that you can only use pins #10-13, and #15.
Pin #7 id output only.
And yes, active high low makes a difference.
-
You make a good point, that did not occur to me as I was blindly following instructions. So if the software finds pin 10 for the touch probe but I can't use it as the other limits are on it how do I choose the correct pin...?
I am so close to getting this thing working it is driving me mental!
-
You need to move the touch plate (or limits) to another pin.
-
So I can just check which pins are not already allocated and select a free one (provided it is in the range given for inputs)?
-
Yes.
-
I notice that when I watch other videos zero in, when the grounded bit touches the positive plate, the bit stops and rises 1 inch and stops again.
On my diagnostics (Alt 7) section, one of the center top of port 1 pins remains lit until i lower the the grounded bit to the positive plate then the light goes out but router keeps going down until the limit switch is activated. Prior to testing the zeroing, the probe was automated set to 1-13 the only free space with out a problem. Any help will be appreciated. Eli
-
Hi Eli,
This is the different script that I found online that was working with a G540. I have sent it as a PDF so that you can print it out. I also have found the manual for your G540 which didn't help much about Z Height.
Sorry I'm not much help. You really need someone that has a lot more knowledge.
I will always Try to help but am just learning myself. Please see my PM to you.
-
thank you for your concern and advise. I will send you pictures of where i am at this point. The G540 has 4 inputs, 3 are taken with NC limit switches and the last in put is being used to set the Zero which is NO until the bit touches the copper coin and sets my only open number which is 12. I'll send pictures to make things clearer.Eli