PDA

View Full Version : Another Aussie Auto Tool Zero Setter



Pages : [1] 2

Greolt
04-16-2007, 11:36 PM
With the type of things I am doing on my router I find I very often need to set my Z axis zero on the top of the material.

What I have been doing to set tool zero to the top of material is to use a 123 block as a known height gauge.

Put it under the tool and jog down to it, using step jog when close, 0.01mm per step, then manualy entering 25.4mm (1") into the Z axis DRO.

There's got to be a better way! (nuts)


Well there is. And lots of people have done this already. No original ideas here. :)

This is what I did. With the help of some people on the Artsoft forum. Mostly Scott. Thanks Scott.:cheers:

Put a user DRO on the screen using Mach's screen utility, Screen4. Assigned it OEM code 1151

Also put a LED for Probe and one for Pause or Dwell. These I will explain later. See the screen grab below as pic.

Assigned the following macro to the "Auto Tool Zero" button.

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-40 F500" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z25.4" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If

EDIT: This is in metric. You will have to change some numbers if you still live in the Middle Ages. :) .......END EDIT

Made a probe touch pad from a scrap of copper clad PCB material. See pic below.

Conected to a spare input on my BOB. Mine needed a pull up resistor.

Assigned it in "Ports and Pins" as "Probe" Set as "Active Low"

The first one I made had a clip to go onto the tool. I found it worked faultlessly without it. So I ditched it. KISS :)

Re, my screen changes.

The "plate Thickness" DRO should be self explanatory.

The Probe LED I made big so I could see it from the machine.

My fear was that if an electrical fault happened and Mach did not stop the probe move then my spindle would drive on relentless. Causing mayhem.

So I just touch the plate to the tool and see the LED light up, before running the macro to satisfy myself that all is good.

The Pause LED just flashes during the 5 second pause I have set to give me time to get from computer to holding the plate in place.

Now you can put these items (only the DRO if that's all you want) anywhere on the screen that suits you.

I chose the area usually used for spindle control. Because I don't use it. :) YET!!!

Now I will repeat, this is not my idea. Lots of people use this type of device

I hope this inspires a few more to give this a try. Very useful on my type of machine. It really is easy.

Greg

crocky
04-17-2007, 03:12 AM
Hi Greg,

Looks pretty good, not quite ready for one yet but I did register the mach software today so I will store this info :)

Bob

wjfiles
04-17-2007, 10:16 AM
I will make one of these plates as time permits.
In the mean time, I loosen the collett so the tool cutter slide and jog the Z axis down onto the workpiece until it starts to push the tool and then tighten the collett and zero the Z axis.
WJF

Glidergider
04-19-2007, 08:35 AM
Greolt
Thanks for posting this code. I've seen it before, but glad to see it again with all your comments.

I have some questions in red
Code "G31Z-40 F500" 'Are you moving the probe 40 mm down at a rate of 500 mm/min'
While IsMoving() 'During this wait, what makes Mach3 stop?'
Wend

I'm confused about the While IsMoving/Wend command.

First of all, -40 mm is a long way. When electrical contact is made, Mach3 records the exact z using the ZProbePos = GetVar(2002), but what command stops the movement? I'm assuming that Mach3 is not processing any further instructions until after it stops moving. Am I wrong about that assumption?

Is the probe hooked to a Mach3 input that always stops the machine on electrical connection? That sensor doesn't need code to activate?

Greolt
04-19-2007, 09:07 AM
I'm confused about the While IsMoving/Wend command.
This just stops the macro from executing the next instruction until the G31 is finnished doing it's thing.



First of all, -40 mm is a long way. When electrical contact is made, Mach3 records the exact z using the ZProbePos = GetVar(2002), but what command stops the movement?The G31 command does. It is a probe move so it is inherent in the command to stop when the probe is triggered.



Is the probe hooked to a Mach3 input that always stops the machine on electrical connection? That sensor doesn't need code to activate? On any other move the probe connection has no effect. (as far as I know)


Code "G31Z-40 F500" Yes this will move down 40mm at 500mm per min or until the probe is triggered.

Set these to whatever suits your machine. I usually jog down quite close so 40mm is more than I need.

I can see that you are like me in that I was not content to just paste someone elses macro in. I needed to understand it. :) The Wiki is good.

Hope this helps, Greg

Glidergider
04-21-2007, 10:29 PM
Hey Greolt
I'm starting to assembly stuff to make the plate, and hook up the wires. My question to you is about wires and this statement,
The first one I made had a clip to go onto the tool. I found it worked faultlessly without it. So I ditched it. In the end, did you only use one wire? You tried two wires, but since the router body was already grounded, you didn't need the second wire?

I'm trying to figure out the wiring. I know the plate's wire will go to pin 15 in my BOB. Do I need a second wire? Is the routers grounded body sufficient?

I see that you used a pull-up resistor. I'm thinking that means the plate is connected to your input pin and electrified to +5V. Am I correct?

Thanks for your previous response. It was helpful.

Greolt
04-21-2007, 11:42 PM
........You tried two wires, but since the router body was already grounded, you didn't need the second wire?
That was what I found in my case. Others have done the same.


Do I need a second wire? Is the routers grounded body sufficient?Some fancy spindles have ceramic bearings. Or there may be other reasons the tool is not well grounded. Try it and see. :)


I see that you used a pull-up resistor. I'm not an expert. :p

But from my basic knowledge, you don't want an input to float. It needs to be held either high or low. Less suseptible to noise that way.

In this case I "pulled' it high and used the plate to ground it (or force it low) when contact is made.

Some break out boards have a jumper to select whether inputs are pulled high or low with on board resistors. PDMX-122

Others just have the inputs pulled low. CNC4PC- C10

Mine has neither.


I'm thinking that means the plate is connected to your input pin and electrified to +5V. Am I correct? From memory I think I used a 3K resistor which at 5 volts is only about 1.5 miliamps.

I won't be in for a few days. Hope this is helpful. Greg

epineh
04-22-2007, 07:27 AM
Nice setup Greg, I might retrofit my machine with something similiar, sure beats my method of using glossy magazine paper between the job and cutter and slow jogging down until it cannot be moved anymore.

First I just have to retrofit servo's, make the drivers for said servo's, get EMC to run the whole thing (drivers using quadrature input - EMC does this natively, apparently). Then build a shed to house all of this... then its straight onto the tool setter :)

At least I have a vacuum pump ready to go heh :stickpoke

Russell.

Glidergider
04-22-2007, 11:49 AM
Hi,
I cut and pasted the script into a file. I edited some values for inch system and hard coded the plate thickness. Here's the code.

PlateThickness = .063 'Z-plate thickness
...
Code "G31Z-.25 F10" 'probing move, can set the feed rate here as well as how far to move
...

In Mach3, I selected Probe input to pin 15, and active low. In the BOB, I connected pin15 to +5v and to the external lead to the plate.

Back in Mach3, I selected the pull-down "operator>VB Script Editor". I found the script file and run it from there.

Problem is that the script makes Mach3 hang indefinately. I hope I gave you enough info to help me trouble shoot the hanging program. What am I doing wrong?

Glidergider
04-22-2007, 02:24 PM
OK, I figured out the indefinite hang. The code had an "exit sub" command at the end. I wasn't calling it from another program, so it didn't know where to return.

My latest problem is, I can't get a ground to stop the G31 probe movement. The plate is wired high to plus 5v. More trouble shooting ahead. It must be an improperly connected pull-up circuit.

Glidergider
04-22-2007, 05:12 PM
Yeah, I got it to work. Thanks for letting me just blabber on here. It sort of helps me figure out what I'm doing, and going to do next.

I have a BOB that includes pull-up resistors, however, they didn't work as advertised. I added a 1 K resistor and it now works.

Greg, thanks for starting this post. I've done some previous reading on the subject, but always had questions. The comments in your first post crystallized the answers.

Greolt
04-24-2007, 04:36 AM
Hi,
I cut and pasted the script into a file. I edited some values for inch system and hard coded the plate thickness. Here's the code.

PlateThickness = .063 'Z-plate thickness

My peice of PCB material that I am using for a touch off plate is 1.55mm thick.

However I need the DRO set at 1.480mm to get an exact and consistant zero setting.

So you may need to play with that setting to get it right. That is why I went with the DRO on the screen.

Having said that, it is almost as easy to make changes as needed with Mach's VB editor. :)

The reason I have my retract movement set to 25.4mm or 1" is that previously I was using a 123 block as a guage.

Now I can just slip it under the tool after zeroing to check for accuracy.;)

Greg

Glidergider
04-24-2007, 07:03 AM
Greg,
I reduced the feed rate to 3 inch/min (I know that's slow). Once I did that, It worked perfectly with .063 inches. I toyed with the idea of two plunges to touch the plate. The first plunge at a higher speed to get close quickly, then a second plunge at 3 i/m. I didn't do that though.

Good idea about the 123 block to check the accuracy. I check accuracy while its plunging. There's a pause in routine just after backing up the overshoot. I lengthened this pause. During the pause, I test the gap by sliding the plate under the tip like a feeler gage.

I'm not the best grammerian. I hope I'm understandable.
Dave

Greolt
04-24-2007, 07:46 AM
That's good Dave. Whatever works is good.

The name of the game is to have a quick, easy, accurate and consistent zero setter.

The method in the first post is doing that for me. :)

Greg

Glidergider
04-24-2007, 09:36 AM
Now I need a 123 block. :)

thkoutsidthebox
04-24-2007, 11:57 AM
I'm going to have sooooo many questions when I'm setting this up! Yours looks great. :)

bigz1
04-28-2007, 11:23 AM
Reading this thread I am going to make my own. Has anyone had any thoughts on making a 2nd fixed plate too automatically compensate for tool wear on end mills?

sawmiller
06-29-2007, 01:42 PM
how about one of you guys that made yoour changes to your mach3 screens , uploading that set? i like the fact of using the space that the spindle speed takes up, but i have wrestled with screen4 for a lil while, and the set i made looks terrible.
thanks,
dan

Greolt
06-29-2007, 06:01 PM
Try this one Dan. It will work with the macro posted at the start of this thread.

Modifying the standard screenset is easier than starting from scratch.

But of course it's like renovating a house as opposed to building a new one.

There is only so much you can change.

Greg

EDIT: Updated the zip file. Macro now has the coments as in the first post. Makes it easier to understand.

Glidergider
06-29-2007, 06:45 PM
Greg,
Are the steps to install your 1024.set simple? Any help in that area will be appreciated.
Thanks,

sawmiller
06-29-2007, 08:06 PM
thanks greg, will look at this a lil while
looks like you install it by clicking view in the menu then load screens
i see the autozero already has a vb script with it by lookin at it with the editor under tools. wont be able to play with it tonight thou :(
machines up in the shop and i'm in the house watching my son ( wifes night out)
dan

Greolt
06-29-2007, 10:31 PM
Greg,
Are the steps to install your 1024.set simple? Any help in that area will be appreciated.
Thanks,

You just need to place it in the Mach3 directory.

When in Mach select View / Load Screens, Then navigate to Mach3 directory and select the screenset you want.

As Dan said the macro assigned to the "Auto Tool Zero" button is already embeded in the screenset.

You will need to access it via Operator / Edit Button Script, and make changes aplicable to your needs.

Greg

Glidergider
06-30-2007, 09:52 AM
Thanks for the instructions. I think I've got it. Works great so far.

Glidergider
07-06-2007, 08:56 AM
I'm really enjoying the new screen (thanks Greg). I love that test button. Outstanding.

I do have a follow up question. My local buddy here in Huntsville also tried the "modified 1024". He's just getting started with his JGRO. He claims that after powering down Mach3, then restarting the next day, the Mach3 screen is blank (white). Any ideas why that's happening?

I told him to reload the "modified 1024" screen, then save fixture when he gets out next time. I don't know if that helps.

sawmiller
07-09-2007, 08:02 PM
:wee: yes, thanks greg for that modified screen, i'm using it all the time,
you can use it during a manual tool change in the middle of a job and it works great, not using the offsets yet, but i probally will.

one thing i had to add was a spindle on/off button, couldnt turn on spindle with F5 and some of the wizards expect you to do it manually.
so i just copied the one on the basic screen, then loaded 1024 mod screen and pasted it where i wanted it.
now i can turn on the spindle if the wizard doesnt include that command in the gcode automaticly.
dan
:wee:

Glidergider
07-11-2007, 05:05 PM
I'm really enjoying the new screen (thanks Greg). I love that test button. Outstanding.

I do have a follow up question. My local buddy here in Huntsville also tried the "modified 1024". He claims that after powering down Mach3, then restarting the next day, the Mach3 screen is blank (white). Any ideas why that's happening?

I told him to reload the "modified 1024" screen, then save fixture when he gets out next time. I don't know if that helps.

Hi guys,
I thought I bump this question once again. Any ideas why Mach3 doesn't remember the modified 1024 screen after a reboot?
Thanks,

Greolt
07-11-2007, 05:26 PM
I have never needed to do it but there is a "Save Layout" under the View Menu.

Has he tried that before shutting down?

Greg

Glidergider
07-11-2007, 05:28 PM
I'll pass that info on. I doubt that he tried it. Thanks.

harryn
07-11-2007, 06:11 PM
Thanks for posting this.

sawmiller
07-11-2007, 07:55 PM
mine is just put in the mach3 directory ( c:mach3) and it works great.
dan

stevespo
10-10-2007, 04:55 PM
This is really helpful - thanks for sharing it with the rest of us. When I get a chance I'm going to figure out how to change the input from probe to z-home, but for now it's easy enough to just continue using the default probe input.

At 12 IPM, I seem to be overshooting true 0.000" by .005", so I compensated by adjusting the probe thickness in the dialog and it works out just fine for my needs.

Steve

Glidergider
10-10-2007, 05:34 PM
Steve,
I had the overshoot problem too, so I slowed the travel speed down, way down. Now it works perfectly. The trade off is that it takes 10 seconds longer, but that's ok.
Dave

stevespo
10-10-2007, 08:18 PM
Hi Dave,

I saw that you had the same issue as well. I'll slow things down if I start to have any problems. Another solution that was discussed here was doing the operation in 2 passes. One at medium speed to get in the ballpark, and the second at slow speed to really nail that home position. Seems like a pretty straightforward thing to do with the well documented code we have. I'll let you know if I get a chance to try it.

Steve

Greolt
10-11-2007, 02:09 AM
Steve

Glad it is working for you. It is the handiest little extra you can add to a router IMO. So dead easy to do too.

I notice in the script that I posted the probe feed speed is 500mm per min. Mine is actualy set at 100mm per min now.

The thing about the probe Z plate thickness is that you adjust the setting in the DRO until the result is perfect.

Not just measure it and enter that amount. Although that is a good starting point.

My Z plate is 1.51mm but the setting in the DRO is 1.48mm to give me an accurate zero.

That is why I put a DRO on screen rather than hard code the thickness. For fine tuning. :)

Greg

Greolt
10-11-2007, 05:19 AM
Here is the script I now use.

Note the 100mm per min feedrate on the probe move.

Also this stores the current feedrate and returns it when Auto Zero is finished doing it's thing.

Greg


CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If

Glidergider
10-11-2007, 06:50 AM
Greg,
Good to hear you slowed your system down to 100 mm/min. I run my feed rate at 50 mm/min.

