Need Help! Mach 3 centre hole finder VBScript


Results 1 to 5 of 5

Thread: Mach 3 centre hole finder VBScript

  1. #1
    Registered
    Join Date
    May 2006
    Location
    UK
    Posts
    20
    Downloads
    0
    Uploads
    0

    Question Mach 3 centre hole finder VBScript

    Hi all, does any one have a working hole center finder code for Mach 3 please ??
    I found this on you tube but does not work right
    Thanks for any help given ,,,,,,,,,,,,,,,,,,,,,stevep
    Rem VBScript To center probe inside a pipe
    If GetOemLed (825) NE 0 Then 'Check 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 (make F25 if using mm)
    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
    Code "G0 Y" &YCenter 'rapid move To the center location
    While IsMoving ()
    Wend
    Code "F" &FeedCurrent 'restore starting feed rate
    End If

    Similar Threads:


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach 3 centre hole finder VBScript

    Are you using a chinese motion controller by chance? If so, most probing macros that you find usually won't work with them.

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered
    Join Date
    May 2006
    Location
    UK
    Posts
    20
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 centre hole finder VBScript

    Quote Originally Posted by ger21 View Post
    Are you using a chinese motion controller by chance? If so, most probing macros that you find usually won't work with them.
    Hi , no I am not,have used a script to locate Z height many times, so edge should not be a problem......stevep



  4. #4
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default Re: Mach 3 centre hole finder VBScript

    Can you elaborate on what doesn't work right?
    What version of Mach3 are you using?

    Gerry

    UCCNC 2017 Screenset
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

    JointCAM - CNC Dovetails & Box Joints
    [URL]http://www.g-forcecnc.com/jointcam.html[/URL]

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  5. #5
    Registered
    Join Date
    May 2006
    Location
    UK
    Posts
    20
    Downloads
    0
    Uploads
    0

    Default Re: Mach 3 centre hole finder VBScript

    Quote Originally Posted by ger21 View Post
    Can you elaborate on what doesn't work right?
    What version of Mach3 are you using?
    OK found the hole center wizard ...didnt even know it was there !!!



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Mach 3 centre hole finder VBScript

Mach 3 centre hole finder VBScript