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:

MPMaster X beta


kccadcam
 Share

Recommended Posts

Back again.......Makino A55e's

 

OK, I'm trying to insert a tool break check at the end of each tool: G65 P9613 A0.030 H1

The -A- value is a +/- tolerance (how much variance on touching probe before machine alarms out)

 

I've copied a section of the MPMaster post (ppredtool) and modified to this:

code:

 

# --------------------------------------------------------------------------

# Tool Break Check Output

# --------------------------------------------------------------------------

 

pbreak

"(BREAK CHECK)", e$

if tool_typ$ = 1, "G65 P9613 A0.030 H1" # CENTER DRILL

if tool_typ$ = 2, "G65 P9613 A0.030 H2" # SPOT DRILL

if tool_typ$ = 3, #-----------------------# DRILL

[

if tldia$ <= .500, "G65 P9613 A0.025 H3"

else, "G65 P9613 A0.050 H3"

]

if tool_typ$ = 4, "G65 P9613 A0.025 H4" # TAP-RH

if tool_typ$ = 5, "G65 P9613 A0.025 H5" # TAP-LH

if tool_typ$ = 6, "G65 P9613 A0.025 H6" # REAMER

#if tool_typ$ = 7, "G65 P9613 A0.015 H1" # BORING BAR

#if tool_typ$ = 8, "G65 P9613 A0.015 H1" # COUNTER BORE

if tool_typ$ = 9, "G65 P9613 A0.015 H9" # COUNTER SINK

if tool_typ$ = 10, #----------------------- END MILL FLAT

[

if tldia$ <= .500, "G65 P9613 A0.010 H105"

if tldia$ > .500 & tldia$ < .750, "G65 P9613 A0.015 H106"

if tldia$ >= .750, "G65 P9613 A0.020 H107"

]

if tool_typ$ = 11, #----------------------- END MILL SPHERE

[

if tldia$ <= .500, "G65 P9613 A0.010 H11"

if tldia$ > .500 & tldia$ < .750, "G65 P9613 A0.015 H11"

if tldia$ >= .750, "G65 P9613 A0.020 H11"

]

if tool_typ$ = 12, "G65 P9613 A0.015 H12" # CHAMFER MILL

#if tool_typ$ = 13, "G65 P9613 A0.015 H1" # FACE MILL

#if tool_typ$ = 14, "G65 P9613 A0.015 H1" # SLOT MILL

#if tool_typ$ = 15, "G65 P9613 A0.015 H1" # CORNER RAD MILL

if tool_typ$ = 16, "G65 P9613 A0.015 H16" # DOVETAIL MILL

if tool_typ$ = 17, "G65 P9613 A0.015 H17" # TAPER MILL

if tool_typ$ = 18, "G65 P9613 A0.015 H18" # LOLLIPOP MILL

if tool_typ$ = 19, "G65 P9613 A0.015 H19" # END MILL BULL


And inserted pbreak at end of pretract:

code:

 if abs(fmtrnd(cabs)) > 360 & nextop$ <> 1003,

[

if lock_codes = one, pbld, n$, *sunlock, e$

rotretflg = 1

pbld, n$, 'G28', protretinc, e$

rotretflg = 0

if lock_codes = one & cuttype = 0, pbld, n$, *slock, e$

]

absinc$ = sav_absinc

coolant$ = sav_coolant

pbreak, e$

So, I'm getting ouput, but it's calling the next tool_type instead of current or previous tool_type

 

code:

 Y-8.9243                                                    ppeck_2$ ppeck_2$

X-5.0074 ppeck_2$ ppeck_2$

X-4.7574 ppeck_2$ ppeck_2$

G80 M9 pcanceldc$ pcanceldc$

M5 ptlchg1002$ pretract

G91 G28 Z0. ptlchg1002$ pretract

(BREAK CHECK) ptlchg1002$ pbreak

G65 P9613 A0.025 H4 <------tool_type 4 = tap --next tool ptlchg1002$ pretract

M01 ptlchg$ ptlchg$

T5470 M6 (8-32 EXPRESS TAP -GH5-) ptlchg$ p__48:1625

(MAX - Z9.) ptlchg$ p__51:1638

(MIN - Z1.25) ptlchg$ p__51:1638

M11 ptlchg$ p__50:1635

G17 G0 G90 G54 X-5.2574 Y-8.4243 B90. S3000 M3 ptlchg$ p__50:1635

M10 ptlchg$ p__50:1635

G43 H1 Z9. M8 T2120 ptlchg$ p__50:1635

/M97 (SHOWER) ptlchg$ p__50:1635

Z2.6 pzrapid$ prapidout

G95 M135 S3000

How do I get to call previous tool_type??

When all is working well I will change all H values to 1 (Right now I've modified h values to reflect tool_type # to see what is coming out where......

Link to comment
Share on other sites

Thank you Dave!!

Sometimes the obvious will get you.....

 

Added !tool_typ$ !tldia$ to ptlchg0$

code:

 ptlchg0$         #Call from NCI null tool change (tool number repeats)

if op_id$ <> last_op_id,

[

rd_params$ # Read parameters - pparameter

pmisccheck

]

pcuttype

toolcount = toolcount + 1

prvtp = rbuf(3,toolcountp)

if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)

else, nexttool = first_tool$

if (mi8$=one & (op_id$ <> last_op_id | (op_id$ = last_op_id & xform_op_id$ <> op_id$)))

| ((tlplnno$ <> prvtp | rotary_type$ <> last_rotary_type) & ret_on_indx), pstop

pcom_moveb

pcheckaxis #Check for valid rotary axis

!tool_typ$ !tldia$ <--------Added here ----

Changed callouts to prv_tool_typ$ and prv_tldia$

and it works!!!

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