1. #1
    HI
    IM HAVING PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
    I USE METRIC
    I HAVE TRIED CHANGING IT MYSELF, I CAN'T GET IT TO WORK
    I NEED A SCRIPT THAT CAN FIND THE CENTER OF A 40 mm PIPE
    AND MOVE AT ABOUT 100mm A MINUTE
    CAN ANYONE HELP ME PLEASE?
    EDDIE

  2. #2
    Quote Originally Posted by eddie60 View Post
    HI
    IM HAVING PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
    I USE METRIC
    I HAVE TRIED CHANGING IT MYSELF, I CAN'T GET IT TO WORK
    I NEED A SCRIPT THAT CAN FIND THE CENTER OF A 40 mm PIPE
    AND MOVE AT ABOUT 100mm A MINUTE
    CAN ANYONE HELP ME PLEASE?
    EDDIE
    First, is mach set up to use metric units?

    Second, can you post the VB Script for the button?

    Jeff.
    Nothing is foolproof......to a sufficiently talented fool!

  3. #3

  4. #4
    THANKS JOHN
    I TRIED THAT SCRIPT,I CANT GET IT TO WORK
    AS I SAID BEFORE IM USING METRIC,,,NOT INCHES
    I NEED A SCRIPT THAT FINDS THE CENTER OF A 40MM PIPE
    AND MOVES ABOUT 100mm A MINUTE

    EDDIE

  5. #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

  6. Quote Originally Posted by eddie60 View Post
    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
    OK, I'm no expert on Mach3 but I can write VBScript! This script appears to use an external probe and an external DRO - I'm assuming you have those and that they work and that you have elsewhere verified you can retrieve the DRO values . If thats not the case then this isnt going to work ever.

    Assuming the above, the only lines that need to be changed are where it subtracts and adds 3 to the current values of X and Y, if Mach3 is set for metric I would assume these should be 75 (for 75mm), e.g.
    Code:
    XNew = Xcurrent - 3 'probe 3 inches to left
    should be:
    Code:
    XNew = Xcurrent - 75 'probe 75mm to left
    Similarly the 'F4' command for the feed rate should be 'F100' for 100mm/min

  7. The capital T is inside a comment line (REM = remark) so is ignored by the program.

    In that case I would ask, Eddie, two questions...

    1/ have you verified your probe works and how

    2/ when you say 'it doesnt work' what exactly are the symptoms... MACH3 complains about the code (what error message?) or the probe doesnt move at all, or it moves but only a little bit?

  8. #8
    I think Irvings got it, that matches what I have on my old Blue set.

    Let us know if this works for you Eddie :feedback:
    Jeff.
    Nothing is foolproof......to a sufficiently talented fool!

Similar Threads

  1. The new probe and finding the center of a hole
    By Ricardoco in forum Probing, Digitizing & Scaning
    Replies: 9
    Last Post: 13-11-2015, 06:43 AM
  2. Help with Mach3 inputs and VB script ?
    By EddyCurrent in forum Artsoft Mach
    Replies: 6
    Last Post: 27-11-2013, 06:35 PM
  3. Mach 3 tool setter Big-tex version / script help please
    By dudz in forum Probing, Digitizing & Scaning
    Replies: 0
    Last Post: 25-06-2013, 08:01 PM
  4. Finding pictures and viewing the albums of a member ?
    By WandrinAndy in forum General Discussion
    Replies: 3
    Last Post: 16-10-2012, 03:29 PM
  5. Edge Finding For Newbies
    By M250cnc in forum CAD & CAM Software
    Replies: 14
    Last Post: 01-03-2011, 10:55 AM

Bookmarks

Posting Permissions

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