Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Haas Probe Run Out Macro


Recommended Posts

I wrote this macro to quickly check my spindle probe run out at anytime.

***This is for Next Generation Controller only and the mill will also need Rigid Tapping/Spindle Encoder.***

Just position the probe .5 or less to the left of a clean ground surface that is parallel with the Y axis.
Hit Cycle Start and the program will pickup the face and then rotate 45° and pickup again.  It will do this 8 times - a full 360°.  When finished the TOTAL run out will be displayed in the "SIZE" field on the controller which is macro variable #10188. 

 

(---START OF PROGRAM---)


     (CHECK PROBE RUNOUT PROGRAM)
     
(----NEXT GENERATION CONTROL ONLY----)
(---MUST HAVE RIGID TAPPING/SPINDLE ENCODER---)
     
(POSITION PROBE .5 OR LESS TO THE LEFT OF A)
(GROUND EDGE THAT IS PARALLEL TO THE Y AXIS) 

(--HIT CYCLE START)
(--THE PROBE WILL PICKUP IN THE +X DIRECTION)
(--THE SPINDLE WILL ROTATE 45 DEGREES)

(THIS WILL REPEAT 8 TIMES = 360 DEGREES)
(THE TOTAL RUNOUT WILL BE IN "SIZE" FIELD)
(WHICH IS VARIABLE #10188)

#10188=#0
G65 P9832 (TURN PROBE ON)
#100=#5021 (CURRENT X START POSITION)
#101=#0 (SET VARIABLES TO NULL)
#102=#0
#103=#0
#104=#0
#105=#0
#106=#0
#107=#0
#108=#0
#109=#0

#1=0
#120=0

WHILE[#120 LT 360] DO1
G103P1
G52
M19P#120 (SPINDLE POSITION)
G91
M79 G31 X.5 F50.
G1 X-.1 F100.
G31 X.3 F4.
#[101+#1]=#5061
G90
G1 G53 X#100 F100.
#120=#120+45(ROTATE SPINDLE 45 DEG INC., FROM 0-360)
#1=#1+1(USED TO ADVANCE PICKUP VARIABLE)
END1


M19P0

#110=#101(CALC. SMALLEST X VALUE INTO #110)
IF [#102 LT #101] THEN #110=#102
IF [#103 LT #110] THEN #110=#103
IF [#104 LT #110] THEN #110=#104
IF [#105 LT #110] THEN #110=#105
IF [#106 LT #110] THEN #110=#106
IF [#107 LT #110] THEN #110=#107
IF [#108 LT #110] THEN #110=#108

#111=#101(CALC. LARGEST X VALUE INTO #111)
IF [#102 GT #101] THEN #111=#102
IF [#103 GT #111] THEN #111=#103
IF [#104 GT #111] THEN #111=#104
IF [#105 GT #111] THEN #111=#105
IF [#106 GT #111] THEN #111=#106
IF [#107 GT #111] THEN #111=#107
IF [#108 GT #111] THEN #111=#108

#10188=#111-#110 (TOTAL DEVIATION DISPLAYED IN "SIZE")
#109=#10188
M69 P1134 (PROBE OFF)
IF [#10188 LT .0005] GOTO 100
#3000=1(PROBE RUN OUT IS .0005 OR GREATER!)
 
N100
M30


(---END OF PROGRAM---)

 

  • Like 3
Link to comment
Share on other sites
  • 3 months later...

 

On 8/19/2020 at 8:05 AM, tpreb6 said:

I wrote this macro to quickly check my spindle probe run out at anytime.

***This is for Next Generation Controller only and the mill will also need Rigid Tapping/Spindle Encoder.***

Just position the probe .5 or less to the left of a clean ground surface that is parallel with the Y axis.
Hit Cycle Start and the program will pickup the face and then rotate 45° and pickup again.  It will do this 8 times - a full 360°.  When finished the TOTAL run out will be displayed in the "SIZE" field on the controller which is macro variable #10188. 

 

(---START OF PROGRAM---)


     (CHECK PROBE RUNOUT PROGRAM)
     
(----NEXT GENERATION CONTROL ONLY----)
(---MUST HAVE RIGID TAPPING/SPINDLE ENCODER---)
     
(POSITION PROBE .5 OR LESS TO THE LEFT OF A)
(GROUND EDGE THAT IS PARALLEL TO THE Y AXIS) 

(--HIT CYCLE START)
(--THE PROBE WILL PICKUP IN THE +X DIRECTION)
(--THE SPINDLE WILL ROTATE 45 DEGREES)

(THIS WILL REPEAT 8 TIMES = 360 DEGREES)
(THE TOTAL RUNOUT WILL BE IN "SIZE" FIELD)
(WHICH IS VARIABLE #10188)

#10188=#0
G65 P9832 (TURN PROBE ON)
#100=#5021 (CURRENT X START POSITION)
#101=#0 (SET VARIABLES TO NULL)
#102=#0
#103=#0
#104=#0
#105=#0
#106=#0
#107=#0
#108=#0
#109=#0

#1=0
#120=0

WHILE[#120 LT 360] DO1
G103P1
G52
M19P#120 (SPINDLE POSITION)
G91
M79 G31 X.5 F50.
G1 X-.1 F100.
G31 X.3 F4.
#[101+#1]=#5061
G90
G1 G53 X#100 F100.
#120=#120+45(ROTATE SPINDLE 45 DEG INC., FROM 0-360)
#1=#1+1(USED TO ADVANCE PICKUP VARIABLE)
END1


M19P0

#110=#101(CALC. SMALLEST X VALUE INTO #110)
IF [#102 LT #101] THEN #110=#102
IF [#103 LT #110] THEN #110=#103
IF [#104 LT #110] THEN #110=#104
IF [#105 LT #110] THEN #110=#105
IF [#106 LT #110] THEN #110=#106
IF [#107 LT #110] THEN #110=#107
IF [#108 LT #110] THEN #110=#108

#111=#101(CALC. LARGEST X VALUE INTO #111)
IF [#102 GT #101] THEN #111=#102
IF [#103 GT #111] THEN #111=#103
IF [#104 GT #111] THEN #111=#104
IF [#105 GT #111] THEN #111=#105
IF [#106 GT #111] THEN #111=#106
IF [#107 GT #111] THEN #111=#107
IF [#108 GT #111] THEN #111=#108

#10188=#111-#110 (TOTAL DEVIATION DISPLAYED IN "SIZE")
#109=#10188
M69 P1134 (PROBE OFF)
IF [#10188 LT .0005] GOTO 100
#3000=1(PROBE RUN OUT IS .0005 OR GREATER!)
 
N100
M30


(---END OF PROGRAM---)

 

 

 

Used this today.....thank you!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...