Steve, Thanks for the offer of writing the double speed routine. I'll try it if you write it, although I'm really pretty happy with the current program. I just manually run the z axis down to get it close.
dave

bigz1
10-14-2007, 03:10 PM
Does anyone have any problems using the tool setter? When I first turn MACH on the tool moves slower than it should do stops at the plate and dosn't retract. But if I close MACH down and restart the tool setter everythings fine. the only change I have made is the speed. Any ideas?

Greolt
10-14-2007, 04:45 PM
Are you using the latest lockdown release?

Over time there have been several releases in which this macro stopped working because Art has changed something for some other reason.

He has always fixed it in the next release. So there are some older releases that will give trouble.

Greg

Greolt
11-02-2007, 12:25 AM
We have been discussing Auto Tool Zero devices over on the Vetric forum.

The concern has been expressed about chipping the fine point on vee cutters and other fine tools.

So I made a short video to demonstrate how gentle this is on tools. Also gives a brief look at how it works.

It's on YouTube. Here's the link. http://youtube.com/watch?v=DOBxt9MIbFo

Greg

Glidergider
11-02-2007, 08:19 AM
Greg,
Good video. I can echo the fact that no tips were broken while I've used the program either.
Dave

Glidergider
11-02-2007, 08:34 AM
Everyone should know that Greg has a second video on YouTube that shows his vacuum clamping setup. The vac stuff is very interesting in it own right, and in that short video, he uses his autozero program, showing just how easy it is to use.
http://youtube.com/watch?v=U9rqj96b4XE

Rodm1954
11-02-2007, 09:52 PM
I have just got round to making my autozero plate by following Greg's instructions. I now wonder why I took so long to get around to doing it.
Thanks Greg.

biotech1
11-03-2007, 04:30 PM
OK got zeroplate built. Got modified screen installed now my probleme is i need to set to inches not mnetric

Code "G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move---is metric right for inches would i change it to this

Code "G31Z-20.0 F50.0" 'probing move, can set the feed rate here as well as how far to move

Greolt
11-03-2007, 05:46 PM
To make it the same but in inches.

This is a probe move of one inch and at 4 inches per min feed rate.

Code "G31Z-1 F4" 'probing move, set the feed rate here as well as how far to move


Also further down you need to change the retract distance, this is one inch

Code "G0 Z1" 'put the Z retract height you want here

Greg

Greolt
11-14-2007, 04:37 PM
Just further to the issue of overrun on zero devices chipping tools.

It occurred to me that some people may have much slower acceleration settings than I have, on their Z axis.

This would mean that when the G31 probe move ends on probe signal (tool touches the plate) the axis needs to decelerate at the set rate. If this is slow it will overrun.

I have my Z axis set to approx 0.1 G's and probe feed at 100mm/min so the stop is virtually instant.

If your Z axis is a bit underpowered or machine is not so rigid and you need slow acceleration settings then make sure your probe speed is not too fast.

Don't have probe feed rate set at 20 or 30 ipm. 4 ipm would be more appropriate.

First jog the Z down close to the target surface (1/4") then run the Auto Tool Zero. No need to start 8 or 10 inches in the air.

Hope this helps, Greg

Glidergider
12-01-2007, 04:56 PM
Greg, et-al,
I just upgraded my Mach3 software and now my z-zero routine won't work. Here's what happening. The probe works fine, as I can touch the router bit and the screen lights up as desired. When I run the program, the zaxis moves downward about 7-20 thousands of an inch then it stops and retracts. Like it sees the probe touch. Of course the probe didn't touch the bit.

Here's the code I'm using. Units are inches.
I hope you can offer a suggestion.
Dave

---------------------
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-1 F2" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z1" 'Go to the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if applicable
Exit Sub
End If

Greolt
12-01-2007, 05:19 PM
Dave

I can't see anything odd about the code.

Does it stop at a consistent spot?

Sounds a bit like "noise" triggering it. Has anything electrical been changed?

It is possible that Art has made some change in the latest release that has affected this. It has happened before.

If your sure it is not noise producing a false trigger then I would go back to the older release and see if that fixes it.

Greg

Glidergider
12-01-2007, 06:19 PM
I"m running version 2.6. How about you?

The touch light on your screen works perfectly. When I touch the probe to the bit, I get a light. Otherwise, I don't get any indication of a spurious touch according to the touch plate light you prove in your screen setup. Maybe a stray signal is so fast that the light doesn't register. I wonder if that's possible?
Dave

Glidergider
12-01-2007, 06:21 PM
Can some of you other folks out there check your version and let me know if you have R2.60?
Thanks,
Dave

Greolt
12-01-2007, 06:34 PM
Yeah 2.6 here too.

If it is noise you wont see it on the LED. Too short.

The fact that the problem only started now is strange but I would still suspect noise.


Do you have a pullup on the input? I can't get away without it but every setup is different.

Greg

ger21
12-01-2007, 07:33 PM
Greg, does increasing debounce help in this instance?

Glidergider
12-01-2007, 08:49 PM
I put the volt meter on the BreakOutBoard test points and measured 4.1 volts. I have a resistor of unknown rating between the 5volt power and the BOB Probe port. The resistor must be reducing the voltage. I forgot why I need that resistor.

I followed the probe lead and separated it from all the other wires in the area. Still no go. At one point I did get a screen indication of the probe grounding out, with no apparent ground contact. So I've got a problem, and it's not Mach3.

I turned off the motor driver power, and ran the mach3 script. This test proved a success, in that the z movement ran the entire 1 inch in the negative direction. The probe even worked in that test. So there's something about the 36 volt power to the drivers that is causing the problem. Without that power, the probe is not getting the noise.

Tell me more about that debounce.

ger21
12-01-2007, 09:38 PM
Tell me more about that debounce.

Not sure if it works for probing, but try putting 5000 in the debounce interval box in the general config page, top right corner.

Greolt
12-01-2007, 09:45 PM
About three months ago Art decoupled the probe from the debounce.

So from that version on it has no effect on G31

Greg

Glidergider
12-02-2007, 12:21 AM
About three months ago Art decoupled the probe from the debounce.
So from that version on it has no effect on G31
Greg
That would explain it! I had debounce already set and prior to the recent mach3 upgrade, it work perfectly. After the upgrade, it hasn't worked, not even once.

Who do I ask about eliminating noise? I wonder if I put a capacitor in parallel with the resistor? Remember, I have a pullup resistor on the probe input.

Greolt
12-02-2007, 12:27 AM
Dave here is the entry relating to probe debounce in the Mach revisions list.

Did you previously have Ver 2.4 or older?

Greg



Aug 1st 2007 V2.4 ( development update)

Fixes to Plugin variables with SDK. Fix to slave homing selection
Fix to debounce. Removed probe from debounce code.

Greolt
12-02-2007, 12:32 AM
I wonder if I put a capacitor in parallel with the resistor? Remember, I have a pullup resistor on the probe input.


No what you can try is a capacitor between the input and 0 volts (or ground)

I would try 0.01uf. Just remember this slows down the probe response. Probably only the same as debounce was doing.

With your 1"/min probe rate it will most likely be fine.

Greg

Glidergider
12-02-2007, 01:42 AM
Greg,
I don't see that cap helping me. Putting a cap between 0v and the probe? My router is my ground, so in my instance, the probe never touches ground. The stray signals trigger a command before the router and probe touch.

I'm not an EE, so this electrical stuff is a little foreign to me. I don't mean to be dense.

In the ports and pins, I have the probe set as "active low"

I was wondering if the resistor I'm using is too much. Since the voltage drop at the probe pin is just 4 volts, that's pretty close to the trigger voltage, which I'm guessing is 2.5 volts.

Regarding my M3 previous version, its been a real long time since I last updated my Mach3. I'm guessing it was May 07 since the last update. I'm sure its not after August.

Hey, wait a minute, I think I might know where you are going with the cap to ground. I forgot that a capacitor doesn't actually transmit any current. So a cap between the probe input and bus ground would be invisible in terms of current and voltage drop at the pin. Yet, the fluctuations in voltage would react to ground. Cool.

mcyr
12-02-2007, 09:40 AM
Hi GG,

Been a very long time, but I'm finally done with my Solslyva buid. I ran into the same type of problem for my limit/home switches because I needed to have pretty long leads from my BOB to the machine. Noise was so bad that I couldn't even reset Mach3 to allow enough time to give the motors a whirl. The noise was occuring so fast that the LED's on the diagnostic page didn't even light up. The only way to get it work "properly" was to set the debounce to 5000! That's almost a full second of noise filtration - no good long term. After reading several solutions posted by others with similar problems I tried soldering a 0.01uF cap across the leads at the BOB. It worked so well that I was able to reset the debounce back to 0. So, you might just start with playing with the debounce level to show that it is noise and if it is then give the capacitor a shot. By the way, did you need to use a second wire to GND as part of your zeroing system? I wasn't so lucky so I have to attach a wire to the bit to complete the circuit. If you didn't then maybe that might be another experiment you can try.

Good luck and best regards,
Mike

mcyr
12-02-2007, 09:45 AM
Whoops! I should have backed up and read a few posts before posting. Sorry for being redundent.

Best regards,
Mike

ger21
12-02-2007, 09:52 AM
There's a better way to hook up your switches to get rid of noise issues. Use 24V.
http://www.cncbuildingblocks.com/sourceoptoinput.html

Glidergider
12-02-2007, 12:35 PM
Hi GG,
...The noise was occurring so fast that the LED's on the diagnostic page didn't even light up. The only way to get it work "properly" was to set the debounce to 5000! That's almost a full second of noise filtration - no good long term. After reading several solutions posted by others with similar problems I tried soldering a 0.01uF cap across the leads at the BOB. It worked so well that I was able to reset the debounce back to 0. Mike
Mike,
Thanks for the detail. I had no idea that 5000 translated to 1 second of delay. No wonder I have to use such a low feed rate for my probe script.


By the way, did you need to use a second wire to GND as part of your zeroing system? I wasn't so lucky so I have to attach a wire to the bit to complete the circuit. If you didn't then maybe that might be another experiment you can try.
Mike
I'm using a Hitachi router. How about you? The bit of that router is grounded to the 110V circuit. I did have an anomaly once. I changed the power strip to a defective or otherwise different unit, and my ground went away. I changed the strip back, and my ground returned. Take an ohm meter from your bit to the 110V ground plug. If you see continuity, you need to change out your extension cord/power strip/or check your shop's circuit ground.

Glidergider
12-02-2007, 04:42 PM
Eureka! I went to the Ratshack and bought a two pack of .01 uF capacitors. $1.49. They were bigger then I thought they'd be.

So, I made a few solder joints, added a couple of pigtails, added a small piece of plywood to support the cap, wrapped it with electrical tape, found a spare Ground on the BOB, and I was working again.

That's a relief to get it solved.

Thanks to all who replied.
Dave

mcyr
12-02-2007, 04:44 PM
Hi Dave,

I'm using a Porter Cable 7301 router. It only has two prongs so nowhere to test for continuity. And I apologize...I made a huge math mistake...5000 on the debounce x 40 usec is 200 millisec, not 1 sec. Sorry.

Best regards,
Mike

Greolt
12-02-2007, 05:03 PM
That's a relief to get it solved.



Glad to hear it's all working again Dave. :)

Greg

Greolt
12-02-2007, 05:15 PM
I went to the Ratshack and bought a two pack of .01 uF capacitors. $1.49. They were bigger then I thought they'd be.



These little monolithics are what I use. Greg

beone
12-15-2007, 12:26 AM
I put one of these on today. I can't believe how well it works. If you don't have one, take my advice and make it It's Great!
Dave

Glidergider
12-15-2007, 12:45 AM
It sure does. Three cheers for Greg!

dewme5
12-15-2007, 11:27 PM
Here's a little different problem. This is also intermittent. Half of the time, the script works great, but every so often, on probe touch, it will pause, then drive another .2-.3 down, and then retract to .5630 instead of just .5, it is adding in the plate thickness .630 as well. This problem so far has not been triggered by anything specifically. starts some times on boot, other times when loading new g-code. everytime I try to use it, I have to pretest in the air before actually setting zero.

The one thing I am doing different, is I'm wired thru a USB game controller, and pulling the probe thru keygrabber.

Greolt
12-16-2007, 12:27 AM
The one thing I am doing different, is I'm wired thru a USB game controller, and pulling the probe thru keygrabber.

I don't think you well ever get consistent results going through USB and third party software.

USB is not used for timing critical tasks.

Greg

Chris Ghent
12-16-2007, 04:21 AM
I am tempted to do this, a couple of questions though...

As I understand this you change tools and then trigger this manually. Without moving x or y it ramps down until it triggers? Then the Z id adjusted automatically and you can hit go for the next process?

You have it running downwards at 500mm/min. Do I read that right? And at that speed it can stop dead so it doesn't plough into the deck? I wouldn't have dared to use more than 1/50th of that if I was thinking this out myself. IF your machine can do that does it mean they all can, or more to the point that my Taig can?

Chris

Chris Ghent
12-16-2007, 04:31 AM
Please ignore my previous message, I posted it after reading the first page not realising there were subsequent posts. Now I have read the lot I realise I have enough to go on with...

Best wishes

Chris

dewme5
12-16-2007, 10:59 AM
I don't think you well ever get consistent results going through USB and third party software.

USB is not used for timing critical tasks.

Greg

This controller I have uses a serial connector that has a usb adapter. would the serial side provide better response. I had gotten the idea of using the controller from this project.
http://www.hossmachine.com/projects_2.html#control%20panel

ger21
12-16-2007, 11:22 AM
I think you'll have to use the parallel port for this to work correctly.

jspencer
12-23-2007, 11:17 AM
Greolt-

Thanks for posting this. It was quick and easy to setup, took me longer to modify my BOB for the pull-up resistor on the input as it has pull downs. Much easier and more accurate than "eye-balling" it. :)

James

Switcher
01-01-2008, 08:00 AM
Lots of great info here, thanks to everyone that posted. :)

.

LeeWay
01-01-2008, 10:19 PM
Greg just sent me the link to this thread. Very cool stuff. I do have a couple of questions. I am having some trouble with an estop firing off sometimes. Not so much now, but I have the debounce set @ 15 or 20 thousand. I am wondering if the cap trick might work on it?
If so, exactly where do I put it? I am using just a plain Jane BOB. I have a really nice one that don't work though. ;)
I am coming out of the BOB on pin 10. Is this where one leg of the cap goes and the other goes to the other side of the switch? I am slightly confused about those caps anyway. I understand diodes and resistors and even led's. The only thing that stores power that I understand is a battery. :)
Sorry for the side track.

Now about this little tool setting gem. I run both a router and a mill now. Just got it up. I know I would need the copper plate on the router for milling my lexan, but on the mill, I always use steel or aluminum. Would I actually have to have a plate in this case? Hmm.

I guess with a long enough cord on it, it will reach both machines. They sit right beside each other. In fact I am going to have to run both off one computer anyway for awhile till I can fix one of the other three I have.
Thanks in advance and great thread.

Greolt
01-01-2008, 11:02 PM
Lee the debounce in Mach does not affect the probe input.

Previously it did but it has not for quite a few versions now.

It would be better if you can get away without a cap on this input. It slows the signal response down. But some systems will need it.

My system simply needs a pull up resistor to act as a clamp. This is sufficient to eliminate noise problems. Without this it is unusable for me.

