Back to Browse

Mach3 Edge finder buttons

38.6K views
Mar 6, 2017
5:11

This completes the programming of the edge-finder buttons in Mach3. Below is the VBscript for the buttons. Simply copy (highlight then Ctrl-C) the relevant section for each button and then paste it into the VBscript editor. NOTE: replace NE with the two not-equals angle brackets Rem VBScript To probe bottom edge If GetOemLed (825) NE 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) Current = GetDro(1) Code "G4 P1" 'Pause 1 second to give time to position probe plate Code "F100" 'slow feed rate to 100 mmpm Rem Probe up YNew = YCurrent + 75 Code "G31 Y" &YNew While IsMoving() Wend YPos1 = GetVar(2001) Code "G0 Y" &YCurrent Code "F" &FeedCurrent 'restore starting feed rate Call SetDro (1,Abs(getoemdro(1000))/(-2)) End If Rem End of To probe bottom edge script. Rem VBScript To probe LH edge If GetOemLed (825) NE 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 "F100" 'slow feed rate to 100 mmpm Rem Probe Right XNew = XCurrent + 75 'probe 75 mm to right Code "G31 X" &XNew While IsMoving() Wend Code "F" &FeedCurrent 'restore starting feed rate Call SetDro (0,Abs(getoemdro(1000))/(-2)) End If Rem End of To probe LH edge VBscript Rem VBScript To probe RH edge If GetOemLed (825) NE 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 "F100" 'slow feed rate to 100 mmpm Rem Probe Right XNew = XCurrent - 75 'probe 75 mm to left Code "G31 X" &XNew While IsMoving() Wend Code "F" &FeedCurrent 'restore starting feed rate Call SetDro (0,Abs(getoemdro(1000))/(+2)) End If Rem End of To probe RH edge VBscript Rem VBScript To probe top edge If GetOemLed (825) NE 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) Current = GetDro(1) Code "G4 P1" 'Pause 1 second to give time to position probe plate Code "F100" 'slow feed rate to 100 mmpm Rem Probe up YNew = YCurrent - 75 Code "G31 Y" &YNew While IsMoving() Wend YPos1 = GetVar(2001) Code "G0 Y" &YCurrent Code "F" &FeedCurrent 'restore starting feed rate Call SetDro (1,Abs(getoemdro(1000))/(+2)) End If Rem End of To probe top edge VBscript

Download

0 formats

No download links available.

Mach3 Edge finder buttons | NatokHD