CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > WoodWorking Machines > DIY-CNC Router Table Machines > CNC Wood Router Project Log


CNC Wood Router Project Log Post your CNC machine building log here only.


This forum is sponsored by:

Reply
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 04-16-2007, 10:36 PM
 
Join Date: May 2006
Location: Australia
Posts: 1,348
Greolt is on a distinguished road
Another Aussie Auto Tool Zero Setter

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!


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.

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


Attached Thumbnails
Click image for larger version

Name:	zero tool.jpg‎
Views:	7816
Size:	122.5 KB
ID:	35645   Click image for larger version

Name:	ScreenHunter_01 17-Apr 01.14 PM.jpg‎
Views:	6993
Size:	65.3 KB
ID:	35646  

Last edited by Greolt; 04-16-2007 at 11:07 PM.
Reply With Quote

  #2   Ban this user!
Old 04-17-2007, 02:12 AM
crocky's Avatar  
Join Date: Dec 2006
Location: Hoppers Crossing, Vic, Aust
Age: 60
Posts: 275
crocky is on a distinguished road

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
Reply With Quote

  #3   Ban this user!
Old 04-17-2007, 09:16 AM
 
Join Date: Jun 2005
Location: Australia
Age: 79
Posts: 197
wjfiles is on a distinguished road
Probe setting plate

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
__________________
The More I Learn The Less I Seem To Know
Reply With Quote

  #4   Ban this user!
Old 04-19-2007, 07:35 AM
 
Join Date: Dec 2006
Location: usa
Posts: 775
Glidergider is on a distinguished road

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?

Reply With Quote

  #5   Ban this user!
Old 04-19-2007, 08:07 AM
 
Join Date: May 2006
Location: Australia
Posts: 1,348
Greolt is on a distinguished road

Originally Posted by Glidergider View Post
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
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 04-21-2007, 09:29 PM
 
Join Date: Dec 2006
Location: usa
Posts: 775
Glidergider is on a distinguished road

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.

Last edited by Glidergider; 04-21-2007 at 09:51 PM.
Reply With Quote

  #7   Ban this user!
Old 04-21-2007, 10:42 PM
 
Join Date: May 2006
Location: Australia
Posts: 1,348
Greolt is on a distinguished road

Originally Posted by Glidergider View Post
........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.

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
Reply With Quote

  #8   Ban this user!
Old 04-22-2007, 06:27 AM
 
Join Date: May 2006
Location: Australia
Age: 40
Posts: 2,205
epineh is on a distinguished road
Buy me a Beer?

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

Russell.
Reply With Quote

  #9   Ban this user!
Old 04-22-2007, 10:49 AM
 
Join Date: Dec 2006
Location: usa
Posts: 775
Glidergider is on a distinguished road

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?
Reply With Quote

  #10   Ban this user!
Old 04-22-2007, 01:24 PM
 
Join Date: Dec 2006
Location: usa
Posts: 775
Glidergider is on a distinguished road

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.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 04-22-2007, 04:12 PM
 
Join Date: Dec 2006
Location: usa
Posts: 775
Glidergider is on a distinguished road

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.
Reply With Quote

  #12   Ban this user!
Old 04-24-2007, 03:36 AM
 
Join Date: May 2006
Location: Australia
Posts: 1,348
Greolt is on a distinguished road

Originally Posted by Glidergider View Post
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
Reply With Quote

Reply




LinkBacks (?)
LinkBack to this Thread: http://www.cnczone.com/forums/cnc_wood_router_project_log/36099-another_aussie_auto_tool_zero.html
Posted By For Type Date
Zero tool screen This thread Refback 10-04-2010 05:52 AM

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mach3 and Tool Setter ints99 Mach Mill 1 07-31-2010 05:29 PM
What will cause this tool setter problem? Hogger Daewoo/Doosan 3 01-03-2007 07:52 AM
Setting up a Tool Setter. Smackre Mach Software (ArtSoft software) 6 06-16-2006 10:41 PM
50 taper tool setter utengineer04 Work Fixtures and Hold-Down Solutions 4 09-12-2005 02:16 PM
tool setter ACME General Metalwork Discussion 8 07-30-2005 11:15 AM




All times are GMT -5. The time now is 04:35 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361