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:

About custome drill cycle without Canned Drill Cycle


Alan Chen
 Share

Recommended Posts

Here's a couple of examples;

code:

      if drillcyc$ = 11, # reaming cycle

[

savdrl_gcode = gcode$

reamfeed = feed*4

pdrlcommonb

pbld, n$, pdrlxy, e$

pbld, n$, *sg01, *depth$, *feed, e$

if dwell$ <> 0, pbld, n$, sg04, *dwell$, e$

pbld, n$, sgfeed, *refht$, *reamfeed, e$

pcom_movea

]

if drillcyc$ = 12, # Reduced entry feed cycle

[

savdrl_gcode = gcode$

entryz = shftdrl$

pdrlcommonb

pbld, n$, pdrlxy, e$

pbld, n$, *sg01, *entryz, "F", no_spc$, *retr$, e$

pbld, n$, *depth$, *feed, e$

pbld, n$, *sg00, *refht$, e$

pcom_movea

]

Link to comment
Share on other sites

Sorry...

My meaning is I want to use "custome drill cycle",like G83 can without "Canned Drill Cycle"..

 

in post

---------------------------------------------------

Enable Canned Drill Cycle Switches

---------------------------------------------------

secandrill : yes #Use canned cycle for drill

secanpeck : yes #Use canned cycle for Peck

secanchip : yes #Use canned cycle for Chip Break

secantap : yes #Use canned cycle for Tap

secanbore1 : yes #Use canned cycle for Bore1

secanbore2 : yes #Use canned cycle for Bore2

secanmisc1 : yes #Use canned cycle for Misc1

secanmisc2 : yes #Use canned cycle for Misc2

 

----------------------------------

 

I can set to "No"... It will output with G01 & G00

Now I want to use "custome drill cycle", and same to output with G01 & G00

 

Thanks...

Link to comment
Share on other sites

If I understand you correctly you are looking to create a pecking custom drill cycyel that will give you longhand code and not the G83 canned pecking action.

 

Correct?

 

You could set up a custom, drill cycle to that, yes,

Link to comment
Share on other sites

01. I want to use G83 function with use canned cycle...

I can modify the post parameter

"usecanpeck$ : yes$ #Use canned cycle for Peck"

Set to "No$"

The depth will output with G00 & G01...

 

02. I want to crate "custome drill cycle"...

The depth will output like G83 without "use canned cycle"

Link to comment
Share on other sites

No...

Ok,I crate the toolpath with drill..

smoetimes I want to use G83 with canned cycle function...

so it will output with G83 X? Y? Z? R? Q?...

But sometimes I need output with G00 & G01.

Because I want to set "First peck" & "other peck".

And when the hole breakthrough, I want to change the speed & Feed....

So, I need "custome drill cycle"...

Link to comment
Share on other sites

Alan,

 

After rereading this thread, this is not going to do all you want but it might get you on the path to complete what you are trying to do

 

This is a simple long hand pecking cycle

Set the peck amount in same box as G83 and set your absolute retract height in the box right underneath

that places the peck amount on the peck1$ variable and the absolute retract on the peck2$ variable.

You will have to format the variables that do not have a $ at the end of them

 

code:

pdrlcommonb

if drillcyc$ = 19,

[

pck_amt = peck1$

retract_2 = peck2$

pck_no = (depth$ - tosz$) / pck_amt

pck_no = pck_no - (pck_no * 2)

cut_amt_inc = pck_amt

cut1 = tosz$ - cut_amt_inc

pbld, n$, pdrlxy, strcantext, e$

pbld, n$, sg00, *retract_2, e$

pbld, n$, sg01, *cut1, *feed, e$

count = pck_no - 1

pass = 1

WHILE count > 1,

[

cut2 = cut1 + (-cut_amt_inc * pass)

pbld, n$, sg00, *retract_2, e$

pbld, n$, sg01, *cut2, *feed, e$

pass = pass + 1

count = count - 1

]

pbld, n$, sg00, *retract_2, e$

pbld, n$, sg01, *pfzout, *feed, e$

pbld, n$, sg00, *retract_2, e$

pcom_movea

]

formatted variables

code:

fmt Z 2 cut1

fmt Z 2 cut2