However every system will be different. Many variables.

Greg

Greolt
01-03-2008, 05:39 PM
I was asked about using the Auto Tool Zero with the Shuttle Pro. So I will post the response here also in case it will help others.

Copy your zero script to a notebook file and save it as M650.m1s

Place this file in Mach3 / macros / Mach3mill folder (or the folder with the name of the profile you use)

Then in the Shuttle plugin assign a button to "Custom macro #1" and put 650 in the Macro number 1 box

Just remember if you ever alter your zero macro, you must do it in both places. Button Script and Macro folder.

Greg

neilw20
01-03-2008, 08:18 PM
Greg

Great work on the Aussie Auto Tool Zero Setter.:cool:

I saw your YouTube video with Vacuun(n) hold down demo.:)

My question, Did you just redirect the suck port on the compressor to the tank?

I have a spare tank on my dead compressor. Maybe I should steal some of the vacuum (into, well out of the old tank), while letting the compressor have some air, so it still works as my chip blower, until I get my dust extractor installed.

I suppose I've just answered my own question, but it's your idea.
Comments Please. I'm in Deer Park. Like to PM for an eyeball.:cheers:

Neil.

Happy snap of a job.

Greolt
01-03-2008, 08:28 PM
G'day Neil

The compressor won't do double duty. As in suck and compress at the same time.

However if you have an old dead compressor, get a cheap ebay vac pump and mount it on top of the old tank.

Add a vac gauge and switch and you will have a great vac source for clamping etc.

Greg

neilw20
01-03-2008, 08:35 PM
Greg.

Looks like I'll have to get a compressor off an old fridge for the suck job.
Paypal not required.

Neil.

Glidergider
01-04-2008, 01:48 AM
Greg,
Have you posted the macro for your laser edge finder? I'd sure like to have it.
http://youtube.com/watch?v=Oc-9gTFj-y4
Great video.
Dave

PS, thanks for the info on the ShuttlePro macro too. Good stuff. I got my ShuttlePro working tonight.
Dave

Greolt
01-04-2008, 02:23 AM
Greg,
Have you posted the macro for your laser edge finder? I'd sure like to have it.


Dave it is posted on this thread. Post number 11.

http://www.cnczone.com/forums/showthread.php?t=48752

Greg

djmartins
01-04-2008, 09:24 AM
EDIT: This is in metric. You will have to change some numbers if you still live in the Middle Ages. :) .......END EDIT

Middle Ages?
I suppose you are correct, since we live in the age of far lower standards and rampant ignorance.
What can one expect from a system developed by a Frenchman who falsified his data to fit his expectations?
Frankly, the metric systems sucks and it was forced on the French people by LAW because even the French thought it sucked.
What is even more amusing is how many places are slowly going back to the old systems in spite of decades of government Metric mandates.


regards,
DJ

Greolt
01-04-2008, 04:06 PM
:p:p What more can I say ????? I rest my case. :D:D:D

neilw20
01-04-2008, 06:14 PM
110v, NTSC.
I have metric mill, imperial lathe, japanese car.

BOBINETTE
01-07-2008, 04:10 PM
Hi, I'm a frenchman that was impose to the metric system, as a mather of fact the metric system is much easier than the imperial one, one big advantage is that it doesn't have fractions. As an example: take 27 1/2 inche and devide this by 3 !!!?, now take 27mm and devide it by 3 ?

MrWild
01-07-2008, 04:49 PM
Bobinette,

Quite simple really. Just go decimal inch and it is every bit as easy as metric. 27.500/3 = 9.16666----

djmartins
01-07-2008, 05:55 PM
Bobinette,

Quite simple really. Just go decimal inch and it is every bit as easy as metric. 27.500/3 = 9.16666----

Yeah, I too find it funny that the metric snobs always claim there are no fractions in the metric system therefore it is better.
Here's one situation that makes the metric system really hurt: what if you and two of your friends go in business together and buy and split everything three ways?
Easy to do in imperial, hard to do in metric.


regards,
DJ

Glidergider
01-07-2008, 06:11 PM
Hey guys, you're bugring up my favorite thread with your discussion of metric vs inches/feet. Nobody wins this argument. Please take it outside.

In closing, I think we all agree, more power to the base 10!

LeeWay
01-07-2008, 06:36 PM
Becoming proficient with both is where it's at.
Now I know this is still a little off track for this thread, but I am still having difficulty with a faulty estop. Today I even used an isolator chip that runs off 5 volts to try and correct the issue. It didn't work for some reason. I have tried a couple different value resistors inline. Should they even be inline? Should they jumper the switch? I have also sleeved the estop cable with copper braided shielding and attached one end to the case. I now have the debounce set @ 24,000.
I am using the same control box on my router though. Just switch the motor plugs and go. I haven't tried setting it to 0 on the debounce, but I don't get the errant ones in mid program. Any ideas?
I only posted this here, because some of you seem to have figured out the debounce thing and I am unsure how to correct it at this point.
Thanks.

Glidergider
01-07-2008, 08:27 PM
Hi LeeWay,
I did conquer the circuit based debounce for the zero Z macro. It's not without issues like a small delay, but well worth the trouble. Here's a schematic I would use for an E-stop debounce circuit. I actually don't have an Estop working right now because of laziness. If my stepper motors over-run the table, no big deal, the machine is not going anywhere.

To all,
Please review and make sure I got this circuit correct, as I do plan to implement sometime in the future, and I don't want to publish incorrect info.

Should there be a resistor in this circuit?

Thanks
Dave

mcyr
01-07-2008, 10:50 PM
Hi Dave,

I can't really read your drawing very well. Is there some other format that could be used?

By the way, I'm now cutting asymmetric elliptical planform wings in foam ala Pearson of Encore DLG fame. They're pretty crude because I don't know diddly about the correct bits/feedrate/rpm's etc. So much to learn, but really rewarding. Now I'm learning the fine art of making jigs to hold things in registration...Plus figuring out a good way to keep MDF dust from going all over the place...

Best regards,
Mike

Rodm1954
01-08-2008, 03:54 AM
Hi Dave,

Yeah, a cleaner view of your drawing would be good. From what I can make out you have the cap on the output side of the 5 volt.

I think the problem we experience with EMI is that anywhere along the wire leading back to the parallel input it is prone to EMI. My thinking places that cap close to the input signal to take out and hold the small EMI spikes.

Now I have to say electronics is mumbo jumbo to me so if I am totally wrong it would be nice if somebody (politely) points me in the right direction. :)

joecnc2006
01-08-2008, 07:34 AM
The drawing is pretty clear to me, if you use a lower screen res. just save the image or click on it to enlarge it.

resistor is from ground on BOB and to the line from the 5volt on BOB to the e-top botton, then estop bottom to the input pin you will use for the e-stop (alot of people use pin 10 i think).

Joe

LeeWay
01-08-2008, 10:05 AM
I can see the drawing pretty well once I click on it. I am using a high res screen though.
It shows a .01 Capacitor rather than a resistor.

I am not actually using a 5 volt pin either, but pin 10 or 15. Tried both. What I haven't done is to check the actual voltage I am getting through the circuit. I will do that next. My ports are the PCI add in kind from Netmos. Perhaps I may need to change the type of mode they are in using the Bios? I am not sure if they are EPP or what. They are whatever the default is though.
This is a Compaq machine with dual core Intel and it did not come with a PPort. This is the wave of the future I think and a sign that some of these guys developing USB alternatives will have a good market later on. :)
Else we'll all be using G100's.

neilw20
01-08-2008, 10:12 AM
With care because this will disable the EM switch, disconnect at the BOB and bridge out then see if you create the problem. This will help prove whether the fault is garbage into the BOB, or garbage into the PC on the PC side.

Put the 0.01 capacitor from the input (which is the emergency stop line) to ground RIGHT AT THE PCB
If it still needs more snubbing try a 470 ohm 1/4 w in series with the EM wire.
That is, between the E-Stop and the 0.01 cap, right at the input.
The placement of the parts relative to the interference is important. It is not sufficient just to put it anywhere.
If EM gets stuck on, the the 470 value needs reducing.
You talk of pin 10 or 15. Isn't that on the PC side?
If you are going to bypass any of the PC pins that needs to be RIGHT AT the DB25 connector on the PC.

Glidergider
01-08-2008, 10:34 AM
Guys, sorry you're having trouble with the drawing. When I click to enlarge it, it's crystal clear.

Leeway,
If you are not using a Parallel port, you are beyond my capability to help. Sorry.

Neil,
What is a EM switch?

Dave

LeeWay
01-08-2008, 10:57 AM
Here's the setup.
It is a simple BOB with no frills. I actually have a 203V back in there now in place of the 201. Had a little lizard trouble. ;)
I think I may have figured something out now though. The mother board and computer PS in this control box are not working right now. The computer running the machine is just sitting on a shelf back behind this box. When I grounded my shield cable, I did so to this control box and not the actual computer running this. I think this may be where I am having some trouble from. I have never had any noise issues in this box with Xylotex before. I didn't have any issues while the installed MB was up and running either. Perhaps this may be a light bulb moment for me. :)
Thanks for all the help guys. I'll check back in later with some kind of results.

PS. I am using a parallel port, but is the add in kind where you stick a card into the mother board. Just not on board or built in like they used to be.

50146

Glidergider
01-08-2008, 11:29 AM
Lee,
Your add-in Parallel port should work OK. It sure would be good to see an schematic of your circuit. The words, so many words, I get confused so easy.

However, if you figured out your problem and it's a ground fault, then never mind, glad it's fixed.
Dave

Greolt
01-11-2008, 04:00 AM
EDIT: I had a post here but on second thought I think it was answering the wrong questions. So I pulled it. :)

Leeway I see in the pic you are not using a buffered or isolated BOB.

The following is lifted directly from cnc4pc website re basic LPT conection board. So authorship and ownership is theirs and so acknowledged.

Do not use this board for wiring Geckodrvies, these drives require 16
milliamps signals, the parallel port can only deliver 10 milliamps.
Using this board for these drives can cause lose of steps and unreliable operation.

Further to this I believe that direct connection to the LPT will mean that your estop can not be wired as per the circuit posted earlier.

Inputs on a LPT are (I believe) high when at rest so need to be bought low with a switch (wired to ground or 0 volts) to change state.

Greg

Glidergider
01-11-2008, 09:49 AM
Greg,
I'd like to see that modified circuit. Can you post it anyway.
Dave


Put the 0.01 capacitor from the input (which is the emergency stop line) to
ground *RIGHT AT THE PCB*
---End Quote---
Leeway do what Neil said. If this does not fix your problems I'd reckon you
have other issues and it's not noise on your estop.

Below is a *modified* version of the circuit pic that was posted before.
Greg

bigbigjimb
01-11-2008, 10:04 AM
Hi
I am no expert at this Electronics but i need some help on this Tool Zeroing.
I am using a CNC4PC Noard (C11G)I have connected the 2 wires one to pin 12 and the other to the 5V beside it and the pins are set to Active Low the two wires are linKed together.Bear in mind this is just a test setup.
When i start the tool Zero the Z axis comes down as it should and when I touch the spindle with the wires it stops and the machine needs a reset surely this is not what should happen and what am i doing wrong.
Jim

Greolt
01-11-2008, 04:24 PM
Jim

Not sure whats going on there with the resets. Maybe you have something set wrong in "Ports and Pins". Perhaps two inputs sharing one pin number.

However the main problem will be that the BOB you are using has on board circuitry that pulls the inputs low.

The BOB makers are very fond of doing this. It is fine if you are connecting a limit, home or estop switch.

However this Auto Zero system as I am using requires that the input is high when at rest and bought low by touching the plate to machine ground (tool)

Greg

LeeWay
01-11-2008, 04:53 PM
Thanks Greg. I saw your edited post. The 203V Gecko's are able to use low voltage inputs from 2.5 to 5 volts, so these have no trouble using a direct connection. Not really direct either because these are optically isolated in the drive, rather than they would be on a higher quality BOB.

I am now unsure just how to test voltage on say pin 10. When should it read any voltage? I am not supplying any, so does pin 10 supply the voltage to go high on it's own, or will I need to provide it? I think that is how the previous drawing was labeled. If so, I ain't doing it right. :)

I will have to test it some more when I get a chance. It continues to faulty stop about every third job I run. Not that big a deal, but now it's set @ 25,000 debounce, so it's really kinda slow. ;)


bigbigjimb, it sounds like it thinks your zero tester is a limit or an estop rather than what you want it to do. It does sound like pin settings or conflicts on that.

Greolt
01-11-2008, 05:24 PM
The 203V Gecko's are able to use low voltage inputs from 2.5 to 5 volts, so these have no trouble using a direct connection.



LeeWay it is not the voltage that matters but the current that the LPT is capable of handling.

However I just posted that for your info. If your setup is working that's good.






I am now unsure just how to test voltage on say pin 10. When should it read any voltage? I am not supplying any, so does pin 10 supply the voltage to go high on it's own, or will I need to provide it?




Pin 10 should be at 5v when nothing is connected. That 5v is coming from the computer (LPT)

If I was using your setup I would make a two wire touch plate. One wire to the plate and one to a alligator clip.

Plate to pin 10. alligator clip to any pin 18 to 25




It continues to faulty stop about every third job I run.

Probe input will not trip an estop. It must be coming from somewhere else.

If you are using a fairly up to date version of Mach then debounce setting does not affect probe input.

Do you have an estop switch connected? Do you have limit or home switches?

Greg

bigbigjimb
01-12-2008, 04:39 AM
Hi
From the response I gather that the wiring is correct?. If so then i probibly need a 3K resistor and i presume that goes between the 2 linked wires and the copper board?
would anybody have any suggestions with the pin settings.?
I have notices that If i leave the head to do its own thing once the button is activated It moves 1mm i think and then stops and returns to zero is this correct/
Jim

Greolt
01-12-2008, 05:36 AM
Jim I'm sorry but I don't follow very well what you are asking.

The best thing I find when trying to help people get this running is to forget about the zero script and buttons etc. for now.

Just concentrate on getting the "Digital" LED on the diagnostics page to change state when touching the plate to the tool.

When that happens then the rest will fall into place.

Greg

bigbigjimb
01-12-2008, 06:01 AM
Greg
OK, I have the light on MACH3 going on no problems there.

It is when i activate the Auto Zero and earth to the Machine Body that it just emergency stops the machine just like I pressing the E-stop.
So I am asking if I need a Resistor and is it 3K that is used.
And what else might be causing the machine to go into emergency Stop Mode.
Jim

Greolt
01-12-2008, 08:17 AM
OK you better zip up your XML and post it so I can have a look at it.

Greg

bigbigjimb
01-12-2008, 01:08 PM
Greg
For Some reason i cannot attach the file here. How can i get it to you
Jim

Greolt
01-12-2008, 05:29 PM
Jim if you zip it you will be able to post it

Greg

bigbigjimb
01-12-2008, 08:07 PM
Managed to do that at last
Jim

Greolt
01-12-2008, 08:42 PM
Jim you have no port and pin set to probe.

You mentioned you want to use pin 12 so it needs to be set like in the pic.

Greg

bigbigjimb
01-13-2008, 04:46 AM
Ahhh, Its Probe I had used Input#1
Thanks for that
Jim

