Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: Jarhead on November 28, 2015, 06:14:36 PM

Title: Use probing for tool zeroing
Post by: Jarhead on November 28, 2015, 06:14:36 PM
Can someone explain how to use the probing screen for tool zeroing??
Not sure what it's looking for and the "help" buttons on the screen are useless.

There's an option for Z position. I'm guessing this is how far the probe will travel to make contact??
When I click the "Measure Z" button, it just gives an error saying "No contact with Probe" (not exact message), then it disables Mach.
If I try it with soft limits active, I get a PMDX error 7.
The probe is working based on the diagnostics page and the fact that I got the Measure Z to move the axis once, it made contact with my "Z block" (1/4" aluminum), it retracted but then I got the no contact message and it hasn't done anything but give the error since.

I'm using Mach4.2803 on Win7 Pro 32 bit with a PMDX-410 to a G540.

Give me steps if possible and what will the results be? Does it stop at zero like mach3 scripts did?
Title: Re: Use probing for tool zeroing
Post by: Jarhead on November 30, 2015, 08:14:13 AM
Ok, How about someone explain what they are doing for tool zeroing then??
Title: Re: Use probing for tool zeroing
Post by: Pedio on November 30, 2015, 10:09:45 AM
I do it manually with a piece of paper. Would love to see auto tool zeroing working.

I can get G32 to work with my probing plate, but have not been able to get auto tool zeroing to work.
Title: Re: Use probing for tool zeroing
Post by: dude1 on November 30, 2015, 01:50:59 PM
look up the tool height probing macro b that does work, if it does not something is wrong with your install
Title: Re: Use probing for tool zeroing
Post by: Pedio on November 30, 2015, 04:17:20 PM
I looked for tool height probing macro b on the forum and in the toolbox and did not find anything.

Any suggestions where I can find this?
Title: Re: Use probing for tool zeroing
Post by: dude1 on November 30, 2015, 05:36:51 PM
google it
Title: Re: Use probing for tool zeroing
Post by: Pedio on November 30, 2015, 07:47:43 PM
http://www.machsupport.com/forum/index.php?topic=30396.0;wap2

I will see if I can sort my way through this later this week.

Thanks
Title: Re: Use probing for tool zeroing
Post by: Jarhead on November 30, 2015, 08:43:47 PM
I'm going to ask again...
Can someone explain how to use the probing screen for tool zeroing??
Title: Re: Use probing for tool zeroing
Post by: dude1 on November 30, 2015, 11:07:48 PM
Pedio don't use that it does not work
Title: Re: Use probing for tool zeroing
Post by: dude1 on November 30, 2015, 11:08:44 PM
Jarhead put in a support ticket to mach support and ask them
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 01, 2015, 11:04:23 AM
The probing screen does work, i will be doing a video over the coming weekend, i have just been too busy later on other stuff, pedio if you go into the video section and have a look at the m6 command i did you will find a bit of code there that can be customised to do an autozero.

Daz
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 02, 2015, 11:23:06 AM
OMG your right although the probing screen does work I cant see a way of using a toolsetter to zero the z, not too worry heres what i use.

Create a button and in the script put

Code: [Select]
local ToolSetter = 15.7 -- change to your toolsetter hight
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-15 F40") -- change feedrate and depth to suit
mc.mcCntlGcodeExecuteWait(0,"G91 Z2 F40") -- change feedrate and retract to suit
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-3 F10") -- change feedrate to suit
mc.mcCntlGcodeExecuteWait(0,"G91 Z5 F40") -- change feedrate and retract to suit, use this Z rectract value for line 7
wx.wxMessageBox("Remove ToolSetter") -- remove if needed
mc.mcCntlGcodeExecuteWait(0,"G91 Z-"..ToolSetter +5 .." F50") -- change feedrate and retract to suit
mc.mcAxisSetPos(0,mc.Z_AXIS,0) -- set Z axis to 0

Daz
Title: Re: Use probing for tool zeroing
Post by: ger21 on December 02, 2015, 11:42:54 AM
I don't know much about Lua, but I see you probe twice, retract, and THEN zero the Z axis? Am I missing something? It looks like you're setting Z zero above your touch plate?
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 02, 2015, 01:01:33 PM
line by line, I us metric

1. Sets the toolsetter height
2. Probes down a maximum of 15mm at a feedrate of 40
3. moves back up 2mm
4. Probes back down at a slow feedrate of 10 for more accuracy
5. Retracts a small amount to remove toolsetter as ive seen some with a small lip around them
6. inform operator to move toolsetter
7. moves back down the toolsetter height + the 5mm we raised on line 5, this leaves the tool on top of stock
8. set z dro to 0

if that helps

Daz
Title: Re: Use probing for tool zeroing
Post by: ger21 on December 02, 2015, 02:04:42 PM
OK, I misread line #7.

However, In Mach3, we set Z zero at the trip point, which is stored in a variable.

Your method sets z zero where the tool stops, after decelerating. Not quite as accurate.
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 02, 2015, 02:23:25 PM
we set Z zero at the trip point, which is stored in a variable.

Good point, I will have a change and perhaps send the value to a pound value

Daz
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 02, 2015, 03:30:37 PM
ok updated to set z axis on probe touch

Code: [Select]
local ToolSetter = 15.7 -- change to your toolsetter height
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-15 F40") -- change feedrate and depth to suit
mc.mcCntlGcodeExecuteWait(0,"G91 Z2 F40") -- change feedrate and retract to suit
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-3 F10") -- change feedrate to suit
mc.mcAxisSetPos(0, mc.Z_AXIS, ToolSetter) -- set dro to height of toolsetter
mc.mcCntlGcodeExecuteWait(0,"G91 Z5 F40") -- change feedrate and retract to suit, use this Z rectract value for line 7
wx.wxMessageBox("Remove ToolSetter") -- remove if needed
mc.mcCntlGcodeExecuteWait(0,"G90 Z0 F50") -- move tool to zero,  change feedrate to suit

Daz
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 03, 2015, 03:28:06 PM
Tool Zeroing is apparently going to be part of the next release. I have a "sequence" that is supposed to work with the current probe screen but I haven't tried it yet. I will try when I'm home tonight and if it works I will post it here.
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 03, 2015, 05:58:45 PM
It works. It's not ideal but it'll do until they release the version including tool zeroing.
Here's what you do.
Set your block on top of your material.
Move the z down to a close distance from the end of the tool.
Zero your Z axis DRO.
Go to the "probing" screen.
Set the Z position to a negative amount that will result in contact with your plate.
Set "Measure Type" to "set Fixture".
Press the measure Z button.
It'll go through it's sequence, when done, the number in your Z DRO is the amount it is above your block.
Remove your block, do a G0 Z-(distance in z DRO + Block thickness)
the tool tip will be at the top of your material, set your DRO to 0.
Or you can just add the thickness of your block to the "end result" DRO number and set the Z DRO to that sum. I'm sure you get the picture with that.

Now, the reason I found that this was not working for me was the soft limits. With Soft Limits enabled, I Get an immediate error saying "NO Contact With Probe".
And if I keep trying the measure Z button it eventually goes to a PMDX error 7.

With soft limits disabled, it has worked every time I've tried it.
Title: Re: Use probing for tool zeroing
Post by: ger21 on December 03, 2015, 06:58:26 PM
Sounds like a bug in the PMDX plugin. Be sure to report this to them.
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 03, 2015, 08:23:58 PM
Sounds like a bug in the PMDX plugin. Be sure to report this to them.

Why do you say that?
Title: Re: Use probing for tool zeroing
Post by: ger21 on December 03, 2015, 09:58:26 PM
You shouldn't have to turn off the softlimits to probe, I don't think.
Title: Re: Use probing for tool zeroing
Post by: dude1 on December 03, 2015, 09:58:36 PM
this is the macro b for tool hight probeing, it worked last time I used it, use at own risk


G49 (Cancel TLO)

G58 (Switch to work offset G58)

G0 X0 Y0 (move the tool over the toolsetter)

G31 Z-10 F150 (probe tool down till it touches the toolsetter)

G10 L1 P1 Z#2002 (set the tool length offset value to the G58 Z position where the probe tripped)

G0 Z5 (move up to safe distance)

G54 (reapply old work offset coordinate system)

G43 H1 (apply new TLO for tool 1)
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 03, 2015, 10:07:03 PM
You shouldn't have to turn off the softlimits to probe, I don't think.

I agree, but what makes you say that's a PMDX issue? I'm don't see why? Not saying you're wrong, just want to understand what makes you say that.
Title: Re: Use probing for tool zeroing
Post by: dude1 on December 03, 2015, 10:57:59 PM
tool height probing is a defined operation, like ref all home. it's a basic function of the machine control the only thing that should affect it is the different ways to stop motion, stop, estop, feed hold
Title: Re: Use probing for tool zeroing
Post by: bob_at_pmdx on December 04, 2015, 12:31:33 AM
Quote
Sounds like a bug in the PMDX plugin. Be sure to report this to them.
and
You shouldn't have to turn off the softlimits to probe, I don't think.

I can't rule anything out at this point, and it *may* be an issue with our plug-in, but at first glance I would be surprised.  Soft limits are handled entirely by the Mach4 core and motion planner.  Our plug-in has nothing to do with them.  Probing motion comes to the plug-in through the Mach4 motion planner, same as GCode motion.  Well, up until the point where the probe makes contact - then the SmartBOB takes over the motion and halts movement (decelerates to a stop).

Since the purpose of this sequence is to set a new zero point for the Z axis, what *may* be happening is that changing the Z position in the DRO and then moving for the probe motion might be exceeding the soft limits.  Your profile that I have here has the Z axis soft limits as -7.5 to 0 (presuming that you have fixed the max/min values in the proper, non-intuitive columns).  If the canned probing routines try to move the Z axis up (which I presume is toward a more positive position) it may trigger the soft limit when it moves above the zero that you just set.  This is pure speculation on my part as I haven't tested any of this.

If you want, enable our debug log to a file, run the tool zero sequence with soft limits enabled, then send us the log file (or the Mach4 package if that is easier).  That should tell me pretty quickly if the issue is in our plug-in.
Title: Re: Use probing for tool zeroing
Post by: dude1 on December 04, 2015, 12:37:20 AM
note to everyone when you are having problems run the logging and post it and your .ini. it will make suport 100 times easier and faster
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 04, 2015, 02:59:45 AM
It works. It's not ideal but it'll do until they release the version including tool zeroing.
Here's what you do.
Set your block on top of your material.
Move the z down to a close distance from the end of the tool.
Zero your Z axis DRO.
Go to the "probing" screen.
Set the Z position to a negative amount that will result in contact with your plate.
Set "Measure Type" to "set Fixture".
Press the measure Z button.
It'll go through it's sequence, when done, the number in your Z DRO is the amount it is above your block.
Remove your block, do a G0 Z-(distance in z DRO + Block thickness)
the tool tip will be at the top of your material, set your DRO to 0.
Or you can just add the thickness of your block to the "end result" DRO number and set the Z DRO to that sum. I'm sure you get the picture with that.

??  How automatic is all that, did you actualy try the code i posted, thats automatic and basically does all that manual work for you.

Daz
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 04, 2015, 02:29:18 PM
It works. It's not ideal but it'll do until they release the version including tool zeroing.
Here's what you do.
Set your block on top of your material.
Move the z down to a close distance from the end of the tool.
Zero your Z axis DRO.
Go to the "probing" screen.
Set the Z position to a negative amount that will result in contact with your plate.
Set "Measure Type" to "set Fixture".
Press the measure Z button.
It'll go through it's sequence, when done, the number in your Z DRO is the amount it is above your block.
Remove your block, do a G0 Z-(distance in z DRO + Block thickness)
the tool tip will be at the top of your material, set your DRO to 0.
Or you can just add the thickness of your block to the "end result" DRO number and set the Z DRO to that sum. I'm sure you get the picture with that.

??  How automatic is all that, did you actualy try the code i posted, thats automatic and basically does all that manual work for you.

Daz

"""It works. It's not ideal but it'll do until they release the version including tool zeroing."""
Title: Re: Use probing for tool zeroing
Post by: DazTheGas on December 04, 2015, 02:47:58 PM
ok thankyou for your time in replying.

dtg
Title: Re: Use probing for tool zeroing
Post by: Jarhead on December 04, 2015, 07:56:40 PM
ok thankyou for your time in replying.

dtg


No problem.
Title: Re: Use probing for tool zeroing
Post by: Tweakie.CNC on December 05, 2015, 01:42:57 AM
 :)

