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:

Posting G13's


Rob @ Target Machine
 Share

Recommended Posts

Does any one have any tricks up their sleeves to get G13's out of Mcam Mpmaster post? My solution so far is to use custom drill cycle 9 to post subprogram calls(prog # is passed through peck1)variable. I write the G13's manually into a sub. I know I could use another custom cycle to post simple G13 routines, but I need something more like this:

curse.gif

 

00216 (CC35542.216..SP)

(.060 EM-.1016 FEEDTHRU)

G90

Z.01

G1Z-.012F3.

G13I.0702D26F3.

G13I.0702D26F4.

G1Z-.057F3.

G13I.0503D27F3.

G1Z-.067

G13I.0507D27F3.

G13I.0507D27F4.

G1Z-.012F20.

G13I.0702D26F5.

G0Z.05

M99

 

Any ides would be appreciated.

Link to comment
Share on other sites

What you are trying to accomlish is NOT a Mastercam function. It is a shorthand machine coding method.

 

AFAIK, the way you are attempting it, a custom drill cycle, is the way this needs to be done.

Link to comment
Share on other sites

That's right, but I have altered mill.txt to name my new cycles(which I will code later).I am still deciding how to label the custom parameters for each new cycle.

 

firebounce.gif My main problem right now is passing these custom 1-10 parameters to my post. What variables are used? eg. as peck1 is for 1st peck - what variable represents custom drill parameters 1-10?

 

Any examples of a custom drill cycle out there ?

Link to comment
Share on other sites

drl_prm1$ - drl_prm10$

 

are the custom drill paramter variables

 

quote:

Any examples of a custom drill cycle out there ?

Do a search on Custom Drill cycles there is a TON of information on the forum

Link to comment
Share on other sites

The subout$ varaible comes into mind. I would look to the handing of the sub methods and use that logic to construct what you are after. May have to buffer some information. I would think using the program number and NCI name would be best with a mi trigger, but the door is really wide open to do what you want, just depends on how far you are needing or wanting to go with things.

 

HTH

Link to comment
Share on other sites

The variable subout determines which channel you want your posted data in (4 channels).

 

quote:

I would like to force a subprogram call as in custom 9 of Mpmaster post and send my drill code to the sub I called. How do I make a sub from my custom cycle?

You're asking about two seperate processes. Since You're using G13 I'm assuming the subprogram is inside of your control and I'll guess a Fanuc Control. To transfer your drl_prm1 - drl_prm10 to the sub you'll first need to transfer the MC variables to the Fanuc local variables (#1 - #33) the the call the G13 bringing in the variables.

 

I don't have a macro call in my drill cycles and I don't have a Fanuc manual to look at for the Variable letters (some letters will be missing) but it would probably look similar to this;

 

code:

      if drillcyc = 9, # G13 Macro cycle

[

pbld, n, pdrlxy, e

pbld, n, refht, e

pbld, n, "G13", "A", drl_prm1, "B", drl_prm2, "C", drl_prm3, "D", drl_prm4,

"E", drl_prm5, "F", drl_prm6, "G", drl_prm7, "H", drl_prm8, "I", drl_prm9,

"I", drl_prm10, e

pcom_movea

]

I see that you have Z changes in your cycle and apparently your G13 program won't handle that. If this is an added cycle I would make the G13 program handle them. If this is a machine tool cycle you will be needing much more to this drill cycle.

 

[ 10-12-2008, 12:06 PM: Message edited by: Tim Johnson ]

Link to comment
Share on other sites

quote:

Since You're using G13 I'm assuming the subprogram is inside of your control and I'll guess a Fanuc Control.

G13 is a Haas circle milling cycle

Postion the tool at XY centerline and Z depth

the G13 line contains the radius and feedrate

I think you can also defined stepover and a finish passes. G13 is a CCW cicle mill (climb cut)

and G12 is clockwise.

Link to comment
Share on other sites

I was thinking about something like this:

 

if drillcyc = 10, # G13 - Standard Feedthru

[

psub_call_s

psub_st_s

pbld, n, pdrlxy, e # depths and radii are in drl_prm 1-10

pbld, n, refht, e # feedrates and ccomp assignment are in mi 3-8

pbld, n, "G1 Z", drl_prm1, "F", mi3, e #

pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5, e # solder well depth

pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5, e # spring pass

pbld, n, "G1 Z", drl_prm3, "F", mi3, e

pbld, n, "G13", "I", drl_prm4, "F", mi6, "D", mi7 e # rough @1/2 depth

pbld, n, "G1 Z", drl_prm5, "F", mi3, e

pbld, n, "G13", "I", drl_prm4, "F", mi6, "D", mi7 e # rough at finish depth

pbld, n, "G13", "I", drl_prm5, "F", mi6, "D", mi7, e # finish feedthru diameter

pbld, n, "G13", "I", drl_prm5, "F", mi6, "D", mi7, e # spring pass

pbld, n, "G1 Z", drl_prm1, "F", mi8, e

pbld, n, "G13", "I", drl_prm2, "F", mi4, "D", mi5 e # cut burr at solder well depth

pbld, n, refht, e

psub_end_s

pcom_movea

]

 

 