bigbigjimb
01-13-2008, 09:37 AM
Greg
I set up the probe as in your screen Print and It still triggers an emergency stop.
Jim

Greolt
01-13-2008, 04:36 PM
Jim send me a PM.

Inputs are pins 10 to 13 and 15. Make a list of all the connections you have to each of those inputs.

Estop, limit switches etc. and whether NC or NO. Mechanical or otherwise.

If they are hooked to 5v-input or ground-input. Any pullup or pulldown resistors or filter caps.

What BOB if any you are using.

And your email address.

Greg

neilw20
01-13-2008, 08:03 PM
I have trraced and drawn the X3 BOB if you need it.

edmond
01-14-2008, 03:22 AM
Hi Guys

I finally made one of these auto tool setters following Greolts excellent instructions. I have set the Z retract at 6.35mm in the VB Script Editor as well as setting the plate thickness as 1.5mm in the plate thickness DRO but it seems to add the plate thickness and Z retract distance together resulting in the cutter not plunging in the workpiece ie the Z is set to high.The LED comes on when I touch the plate on the cutter, and the probe does work it just seems the Z lifts up to much.Pls Help

Thanks
Edmond

Greolt
01-14-2008, 04:15 AM
Edmond

Copy and paste the script straight form the VB editor into a notepad text file and post it here so we can have a look.

Greg

EDIT: "Copy and Paste" not "Cut and Paste". :) Thanks Rod for pointing that error out.

epineh
01-14-2008, 04:37 AM
Hey Greg, I don't want to hijack your thread, but I am kinda thinking out loud here, would it be possible to use a tool zero setter on a lathe?

My thinking is that if there is enough travel for the tool to reach the tailstock, touch off on a plate or the tailstock itself and apply offset to centre.

Russell.

Greolt
01-14-2008, 05:02 AM
Bigbigjimb and I have PM'd and he had some inputs enabled in "Ports and Pins" that had no connections. He will be disabling them.

Worth mentioning here that if you have no Estop connected (naughty :)) then because Mach will not allow you to disable the input it is
best to set it to port 0 and pin 0 to stop Mach sensing any stray noise on it.

Second issue is a common one.

Many of the BOB manufacturers, including cnc4pc which Bigbigjimb has, build in pull down resistors on the inputs.

Fine idea for estop and limit switches, bad idea for an input that you want to use for the Auto Tool Zero device as described in this thread.

We need an input that is high when at rest and bought low by grounding. The standard LPT configuration.

Experience of the last couple of months since starting this thread has taught me that it is too difficult for me (just a carpenter) to direct
someone with even less electronic savvy than myself on the other side of the world via email how to overcome this problem.

So I am no longer going to try. I'm sorry about that, perhaps someone else can.

If you have a spare input that is high when at rest then this device is very simple to implement.

If you don't and don't know how to achieve one then perhaps this device is not for you.

Greg

Rodm1954
01-14-2008, 05:10 AM
Greg
I think you have done a great job introducing and encouraging others to set up this simple yet very effective addition to a CNC machine.
To set yourself up as helpdesk is another thing so fully understand your postion on this.
Don't stop posting more of your CNC trinkets though. :)

LeeWay
01-14-2008, 07:11 AM
Greg, the info already given and contained in this thread should help many implement this touch off tool. I didn't help much throwing in an odd ball question about an errant estop either, but the info given about it may also help others. It's all now down and documented, so your work on that end of it should be done. ;) I want to thank you for the help you have given freely and hope to see some more cnc goodies from you.
I never have had a chance to resolve the estop, so I just emulate one with the spacebar on the keyboard. This seems to work well enough until I get a little more time. Thanks again.

bones
01-14-2008, 07:52 AM
Hi Guys,
I'll jump in and say a few things.
First off, great work Greg. I've seen Rod's running and got Steve's running on the weekend.

If you are using a parallel port card, You may get into problems with it working. Especially if you use a xylotex board.
The xylotex board allows the Parallel port card to go straight through to the terminals and some add on cards just don't work for inputs.

The cnc4pc card has a buffer chip inline which can fix this problem.
But the inputs are pulled to ground via a resistor. Normaly you would want this but in our case we want that resistor on the input connected to 5V.

You can fit a resistor between 5V and the input you are using BUT you will have to remove that resistor that connects that input to ground.
This will void your warranty for the card and if you don't know what you are doing can wreck your card.

The add on cards are fine for driving your motors, so if your not electronic savy get an add on card to drive you motors through your cnc4pc board and get the C13 basic breakout board for inputs eg for the Z zeroer.

Cheers
Rodney

Greolt
01-14-2008, 03:53 PM
Leeway, Rod and Bones thanks for the comments.

Maybe I should clarify, I am not taking my bat and going home. :)

I'm still here re implementing this device but am not the right person to direct those who do not have an input that is high at rest, how to achieve it.

What I could do on site in minuets with a multi meter in hand, I find too difficult to do over email. BOB manufacturers do not provide circuit diagrams.

Unless the person has a reasonable electrical understanding themselves I am not the best person to help.


Edmond how did you go with that script?

Greg

Greolt
01-14-2008, 04:19 PM
Hey Greg, I don't want to hijack your thread, but I am kinda thinking out loud here, would it be possible to use a tool zero setter on a lathe?

My thinking is that if there is enough travel for the tool to reach the tailstock, touch off on a plate or the tailstock itself and apply offset to centre.


Russell

I am not familiar with the requirements of a CNC lathe but the probe input in Mach can be adapted for use in all sorts of ways.

By combining the electrical signal side with an appropriate script I'm sure what you want could be done. :)

Greg

edmond
01-14-2008, 11:57 PM
Hi Greg

Attached is the script in notepad format.I used the Modified 1024 screen that was provided in this thread so the script was already encoded in it so it should be good.I just type in the plate thickness in the DRO and run the macro, is that right nothing, gets typed in the Z DRO right.Thanks for the help

Edmond

Greolt
01-15-2008, 01:31 AM
Edmond

I can't see any problem with the script you are using. Although I would suggest slowing the probe move down to 100mm/min.

Here is the same script but a bit updated.

It has a two second delay then a probe move of 20mm at 100mm/min and a final retract of 6.35mm.

This new one also returns the modal feed rate that was in effect before the script was run.

Try it to see if the slower probe move makes a difference.

Also note that the plate thickness needs to be adjusted to get the final result accurate. Measured thickness is used as a starting point.

And if after trying that it still looks strange, then open the VB script editor via "Edit Button Script" and step through it one step at a time and see
if you can spot an error happening. Position the editor window so you can see the Z DRO in the background.

Let us know how you got on

Greg

Rodm1954
01-15-2008, 02:05 AM
Edmond,
I'll chime in here. I couldn't see anything wrong with the code either. Was wondering if your plate thichness has been entered as a negative as this could cause an unexpected result. Just make sure there is a plus sign in front of the figure in the DRO for Plate thickness.

edmond
01-15-2008, 02:31 AM
Thanks for the help guys.I will try the new updated script tonight and double check that the plate thickness is a positive.Gotta go now at work at the moment.Thanks again for the speedy reply.Will let you guys know tomorrow if I got it to work.

Edmond

Greolt
01-15-2008, 02:36 AM
Rod I think Edmond is using the screenset I posted up a while ago.

The plate thickness DRO on screen does not have a pos neg facility.

This was on purpose and is something you can set when making the screen in Screen4

Cricket starts tomorrow over your way. I'll be watching on the TV. :)

Greg

EDIT: I take that back. I was wrong. :withstupi

You can still enter a negative number but it does not show a pos by default.

So Rod was absolutely correct. Sorry Rod. :o

Rodm1954
01-15-2008, 03:43 AM
Edmond
I may have worked out your problem -here's hoping. Mach3 has a quirk that you have to press "enter" afer placing a value in the Plate Thickness DRO. If you haven't pressed enter then when you shift focus with your mouse you will find it returns to the original value - probably 0.00. Easily checked as you should see the plate thichness you want displayed in the DRO when you open Mach3.

Greg,
We have the perfect weather at the moment for cricket but it is going to warm up on the second day. I might even work up a sweat watching it. :)
You are right about this help thing as there are so many variables in this simple extra that you do not think about. It is much easier to troubleshoot when it is all in front of you. I set the DRO + & - on my screen for obvious reasons. :)
I also put speeech on mine as the count down means I do not have to look at the screen while it is setting.
Steve fitted a touchplate on the weekend and is thrilled.
Enjoy the cricket.

epineh
01-15-2008, 05:30 AM
Hey Greg, I was just thinking, (here we go again :)). First of all as others have said, great work on the tool setter thread, I realise it has been a lot of work for you but a lot of people have really benefited from this thread and your other threads.

As for the Break out board, would you be interested in giving me your "requirements" as such to make things easier to setup a machine?

I am prototyping a couple of designs at the moment and trying to work around the parallel port limitations. My main goals are :

Charge pump.
Buffered, not optoisolated outputs (from the PC) this will solve the 2.6mAmp current source problem, allowing active high/low compatibility and at the same time will invert signals as required.
Onboard relay's, though if all relay outputs are used it takes up a lot of room.
Optoisolated Inputs (from the machine)
R/C filtering

I know it will be more work for you but if you PM me the exact requirements I can do the layout within a week of getting your PM, etch and populate the board components and post it to you to test. If it works you can keep the board F.O.C. and we will post the layout/schematic/parts list as an open source project.

I know there will never be "One BOB to rule them all" but I am sure we could make a nice clean design aimed at the more serious hobbiest.

Cheers.

Russell.

LeeWay
01-15-2008, 06:00 AM
I like the idea of a dedicated user friendly bob. A buffered one rather than optoisolated. I have even considered using a project board from Radio Shack and building a simple one myself. The extent of my electronics building was a little metal detector kit years ago. It did work though. ;)
The plain Jane BOB I am using does work with 203V's and 201's. I imagine it would work with Xylotex as well. It is not without problems though and I suspect buffering would cure most of those woes.
Different computers also make the mix a little lumpy.
I think it will always be a challenge to get everything running on the same page for the hobbyist with so many different types and designs of hardware. Having another choice for a bob's design may certainly help to smooth the road for many.

http://www.winfordeng.com/products/pic/brk25f-r-ft_large.jpg

Greolt
01-15-2008, 06:31 AM
As for the Break out board, would you be interested in giving me your "requirements" as such to make things easier to setup a machine?



Russell I'm not so sure that I'm the right person to be specifying a BOBs requirements. Everybody has different thoughts on what is important.

For instance I am not so hung up about optoisolation although buffering is good with most modern LPT being a bit low on voltage.

If I needed a basic BOB tomorrow I would get one of cnc4ps's C10 board (cheap) and alter it to my requirements.

Pminmo who is a cnczone member has a site with some BOB designs which I believe are open source. http://www.pminmo.com/

As for requirements relating to this thread the only thing is one input that is high when at rest and bought low by grounding.

I'm not sure why the BOB manufacturers are fond of building in circuitry to hold all the inputs low. But then I am not an EE. Just a dumb carpenter. :)

Greg

epineh
01-15-2008, 06:36 AM
It is hard to make a BOB to suit every application, there are just so many variables.

For instance if the driver isn't optoisolated, then the BOB probably should have this, if the driver is opto'd then the BOB does not need any. And so on with every other combination of other variables.

The board you posted is similiar in design as one I am using on a little lathe retrofit at the moment, straight through, no bells or whistles. This would work fine in most cases, though it would suit drives that are buffered/opto'd.

Add servo E-stop/enable/fault logic and you have opened another can of worms... and so on...

I just hope I haven't caused Greg a nervous breakdown now :D I understand if you do not have the time for this, and obviously you have a working system anyway so the BOB will be redundant for your system, but you could always build ANOTHER machine :)

Russell.

epineh
01-15-2008, 06:48 AM
Greg you are probably right, there may not be a need for ANOTHER BOB out there, guess I got a little excited. The CNC4PC boards are quite neat by the way, thanks for the link.

Phil (pminmo) does have some good boards on his site.

I am no EE either, just a dumb electrician :D

Russell.

LeeWay
01-15-2008, 05:58 PM
Well, Guys, I did manage to get the estop working again. It was something Greg said that clicked in my brain about the active high thing.
Anyway, I am just using an on off machine switch for the estop. It works now because I opened the switch and set it active low. No more need to set the debounce up high. This isn't the correct way to do it, but it sure is nice to run a full job without an errant estop. :)

edmond
01-16-2008, 12:11 AM
Hi

Greg, I tried the new script you gave me last night still does the same thing adding the plate thickness and z retract.

Rod, you are right, I remember when I open Mach3 there is no value in the plate thickness DRO so its just a matter of making sure I press enter after entering the value, or maybe I must just hard code the value

Thanks for all the help, will check if it works when I get home tonight and let you guys know tomorrow

Edmond

Greolt
01-16-2008, 01:21 AM
Edmond for whatever reason the script must not be entering the "Plate Thickness" amount in to the Z DRO at the appropriate time.

At the point it should do that in the VB script, the DRO must be going to zero instead.

Therefore when it moves on to retract the set amount (6.35mm in your case) it starts from zero at the top of the zero plate instead of
say 1.5mm or whatever you have set in the plate thickness DRO.

The only reasons I can think of is,

1. The Plate Thickness DRO is set to zero

2. The DRO number that was assigned in the screenset has gone wrong for some reason and the script is trying to read a non existant DRO.

The script looks for DRO number 1151. If it does not find it instead of entering the correct amout it enters zero in to the Z DRO. Then moves to the next command in the script.

I suspect it will be one of those two scenarios.

Greg

edmond
01-16-2008, 11:53 PM
I got it to work properly, it turns out I wasn't pressing enter after entering the plate thickness just as Rod assumed.I have fine tuned the plate thickness and tested the Z retract with a 1/4" height gauge, its now 1/4" on the dot'.Thanks for all the help everyone and thank you Greg for providing the scrip, instructions and support for this wonderful time saving device

Edmond

bones
01-17-2008, 10:33 PM
Hi Guys,
Well I desided to stop talking about it and make one for the work machine.
It couldn't be any simplier.
One wire solded to pin 13 on the DB25 connector inside driver box (600W Servo driver/power supply box).
And the other to a piece of PCB.
The only problem was trying to find where to put the plate thickness value in.
I went through every screen looking for it and had to ring Rod.
He tells me it is below where you click "Auto Tool Zero".
Oh yeh so it is. Bloody male blindness.

Lucky no problems with the parallel port or windows, so it worked straight away. I Jagged that one.

BUT! no countdown. Has anyone had that problem with Windows 2000.
I can get the narrator running and tell me every windows that pops up.
And installed to control panel icon. SAM will talk to me.
But nothing in Mach3. And yes I have enabled Speech in Mach3.

Any idea's?

Cheers
Rodney

Greolt
01-17-2008, 10:42 PM
G'day Rodney

The DRO does not exist on the standard screen so they are all custom screens. So it could be anywhere. :)

All sorts of custom screen alterations or complete new screens out there. Screen grabs of few examples below.

Rod is the only one I have heard of that has made his Auto Tool Zero talk to him.

The speech facility in Mach must be be used by some for various purposes though.

I would make a request for info over at the Artsoft site. See if any one else is using it.

Greg

bones
01-17-2008, 11:01 PM
Hi Greg,
Thanks. I got the screen off Rod. It was staring me in the face, but i didn't see it. It works great.
I'm still waiting for my cross hair lazers to turn up.
I am thinking of fitting a USB cam aswell and use those cross hairs built into Mach3. I have a spare one here somewhere.

