Hello Guest it is January 28, 2020, 09:24:06 AM

Author Topic: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT  (Read 5142 times)

0 Members and 1 Guest are viewing this topic.

PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« on: May 19, 2009, 06:46:27 AM »
HI
IM HAVING PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
I USE METRIC,,  NOT INCHES
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

vmax549

*
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #1 on: May 19, 2009, 11:41:27 AM »
Can you post the piece of script giving you problems maybe we can help.

(;-) TP
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #2 on: May 20, 2009, 02:10:31 AM »
HI

THANKS FOR YOUR REPLY
CAN YOU HELP ME?
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #3 on: May 20, 2009, 03:08:35 AM »

HI TP
THIS IS A COPY OF THE SCRIPT,,AS YOU CAN SEE ITS SETUP OF INCHES

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

EDDIE

vmax549

*
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #4 on: May 20, 2009, 09:49:38 AM »
(;-) The code is not in inches but is in UNITS. Just change the numbers to reflect what you need and resave.

Just a thought, (;-) TP
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #5 on: May 21, 2009, 12:47:18 AM »
THANKS GREG

I WILL TRY IT
Re: PROBLEMS WITH THE MACH BLUE SCREEN SCRIPT
« Reply #6 on: January 02, 2010, 04:05:22 PM »
Hi
Here is the one i use for mm, look thru the file i have marked in the comments where you can change it

'*********************************

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 "F50"         'slow feed rate to 4 ipm OR 50MM/MIN

Rem   Probe left
   
   XNew = Xcurrent - 25      'probe 3 inches to left OR 25MM
   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 + 25      'probe 3 inches to right OR 25MM
   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 + 25                          '25MM
   Code "G31 Y" &YNew
   While IsMoving()
   Wend
   YPos1 = GetVar(2001)

   Code "G0 Y" &YCurrent

Rem   Probe down
   
   YNew = YCurrent - 25                         '25MM
   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

'**************************

Good luck
Friedrich