I,m using Mpmaster v9.1post. The concept of how to code a custom drill cycle is getting clearer to me, but how

do I push code into a sub, and return???

 

The additional point part is no prob.

 

Am I even in the ballpark??? banghead.gifcuckoo.gif

 

[ 10-13-2008, 11:02 AM: Message edited by: mastercamguru ]

Link to comment
Share on other sites

This is what I came up with :

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

#Use this postblock to customize drilling cycles 8 - 19

#

# custom vars ****************************************

fmt Z 15 depth_1

fmt Z 15 depth_2

fmt Z 15 depth_3

fmt Z 15 depth_4

fmt I 15 rad_1

fmt I 15 rad_2

fmt I 15 rad_3

fmt I 15 rad_4

fmt F 15 plunge_fr

fmt F 15 rough_fr

fmt F 15 finish_fr

fmt D 15 comp_1

fmt D 15 comp_2

fmt D 15 comp_3

fmt Z 15 clear_hgt

fmt Z 15 feed_hgt

#

depth_1 = drl_prm1 # depths and radii are in drl_prm 1-8

rad_1 = drl_prm2

depth_2 = drl_prm3

rad_2 = drl_prm4

depth_3 = drl_prm5

rad_3 = drl_prm6

depth_4 = drl_prm7

rad_4 = drl_prm8

#

#

plunge_fr = mr1 # feedrates are in ------- mr 1-3

rough_fr = mr2

finish_fr = mr3

#

#

comp_1 = mi3 # cutter comps are in ---- mi 3-5

comp_2 = mi4

comp_3 = mi5

#

#

clear_hgt = refht_a

feed_hgt = refht_i

# *******************************************************

#

pdrlcommonb

if drillcyc = 8,

[

sub_prg_call = peck1

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

]

if drillcyc = 9, # G13 - Standard Feedthru

[

#psub_call_s

#psub_st_s

pbld, n, feed_hgt,

pbld, n, "G1", depth_1, plunge_fr, e

pbld, n, "G13", rad_1, rough_fr, comp_1, e # solder well depth

pbld, n, "G13", rad_1, finish_fr, comp_1, e # spring pass

pbld, n, "G1", depth_2, plunge_fr, e

pbld, n, "G13", rad_2, rough_fr, comp_2, e # rough @1/2 depth

pbld, n, "G1", depth_3, plunge_fr, e

pbld, n, "G13", rad_2, rough_fr, comp_2, e # rough at finish depth

pbld, n, "G13", rad_3, finish_fr, comp_2, e # finish feedthru diameter

pbld, n, "G13", rad_3, finish_fr, comp_2, e # spring pass

pbld, n, "G1", depth_1,finish_fr, e

pbld, n, "G13", rad_1, finish_fr, comp_1, e # cut burr at solder well depth

pbld, n, clear_hgt, e

#psub_end_s

]

pcom_movea

 

pdrlcst_2 #Custom drill cycles 8 - 19, additional points (user option)

#Use this postblock to customize drilling cycles 8 - 19

pdrlcommonb

if drillcyc = 8,

[

sub_prg_call = peck1

pcan1, pbld, n, pxout, pyout, strcantext, e

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

]

if drillcyc = 9, # G13 - Standard Feedthru Additional Points

[

pcan1, pbld, n, pxout, pyout, strcantext, e

]

pcom_movea

 

Post crashed and reported duplicate pdrlcommonb and posted a few G13's, two place decimals for feedrates, and a long line of G1's and G13's without any x-y moves. Not as easy as it looks. LOL curse.gif

Link to comment
Share on other sites

I forgot about these but they work. Got them straight from the Bridgeport guy for a Fanuc 0i-MC barely a year old.

 

I hope this can help at least a little.

 

O9013(G13 CCW CUTTING)

(OIM & 18MC CONTROL)

#25=#4

#7=#7+13000

#1=#[#7]

