setup for installing edge finder on a mach3...

13
SETUP for installing Edge Finder on a Mach3 system You will need to activate the Digitizing probe in order to use the edge finder. First thing is to configure the probe input as follows. You will need to select an available port and pin to connect to the probe and edge finder. Below is an example on how to set up the port. CAUTION: Because the edge finder is used very near the tool and spindle, Always make sure the spindle cannot spin while using the Edge Finder.

Upload: lamtuong

Post on 06-Feb-2018

289 views

Category:

Documents


12 download

TRANSCRIPT

Page 1: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

SETUPforinstallingEdgeFinderonaMach3system

YouwillneedtoactivatetheDigitizingprobeinordertousetheedgefinder.Firstthingistoconfiguretheprobeinputasfollows.Youwillneedtoselectanavailableportandpintoconnecttotheprobeandedgefinder.Belowisanexampleonhowtosetuptheport.

CAUTION:Becausetheedgefinderisusedverynearthetoolandspindle,AlwaysmakesurethespindlecannotspinwhileusingtheEdgeFinder. 

 

Page 2: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

ProbeWiringdiagram:

TheCNCprobesensingcircuitmustbewiredcorrectlyforproperoperation.Theusualwaytodothisistowireagroundwiretotheedgefinderandapplya5voltsourcetotheprobeandportinput.Fairlyreliableresultscanbehadbyusinga1000ohmresistorandasmallfiltercapacitor.Theresistormakesthepowersupplyshortcircuitproof,andthecapacitorwillminimizethepossibilitythatexternalelectricalnoisewillinterferewiththeoperation.Ontherareoccasionthattheprobehappenstobegroundedtoelectricalground,theprobeandedgefinderconnectionswillbereversed.

Theprobeconnectionisbestdonewithanalligatorclipthatwillallowyoutoeasilyconnectanddisconnectthevoltagetotheprobe.

Ireccommendthatyouuseatwowirezipcord(lampcord)toconnectbetweentheportinput&groundandtheprobealligatorclip&EdgeFinder.Makethelengthlongenoughthatyoucanreachallpossiblestartingpointsandalittlemoreincaseitneedsrepair.

 

Page 3: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

Configurationtesting:

TheprobewiringisverifiedbyswitchingtothediagnosticscreenandobservingthatgroundingtheprobetotheEdgeFinderactivatestheDigitizelightandoneoftheportpinlights.Thisoperationisessentialforoperation.

 

Page 4: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

ItisfairlyeasytomodifytheMainProgramRunscreentohaveacontinuitylightthatisactivatedwhenevertheprobeisgrounded.ThisisaccomplishedbyusingthescreeneditortocopythedigitizelightfromtheDiagnosticscreentotheProgramRunscreenandplaceitnexttotheAutoToolZerobutton.ThiswillpermityoutoeasilytesttheprobebeforeeachtimeyouusetheEdgefinder. 

  

 

Page 5: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

OpeningtheAutoToolZeroScripteditor:

TheedgefindingscriptmustbeloadedintotheMach3AutoToolZerobutton.Thisisaccomplishedasshownbelow.Cutandpastethescriptfileintotheeditorandsaveit.

 

The following script file is for your reference use. You may need to modify it to meet your specific 

needs. The file supports six different ways to find an edge or center. I use only  function 1 (Center) 

and function 6 (Z Top find). These two functions get me quickly to the corner  X=0, Y= 0 and Z= 

0.250. I then make any offsets necessary to start my project. 

   

Page 6: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

EdgeFinderbasicscriptfile

Thefollowingfileisanexampleonhowtosetupabasicscripttoperformavarietyofprobetasks.Notethattheoperatormustinputanumbertoperformatask.Ablankentryorazerowillabortthetask.Thisfileisavailableatmywebpage:http//Vancura.Innovations/p‐cnc‐ef.htm 

