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:

Please help with Check and Rerun Macro using Renishaw Probe


Tinhman
 Share

Recommended Posts

Good morning all,

Please help with this macro. I dont know what I am missing but my wear offset is not adding up the right value after the first run.

Machine is Mazak with fusion control.

Here the the code

 

********************************

(MC OP : 2)
#160=0
#161=0
#162=0
#163=0
#164=0
N400 (BORE FINISH .750 DIA)
(RGH AND FIN .750 DIA)
N201 (3/8 EM 2 F 1.0 LOC 1.45 LAH)
G0 G17 G40 G80 G90 T20
G0 G28 G91 Z0
G90
M06
#160=.750(SIZE WANT TO MACHINE)
#164=.001(TOLERANCE SET AT HIGHEST LIMIT)
#161=#[61000+#51999](CAPTURE ORIGINAL VALUE)
#162=-[#161+#163](CALCULATE NEW CUTTER COMP VALUE)
G10 L13 P#51999 R#162 (ADD NEW CUTTER COMP)
M00
(MAX - Z3.)
(MIN - Z-.3)
G00 G17 G90 G54 X.0032 Y-.0092 S6600 M03
G43 H#51999 Z3. T41
Z.1
G94 G01 Z.05 F100.
G41 D#51999 X-.045 Y.0482 F40.
G03 X-.1775 Y0. I-.0574 J-.0482
X.1775 Z.01 I.1775 J0.
X-.1775 Z-.03 I-.1775 J0.
X.1775 Z-.07 I.1775 J0.
X-.1775 Z-.11 I-.1775 J0.
X.1775 Z-.15 I.1775 J0.
X-.1775 Z-.19 I-.1775 J0.
X.1775 Z-.23 I.1775 J0.
X-.1775 Z-.27 I-.1775 J0.
X.1255 Y-.1255 Z-.3 I.1775 J0.
X-.1255 Y.1255 I-.1255 J.1255
X-.1775 Y0. I.1255 J-.1255
X.1555 Y-.0857 I.1775 J0.
X.0627 Y.0205 I-.0657 J.0362
G01 G40 X-.0072 Y-.0066
G00 Z.25
X-.0068 Y-.0092
Z.1
G01 Z.05 F100.
G41 D#51999 X-.055 Y.0482 F40.
G03 X-.1875 Y0. I-.0575 J-.0482
X.1875 Z.01 I.1875 J0.
X-.1875 Z-.03 I-.1875 J0.
X.1875 Z-.07 I.1875 J0.
X-.1875 Z-.11 I-.1875 J0.
X.1875 Z-.15 I.1875 J0.
X-.1875 Z-.19 I-.1875 J0.
X.1875 Z-.23 I.1875 J0.
X-.1875 Z-.27 I-.1875 J0.
X.1326 Y-.1326 Z-.3 I.1875 J0.
X-.1326 Y.1326 I-.1326 J.1326
X-.1875 Y0. I.1326 J-.1326
X.1628 Y-.093 I.1875 J0.
X.0717 Y.0146 I-.0651 J.0372
G01 G40 X.0014 Y-.0114
G00 Z3.
M09
M05
G0 G91 G28 Z0.
M01
(*)
(MC OP : 3)
(PROBE CHECK .750 HOLE)
N41 (6MM PROBE)
G0 G17 G40 G80 G90 T41
G0 G28 G91 Z0
G90
M06
M01
(MAX - Z1.)
(MIN - Z-.25)
G00 G17 G90 G54 X0. Y0.
G00 Z1.
G94
G65 P9810 G54 X0. Y0. F120.
G65 P9810 Z-.25
G65 P9814 D.75 (PROBE BOSS/BORE)
G65 P9810 Z.1
M05
G0 G91 G28 Z0.
M01
(*)
(MC OP : 5)
#163=[[#160-#138]/2]
IF[#138GT[#160+#164]]GOTO7777
IF[#138LT#160]GOTO400
#160=0
#161=0
#162=0
#163=0
#164=0
M01
(*)
(*)
(*)
(*)
N401 ( BORE FINISH 1.000 DIA)
N202 (3/8 EM 2 F 1.0 LOC 1.45 LAH)
G0 G17 G40 G80 G90 T20
G0 G28 G91 Z0
G90
M06
#160=1.0(SIZE WANT TO MACHINE)
#164=.001(TOLERANCE SET AT HIGHEST LIMIT)
#161=#[61000+#51999](CAPTURE CURRENT VALUE)
#162=-[#161+#163](CALCULATE NEW CUTTER COMP VALUE)
G10 L13 P#51999 R#162 (ADD NEW CUTTER COMP)
(MAX - Z3.)
(MIN - Z-.3)
G00 G17 G90 G54 X2.1599 Y.1318 S6600 M03
G43 H#51999 Z3. T41
Z.1
G94 G03 X1.8426 Y-.1318 Z.066 I-.1586 J-.1318 F40.
X2.1599 Y.1318 Z.0321 I.1586 J.1318
X1.8426 Y-.1318 Z-.0019 I-.1586 J-.1318
X2.1599 Y.1318 Z-.0358 I.1586 J.1318
X1.8426 Y-.1318 Z-.0698 I-.1586 J-.1318
X2.1599 Y.1318 Z-.1038 I.1586 J.1318
X1.8426 Y-.1318 Z-.1377 I-.1586 J-.1318
X2.1599 Y.1318 Z-.1717 I.1586 J.1318
X1.8426 Y-.1318 Z-.2056 I-.1586 J-.1318
X2.1599 Y.1318 Z-.2396 I.1586 J.1318
X1.8426 Y-.1318 Z-.2735 I-.1586 J-.1318
X2.2075 Y0. Z-.3 I.1586 J.1318
G01 X2.1012
G03 X1.8988 I-.1012 J0.
X2.1012 I.1012 J0.
G01 X2.3075
G03 X1.6925 I-.3075 J0.
X2.3075 I.3075 J0.
G01 X1.7875 Y.05
G41 D#51999 X1.7375
G03 X1.6875 Y0. I0. J-.05
X2.3125 I.3125 J0.
X1.6875 I-.3125 J0.
X1.7375 Y-.05 I.05 J0.
G01 G40 X1.7875
G00 Z3.
M09
M05
G0 G91 G28 Z0.
M01
(*)
(MC OP : 6)
(PROBE CHECK 1.0 HOLE)
N41 (6MM PROBE)
G0 G17 G40 G80 G90 T41
G0 G28 G91 Z0
G90
M06
(MAX - Z1.)
(MIN - Z-.25)
G00 G17 G90 G54 X2. Y0.
G00 Z1.
G94
G65 P9810 G54 X2. Y0. F120.
G65 P9810 Z-.25
G65 P9814 D1. (PROBE BOSS/BORE)
G65 P9810 Z.1
M05
G0 G91 G28 Z0.
M01
#163=[[#160-#138]/2]
IF[#138GT[#160+#164]]GOTO7777
IF[#138LT#160]GOTO401
#160=0
#161=0
#162=0
#163=0
#164=0
M01
(*)
GOTO8888
N7777
#3000=1(BORE TOO LARGE - OUT OF TOLERANCE)
N8888
M05
M09
G0 G91 G28 Z0.
G28 Y0.
G90
#3901=#3901+1
M30
%
 
 
Thank you in advance.
 
Tinhman
 
 
 
  • Like 1
Link to comment
Share on other sites

If you are using Renishaw probing macros then you need a T programmed on your P9814 line to tell the control which offset number to update. If you want the control to automagically re-run the tool when the bore is undersize then you need to put the logic in the program such that if the hole is under a certain tolerance to have it jump back to the beginning of that tool (e.g. IF [#143 LT  -.001] GOTO1). Also you will need to do this comparison prior to calling another macro because the variables where your measured values are become cleared out once you call another macro. 

 

Cheers!

Len

Link to comment
Share on other sites

Tinhman, I am not sure how often you need to probe but Mastercam does have a probing product so you can program for the probes through software instead of needing to know all the Macro info which in my opinion probing language can be quite confusing. I hope you get your answers but if you are unable to or if you plan on doing lots of probing in the future you may want to start looking at Mastercams Renishaw Productivity plus product.

I know that's not an answer for your current question / problem but if this is something you will be doing often it may be worth the investment for reliable probing code generation​ and more advanced probing capabilities. ​

link-http://www.mastercam.com/en-us/Solutions/Milling-Solutions/Renishaw-Productivity

 

Link to comment
Share on other sites

I have no clue on Mazak's however as I said earlier with Renishaw's macro O9814 if you want to update the offset with new cutter compensation you must program a T on the O9814 line in order for control to know which offset to update (G65 P9814 D.75 T1. (PROBE BOSS/BORE). Did you try this?? Also a simple IF statement like " IF [#143 LT  -.001] GOTO1" will compare the resulting error to a given value and cause the machine to return to beginning of the tool and recut the hole using the new offset (IF it exceeds the value). Did you try this as well? What was the result?

 

I don't see where Inspection Plus would be any different on a Mazak or why you would need to use #160-#164, but then again I don't do Mazak's

 

Good Luck!

Len Dye

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