IF[#6EQ#0]GOTO1

#6=#6-#1

N1#2=#4-#1

#3=#2/2

#4=#2*2

IF[#6NE#0]GOTO10

IF[#18EQ#0]GOTO5

IF[#25LE#1]GOTO3333

IF[#18GE#2]GOTO4444

#11=#18-#3

#12=#11*#11

#13=#3*#3

#14=#13-#12

#10=SQRT[#14]

#15=#2-#18

#16=#9*3

G91G94

G3X#18Y-#10R#3F#16

X#15Y#10R#3F#9

X-#4R#2

X#4R#2

X-#15Y#10R#3

X-#18Y-#10R#3F#16

GOTO100

N5

IF[#25LE#1]GOTO3333

G91G94

G3X#2R#3

X-#4R#2

X#4R#2

X-#2R#3

GOTO100

N10

IF[#17GE[#1*2]]GOTO5555

IF[#25LT#1]GOTO6666

G91G94

#18=#17/2

#19=#6/2

G3X#2R#3F#9

G3X-#4R#2

X#4R#2

DO1

#4=#17+#4

#2=#4/2

IF[[#4-#30]GE#6]GOTO20

G3X-#4R#2

#30=#2

#4=#17+#4

#2=#4/2

IF[[#4-#30]GE#6]GOTO30

X#4R#2

#30=#2

END1

N20#2=#2-#18

#4=#4-#17

#20=#6-#2

#4=#4+#20

#2=#4/2

G3X-#4R#2

G3I#6

G3X#6R#19

GOTO100

N30#2=#2-#18

#4=#4-#18

#20=#6-#2

#4=#4+#20

#2=#4/2

G3X#4R#2

G3I-#6

G3X-#6R#19

N100G1G90

N3333#3000=5(END MILL TOO LARGE)

N4444#3000=6(RAPID MOVE TOO LARGE)

N5555#3000=7(STEP OVER TOO LARGE)

N6666#3000=8(ENTRY ARC TOO SMALL)

%

Link to comment
Share on other sites

Ok better got x-y output back, but some missing code from pdrlcst routine pdrlcst_2 is ok though.(assuming I can get sub to post), but I'll need to get G13 routine working first. This is what I'm getting now:

T1 M06 (.060 EM)

(MIN - Z0.)

G00 G90 G54 X-1.1158 Y-.5451 S6000 M08

G91 G43 H1 Z0. M03

G92 Z.05 M08

G90

G1 Z-.012 F1.5

G13 I.0703 F3. D28.

G13 F5.

G1 Z-.057

G13 I.0503 D29.

G1 Z-.067

G13

G13 I.0508

G13

G1

G13

X-1.0158

Y-.4451

X-2.2743 Y-.3918

I changed fmt statements as follows:

# custom vars ****************************************

fmt Z 2 depth_1

fmt Z 2 depth_2

fmt Z 2 depth_3

fmt Z 2 depth_4

fmt I 12 rad_1

fmt I 12 rad_2

fmt I 12 rad_3

fmt I 12 rad_4

fmt F 15 plunge_fr

fmt F 15 rough_fr

fmt F 15 finish_fr

fmt D 15 comp_1

fmt D 15 comp_2

fmt D 15 comp_3

fmt Z 2 clear_hgt

fmt Z 2 feed_hgt

I moved them up to where I can see others at beginning of post section. Something tells me I might be assigning a a drl_prm value to a variable that has not yet been defined. That would not end well. I'll move the variable assignments down to right before the drill cycle section.

Link to comment
Share on other sites

Axis ---I wish I had macro B.

 

This is a yasnac I80 control on a Matsuura mc510-vf. The G13's were an option for the control, but no macros that I am aware of. The control ignores any line beginning with #. I'm just trying to define a few cutom drill cycles to output the G13'3 so I don't have to make manual edits so often.

Link to comment
Share on other sites

T1 M06 (.060 EM)

(MIN - Z0.)

G00 G90 G54 X-1.1158 Y-.5451 S6000 M08

G91 G43 H1 Z0. M03

G92 Z.05 M08

G90

Z0. G1 Z-.012 F1.5

G13 I.0703 F3. D28.

G13 I.0703 F5. D28.

G1 Z-.057 F1.5

G13 I.0503 F3. D29.

G1 Z-.067 F1.5

G13 I.0503 F3. D29.

G13 I.0508 F5. D29.

G13 I.0508 F5. D29.

G1 Z-.012 F5.

G13 I.0703 F5. D28.

Z0.

X-1.0158

Y-.4451

X-2.2743 Y-.3918

Link to comment
Share on other sites

Like I said you are making this a lot harder than it has to be. I use to do this with a Mi trigger in my post. I would use the NCI name and program number to assign my sub program number. I then used a mi trigger in the pheader and psof part fo the post that took the standard header and then made it a sub header and the same with the M30 by using the trigger it made it a M99 instead of a M30. Then in an operation you choose you can then use a Mr to assign the main program with the sub program number you want. You can even do a manual unit and just call it if you want everything coming out of Mastercam. Keep it simple has always been my rule.

 

HTH

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