Rem VBScript To center probe inside a pipe And Any edge rem Vancura Innovations 2010/10/30; rem 2015/11/11: minor update, some notes rem user must enter a number before CNC will move. rem entering zero will exit doing nothing rem Probe should be tested before running program ' Option Explicit ' this forces programmer to list all variables Dim safeZ ' safe tool height Dim toolsize ' tool diameter Dim mymode As Integer ' selection: for action Dim FeedCurrent Dim Xoffset ' position information Dim Yoffset ' position information Dim mytoolsize Dim XCurrent ' position information Dim YCurrent ' position information Dim ZCurrent ' position information Dim YCenter Dim XNew Dim YNew Dim ZNew Dim XPos1 Dim YPos1 Dim XPos2 Dim YPos2 Dim ZPos2 ' ================================================================= ' ===== CODE STARTS HERE ========================================= ' ================================================================= rem === program will not run if probe isshorted === If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty Code "(Probe is grounded, check clearance and try again)" Else ' === module works in only one mode === If GetOemLed (16) <> 0 Then 'Warning Wrong Coordinate system DoOEMButton(107) Code "(Changing to Normal DRO Mode)" Code "G4 P0.25" ' === Pause 1/4 sec ===

Page 7: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

End If DoSpinStop ' === double check motor is not running === safeZ = 0.1 ' === change safe Z height; should clear tool Xoffset = 0.1 Yoffset = 0.1 toolsize = (0.125) /2 ' === default tool size === ' === ask user to select an operation to perform. === mymode = Question ("0=Q; 1=Cntr, 2=-X; 3=-Y; 4=+X; 5=+Y; 6=Z; 7=XYZ") ' If mymode = 0 Then ' === zero quits without doing anything === Code "(0 = Quit)" Exit Sub End If ' === ask more questions if not finding center or z=0 === If ((mymode > 1) And (mymode < 8) And (mymode <> 6)) Then mytoolsize = Question ("Probe Size 1=0.093; 2=1/8; 3=1/4") If (mytoolsize = 1) Then toolsize = (0.09375) /2 ElseIf (mytoolsize = 3) Then toolsize = (0.250) /2 End If mytoolsize = Question ("0=Direct metal 1=0.300") If mytoolsize = 1 Then toolsize = toolsize + 0.300 End If End If ' mymode = mymode -1 ' === normalize (we don't do this)=== ' FeedCurrent = GetOemDRO(818) 'Get the current settings XCurrent = GetDro(0) ' location of tool X position YCurrent = GetDro(1) ' location of tool Y position ZCurrent = GetDro(2) ' location of tool Z position Code "G4 P1" 'Pause 1 second to give time to position probe plate Code "F4" 'slow feed rate to 4 ipm ' === Go really SLOW === '======================================== If mymode = 1 Then ' === FIND CENTER) === '======================================== Code "(Mode 1: Find Center )" Rem Move Probe X Minus XNew = Xcurrent - 1 'probe 1 inches to left Code "G31 X" &XNew While IsMoving() 'wait for the move to finish Wend XPos1 = GetVar(2000) 'get the probe touch location Code "G0 X" &XCurrent 'rapid move back to start point Rem Move Probe X Plus XNew = XCurrent + 1 'probe 1 inches to right Code "G31 X" &XNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend XPos2 = GetVar(2000)

Page 8: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