fmt 2 cut_amt_inc

fmt Z 2 retract_2

fmt 4 pck_cnt

fmt 4 pck_no

fmt 2 pck_amt

fmt 4 pass

fmt 4 count

Link to comment
Share on other sites

Alan, hows this grab you?

 

code:

G00 G17 G40 G80 G90

N100 T1 ( 3/4 DRILL)

M6

(MAX - Z2.)

(MIN - Z-3.115)

G00 G90 G54 X0. Y0. S4000 M03

G43 H1 Z2.

(INITIAL PECK)

G00 Z.1

G01 Z-.5 F12.

(MAIN PECKING)

G00 Z-.45

S2500

G01 Z-.625 F8.

G00 Z.1

G00 Z-.575

G01 Z-.75

G00 Z.1

G00 Z-.7

G01 Z-.875

G00 Z.1

G00 Z-.825

G01 Z-1.

G00 Z.1

G00 Z-.95

G01 Z-1.125

G00 Z.1

G00 Z-1.075

G01 Z-1.25

G00 Z.1

G00 Z-1.2

G01 Z-1.375

G00 Z.1

G00 Z-1.325

G01 Z-1.5

G00 Z.1

G00 Z-1.45

G01 Z-1.625

G00 Z.1

G00 Z-1.575

G01 Z-1.75

G00 Z.1

G00 Z-1.7

G01 Z-1.875

G00 Z.1

G00 Z-1.825

G01 Z-2.

G00 Z.1

G00 Z-1.95

G01 Z-2.125

G00 Z.1

G00 Z-2.075

G01 Z-2.25

G00 Z.1

G00 Z-2.2

G01 Z-2.375

G00 Z.1

G00 Z-2.325

G01 Z-2.5

G00 Z.1

G00 Z-2.45

G01 Z-2.615

G00 Z.1

(REDUCING PECK)

S1250

G00 Z-2.565

G01 Z-2.735 F6.

G00 Z.1

G00 Z-2.685

G01 Z-2.843

G00 Z.1

G00 Z-2.793

G01 Z-2.9402

G00 Z.1

G00 Z-2.8902

G01 Z-3.0277

G00 Z.1

G00 Z-2.9777

G01 Z-3.1064

G00 Z.1

G00 Z-3.0564

G01 Z-3.115

G00 Z.1

M05

G91 G28 Z0.

G28 Y0.

G69

G90

M30

%

Hang on, I just realized I have to make an addition to rapid back down for the next cut.

 

Almost there.

 

[ 03-05-2006, 12:48 PM: Message edited by: jmparis ]

Link to comment
Share on other sites

OK 1 custom drill cycle coming up.

You set an initial peck depth, a peck amount and an amount of distance you want to perform a reducing peck on. If your drill 4" in deep an you want to reduce the last ince you place 1" in the box

 

On the custom parameters tab you add feeds and speeds for each section of the cycle, plus the reducing amonut of the peck the max and min pecks amounts.

 

No warranties given or implied wink.gif

 

Here are the variables

code:

fmt Z 2 cut1

fmt Z 2 cut2

fmt 2 cut_amt_inc

fmt Z 2 strt_hgt

fmt Z 2 pck_strt

fmt Z 2 retract_2

fmt Z 2 strt_pck_cut

fmt 4 pck_cnt

fmt 4 pck_no

fmt 2 pck_amt

fmt Z 2 pck_depth

fmt Z 2 set_z

fmt 4 pass

fmt 4 count

fmt S 4 pck_speed

fmt F 15 pck_feed

fmt S 4 rdcd_speed

fmt F 15 rdcd_feed

fmt 2 rdcd_step

fmt 2 rdcd_pck_start

fmt 2 rdcd_percent

fmt 2 rdcd_max

fmt 2 rdcd_min

fmt Z 2 rdcd_strt

fmt Z 2 rdcd_cut1

fmt 2 rdcd_pck

fmt 2 perc_calc

fmt Z 2 end_rdcd_pck

fmt 2 rmn_pck_dist

fmt Z 2 rpd_hgt

fmt Z 2 rpd_plane

Here is the cycle

code:

pdrlcommonb

if drillcyc$ = 19,