Cheers
Rodney

Greolt
01-17-2008, 11:30 PM
I have one of those I use on the X3.

They are remarkably accurate. You can clearly see when you move the axis 0.001"

However to get that sort of resolution they need to focus from just a few mm away form the object they are looking at.

So they don't lend themselves to being fixed permanently in position as do the lasers.

They are commonly fitted to the spindle, used and removed.

From a fixed position much higher I suppose you would get similar accuracy to the laser but then the laser is simpler and more robust.

Greg

bones
01-18-2008, 12:13 AM
Hi Greg,
I have a play with them anyway and have the lazer aswell.
With the touch plates too. I coated Rod's with a Tinning solution.
It didn't turn out too bad but it needed a bit more tinning solution.
You can get it places that sell PCB's. It comes in a packet crystalised and you just mix it up with warm water.
A good consentrated mix gives it a really nice silver coating.
And the best part is that it's non oxidising.

Cheers
Rodney

lovebugjunkie
01-30-2008, 03:16 PM
Been watching this thread for a few months. Thought it would be a nice addition to my router when I got it.

Well I got the router the first week of Jan (Romaxx) and after Ron (owner of Romaxx) helped me with my Mach3 configuration it is now working. Sure makes setting the Z-axis quick and accurate from my paper/eye ball method.

Thanks to Greolt for posting the script and Mach 3 screen change, sure made this an easy addition. (Not to mention low cost, to what I almost purchased on the internet)
George

bigbigjimb
01-30-2008, 10:17 PM
Hi
What screen set are you guys using for cross hair lazers is it available somewhere
Jim

neilw20
01-30-2008, 10:40 PM
Somne of the pointer pens come with an array of little masks.
Starsm crosses T's, aniamls etc.
Little mask that sits at the focal point between laser and the lens.

Greolt
01-30-2008, 11:52 PM
Hi
What screen set are you guys using for cross hair lazers is it available somewhere
Jim

Jim look over at this thread

http://www.cnczone.com/forums/showthread.php?t=48752

All the info and screens are there if you trawl through it. :)

Also a link to the laser I used.

Greg

fourxfour2
01-31-2008, 03:32 AM
Hi guys, I don't post much but I have been watching this thread and have been playing with the Mach screen 4..with whats been posted I think it's time to try this on my router..
Just one question....I thought I read that someone had done this with the X,Y axis also...and can it you bring the tool to a predetermained spot ...like touch off in X with a 1/2 EM and have Z retract and the tool move to its CL and then Zero the DRO.
Thanks again to all .....

Greolt
01-31-2008, 06:16 AM
I believe that Ron Ginger who looks after the New Fangled Wizards development has done this.

Do a search over at the Artsoft forum.

Greg

fourxfour2
01-31-2008, 09:09 AM
Thanks Greolt I'll post the same Question over there.....

touser
02-27-2008, 05:06 PM
Hi everyone, i am in the process of trying to build one of these, my BOB is a sound logic PC-2-Route Model M2 rev. 1.7 my problem is there are no 5v lines on this board that i can use from what i can tell. The signal line is reading 10.3v and the only other option is 12v. Can i use the signal or 12v line? Also, when i measure any of the outputs on the board with a volt meter, whether its the +12v or the signal lines if i ground to anywhere but the board itself i get no reading. Does anyone know what i am doing wrong? Thanks!

Greolt
02-27-2008, 06:32 PM
I don't know what is going on there Touser

5v logic level signals are fairly universally used when connecting to a Printer port.

I would talk to the BOB manufacturer.

What you need is an input that is high when at rest and can be driven low by connecting to 0v/ground.

Greg

bones
02-27-2008, 07:24 PM
Hi Touser,
If you look at the very last wiring diagram in this document it shows you how to wire for using a ground.
http://campbelldesigns.net/files/pc%202%20route%20for%20mach%20rev%201-9.pdf
Make sure you set the pulse input in Mach3 to active low. This might be the other way if using a BOB.
The other problem is that the ground of the machine and the BOB are probably isolated, so you will need the ground from the BOB input to clip onto the milling bit when you are setting up.

Cheers
Rodney

Greolt
02-27-2008, 08:20 PM
Looking at the diagram Rodney pointed out it should work fine. Good setup with that BOB.

You may or may not get away without the Crocodile Clip. Depends whether that ground labelled "Router Gnd" is already connected to the machine or not.

Greg

touser
02-28-2008, 09:41 PM
Thanks everyone for the help. I ran an extra wire to the ground on the BOB with an alligator clip as you suggested and that seems to have done the trick. However, i am running it off the Auxlim input on the BOB, labeled J11, so i typed port 1 pin 11 into the Probe input under Input Signals, and that is triggering the LimitOV light on the diagnostics page of mach3. Although if i change it to port 1 pin 12 the same LimitOV is triggered. Is that going to be alright? If so, how do i edit the program run screen LED to light up when LimitOV is triggered?

bones
02-28-2008, 10:09 PM
Hi,
I don't know what is going on there.
Make sure the LinitOV input is not enabled and set to port 0.
Set the probe input (on the input page) to the port you are using.
When you touch it on the ground it should light up the digitize pin in diagnostics page.
Have you downloaded the sceen from Rod or Greg?

If when you short the zeroer out on say Rod's screen(setup page), the Touch light should come on. If it does then test it by clicking the "auto tool zero". After moving 30mm it will come back up. You have to touch it before it reaches there.

Cheers
Rodney

Greolt
02-28-2008, 10:19 PM
Touser the best way to get it going is forget about on screen buttons and scripts for now.

Just concentrate on getting the "Digitize" LED on the diagnostics page to come on when you touch the plate to ground/clip.

When you get that, the rest will fall easily into place.

This mostly means getting "Ports and Pins" set up correctly.

As far as "J11" is concerned, that may or may not be pin 11. Check in the BOB PDF.

Make sure no other input is sharing the pin number.

Let us know how you get on.

Greg

Greolt
02-28-2008, 10:38 PM
Touser

I had a look at the PDF for your BOB

You should be using "Aux Home" or also called "A Home" This is pin 15

Looks like the Limit inputs are tied to Reset rather than pins. Don't use these for probe.

Greg

touser
02-28-2008, 11:22 PM
You guys are great, i hooked it up to the Auxhome input per your suggestion and the lite works as it should now. Thank you again!

erniebro
04-08-2008, 05:20 PM
Thanks for all the info on putting together the depth finder. I expanded on this idea a little and came up with a version that also does edge finding and centering. I put up a new thread here: http://www.cnczone.com/forums/showthread.php?p=436238#post436238

Thanks again for all the info.

-Ernie

adrian.nicholls
04-09-2008, 07:11 AM
Hi guys,
Im wondering where i can download rods screen set with the auto tool zero button and led, and ??

Thanks
Adrian

Rodm1954
04-09-2008, 07:44 AM
Adrain,
If you want to PM me your email address I will send you the screen set.

dgoddard
04-09-2008, 08:36 AM
This may sound like a dumb question to those who have used Mach3 for awhile. I'll a novice and have used it for about a year and love it but have stuck with standard screens. Question: Do the screens noted completely replace the standard ones or can you select between the two?

Rodm1954
04-09-2008, 08:46 AM
You add new screens to the existing set. I use screen4 to create them. You can download Screen4 for free on the Mach3 site and there is a video that shows you how to use it.

adrian.nicholls
04-11-2008, 01:56 AM
Thanks rod, my e-mail address is

adriannicholls8117796@hotmail.com

Thanks

Mr.Chips
04-11-2008, 03:32 AM
You add new screens to the existing set. I use screen4 to create them. You can download Screen4 for free on the Mach3 site and there is a video that shows you how to use it.

Hmmmm I went to the Mach3 screen downloads and did not see a "Screen 4"
Where would I find it.

Thanks

Greolt
04-11-2008, 04:44 AM
This may sound like a dumb question to those who have used Mach3 for awhile. I'll a novice and have used it for about a year and love it but have stuck with standard screens. Question: Do the screens noted completely replace the standard ones or can you select between the two?





You can do either. I have screens that I built from scratch. Also altered the standard set to suit someone's needs.



Hmmmm I went to the Mach3 screen downloads and did not see a "Screen 4"
Where would I find it.





Screen4 is here, http://www.machsupport.com/Downloads/Screen4.zip

amen23
05-07-2008, 07:35 PM
Hi greg

Do you have schematics of your set up or could you possibly help me set mine up...... i have read the entire thread and still dont quite know where to begin with this 'auto zero'. I got 3m X 1.6m router cnc and its pissing me off everytime i have to get up and walk over to the far end to line things up!