Tweakie.
Title: Re: Use probing for tool zeroing
Post by: dude1 on December 05, 2015, 01:45:33 AM
to funny
Title: Re: Use probing for tool zeroing
Post by: Pedio on December 13, 2015, 03:31:33 PM
ok updated to set z axis on probe touch

Code: [Select]
local ToolSetter = 15.7 -- change to your toolsetter height
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-15 F40") -- change feedrate and depth to suit
mc.mcCntlGcodeExecuteWait(0,"G91 Z2 F40") -- change feedrate and retract to suit
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-3 F10") -- change feedrate to suit
mc.mcAxisSetPos(0, mc.Z_AXIS, ToolSetter) -- set dro to height of toolsetter
mc.mcCntlGcodeExecuteWait(0,"G91 Z5 F40") -- change feedrate and retract to suit, use this Z rectract value for line 7
wx.wxMessageBox("Remove ToolSetter") -- remove if needed
mc.mcCntlGcodeExecuteWait(0,"G90 Z0 F50") -- move tool to zero,  change feedrate to suit

Daz

Daz - Works Great for me. THANKS - this makes my life better!!!
Title: Re: Use probing for tool zeroing
Post by: Bronk on January 09, 2016, 07:27:22 PM
Thank you. This works great.
This was my first time screen editing and adding scripting. On button added to the tool panel, convert the measurement values from mm to inches and I was off and running.
Huge time saver. 
Title: Re: Use probing for tool zeroing
Post by: HoY on March 07, 2017, 06:21:45 PM
After spending quite a bit of time wondering what I was doing wrong, and changing values over and over again, I noticed that G90 would have my Z axis go down while G91 only let it go up, even when the called for Z command was up. I don't know what the difference is between G90 and G91, but when I changed the two downward probing commands to G90, and everything that is supposed to be Z up left at G91 the script started working properly for me. I imagine it's completely my fault I had to do this. Probably something to do with my Z axis motor mounted upside down and being pulley driven, and axis reversed when mapped.. Anyway, got it working, finally!