[

rpd_plane = .05

pck_strt = -(peckclr$)

pck_amt = peck1$

retract_2 = peck2$

rdcd_step = -(dwell$)

pck_no = (depth$ - pck_strt - rdcd_step) / pck_amt

pck_no = pck_no - (pck_no * 2)

cut_amt_inc = pck_amt

pck_speed = drl_prm1$

pck_feed = drl_prm2$

#Initial Peck Section

pbld, n$, pdrlxy, strcantext, e$

pbld, n$, "(INITIAL PECK)", e$

pbld, n$, sg00, *retract_2, e$

pbld, n$, sg01, *pck_strt, *feed, e$

# Main pecking section

pbld, n$, "(MAIN PECKING)", e$

count = pck_no

pass = 1

rpd_hgt = pck_strt + rpd_plane

pbld, n$, sg00, rpd_hgt, e$

WHILE count > 1,

[

cut2 = pck_strt + (-cut_amt_inc * pass)

rpd_hgt = cut2 + rpd_plane

pbld, n$, pck_speed, e$

pbld, n$, sg01, *cut2, pck_feed, e$

pbld, n$, sg00, *retract_2, e$

pbld, n$, sg00, *rpd_hgt, e$

pass = pass + 1

count = count - 1

]

pck_depth = depth$ - rdcd_step

pbld, n$, sg01, *pck_depth, pck_feed, e$

pbld, n$, sg00, *retract_2, e$

#Reducing Peck section

pbld, n$, "(REDUCING PECK)", e$

rdcd_pck_start = pck_depth

rdcd_speed = drl_prm3$

rdcd_feed = drl_prm4$

rdcd_percent = drl_prm8$

rdcd_max = drl_prm9$

rdcd_min = drl_prm10$

rdcd_strt = pck_depth + .05

rdcd_cut1 = rdcd_pck_start - rdcd_max

end_rdcd_pck = depth$

rpd_hgt = pck_depth + rpd_plane

pbld, n$, rdcd_speed, e$

pbld, n$, sg00, rpd_hgt, e$

pbld, n$, sg01, rdcd_cut1, rdcd_feed, e$

pbld, n$, sg00, *retract_2, e$

perc_calc = rdcd_percent / 100

rdcd_pck = rdcd_max - (rdcd_max * perc_calc)

rmn_pck_dist = dwell$ - rdcd_max

rpd_hgt = rdcd_cut1 + rpd_plane

pbld, n$, sg00, rpd_hgt, e$

 

while rmn_pck_dist > rdcd_pck,

[

rdcd_cut1 = rdcd_cut1 - rdcd_pck

rpd_hgt = rdcd_cut1 + rpd_plane

pbld, n$, sg01, rdcd_cut1, rdcd_feed, e$

pbld, n$, sg00, *retract_2, e$,

pbld, n$, sg00, rpd_hgt, e$

rdcd_pck = rdcd_pck - (rdcd_pck * perc_calc)

rmn_pck_dist = depth$ - rdcd_cut1

rmn_pck_dist = rmn_pck_dist - (rmn_pck_dist * 2)

]

 

rpd_hgt = rdcd_cut1 + rpd_plane

pbld, n$, sg01, pfzout, rdcd_feed, e$

pbld, n$, sg00, *retract_2, e$

 

pcom_movea

]

Cycle Tab

code:

[drill cycle 20]

1. "SPECIAL PECK CYCLE"

2. ""

3. "Reducing Distance"

4. ""

5. ""

6. ""

7. "Peck Amount"

8. "Peck Clearance Height"

9. "Initial Peck"

10. ""

11. ""

Custom Cycle Tab

code:

[drill cycle 20 custom parameters]

1. "Custom Drill Parameters 20"

2. "Pecking RPM"

3. "Pecking Feed"

4. "Reduced Peck RPM"

5. "Reduced Peck Speed"

6. ""

7. ""

8. ""

9. "Reducing Peck %"

10. "Start Reducing Peck"

11. "Minmium Reducing Peck"

Of course remember to add it into your operation notes.

 

code:

sdr19   "SPECIAL PECK DRILL" #    "         "

I have found 1 issues that I don't know what causes them, if you increase you reducing percentage to over 30% it hangs.

 