Just to clearify - I know nothing about electronics ..diddly ... nada ... I know more about osama binladens latest hiding spots than i do about electronics.(i think you're getting the picture here)

Anyway ... I got a 4 axis alien cnc driver board .....i bought it because it was simple 'plug and play' ..... everthing about the board can be found here ...
http://www.sebbylive.com/Articles/Projects/Hardware/CNCMill/MotorController.aspx (including the photo)

the pdf file on the website isnt working ...here is another in pdf.format ......but its only a single axis (pretty much the same)......

http://www.chatzones.co.uk/discus/messages/5557/datasheefortaliencnc1axis-6045.pdf

This is the only documentation i received with the board and since this guy has gone out of business and his website no longer functions ...i can't really ask him.

I'm using the lastest version of mach 3.
(2.6 i think --is licenced)

Its a brilliant board , I've never had any problems with it and dont want to 'fry' it ..... hence the help needed.

I schematic would really be appreciated ..including all the wiring ect ..how to locate pins ..or test for them

thanks
don

tpworks
05-07-2008, 09:33 PM
oops:confused:

johyn
06-12-2008, 09:48 PM
Seems that it would be possible to use this to set x and y also...

amen23
06-18-2008, 02:55 PM
not to worry....... its fried ....getting a new one

don

jeb
07-30-2008, 06:06 PM
Hi all,
I've been using this lovely auto tool zero for months without any problems......until a few days ago. I was zeroing the tool after running a toolpath, the z came down until the tool touched the plate, paused slightly as it usually does, and then plunged in 25.4 instead of retracting 25.4. Thank god I was on top of two inches of foam! I have done some testing and have not been able to repeat the problem. Any ideas?

ClaudioG
08-13-2008, 12:41 AM
Well setting up this great tool has been on my to do list since first seeing it about 8 months ago. I've got a WidgitMaster Wide Router (and Midi) with a HobbyCNC Pro driver board.

As someone else said previously, it was so easy to setup I can't believe I didn't do it sooner.

The HobbyCNC Pro board has input pins 10, 11, 12, 13 & 15 with integrated 10K pull-up resistors, so it was just a matter of;

- connecting a wire from pin 15 to the touch pad plate
- connecting a wire from ground to the base of my router table as the spindle (Kress FME 800) does not appear to be grounded
- configuring the Ports & Pins Inputs page for the Probe input as per post # 115
- downloading and renaming the file in post # 19 to '1024.set' and copying it to the Mach3 root folder (after making a backup of the original 1024.set file)
- downloading the latest script from post # 130 and copying it into the new button using the 'Edit Button Script' in the 'Operator' menu

All appears to be working as advertised.

Thanks Greg for your continued valuable contributions to the CNC community.

Cheers,

Claudio

152iq
08-13-2008, 07:02 PM
Greg,

Many thanks for the "modified 1024" and some of your other posts. I've learned MIDI, PIC assembler, INTEL HEX, and now G-code all for one project. Learning VBS on top of that was more than I wanted to do for now. So again, THANKS,

Browning

dsage
09-29-2008, 10:13 PM
Hi Guys:

I'm new to this forum. I implemented the Auto zero touch pad with success and absolutely no issues. Thanks Greg for the effort. Very slick.
Sorry but 12 pages of this thread was a bit much to wade through to find the answer to my question. Sorry if it's already answered elsewhere.
I notice the new plate thickness DRO never reads anything. How do you make that work and what will it read when it does. What should I do with that reading when it does show up. It seems everything is taken care of without it.
What's the process for customizing the control panel? I'd like to make some minor changes of my own.


Thanks

Sage

Greolt
09-30-2008, 12:44 AM
I'm new to this forum. I implemented the Auto zero touch pad with success and absolutely no issues. Thanks Greg for the effort. Very slick.
Sorry but 12 pages of this thread was a bit much to wade through to find the answer to my question. Sorry if it's already answered elsewhere.
I notice the new plate thickness DRO never reads anything. How do you make that work and what will it read when it does. What should I do with that reading when it does show up. It seems everything is taken care of without it.
What's the process for customizing the control panel? I'd like to make some minor changes of my own.




I guess you mean the "Plate Thickness" DRO. The name says it all.

Enter here the thickness of the material you are using as a touch plate. Then make minor adjustments to get the result spot on.

This tells the macro what height above intended zero the probe was activated.

For alterations to screens look for "Screen4". It will be found on the Artsoft web site.

Greg

neilw20
09-30-2008, 03:52 AM
In Mach3, when you change an entry in a DRO you MUST HIT ENTER to to accept the new value. This stops typos or accidental key hit creating havoc.
Also, if the num-lock is not on the number pad won't enter changes either.

Mr.Chips
09-30-2008, 09:11 AM
In Mach3,
if the num-lock is not on the number pad won't enter changes either.

Is this true even if you use the number keys that are above the letter keys and not the Key Pad?

Thanks Neil

LeeWay
09-30-2008, 09:42 AM
Yep. That's all I ever use. I am not even aware that there is a calculator on the end of all my keyboards. :)

dsage
09-30-2008, 10:28 AM
Ok. I wasn't getting the fact that it was a DRO you could enter data into. I get it now. Very nice. Good work. I guess I got the speed etc tuned pretty well. I checked the final height after the tool retract and it was spot on using feeler guages from the work surface. My piece of circuit board is the typical .063" and I only have a retract to .2" after zeroing and it was spot on. I assume the retract would be short or long if the .063 was not correct.

Thanks

Sage


Sage

dsage
09-30-2008, 07:06 PM
Ok. Sorry I must be slow. I'm still not getting the purpose of the "plate thickness DRO". I put 0.065" in the DRO which is the thickness of the plate (no mater what I put in there), after doing the auto zero it does not change. I see the Z DRO change for a fraction of a second to 0.065 but I think that gets there from the macro writing it there just before it does the retract.

Can someone explain to me how to use the "Plate thickness" DRO.

Sage

Greolt
09-30-2008, 07:21 PM
Sage

It is not supposed to change. The macro reads that value to know how thick the touch plate is and allow for it in it's calculations.

The macro will not change that value. Only the operator can do that.

Read through the macro on the first page of this thread. You don't have to understand it all but you will get the gist of it.

Greg

dsage
09-30-2008, 08:50 PM
I read the macro and I thought I understood it.
Here is a piece of the macro.

Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z25.4" 'put the Z retract height you want here

Because I use inches here I change the obviously metric numbers throughout the macro to inches. I may have gotten carried away a bit.

In the line
"Call SetDro (2, PlateThickness)"

Is the PlateThickness a variable that macro reads from the DRO? (put in by the user)

I thought it was something I needed to insert so I removed the words PlateThickness and put in 0.065
In effect I guess I've hardcoded the value instead of having it read from the DRO.

I guess I need to put the PlateThickness variable back - right?

This might explain why no matter what I put in the DRO the Z-axis DRO gets updated with .065 (I also extended the pause to 1 second so I can better see what gets writen tot he Z-axis DRO before it does the retract).

Maybe I get it now.

Sage

123CNC
09-30-2008, 09:04 PM
From upthread,

"Put a user DRO on the screen using Mach's screen utility, Screen4. Assigned it OEM code 1151

and

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO "

When you initially 'program' your auto tool zero, you will enter the best value for plat thickness in the Mach's screen utility, Screen4. This value may differ from actual thickness, + x to achieve the desired accuracy and repeatability. The auto tool zero macro retrieves the stored value, previously entered, in Screen 4, OEM (1151).

If you need to make a new touch plate, no problem. Enter the new best value in Mach's screen utility, Screen4.

I'm not sure I understand where you assigned your "0.065" value within context of the VB script, but it sounds like you did hard code it, at one point, yet perhaps left the variable somewhere else?

More or less.

dsage
09-30-2008, 09:14 PM
Ok I put the variable PLateThickness back and it's working properly now i.e what I put in the DRO gets transfered to Z-axis.

Thanks for that. I got a bitcarried away modifying things.

So now the question is. My machine is very repeatable so why do I need the PlateThickness DRO now that it's set up. I can't imagine I'll be changing the plate on a regular basis or anything. It might just as well be hard coded in the macro.
How hard would it be to make the tool zero function work on the original 1024 screen which already had a button for zeroing the tool so I can use the original screen. I think it might be useful to have the toool information back (which disappeared with the modified 1024 added for this feature).

Great feature though. Glad to have it any way I can get it. It was a real pain setting zero before.

Thanks


Sage

ger21
09-30-2008, 09:17 PM
You don't enter the value in screen 4. You add the DRO to the screen using Screen4. Then, in Mach, when you run Mach3, you enter the plate thickness into the DRO that you added to the screen.

"Call SetDro (2, PlateThickness)" sets the Z axis DRO to whatever your plate thickness is. It gets that info from DRO you add to the screen.

ger21
09-30-2008, 09:21 PM
You could change this line:


PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

to:

PlateThickness = .065

Then you wouldn't need the DRO. If you ever changed the plate, just change the thickness in the macro code.

Greolt
09-30-2008, 09:28 PM
How hard would it be to make the tool zero function work on the original 1024 screen which already had a button for zeroing the tool so I can use the original screen.




No problem at all hard coding the plate thickness value. That is what many people do.

And yes, then the standard screen with existing button would be fine.

I prefer to have my LEDs and DRO on screen. Just my preference.

Greg

dsage
09-30-2008, 09:30 PM
On second thought (for now anyway). I'll stick with the modified screen. There is some benefit to having the LED indicator on screen to test the plate operation before using it. It could be bad news if the plate didn't work.

Ideally though I'd rather have the original screens back with just the addition of a LED near the original tool set button to test the plate and just hard code the plate thickness into the button macro as required to set it up.

Like I said. I'll take it anyway I can get it. It's a great addition to the software.


Thanks to Greg and all for your efforts.

Sage

bp092
10-07-2008, 04:37 PM
I'm running a pmdx122 BOB. Anyone here using the same bob and made a tool setter like these in this thread? I am using pin 15 on my input side, setup on the probe in mach3 using ernie's machblue screen. No luck yet. I had the understanding that it was worked out so only one wire was needed and you didn't need a complete circuit. Would I need to add a resister/cap at all? Or just another cable to go from ground to an alligator clip on the tool? Thanks.

jalessi
10-07-2008, 05:30 PM
BP092,


In the PMDX 122 document it states there is a LED on board that should light if the pin is pulled low.

Is the LED working when you ground the touch plate?

If so, then Mach3 is not configured completely.

I would be happy to IM you help, let me know.

Do you have a instant messenger?

Jeff...

bp092
10-07-2008, 06:48 PM
Thanks to Jalessi for helping me to get it working!

dsage
10-13-2008, 01:13 PM
Greg:

I wonder if you can help me here.

I have been using your tool setter with great success. I had to convert it to inches though.
Today I created some G-code files for some fonts. Somehow the G-code came out with X and Y numbers in the hundreds, probably because they were in millimeters. So I took the files and added a G21 on the front to tell the machine they were in millimeters but then they were too small. So I applied a manual scale of 4 to X 4 to Y and to get Z back to inches depth of cut I applied a scale of 2.54. I think theres a mistake somewhere there but the result was what I was looking for and is irrelevent to the problem.

In the past, working with inches I noticed the tool setter moves down until it touches the work and as soon as it does it jerks a bit deeper - maybe about a thou before it backs off the prescribed amount. This extra forward move was no big deal so I ignore it.

The G21 and the scaling now makes this a problem somehow. Good thing I was working on a piece of wood loosley clamped at the top of the vise jaws because at one point during my experiments, after touching down and stopping, the Z axis went down about another 100thou before retracting.

I was unabe to reproduce that serious problem but below is some code for you (or anyone) to test the tool setter. It still jerks down quite a bit before retracting. Maybe someone can figure out why and detect where my problem lies. I may have screwed up the conversion to inches from your original button code so I have also included my macro (or whatever it's called) for the tool setter button below as well.


To use the G-code:
First home everything and then put the machine somewhere in the middle of the table and zero X and Y. Put the quill down a bit and zero it. Then move the quill up a bit so it's a bit positive.

Load the G-code below and manually put a 4 in both the X and Y scaling DRO's and put 2.54 in the Z scaling DRO.

Run the tool setter. You don't need to have a tool in the chuck. AFter the tool setter starts just touch the plate to ground somewhere and hold it. You will see the quill stop as it should but very quickly jerks down a bit more (about 10thou or more) before retracting to the defined height.

The G-code:

(Program to test auto-zero with metric G21 and scaling active)
(manually set x scale to 4 y scale to 4 and z scale to 2.54)
(then use auto-zero and see what it does)
G0 x0 y0 z0
G90
G21
G0 x10 y6
m30




My button macro is as follows - converted to inches:

PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-1 F4" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2,PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.75" 'Pause for Dro to update.
Code "G0 Z.2" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If



Thanks for your help.

Sage

aminear
10-13-2008, 01:32 PM
what is your z pad height dro setting value set to?

dsage
10-14-2008, 02:07 PM
Sorry Aminear:

See the corrected original post. I updated the button script listing. What I originally posted was not what is on my CNC machine. It is now corrected to what is misbehaving as described.
To answer your question, the PAD is .058 inches thick and that is what I have set into the tool setter DRO.


Sage

Greolt
10-14-2008, 10:40 PM
Sage

I am afraid you have totally confused me. Easy to do according to SWMBO. :)

Starting with incorrect dimensions and then trying to fix them with scaling and swapping base units is a recipe for mistakes IMHO.

I live in the 21st century and so therefore don't use medieval English measurements (that should get a few flames :))

Those that do have to contend with files of two different base units, generally have an XML (profile) for each base unit and just start Mach with the appropriate one.

Have one profile called Inch and another called Metric. Easy to do and will only take a few minuets to set up.

Then each will need to have its own Auto Zero macro in the relevant units. Place the macro in the profile's macro folder and call it from the on screen button.

Greg

neilw20
10-15-2008, 03:19 AM
Excellent advice.
Use two different XML files if you really must live in the past.
I think it is easier to enter 1.6 than 0.0625, imperial feed rates suck too.
I have imperial lathe and use it as metric. Just a bit hard doing metric threads.

dsage
10-15-2008, 07:01 AM
All good advice guys but I guess I'm trying to point out a bug.

Maybe someone could try what I suggested.

In case I lost you:

It's not unreasonable to have a G21 in your code is it? The reason I got around to putting it there is irrelevant.

And I don't think it's un-reasonable to use the scaling DRO's to add some scaling is it? They put them there for a reason.

So. If someone could just try the G-code presented and put scaling of 4 on X and Y and 2.5 or so on Z you might see what I'm talking about.

I think the scaling is taking affect on the Tool Setter. Also I can't explain why the Z axis jerks down a bit before it goes up (dangerous when scaled up). That might be something I screwed up in the button code converting it.

Even if you do none of the above you might also see the tiny (part of a millimeter to you guys) jerk downward. I'd like to know. Watch carefully immediately after the tool setter stops.

Even if I take your suggestion and have two set ups I'd still have to have a different button script for the inch setup of the tool setter because the number in the script in millimeters when interpreted to inches is not reasonable.

BTW> I understand metric. I live in Canada. I use both.

Sage

tassie
10-15-2008, 08:09 AM
This is just a quick thank you to Greg for the details of his Aussie Zero Tool and all the other posters who asked the questions I needed help with. I've made this tool for my K2CNC router table and it works SO well. I love that something so simple can make a job so easy!

Thanks again. :)

Philip
Tasmania

Greolt
10-15-2008, 08:29 AM
And I don't think it's un-reasonable to use the scaling DRO's to add some scaling is it? They put them there for a reason.


.

When I first started using Mach I used scaling. I found at that time it was buggy. Now I just don't use it.



So. If someone could just try the G-code presented and put scaling of 4 on X and Y and 2.5 or so on Z you might see what I'm talking about.

I think the scaling is taking affect on the Tool Setter. Also I can't explain why the Z axis jerks down a bit before it goes up (dangerous when scaled up). That might be something I screwed up in the button code converting it.

.

Try taking the following lines out of the code,

ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend



Even if you do none of the above you might also see the tiny (part of a millimeter to you guys) jerk downward. I'd like to know. Watch carefully immediately after the tool setter stops.
.

No my machine does a very small movement up.



Even if I take your suggestion and have two set ups I'd still have to have a different button script for the inch setup of the tool setter because the number in the script in millimeters when interpreted to inches is not reasonable.
.

That is the idea. You have a macro in each profiles macro folder that is for the relevant units. Much less mistake prone.

It would not surprise me at all if the scaling had a bug that upsets the macro. So if it is that or something else I really don't know.

Greg

LeeWay
10-15-2008, 08:41 AM
That issue may be one of the way you have your machine setup. You may need to insure or change that part of the code to a negative or positive value. Opposite of the way you have it set now.
I do have this working on my desktop, but haven't tried it on my machines yet. Will do so when I find some time.

dsage
10-15-2008, 10:12 PM
Thanks all.

I'll investigate it some more to see if I can figure out exactly what causes it. I'll be busy making chips for a while.

It continues to work fine without any scaling, although still with a very small jerk down (Maybe 1 or 2 thou) just after touching down. It's not a big deal. I can ignore it.

Thanks Greg.

Sage

dsage
11-09-2008, 07:42 PM
Startling development today.
Other than the small qwerks I mentioned previously, the tool setter has been working fine. But today, I used the setter and on what was supposed to be the tool retract phase the machine Z-axis instead drove my 3/16 ball end mill practically right through the circuit board and it was backed by a solid piece of metal too. My Z-axis stepper has a lot of power so I now have a hole in the piece of touch circuit board and it's warped and will need replacement. I turned Mach off and back on to reset (whatever) and it works again. I'm very cautious about using it now and test it by holding the board above the work once to see if it behaves properly before using it properly. I have no idea what messed up the tool setter.
PS> previous to using the tool setter everyting was machining perfectly so there was nothing wrong with Mach itself or any of the settings (that I can figure anyway).

Any ideas what could casue this? Maybe some remnant G-code that didn't clear?


Sage

bp092
11-09-2008, 08:34 PM
As a general rule of thumb I always test and contact the touch plate with the cutter to "green light" before doing it. It's a painless fast test that ensures it should work properly.

jalessi
11-09-2008, 08:53 PM
Sage,

I did the same thing with the tool setter "ONCE".

I loaded a different screen to check it out and the tool setting macro was not in the screen I was experimenting with.

Needless to say my ignorance caused a $18.00 pyramid cutter to plunge right through the tool setter plate, instantly self destructing or should I say "Operator Inflicted Damage".

Jeff...

neilw20
11-09-2008, 09:46 PM
Thumb in 8um. mind in neutral?

dsage
11-10-2008, 03:22 PM
I did test the tool setter light first - always do. The light reacted properly.
This was a problem with the code associated with it (I assume) or some other G-code that was laying around which could affect it.
I do a lot of program editing and testing and stop programs mid stream quite a bit after checking code edits to see if they work.
I'm wondering if the code associated with the tool setter can be improved by saving all possible G-codes used by - or that could affect the tool setter - making them safe values appropriate for the tool setter and then restoring the previous setting back after the tool set.
Having said that I have no idea what errant G-code could have caused the tool setter to do a G-zero down 60thou instead of up.

From now on I'm going to have to use it twice. Once in mid air well above the part, and if it reacts properly then I'll put the plate down on the part.

A shame though.

Sage

Glidergider
11-10-2008, 03:45 PM
Your problem sounds like a Mach3 problem. Sometimes when rebooting Mach3, it will forget which Macro the button is supposed to run. Lucky me, I've never had a problem that you've had. After a re-boot of Mach3, I always check my custom macros.

In my macro, I changed the Z downward feed rate to a real slow value. Once or twice, I've forgot to plug in my router, which negates the ground. On these occasions that I reminisce, I also forgot to test the continuity. So you know what happens then. Lucky for me, I have a real low feed rate in the macro. I can feel the pressure starting to mount before any damage can be done. I quickly hit the escape key to stop any damage. So, consider slowing down the z feed rate in your macro.

jalessi
11-10-2008, 04:16 PM
Sage,

The tool setter led will always light when there is continuity between the plate and the tool, it has nothing to do with the distance between the tool and Z Zero.

How would the LED know the plate thickness if the tool macro was incorrect?

Just because the LED lights does not mean the tool setter is operating correctly!

I am being repetitious and its intentional, if you load a different screen using Mach Loader or choose a screen that does not have the correct tool macro data or the generic tool setter macro data there is a very good chance the tool will crash.

The reason why is because the generic macro is telling the Z axis to travel ... a certain distance.

It would be nice to hear from other Mach3 users to see if they have ever encountered what you are talking about.

Jeff...

neilw20
11-10-2008, 07:27 PM
If you have stopped a program part way through Mach3 could be in some unexpected state.

For example,
It could be in incremental mode.
It may have been doing an arc or circle, and G2 or G3 are in effect.
Drill cycles may been interrupted and a G80 is required to cancel G8x mode.
If you Mach3 is likely to be in some unexpected state, you must either run a small program to make sure the state is well defined, or the Macro must check all possible rogue conditions and at least do nothing other than warn you if all is not well.

At the start of a program it is good practice to set all modal states to a known condition.
Initialize all variables used. #123 MAY HAVE BEEN ZERO, but may have some other value now because any previously run program may have changed it. The variable is persistent.
I turned my machine off after running a program successfully all day.
The last program run was aborted because I was cutting air. Variable #123 had a non zero value now.

The next day the program run nicely until after the first pass around a job, dodging the mounting bolts in it's normal spectacular manner.
Next pass around at 400mm/min the $60 carbide cutter unscrewed a mounting bolt in a spectacular manner, and the cutter evaporated.
The cause was #123 had not been initialized to zero at the start of the program. Normally it was set to zero as the program ended.

Expensive lesson, and had to wait for a new cutter to arrive.

A good well behaved program macro will save all states it changes, set all states to it's requirements, and at the end restore the states to the original.

