![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| CNC Wood Router Project Log Post your CNC machine building log here only. |
| This forum is sponsored by: |
![]() |
| LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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 EDITMade 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 Last edited by Greolt; 04-16-2007 at 11:07 PM. |
|
#3
| |||
| |||
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 |
|
#4
| |||
| |||
| 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? |
|
#5
| ||||
| ||||
|
This just stops the macro from executing the next instruction until the G31 is finnished doing it's thing.
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 |
| Sponsored Links |
|
#6
| |||
| |||
| 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,
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. |
|
#7
| ||||||
| ||||||
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 won't be in for a few days. Hope this is helpful. Greg |
|
#8
| |||
| |||
| 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. |
|
#9
| |||
| |||
| 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? |
|
#10
| |||
| |||
| 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. |
| Sponsored Links |
|
#11
| |||
| |||
| 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. |
|
#12
| |||
| |||
| 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 |
![]() |
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 |
| Display Modes | |
| |
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 |