If I find the error, I'll clear it but it is otherwise usable.

Link to comment
Share on other sites
  • 10 months later...

been almost a year now and no one's said boo about it. I'm trying to do the same thing right now w/o switching to "no" in post. I'm drawing a blank (as usual) on "operation notes". John, are you talking about documenting the edit at the top? For what ever reason (my own for sure) I'm not posting any drill code using this.

Link to comment
Share on other sites

This section here Louie

 

code:

Select operation note

sdr00 "DRILL/CBORE" # String definition

sdr01 "PECK DRILL." # " "

sdr02 "CHIP BREAK." # " "

sdr03 "TAP........" # " "

sdr04 "BORE 1....." # " "

sdr05 "BORE 2....." # " "

sdr06 "FINE BORE.." # " "

sdr07 "MISC 2....." # " "

sdr08 "CUST 09...." # " "

sdr09 "ID PROBE" # " "

sdr10 "OD/BOSS PROBE" # " "

sdr11 "X CENTER INSIDE" # " "

sdr12 "Y CENTER INSIDE" # " "

sdr13 "ROTATE Y AXIS" # " "

sdr14 "CENTER X OUTSIDE" # " "

sdr15 "CENTER Y OUTSIDE" # " "

sdr16 "AUTO EDGEFIND" # " "

sdr17 "ROTATE X AXIS" # " "

sdr18 "HOLE TO HOLE ORIENTATE" # " "

sdr19 "Z INSPECT HEIGHT" # " "

sdr20 "Custom Test"

No code, how is it set up?

Link to comment
Share on other sites

coming up blank. chicken didn't work.

 

code:

 

( Program Name - 3325_MTL )

( Program Date - 01 - 31 - 07 )

(T6 .800 CBORE, .8 DIA)

(SNK RB2-N)

N0100G91 G28 X0.0 Y0.0 Z0.0

N0110G20 G40 G49 G80 G90 G94

 

(-----------------------------)

(T6 .800 CBORE, .8 DIA)

(-----------------------------)

 

N0120 G90 G54 G0 X-10.525 Y0. S2000 M3

N0130 G43 H6 Z1. M08

N0140 G80

N0150 G91 G28 Z0 M09

N0160 G28 X0.0 Y0.0

N0170 T6 M06

N0180 M05

N0190 M30

Link to comment
Share on other sites

My custom drill cycles llok like this

 

code:

pdrlcst$         #Custom drill cycles 8 - 19 (user option)

#Use this postblock to customize drilling cycles 8 - 19

pdrlcommonb

#if drillcyc = 8, pcan1, pbld, n, *sgdrlref, *sgdrill, pdrlxy, pfzout, pcout,

# prdrlout, dwell, *feed, strcantext, e

if drillcyc$ = 8,

[

sub_prg_call = peck1$

pcan1, pbld, n$, *sg00, *sgabsinc, pfxout, pfyout, strcantext, e$

pbld, n$, "M98", *sub_prg_call, e$

]

#else, "CUSTOMIZABLE DRILL CYCLE ", pfxout, pfyout, pfzout, pfcout, e

pcom_movea

 

pdrlcommonb ####### ID PROBE CYCLE ADDED 08/01/05 - JMP

#~drillcyc, e

if drillcyc$ = 9,

[

"(PROBE ID)", e$

"(AUTO CENTERING CYCLE)", e$

pbld, n$, "G65 P8010", *z_retract, "D0.", *drl_prm6$, *uptol, *lowtol, "V0.", *drl_prm7$, *pfzout, e$

pbld, "G04 P100", e$

pcom_movea

]

 

pdrlcommonb #### OD/BOSS PROBE CYCLE ADDED 08/01/05 - JMP

#~drillcyc, e

if drillcyc$ = 10,

[

"(PROBE OD/BOSS)", e$

"(AUTO CENTERING CYCLE)", e$

pbld, n$, "G65 P8017", *drl_prm1$, *z_retract, "D0.", *drl_prm6$, *uptol, *lowtol, "V0.", *drl_prm7$, *pfzout, e$

pbld, "G04 P100", e$

pcom_movea

]

you could try using the ~drillcyc, e$

 

and check which cycle is actually being output

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