Back to your problem...

Because the macro must cause a Z move by it's nature, there should be sufficient safeguards written into the macro to prevent stupid move.
Also this macro cannot restore everything to what it was because it's purpose is to move to a new position. It is the responsibility of the macro to ensure it can execute correctly, and if you make a habit of leaving things in undefined states, then you must improve the macro.

Greolt
11-10-2008, 11:36 PM
I have been using this device for about a year and a half and have never had it fail. Except when using the NCpod but that is another story. :)

However Neil has a valid argument. It is hard to anticipate every condition it could possibly be called from.

How about placing this line in the macro as a preamble,

Code " G21 G17 G49 G50 G80 G90 "

The G21 would be G20 if using medieval english measurements. :)

G90 is not necessary in my script but does no harm.

Greg

dsage
11-15-2008, 03:57 PM
I would have to agree (and have already stated) that the macro needs to save the current conditions for those Items it intends to use, set them to appropriate values, execute it's function and then put the conditions back where it found them. I do a lot of micro processor programming and this is standard programming procedure for an interrupt procedure (to push and pop the stack), which is essentially what you have here

I agree it might have gotten screwed up by killing a program mid stream. But who's to say the tool setter can't be used after stopping a program. I do a lot of dry runs on programs with the cutter retracted to be sure they work properly for the first (of many passes) then stop the program and reset the axis to start again. I don't think that's unreasonable.

Maybe someone can suggest a way to press a button to reset all of stuff to safe values.

I guess I could put some pre-amble at the beginning of every program to do that initializing, then have an M1 to pause the program for a manual Z-axis calibration before continuing.


Sage

neilw20
11-15-2008, 04:23 PM
I knew the RESET (screen) BUTTON had a use. Add all the default settings to the button VB code for that button. Just have to figure how to patch into it.
Might be easier to use some other button.

Greolt
11-15-2008, 05:11 PM
The reset already has that option on the General Config page. See pic

Personally I'm happy with the operation and reliability of the macro as is. But that's me. :)

Greg

dsage
11-19-2008, 10:11 AM
Greg:

I must have missed somewhere how you got the tool setter macro to run from a shuttle pro button. Could you explain please. (The shuttle pro is fantastic as is your tool setter)

Thanks

Sage

Greolt
11-19-2008, 03:18 PM
Sage

Need to have the zero macro in the macro folder.

Copy the macro to a text (notepad) file and call it M615.m1s or some number not in use. Place this in the macro folder with the name of your profile (Mach3mill)

Then use the number 615 in the shuttle config. It is that easy.

Also what you should do is use this code for the on screen button. Code "M615"

Greg

dsage
11-19-2008, 07:12 PM
Ok so following your instructions and for the benefit of others:

I found the macro for the on-screen button tool setter was called
"hidenscript.m1s" and is kept in the c:\mach3\macros\mach3mill directory.
I found that out by editing the on screen button (operator\edit button script). The name is at the top the editing window.

I copied that macro file and renamed the copy M620.m1s (noting that that macro file number 620 was not used.)

I went into the config screen in mach selected "config plugins" and selected the shuttle pro for configuration. I found the button I wanted to program and assigned it "macro #1" from the pulldown.

In the box for macro#1 on the same screen (right side middle) I entered 620 and pressed ok.

Bob's your uncle as they say. The chosen button on the shuttle pro now operates the tool setter just like the one on the screen.


Man, that was easy.

Thanks

Sage

johyn
11-21-2008, 05:48 AM
Hello, have been following this for a while and wanted to put my thoughts in for those that might want another option.
I chose to use the button edit and asign my code to the unused tool zero button. This was not as pretty as some of the screen edit types but not as cumbersome as using the screen 4 utility... ( more time spent with actually using my machine) , John

steelestimating
11-21-2008, 09:06 AM
I would have to agree (and have already stated) that the macro needs to save the current conditions for those Items it intends to use, set them to appropriate values, execute it's function and then put the conditions back where it found them. I do a lot of micro processor programming and this is standard programming procedure for an interrupt procedure (to push and pop the stack), which is essentially what you have here

I agree it might have gotten screwed up by killing a program mid stream. But who's to say the tool setter can't be used after stopping a program. I do a lot of dry runs on programs with the cutter retracted to be sure they work properly for the first (of many passes) then stop the program and reset the axis to start again. I don't think that's unreasonable.

Maybe someone can suggest a way to press a button to reset all of stuff to safe values.

I guess I could put some pre-amble at the beginning of every program to do that initializing, then have an M1 to pause the program for a manual Z-axis calibration before continuing.


Sage


Hi
The powerful estimating tool is designed specifically to meet the needs of estimators in the structural steelwork industry.


http://www.acecadsoftware.com/steel_estimating

chrisb691
11-24-2008, 05:11 AM
I got the touch plate working tonight, after some initial problems. At first I had to hard-code the plate thickness in, to get it to work. Then I re-read all the posts on this thread, and found the solution in post 134, where Rod explained about hitting enter to make the DRO setting stick. :)

So, many thanks to Greg for the screen, and the explanations in various posts. Also thanks to Rod, who saved me a quantity of hair.

Now looking on ebay for a laser cross pointer, so I can do Greg's x y zero trick.

tpworks
11-26-2008, 11:21 PM
Looking for a laser cross?
http://www.dealextreme.com/details.dx/sku.5982

Greolt
11-27-2008, 12:06 AM
I got this one, http://www.dealextreme.com/details.dx/sku.5942

It focused to a good line. Though I do think that it is a bit hit and miss at this price point.

Also bought a more expensive one that was useless. Poor focus.

Greg

chrisb691
11-27-2008, 02:40 AM
Thanks Greg. I picked that up from one of your earlier posts, and odered a couple of them.

Chris

dsage
12-30-2008, 09:02 AM
I think I stumbled on the problem with the tool setter jamming itself into the work piece instead of retracting.
I was doing some moving around manually and had set G91 using the manual code entry line. I used the tool setter and it jammed itself into the part. I put it back to G90 and it was fine again.
I guess it makes sense this would screw it up so I'm thinking I should change the tool setter button code to include the statement:

Code "G90"

at the beginning.

Granted this will screw up your operation if you needed G91 set but I don't usually use G91 unless I'm playing around manually and any good code should set it properly.

So the question is: Will this work? I haven't done it yet.

I haven't ruled out something else also causing this problem but at least this one I think I've proven (unless I got mis-led somehow)

Sage

sailfl
01-03-2009, 08:44 AM
It is clear that some thing is wrong. I can not get my zero touch plate to work correctly.

First let me explain what I am doing. I am not using the Mach3 screens. I have a touch plate with a small LED light attached. When things are working correctly, I will test that I have a complete circuit by touch the plate to the bit. If the light turns on, I will know that I can run the macro with out the fear of driving the bit through the table. I will use my Shuttle Pro to run the macro.

I have used the code off of this thread. I even got some code from the Mach3 forum but that did not work either. When I touch the plate, I see on the Mach3 Diagnostic page that I have a closed circuit. When I run the macro the bit touches the plate and the light lights but the router continues to drive down. It is not stopping. I think you should be able to hold the plate in the air and touch the bit once the macro is running and it should work.

How do I get this to work? Do you need additional information? Do I need to add a pull up resistor?

Thanks for helping.

Jay C
01-18-2009, 10:19 PM
Guys this might have already been answered/settled but it's been a while since I visited this thread so apologies if so. The CNC4PC C10 BOB that I use has 10Kohm pull-down resistors on all pins. The touch probe works by connecting the input to ground (active low). Since the pin is already pulled down to low, one simply needs to pull up the input pin with a smaller resistor creating a voltage divider. For my touch probe I uses a 1Kohm resistor from Vcc (5V) to the input pin. I also found it necessary to add some bypass capacitors (.1uF tantalums) due to noise.

Edit: By adding the 1Kohm resistor in series with the 10Kohm resistor there is a constant current of .5mA and the input pin will see 4.5V (ideally). When the probe touches the grounded plate 5/1000 or 5mA will flow through the 1Kohm resistor.

The photo show my probe box (an RS project box and a plug in connector from the junk bin). The gray wire at the top of the photo goes to the DB9 serial connector and ultimately to the input pins and Vcc and GND pins on the C10). The bigger yellow and black wires go to my probe (used some wires off a dead PC power supply but there in no real need to use this big of a gauge, 22AWG is fine). The servo connector connects to my photo limit switch (seen on the right hand of the photo. (I can post the schematic/brd/and gcode if you would like it). Like I said, to prevent noise from giving false triggers I added a bypass cap both across the Vcc and GND, and from the probe in to ground (effectively this places it parallel to the 10K pull-down resistor).

FWIW,
Jay

sailfl
01-19-2009, 06:12 AM
My problem was resolved when I used the Probe input in Ports and Pins configuration. Now, as soon as the bit touches the plate it waits a short period and retracts. I had the wrong input set up.

ger21
01-19-2009, 09:11 AM
I'm gonna make this thread sticky. :)

john_t_h
01-23-2009, 11:59 PM
Instead of the LED being assigned to probe (I assume 825 is probe). I want to assign it to OEM trigger in the mach 3 ports and pins config. I have my digital probe already set up and the high low settings are different to the z plate.

How do I do this?

MICA
01-26-2009, 05:12 AM
Question:
Rather creating a UserDRO(1152), couldn't you use OEMDRO(1001) which is already on the offsets page (ie the Gage Block Height DRO) ?

ozzie34231
01-29-2009, 03:26 PM
Mica,
I think that will work and I think a lot of this probe interface could be integrated in that page.
Ozzie

dneisler
02-03-2009, 11:18 PM
I just read this thread the past few days, and decided to make one since I am making lots of took changes in current projects.

It works fine with mach3, and my C11 BOB...BUT.....it is not accurate. It seems to vary about .030" each time. I did have to use 2 - 4.7k resistors to get it work with my mill setup.

any Ideas?

sailfl
02-04-2009, 04:09 AM
Donald,

I had some trouble with my Zero Touch Plate macro also when I had the Z move upward after the bit touched the plate. I found that when it was an inch, it was not accurate so I changed the upward distance to .8 of an inch and it has been accurate.

What distance do you have it move upward?

dneisler
02-04-2009, 12:52 PM
Donald,

I had some trouble with my Zero Touch Plate macro also when I had the Z move upward after the bit touched the plate. I found that when it was an inch, it was not accurate so I changed the upward distance to .8 of an inch and it has been accurate.

What distance do you have it move upward?

I have it set to retract a 1/4" only.

Greolt
02-04-2009, 05:54 PM
Whether retract distance is set to 1mm or 200mm or 0.1" or 10" should make no difference at all to the accuracy.

All the height setting is done and finished before it retracts.

If you are adjusting the retract height to get accuracy then you have some other issues going on.

Better to track them down.

Greg

dneisler
02-04-2009, 07:02 PM
I know it is not the retract, it is something else. Bounce, delay or something causing it not be accurate. Just not sure what to do.

neilw20
02-04-2009, 07:23 PM
Temporarily, slow down the feed rate to 1 or 2% with the over-ride and see it should still do exactly the same.
If not you have a mechanical problem. Maybe Z backlash due to a loose coupling?

dneisler
02-04-2009, 07:26 PM
Temporarily, slow down the feed rate to 1 or 2% with the over-ride and see it should still do exactly the same.
If not you have a mechanical problem. Maybe Z backlash due to a loose coupling?

ok I will try to slow it down more, currently at 4 IPM. It is not a backlash issue, I can hold within a .001" I have a dial indicator on it, and it reads the same every time I set the tool hight. But when I remove the plate, and go to Z0 I can slide a piece of thick paper under the tool every time.

Greolt
02-04-2009, 07:56 PM
I have a dial indicator on it, and it reads the same every time I set the tool


If you are getting consistent results then all you need do is adjust the plate thickness in the DRO till the result is spot on.

Plate thickness as measured is a starting point. Always needs to be tweeked a bit for accurate results.

Every system is going to have a unique amount of time (in micro seconds) for the signal to get to Mach and for the value to be pulled and placed in the variable.

Hence the need to adjust the plate thickness.

Greg

john_t_h
02-05-2009, 01:31 AM
Yep, my plate is 1.55mm thick but I have it set as 1.4mm in the DRO to get the right height.

Greolt
02-05-2009, 02:17 AM
Sorry John, I was responding to Donald who was getting consistent but not accurate results.

Greg

john_t_h
02-05-2009, 03:50 AM
Yeah I know, I was just backing up what you said by saying what I did :)

Greolt
02-05-2009, 05:05 AM
No worries John.

Always nice to have a little backup. :)

Greg

john_t_h
02-05-2009, 05:19 AM
No problemo :)

I can't believe I took so long to put one of these together. I was frightened off by not understanding how the BoB worked. I'm still stumbling through Mach3 but, now I have one, I wouldn't go without it.

dneisler
02-05-2009, 09:15 PM
Thanks guys. I think I got it.

My plate is .064" thick and I had to set it in the script to .075"
Now, I just gotta play with it and see how well it helps me out now.

I avoided tool changes till now, maybe it is time to try a 4 flute EM for a finishing pass on some 6061.

Greolt
03-05-2009, 09:38 PM
Updated zero script.

If by chance G91 is in effect when running the original script it would not work as expected.

Although I never use G91 it is best to cover that possibility. Some users may have experienced this problem.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z20" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If <!-- / message -->
<!-- controls --> http://www.cnczone.com/forums/images/buttons/quote.gif (http://www.cnczone.com/forums/newreply.php?do=newreply&p=353034)

john_t_h
03-05-2009, 09:59 PM
I don't think I need to worry about it, but was is G91?

Greolt
03-05-2009, 10:11 PM
John

G90 is absolute and G91 is incremental.

Look at the Gcodes tab in Mach3 it gives a good explanation.

Greg

neilw20
03-05-2009, 10:14 PM
Hi Greg.

On occasions I use G91.

A subroutine like the zero setter's job is to change something. The Z offset.
If the subroutine requires the machine to be in a certain state, (like you save the feed rate, and change it temporarily then restore it) then the original state needs to be saved and restored. A subroutine, on return, should only have changed what it's intended purpose was, then restore all other conditions.
Also, if the original mode was G1, then it should be restored to G1 before returning. If you have been using MDI to do some moves, etc, and require to reset a tool, then if the machine ends up in G0 mode without a warning then the inevitable crash can be done by the operator before the penny drops.
Good, work, but still work in progress. (IMHO)
I Think it is OK to leave the machine in a changed state if you warn the operator with a dialog box that must be confirmed, just like 'machine outside limits'.

Just the thoughts of a programmer from when there was not even keyboards.

Neil

Greolt
03-05-2009, 11:21 PM
Neil

Your point is well made. Even though in two years of using it like it is and never striking those scenarios.

How is this? It takes care of resetting the G90/G91 to whatever it was before.

CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentMode = GetOemLED(48) 'Get the current G90/G91 state
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z20 F800" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
If CurrentMode = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If


Now to tell the truth I haven't, as yet, discovered how to query the G0/G1 state.

Any ideas?

Greg

EDIT: On second thought it leaves the G1 as the active state. I am comfortable with that. That will do me. :) <!-- / message -->
<!-- controls --> http://www.cnczone.com/forums/images/buttons/quote.gif (http://www.cnczone.com/forums/newreply.php?do=newreply&p=353034)

