Thank you Gerry
I found what was the problem. After auto zeroing z I ask to go zero, but my zero coord was below my limit switch !!
Have a good day
Thank you Gerry
I found what was the problem. After auto zeroing z I ask to go zero, but my zero coord was below my limit switch !!
Have a good day
*snip* double post
Just set this up using Greolt's code above *Thanks , and one the more recent versions of mach3 ver. 3.043...
I had to change the PlateThickness variable to look at OEMDRO(1001) to return the thickness from Mach's Offsets tab, under Guage block height setting, just in case anyone else has guage block height problems. I changed the last line of this first block of variables.... did the trick!
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 = GetOEMDRO(1001) 'Z-plate thickness DRO. Gets guage block height setting from the offsets tab
I've had a mill and a router (one with a smoothstepper and one without) running auto tool zero fine for a while.
I just set up another router and hooked up a piece of PCB to an input, checked that mach can see it touch the tooltip, click on auto tool zero - and it stops when it hits the PCB, then drives the tool straight through the PCB and hits the bottom end of z-travel.
It looks like it's not getting the correct value from GetVar(2002) and the
Code "G0 Z" &ZProbePos
is sending it to the wrong place.
I've temporarily removed this chunk of code:
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
which works, but won't be quite as accurate.
This is basically a clone of my other router setup (but a much bigger table) and on a different PC (so it had a fresh mach install of the latest lockdown) but I can't see why it should behave differently to my other 2 setups.
--
Jon
I had this happen as well in testing, when my scaling factor was set to more than 1.
"drive down to bottom of z axis" , set scale back to 1:1 and it was ok
I will try to find out how to "script" something to handle or check for the scale factor prior to running.
In my macro, I first set all the scales to 1, then reset them after zeroing. I can post the code later if you want it.
You might also check that you're not in incremental mode (G91).
Gerry
UCCNC 2017 Screenset
http://www.thecncwoodworker.com/2017.html
Mach3 2010 Screenset
http://www.thecncwoodworker.com/2010.html
JointCAM - CNC Dovetails & Box Joints
http://www.g-forcecnc.com/jointcam.html
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
ger21
If you are able to paste the code later it would certainly be appreciated!
definitely save me some time.
Here you go:
'Get Axis Scale factors
XScale = GetOEMDRO(59)
YScale = GetOEMDRO(60)
ZScale = GetOEMDRO(61)
'Set All Axis' Scale to 1
Call SetOEMDRO(59,1)
Call SetOEMDRO(60,1)
Call SetOEMDRO(61,1)
Sleep(250)
Auto Zero Here...
' Return Scale settings to original
Call SetOEMDRO(59,XScale)
Call SetOEMDRO(60,YScale)
Call SetOEMDRO(61,ZScale)
Sleep(250)
End macro.....
Gerry
UCCNC 2017 Screenset
http://www.thecncwoodworker.com/2017.html
Mach3 2010 Screenset
http://www.thecncwoodworker.com/2010.html
JointCAM - CNC Dovetails & Box Joints
http://www.g-forcecnc.com/jointcam.html
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Gerry and Greg:
There have been so many scripts posted with people making their various modifications. Could you re-post your complete script so there is yet another place where they (it) are all in one piece. It's difficult to find a complete working version with 38 pages to sift through. I'm not sure if there is a place to post a message on this topic that is "sticky" so the complete working version is always easily found.
I believe Greg started this topic but I'm not sure who has the defacto standard now. Perhaps both of you could post your scripts for those searching for a working solution.
Thanks for your efforts. One of your scripts has been working fine for me for a long time.
Thanks
Sage
Has anyone tried this with Mechatronics easy-cnc 3 axis board?
This is a visual basic script that works with Mach3 software. As long as you have an input pin to wire the touch plate to it should not matter which motor driver board you use. The input pin would be on a breakout board (or in the case of a Gecko G540 is built into the module)
CarveOne
CarveOne
http://www.carveonecncwoodcraft.com
Thank you for your fast answer, impressive how fast it is to get help here.
The easy-cnc board has a terminal block for all unused port pins, so i can connect to the pins. What i am unsure about is the actual wiring, if a pullup is needed and if so, how to wire it. I was hoping someone had tested wiring with the mechatronics board so i could draw upon their success :-)
I'm not familiar with that board but it will need a pullup resistor to +5v if one is not already provided on the input pins of the board. The touch plate goes to a ground pin and the clip that attaches to the router bit goes to an input pin on the board. The input pin goes "low" when the bit contacts the touch plate. This script works well for a simple easy to implement zero setter.
ger21's 2010 screenset has some additional safety features, like auto tool length setting so that you don't forget to re-zero after a tool change. It has a simpler Z zero mode also.
CarveOne
CarveOne
http://www.carveonecncwoodcraft.com
Hi all,
I am new to this site and am trying to set up a Z plate. I have read this entire section on
z-zero plates and it has been enlightening.
First of all, I have recently finished building a MechMate. Is equipped with a Mech3 version 3.042.020. The screen that I found here it is called “1024%Zero” that I like since I do use my spindle controls. I will attach. My PMDX- 122 bob that I have set to the “probe” input # 15. I do have a green light on the screen when touched and it allows me to enter a value of the plate “.253”.
The 615.mls file is aversion of Greg’s modified as follows:
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO
If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G31Z-5 F30"
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G0 Z" & ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z1 F20" '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)"
End If
When I run I get the following results:
coordinates DRO readings action
reference zero DRO 0.0000 Bottom of cutter at
top of z plate DRO -6.2960 measured distance
user coordinates DRO 1.0010 touches z plate and retracts
machine coordinates DRO -5.3800 touches z plate and retracts
I have a lot to learn so please bear with me. I believe the user coordinates should be the 1” minus the z-plate thickness of .253 that I entered in the screen or .747 and not the 1.001 I am reading.
If this is wrong, then, what have I doing wrong?
Thanks,
Al
No, at the end of the routine your work coordinate should be at 1" due to this line, which happens after the plate thickness has been taken into account.
Code "G1 Z1 F20" 'Change the Z retract height here
Does your machine have a resolution of less than .0005 ? Could be why it is a thou out.
Jog to the top of the work to verify that it is zero. I found mine was out by a fraction and had to adjust the plate value to compensate.
HI Mica,
I hooked up my Y car buttons today. I loaded Greg’s Macro and Brain files and set OEM buttons to input #4 and OEM code 301.
The y car buttons work fine and the DRO user readings the correct readings.
But, there is one glitch I can’t figure out. That is when I press the on screen button the machine does its z-plate routine the final user DRO reading 1.001” and .753 off the z-plate. This is fine. When I press the routine from the Y car buttons I get a User DRO reading of 2.002” and am 1.753 off the work surface. Which is also fine.
The question is why is Y car readings 1” higher than if I use the on screen command?
One other thing my Normal/Abnormal condition led keeps flashing and has done so since I started the z-plate install. When I highlight with mouse I get a message” axis’s not referenced in a normal condition.
As far as resolution I am not sure but I am cutting wood, but wouls like it correct.
I do appreciate all the input I have received it does help.
Thanks,
Al
I don't have a Mechmate. What is the Y car button doing? How is Mach3 set up for it?
What does the brain do?
As for the normal/abnormal, just double click it and set it to normal. It's the dumbest thing ever conceived and should be removed from the screen. It has nothing to do with any errors, it just let's you know that settings have changed.
( I posted this reply on the Mechmate forum too.)
Gerry
UCCNC 2017 Screenset
http://www.thecncwoodworker.com/2017.html
Mach3 2010 Screenset
http://www.thecncwoodworker.com/2010.html
JointCAM - CNC Dovetails & Box Joints
http://www.g-forcecnc.com/jointcam.html
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)
Hi Gar,
I if you check out the MechMate site section on z plate zeroing look at post # 38 from Greg an older post but explains it all including the brain and macro I am using..\\ that did work on the light flashing matter.
Thanks Al
Al
It is best to use the one macro, called from either the macropump or the on-screen button.
So if for example the macropump is calling M615, then the on-screen button should also call M615.
This will avoid a situation happening where one macro is edited and forgetting to do the same edit to another instance of the macro.
Keep it all in one place.
Greg
Hi Greg,
I am only using one macro, M615 it is the loaded in the macro file. I have my OEM button set to input #4 and OEM code set to 301. The way I understand the operation is that when I press the Y car button the Brain that is in the Brain folder, that I enabled, call up the Macropump that tells M615 file to do it's thing.
Are you telling me that i should set the button OEM code from 301 to M615?
So all your instructions have worked fine.
Thanks,
Al