' Rem === calculate hole X center === XCenter = (XPos1 + XPos2) / 2 'center is midway between XPos1 and XPos2 Code "G0 X" &XCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (0,0.000) Code "G4 P0.25" 'Pause 1/4 sec Rem Move Probe Y Minus YNew = YCurrent - 1 Code "G31 Y" &YNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend YPos1 = GetVar(2001) Code "G0 Y" &YCurrent Rem Move Probe Y Plus YNew = YCurrent + 1 Code "G31 Y" &YNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend YPos2 = GetVar(2001) ' === Calculate hole Y center === YCenter = (YPos1 + YPos2) / 2 Rem move To the center Code "G0 Y" &YCenter While IsMoving () 'Wait for stop signal Wend Call SetDro (1,0.000) While IsMoving () Wend Code "G4 P0.25" 'Pause 1/4 sec Rem ================================================== Rem === do X center find a second time for better accuracy. === Rem Again Move Probe X Minus XCurrent = GetDro(0) XNew = Xcurrent - 1 'probe 1 inches to left Code "G31 X" &XNew While IsMoving() 'wait for the move to finish Wend XPos1 = GetVar(2000) 'get the probe touch location Code "G0 X" &XCurrent 'rapid move back to start point Rem Again Move Probe X Plus XNew = XCurrent + 1 'probe 1 inches to right Code "G31 X" &XNew 'Start hunt for edge While IsMoving() 'Wait for stop signal

Page 9: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

Wend XPos2 = GetVar(2000) XCenter = (XPos1 + XPos2) / 2 'center is midway between XPos1 and XPos2 Code "G0 X" &XCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (0,0.000) Code "G4 P0.25" 'Pause 1/4 sec Rem ================================================== Rem Call SetUserDro (1152,YPos1 - YPos2 + .200) Rem Code "G4 P0.25" 'Pause 1/4 sec '=================================== ElseIf mymode = 2 Then '=================================== Rem === find the outside edge to minus X === Code "(Mode 2: Find -X )" Rem Move Probe X Plus XNew = XCurrent + 1 'probe 1 inches to right Code "G31 X" &XNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend XPos2 = GetVar(2000) ' XCenter = (XPos2) + toolsize Code "G0 Z" &safeZ 'rapid move to the x center location While IsMoving() 'Wait for stop signal Wend Code "G0 X" &XCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (0,0.000) Code "G4 P0.25" 'Pause 1/4 sec ' ===== '=================================== ElseIf mymode = 3 Then '=================================== Rem === find the outside edge to minus Y === Code "(Mode 3: Find -Y )" Rem Move Probe Y Plus YNew = YCurrent + 1 Code "G31 Y" &YNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend YPos2 = GetVar(2001) ' YCenter = (YPos2) + toolsize Code "G0 Z" &safeZ 'rapid move to the x center location

Page 10: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

While IsMoving() 'Wait for stop signal Wend Code "G0 Y" &YCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (1,0.000) Code "G4 P0.25" 'Pause 1/4 sec ' ===== '=================================== ElseIf mymode = 4 Then '=================================== Rem === find the outside edge to plus X === Code "(Mode 4: Find +X )" Rem Move Probe X Minus XNew = XCurrent - 1 'probe 1 inches to right Code "G31 X" &XNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend XPos2 = GetVar(2000) ' XCenter = (XPos2) - toolsize Code "G0 Z" &safeZ 'rapid move to the x center location While IsMoving() 'Wait for stop signal Wend Code "G0 X" &XCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (0,0.000) Code "G4 P0.25" 'Pause 1/4 sec ' ===== '=================================== ElseIf mymode = 5 Then '=================================== Rem === find the outside edge to plus Y === Code "(Mode 5: Find +Y )" Rem Move Probe Y Minus YNew = YCurrent - 1 Code "G31 Y" &YNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend YPos2 = GetVar(2001) ' YCenter = (YPos2) - toolsize Code "G0 Z" &safeZ 'rapid move to the x center location While IsMoving() 'Wait for stop signal Wend Code "G0 Y" &YCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (1,0.000) Code "G4 P0.25" 'Pause 1/4 sec

Page 11: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