neilw20
03-06-2009, 03:21 PM
Greg.

Nice fix. Thanks

After a little investigation, but I have not tested it, GetOemDRO(819)
If this does not work I will investigate further,

Neil

Greolt
03-06-2009, 05:29 PM
OK you have gone to the trouble of finding the DRO number (it is not on the wiki list) so I guess I better do something with it. (nuts)

So here is zero script number 1089 :)

Incorporates returning the Abs/Inc and Rapid/Feedrate states to whatever they were found to be in prior to running the script.

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 = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P2" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-20 F100" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z20 F800" 'put the Z retract height you want here
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
Code "G0"
End If
Exit Sub

This should address the concerns you had Neil.

Personally I was only concerned with the issue of starting in G91 screwing things up but it makes sense to cover all known bases.

Greg

dsage
03-10-2009, 09:36 PM
Greg:

Thanks for the new tool setter code. Glad to see you're sticking behind your "product" and making improvements for us all. Much appreciated.

I haven't tried it yet but I had a real startling experience this evening with the old version of the tool setter and the latest beta Mach V3.043.
I ran the beta Mach because it fixes a problem with tool offsets. When I ran the old tool setter it performed properly - but - just after it finished retracting my standard 0.2", my Z axis gave out a real SCREAM of steps. Luckily they came out so fast the axis did not actually move. In fact the strange thing was the DRO's did not change either. It happened both times I tried it, then I chickened out trying it any more.
I guess the problem could be (probably is) Mach but then it might be some incompatibility betwen your tool setter code and the new Mach as well.
Mabe you should give it a try.

BTW
I also had Mach issue a scream of X axis steps just moving the table which wouldn't be anything to do with the tool setter.

Sage

Greolt
03-10-2009, 10:10 PM
Greg:

Thanks for the new tool setter code. Glad to see you're sticking behind your "product" and making improvements for us all. Much appreciated.


Thanks Sage

I am however a bit uncomfortable calling this "My Product"

The original code that I started with came from Scott Worden. All I have done is modify it to suit myself and do a bit of a write up to encourage others to use it.

I have not used the development version of Mach. It is put up for testing only. Very much a beta version. I use the release candidate.

Greg

dsage
03-15-2009, 11:28 AM
Not to worry. I found some other issues with the beta version as well. Apparently the tool offset code still has a few bugs. Yes it is beta and I've set it aside for now.

Thanks

Sage

Glidergider
03-21-2009, 08:33 PM
I've recently lost my ability to use the z zero macro due to a problem with my Hitachi router. Recently, the spinning portion of the router is no longer grounded. The router body is, but not the spinning chuck. Thus, I've not been able to use the macro.

Does anyone have a solution for me? What could cause my spindle to loose it's grounding connection?
Thanks
Dave

Greolt
03-21-2009, 08:53 PM
Dave

Something must have changed. Can you think of anything? The ground path can be quite tenuous, passing through bearings etc.

You may be better to have a second wire as part of your plate and have ground returned via a crocodile clip placed on the tool.

Greg

Greolt
03-21-2009, 08:58 PM
You could track down where the loss of connection is occurring.

Put a test lead from router bit to router mounting plate and test.

Then try from router mounting plate to gantry

Then from gantry to machine base and etc.

You will probably quickly find where the problem lies.

Greg

jalessi
03-21-2009, 09:29 PM
Dave,

Is it possible you added an extension cord without a earth ground to any of your components?

Jeff...

Glidergider
03-22-2009, 12:41 AM
Greg,
Your first response about the electrical bond through the bearings is where the fault lies. I have a ground everywhere except through the spindle. I'm not sure what happened. I may have to add the a jumper from the body to an alligator clip as you suggested. I wonder if normal wear and tear could be causing the lose of ground?

I'm going to look back through this thread, cuz I'm thinking that someone else mentioned having a Hitachi, but not having a ground.

BobF
03-22-2009, 10:58 PM
Dave,
Does the Hitachi have a 3 wire or a 2 wire cord?
My router (Milwaukee) has a 2 wire cord and I wonder if I will have to add a ground when I get the wires hooked up.
Thanks

Glidergider
03-23-2009, 08:12 AM
Bob,
The Hitachi has a 3 wire power cord. The third wire is the ground which in my case works only up to the body of the tool. Recently, the rotating spindle has lost its connection to the ground.

Glidergider
03-23-2009, 08:23 AM
With my z-zero grounding on the fritz, I've been relying on the ShuttlePro and a sheet of paper to find z-zero. I just lower the spindle down till it touches the papers. Adjust contact till I think its about right, then set z to zero.

Greg introduced me to the ShuttlePro with this thread.
http://www.cnczone.com/forums/showthread.php?t=48752

I also have the laser xy zero gadget too. I love all those tools.

BobF
03-24-2009, 06:45 PM
I got it working today. I had to add a ground wire as I suspected. I found an old automotive alligator clip in my tool box and it can grip a 1/2" bit shaft. Works great.

BobF
03-27-2009, 01:53 PM
Dave,
I don't know how many "miles" you have on the Hitachi, but I would be checking the bearings and maybe replacing them. This looks to me like the early warning signs of bearings going out.

Glidergider
03-28-2009, 12:33 AM
Bob,
I don't know the mileage, but I'll check Mach3 later tomorrow. I finally figured out the problem. The lost ground is isolated to the collet. Apparently it has some wood sap or other contaminate gumming up the works. This is my second collet. Apparently I over torque the collet when tightening the cutters causing the first one to break.

Thanks for all the responses.

Mr.Chips
03-28-2009, 12:58 AM
Bob,
I don't know the mileage, but I'll check Mach3 later tomorrow. I finally figured out the problem. The lost ground is isolated to the collet. Apparently it has some wood sap or other contaminate gumming up the works. This is my second collet. Apparently I over torque the collet when tightening the cutters causing the first one to break.

Thanks for all the responses.

Dave,
You can get a rifle bore cleaning brass brush of the right dia. and some solvent and clean them. This is a common problem with wood workers.
Hager

Greolt
03-28-2009, 01:03 AM
I haven't tried it but people tell me that oven cleaner is the go.

Greg

BobF
03-28-2009, 08:59 PM
Bob,
I don't know the mileage, but I'll check Mach3 later tomorrow. I finally figured out the problem. The lost ground is isolated to the collet. Apparently it has some wood sap or other contaminate gumming up the works. This is my second collet. Apparently I over torque the collet when tightening the cutters causing the first one to break.

Thanks for all the responses.

Thats good to know, I hadn't thought about the collet. I could just picture your bearings failing and loosing contact.
You can soak the removable parts in mineral spirits. That should loosen up most things that could get there from woodworking. If you do, wipe them with a light coat of oil after. I would use camelia oil because I have it on hand, and its supposed to not stain the wood or cause finishing problems.

contactirfu
05-04-2009, 10:02 AM
hi - what would be better -

1. I have 24V (that also powers the limits estop etc) at the machine end and want to use that for Z zero using a PC317 opto interfaced with BoB

2. The BoB is again internally opto isolated for the inputs with a separate 5v PS and I run cable to get the 5 v to the machine and get the z zero going this way.

Thanks in Advance!

contactirfu
05-05-2009, 11:00 AM
hi - what would be better -

1. I have 24V (that also powers the limits estop etc) at the machine end and want to use that for Z zero using a PC317 opto interfaced with BoB

2. The BoB is again internally opto isolated for the inputs with a separate 5v PS and I run cable to get the 5 v to the machine and get the z zero going this way.

Thanks in Advance!

Was it a difficult question? :)

ger21
05-05-2009, 11:11 AM
24V is far less susceptible to noise.

contactirfu
05-05-2009, 11:30 AM
Thank you Gerry.

rainbow2009
05-07-2009, 11:33 PM
pret auto (http://pret-auto.org)
:banana::wee:That's pretty good^^

contactirfu
05-31-2009, 05:28 AM
HI - I have my machine set up in metric and most of the programs I make are in Inches - so if I have setup this macro in metric and then run a program which is in inches - i believe instead of 40mm it will go down 40 inch?

so a work around for it will be a addition to the program to chk in the system is at that moment setup in inches or metric - and choose a appropriate value for the offset.

any inputs?

or help?


//////////////////////Don't even bother to answer this - I will change my post processor to that of metric units :)

BobF
05-31-2009, 09:25 AM
Seems like I remember that Mach 3 has the ability to scale. Maybe you could use a scale factor to convert.

neilw20
05-31-2009, 11:34 AM
Put G20 at the start of your imperial code.
Put G21 at the end.

G20 selects imperial.
G21 selects metric.

It is that easy. No scaling or stuffing around.

Make sure you test it properly the first time you use it.

BOBINETTE
05-31-2009, 05:35 PM
Hi, in Mach 3, in the setting page can you gust change the units from English to metric ALT-U ?

lancut
06-21-2009, 07:37 PM
Hi, after unsuccessful attempt to make this thing work I'm forced to ask for help.
I would love to be able to use this idea, but the message I'm getting is "the plate is grounded" I'm using an registered version of Mach3 with a Gecko 540 driver. The plate is connected to pin 4 of the drive which is pin 13 on the parallel port and is the only available input pin, router is well grounded. When setting to "active low" there is no current, error message, the script is executed properly, but the Z axis won't stop no matter what, tried short the plate in to the ground all over the router...no response. When I disabled the settings in Mach3 the green led become active along with the message "the plate is grounded" The plate is resting on sheet of nylon that I'm attempting to machine and I know it is insulator. I do not have a BOB. Does anybody using a Gecko 540 was successful to get this to work. I haven't used any resistor, because I have no idea where it supposed connect to. I hope somebody be able to solve this for me. Thanks.

Greolt
06-21-2009, 08:27 PM
According to the G540 manual connector 4 (pin 13) is activated by switching to ground (connector 12). This is what you need and good.

Best idea is forget about the macro and auto zero buttons etc. Just concentrate on getting the "Digitise" LED on the diagnostics page to change state when you ground the touch plate.

Get that right and the rest will fall into place.

Start with a temp switch or even a piece of wire and short connector 4 to connector 12. Does the digitise LED change state?

Get that right then connect your touch plate and get it to do the same when you touch the plate to the tool. Then if that is right the rest is easy.

It is possible you may need a little extra pullup on pin 13 to help with false triggers but I have no details on the G540 specs to advise with that.

Greg

EDIT: The input is called "Probe" in ports and pins, and called "Digitise" on the diagnostics page. Mach3 is poor on consistency of terminology. :)

BOBINETTE
06-24-2009, 03:46 AM
Hi, can anyone help me out with this autozero tool, what I'm looking for is to get the spindel retracted 1 inche, the plate thichness is .030, even if I change the plate thickness it doesn't have any effect on the height that the spindal retracts.

PlateThickness = GetUserDRO(.1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G31Z-4 F5" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (.030, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z1" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
Exit Sub
End If
Thank you

Greolt
06-24-2009, 04:48 AM
G'day Bobinette

You have a decimal place in the first line that should not be there.

Here is the same macro that has been updated a bit. I have used the settings like you had.

Remember once it is working to fine tune the setting in the Plate Thickness DRO

Greg





CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) 'Get the current Absolute/Incremental state
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P5" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-4 F4" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G1 Z1" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If
If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If

BOBINETTE
06-24-2009, 03:29 PM
Thank you for the new code, now it is consistant at 1.055 but what I'm wanting is 1 inche.
When you mention to fine tune the setting in the Plate Thickness DRO, you are talking about the one on the mach3 screen ? if so I tryed it from .010 to 1.5 without any change. The actual thickness of the plate is .030.
Sorry to bother you with this

lancut
06-24-2009, 05:05 PM
Thank you Greolt for your reply, I will investigate that further when time allows. I will post results. Thanks again.
BR

Greolt
06-24-2009, 05:57 PM
Bobinette

Post a copy of the screenset you are using.

It will be in the Mach3 folder. A ".set" file.

Greg

BOBINETTE
06-25-2009, 12:57 AM
Hi, it is the Modified 1024.set, sorry I can't zip the file I can only use the .rar format, I hope the pic is going to give you an idea.
Thank you

Greolt
06-25-2009, 01:26 AM
No I need the file.

Rename it as a text file. .txt

Greg

BOBINETTE
06-28-2009, 12:27 AM
Hi, sorry for the delay about the file. here it is:

Greolt
06-28-2009, 05:58 AM
Hi, sorry for the delay about the file. here it is:

OK I can not see anything wrong with it.

Here it is back with just a couple of small mods to the zero script,

Greg

BOBINETTE
06-30-2009, 04:08 PM
Hi, thank you for your help, I have tryed the last file with no improvement, just can't get it to stop at 1 inch like asked in the script.

Greolt
06-30-2009, 07:11 PM
Open it up in the VB editor and step through one line at a time and see if you can see where it is going wrong.

When you say "just can't get it to stop at 1 inch like asked in the script" what exactly do you mean?

Are you using the LPT or another device?


Greg

BOBINETTE
06-30-2009, 08:37 PM
Hi, to one of your question the answer is yes I'm using LPT
About "just can't get it to stop at 1 inch like asked in the script" from what I can understand from this part of the code "Code "G0 Z1" 'put the Z retract height you want here" is that ounce the router bit has made contact with the probe, it should rise 1 inche, if this the right way of thinking, well to get the 1 inche retract I have to put .771 in the code and then it shows .771 in the DRO but I have 1 inche between the raise router bit and the part to route.
I don't know if the way I explain this makes sence, at least I hope so
Thank you fot your patience

Greolt
06-30-2009, 09:03 PM
OK are you sure your steps per unit are set correctly for the Z axis?

If it is, then some step in the macro is going wrong.

Step through it line by line and watch the Z DRO at the same time to see where it is going wrong.

Greg

.

BOBINETTE
06-30-2009, 09:49 PM
Did what you told me and this is the only thing that I suspect, maybe I'm wrong.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
CurrentMode = GetOemLED(48) 'Get the current G90/G91 state
PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

If GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
Code "G4 P10" ' this delay gives me time to get from computer to hold probe in place
Code "G90 G31Z-1 F5" 'probing move, can set the feed rate here as well as how far to move
While IsMoving() 'wait while it happens
Wend
ZProbePos = GetVar(2002) 'get the axact point the probe was hit
Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun should the Z axis start to move now or only after the one below that I put in bold and underline, because the mouvement starts at the next bold step
While IsMoving ()
Wend
Call SetDro (.030, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
Code "G4 P0.25" 'Pause for Dro to update.
Code "G0 Z1" 'put the Z retract height you want here
Code "(Z axis is now zeroed)" 'puts this message in the status bar
Code "F" &CurrentFeed 'Returns to prior feed rate
If CurrentMode = 0 Then 'if G91 was in effect before then return to it
Code "G91"
End If
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If

For the steps per unit, here is what I did: Went to the setting page then click on (set steps for units) followed the instructions for the 3 axis and measured each displacement with a digital caliper and let Mach insert the number of steps
Thank you

Greolt
07-01-2009, 12:15 AM
The movement at the first bold line will be very small. Although you should see it on the DRO.

The amount depends on motor tuning settings and how much deceleration is needed.

The axis is just returning to the precise point that the probe was tripped.

Then the second bold line it will move up to 1 inch .

Before the second line, the DRO should set to the plate thickness as in the thickness DRO

These things you will see as separate steps if you step through like I showed.

Greg