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:

Back Spot facing with Pecking using Custom Drill Cycle


Recommended Posts

So I have some deep back spot faces to do. Why i created the custom drill cycle I shared a couple weeks ago. I recommend an auto flip out style tool and they felt it was too expensive. They want to use the hand load style and now I am adding another custom drilling cycle to support this. The issue is i need to now peck with this back spot facing tool. i have never needed to do this in all my years of machining. I have al the logic I need added to the post to do a one shot back spot face. Now i need to add pecking to that. i already used peck1 and peck 2 for Overall Clearance and Part clearance. Now i need to add pecking so I am looking to use custom drill parameters. I am trying to think of a way to use the depth which is the finally back spot depth and the Clear Part Depth to have a known value. Then take that and use a peck value to have the post peck drill to the finish depth with a value called out.

My clearance depth is -.65 and the finished depth is -.398. That give me a difference of .252 and I want to peck .05. The easiest thing to do it change the clearance to -.648 and then use .05 5 times. That is okay for the one parts, but part of writing any post logic is not the one time situation. The end user needs to have something that helps them without making it harder. advanced drill is great, but not plug and play in a situation like this. adding al the pecks and additional fields needed to do that way is not practical. I was thinking of doing a capture process of the distance it needs to travel do the math using the peck amount and then have the post determine how many pecks it need. The issue is I need to store that data in a buffer to then query to make sure each peck is correct and that we end up at the finally depth needed. Once way is to take the depth and subtract the first distance from that. That would be .200 in the first move from final depth. Then it would be a rinse and repeat until the final depth is reached. The simple way is to take have the programmer do the math. You have to cover 1" in then you need 20 pecks and put that amount in for each peck. Problem would be we only have 10 places to input values and not really an option. This is where the logic do just plug and play with a peck amount would be ideal. There is the logic built into the post to do this for standard pecking from top of hole until the bottom if a programmer wants long hand. I need to go the opposite direction and go from the deepest point to the final depth. I am just brain storming as I am writing this, but was wondering does anyone have something that have done to do this they wouldn't mind sharing?

Link to comment
Share on other sites

Ron,

As I found the original post this is James' work

O9201(REDUCING PECK MACRO)
(THIS PROGRAM IS DESIGNED TO RUN FROM A PRE-DRILLED HOLE)
(USED FOR A DEEP HOLE WHERE TWO DIFFERENT DRILL LENGTHS ARE NEEDED)
(#18 "R" RAPID PLANE)
(#4 "I" 1ST PECK)
(#17 "Q" MINIMUM PECK)
(#26 "Z" FINAL DEPTH)
(#5 "J" REDUCTION MULTIPLIER)
(#9 "F" FEEDRATE)
(#3 "C" PECK RETRACT COUNT)
(#100 INITIAL PLANE STORAGE)
(#101 REMAINING DISTANCE CHECK)
(#102 "Z" TARGET VALUE)
(#103 "Z" FEED/RAPID VALUE)
(#8 "E" SUB RAPID PLANE)
#10=#4
(ERROR CHECKS)
IF[#3EQ#0]GOTO5
#3=FIX[#3]
GOTO6
N5#3=1
N6IF[#26EQ#0]GOTO50
IF[#18EQ#0]GOTO51
IF[#9EQ#0]GOTO52
IF[#4EQ#0]GOTO53
IF[#18LT#26]GOTO54
IF[#5NE#0]GOTO7
#5=1
N7IF[#5GT1]GOTO55
IF[#17GE.2]GOTO8
#17=.2
N8#100=#5003(STORE CURRENT Z POSITION)
G0Z#18(RAPID TO R PLANE)
#101=ABS[#5003-#26](CHECK FOR REMAINING DISTANCE #101=FINAL DEPTH)
#103=#18(SET 103 TO R PLANE, #103=NEW "R" IN PART)
WHILE[#101GT[#4+.02]]DO1(TEST 101 FOR FINAL DEPTH)
#149=0
WHILE[#3NE#149]DO2(CHECK FOR RETURN TO "R")
G0Z#103(RAPID INTO NEW "R" PLANE)
IF[#101LE[#4+.02]]GOTO2
#103=[#5003-#4](NEW DEPTH)
G1Z#103F#9(FEED TO "Z")
#101=ABS[#5003-#26](RECALIBRATE DISTANCE TO GO)
#103=#103+.1(RETURN PECK IN "R" PLANE)
G0Z#103(RAPID TO NEW "R")
#4=[#4*#5](RECALCULATE FEED DISTANCE)
#149=#149+1(INCREMENT COUNTER)
IF[#4GT#17]GOTO1(CHECK FOR MINIMUM PECK)
#4=#17(SET TO MINIMUM PECK)
N1END2
G0Z#18(RAPID TO ORIGIONAL "R" PLANE)
END1
G0Z#103(RAPID TO PECK RETURN PLANE)
N2G1Z#26(FEED TO FINAL Z)
GOZ#18
N3G0Z#100
#4=#10
GOTO4
(ERROR STATEMENTS)
N50#3000=1(NO VALUE IN Z)
N51#3000=2(NO VALUE IN R)
N52#3000=3(NO VALUE IN F)
N53#3000=4(NO VALUE IN I)
N54#3000=5(R IS DEEPER THAN Z)
N55#3000=6(J VALUE MUST BE LE 1.)
N4M99

Though as a relook at that one, I don't think it's one of mine but I probably used it to create something else..so I don't want to credit for someone else's work on this....

  • Thanks 1
Link to comment
Share on other sites
18 minutes ago, Jake L said:

Dumb idea. Is there a parameter that can flip the Z axis plus/minus direction on the machine? If there is, how dumb would it be to G10 and use a standard drill peck cycle?

Not a good idea. This has to be long code. i need the ability to stop with the tool inside of the hole to attach and back spot facer. I then need to go to the depth back away and by hand remove the back spot facer. If it is in canned cycle we loose this kind of control.

Never mess with thing like this on machine tool it is a quick way to tear something up or get someone hurt.

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