' ===== '=========================================== ElseIf mymode = 6 Then '==== Z TOP ==== '=========================================== Rem === find the top surface Z = Zero === Code "(Mode 6: Find Z Top )" Rem Move Probe Z Minus ZNew = ZCurrent - 1 Code "G31 Z" &ZNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend ZPos2 = GetVar(2002) Call SetDro (2,0.000) ' Code "G0 Z" &safeZ 'rapid move to the x center location While IsMoving() 'Wait for stop signal Wend Code "G0 Z" &0 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Code "G4 P0.25" 'Pause 1/4 sec '=========================================== ElseIf mymode = 7 Then '==== X Y Z ==== '=========================================== Rem === find the outside edge minus X, minus Y, and Z = 0 === Code "(Mode 7: Find -X0, -Y0, &Z0 )" ' Must be within 1 inch of the corner over the work Call SetDro (0,0.000) ' Call SetDro (1,0.000) Call SetDro (2,0.000) ' ===== First find Z ===== ZNew = - 3 Code "G31 Z" &ZNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend ZPos2 = GetVar(2002) 'The Z EDGE Call SetDro (2,0.000) ' Code "G0 Z" &safeZ 'rapid move to the x center location While IsMoving() 'Wait for stop signal Wend Code "G0 Z" &0 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Code "G4 P0.25" 'Pause 1/4 sec ' ===== Then find X ===== XNew = - 1.000 'back off 1 inch

Page 12: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

Code "G0 Z" &safeZ 'rapid move to safeZ location While IsMoving() 'Wait for stop signal Wend Code "G0 X" &XNew 'rapid move to the x starting location While IsMoving() 'Wait for stop signal Wend Code "G0 Z" &(-0.100) 'move to starting height ' XNew = + 3.000 'probe 3 inches to right Code "G31 X" &XNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend XPos2 = GetVar(2000) ' XCenter = (XPos2) + toolsize ' The X EDGE Code "G0 X" &(XPos2 -.100) 'back off from work Code "G0 Z" &safeZ 'rapid move to the safeZ location While IsMoving() 'Wait for stop signal Wend Code "G0 X" &XCenter 'rapid move to the x center location While IsMoving () 'Wait for stop signal Wend Call SetDro (0,0.000) Code "G4 P0.25" 'Pause 1/4 sec ' ===== Then find Y ===== Code "G0 Z" &safeZ 'rapid move to safeZ location While IsMoving() 'Wait for stop signal Wend Code "G0 X" &(0.100) 'rapid move to the x starting location While IsMoving() 'Wait for stop signal Wend Code "G0 Y" &(-1.000) 'rapid move to the y starting location While IsMoving() 'Wait for stop signal Wend Code "G1 Z" &(-0.100) 'move to starting height ' YNew = +3 Code "G31 Y" &YNew 'Start hunt for edge While IsMoving() 'Wait for stop signal Wend YPos2 = GetVar(2001) ' YCenter = (YPos2) + toolsize ' The Y EDGE Code "G0 Y" &(YPos2 -0.100) 'back off from work Code "G0 Z" &safeZ 'rapid move to the safeZ location While IsMoving() 'Wait for stop signal Wend Code "G0 Y" &YCenter 'rapid move to the y corner location While IsMoving () 'Wait for stop signal Wend Call SetDro (1,0.000) Code "G4 P0.25" 'Pause 1/4 sec ' ===== head to x0,y0,z0 =====

Page 13: SETUP for installing Edge Finder on a Mach3 systemshoelessdave.com/Vancura.Innovations/files/Documents/CNC/EdgeFind… · SETUP for installing Edge Finder on a Mach3 system ... It

Code "G0 Z" &safeZ 'rapid move to the safeZ location While IsMoving () 'Wait for stop signal Wend Code "G0 X" &(0.000) 'rapid move to the x corner location Code "G0 Y" &(0.000) 'rapid move to the y corner location While IsMoving () 'Wait for stop signal Wend Code "G0 Z" &(0.000) 'rapid move to the z corner location ' ===== Done ===== '=================================== ElseIf mymode = 8 Then toolsize = (0.09375) /2 '=================================== ElseIf mymode = 9 Then toolsize = (0.125) /2 '=================================== End If '=================================== Rem: === Restore original feedrate === Code "F" &FeedCurrent 'restore starting feed rate End If