Threaded View
-
20-05-2009 #5
HI
THANKS JEFF
ANSWERING YOUR QUESTION
YES MY MACH 3 IS SETUP FOR METRIC
THIS IS THE BUTTON SCRIPT I NEED TO EDIT
Rem VBScript To center probe inside a pipe
If GetOemLed (825) <> 0 Then 'Check to see if the probe is already grounded or faulty
Code "(Probe plate is grounded, check connection and try again)"
Else
FeedCurrent = GetOemDRO(818) 'Get the current settings
XCurrent = GetDro(0)
YCurrent = GetDro(1)
Code "G4 P1" 'Pause 1 second to give time to position probe plate
Code "F4" 'slow feed rate to 4 ipm
Rem Probe left
XNew = Xcurrent - 3 'probe 3 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 Probe right
XNew = XCurrent + 3 'probe 3 inches to right
Code "G31 X" &XNew
While IsMoving()
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
Rem Probe up
YNew = YCurrent + 3
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos1 = GetVar(2001)
Code "G0 Y" &YCurrent
Rem Probe down
YNew = YCurrent - 3
Code "G31 Y" &YNew
While IsMoving()
Wend
YPos2 = GetVar(2001)
YCenter = (YPos1 + YPos2) / 2
Rem move to the center
Code "G0 Y" &YCenter
While IsMoving ()
Wend
Code "F" &FeedCurrent 'restore starting feed rate
End If
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
The new probe and finding the center of a hole
By Ricardoco in forum Probing, Digitizing & ScaningReplies: 9Last Post: 13-11-2015, 06:43 AM -
Help with Mach3 inputs and VB script ?
By EddyCurrent in forum Artsoft Mach (3 & 4)Replies: 6Last Post: 27-11-2013, 06:35 PM -
Mach 3 tool setter Big-tex version / script help please
By dudz in forum Probing, Digitizing & ScaningReplies: 0Last Post: 25-06-2013, 08:01 PM -
Finding pictures and viewing the albums of a member ?
By WandrinAndy in forum General DiscussionReplies: 3Last Post: 16-10-2012, 03:29 PM -
Edge Finding For Newbies
By M250cnc in forum CAD & CAM SoftwareReplies: 14Last Post: 01-03-2011, 10:55 AM
Bookmarks