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:

Change 5 axis G0/G1 drilling Cycles output?


crazy^millman
 Share

Recommended Posts

Ok here is what I got. I am using MPGEN5AX. I am trying to use rapid moves for all mt 5 axis stuff but wantthe ability to feed during my drilling operations for my rapid outs. The machine has a dog leg problem and if you rapid out of the hole bam boom and all that Jazz. Now if you make the post do all g1 rapid move the fastest the machine can read is 400 imp though it is capable of higher in G00 and with HPCC on it wants to accel and deccel when this is not needed. I was hoping to do just a easy post modifaction like below to achieve the desired results.

 

code:

prapidout       #Output to NC of linear movement - rapid

if drillcyc >= 0,

[

pcan1, pbld, n, `sg01, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, "F100.", strctxt, scoolant, e

]

else,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, strctxt, scoolant, e

]

I went here becuase my debug told me this:

code:

O0000 (:0000)                 pheader 40

(PROGRAME - PR-J108-BACK-1) pheader 40

(PROVEN DATE / / ) pheader 40

(CUST-) pheader 40

(P/N-) pheader 40

(SEE-SU-SHEET) pheader 40

(POST DATE - 20-06-05 TIME - 16:25) pheader 40

(RON BRANCH) pheader 40

(T10 | 15/32 DRILL ) pwrtt p__59:2178 40

(T11 | .500 REAMER ) pwrtt p__59:2178 40

(T8 | 21/32 DRILL ) pwrtt p__59:2178 40

(T9 | 3/4-10 TAPRH ) pwrtt p__59:2178 40

(T6 | 11/32 DRILL ) pwrtt p__59:2178 40

(T7 | .375 REAMER ) pwrtt p__59:2178 40

G20 psof 42

G0 G17 G40 G80 G90 G94 G98 psof 42

G0 G28 G91 Z0. psof prefreturn 42

G91G28Z0.M9 psof 42

G0 G55 G90 X0. Y0. A0. B29. psof 42

M19 psof 42

M00 psof 42

( 15/32 DRILL ) psof ptoolcomment 42

T10 M6 psof p_goto_strt_tl 42

N100 ( 15/32 DRILL ) psof ptoolcomment 42

( GAGE LENGTH=6. ) psof p_goto_strt_tl 42

G0 G54 G90 X-51.077 Y-1.7887 B0. A18. S1500 M3 psof p__4:1194 42

H10 D10 Z22.3854 M8 psof p_goto_strt_tl 42

Y-.158 Z17.3667 prapid prapidout 46

G1 Y-.1271 Z17.2716 F10. plin plinout 46

G0 Y-.158 Z17.3667 prapid prapidout 46

G1 Y-.0962 Z17.1765 plin plinout 46

G0 Y-.158 Z17.3667 prapid prapidout 46

Y-.1271 Z17.2716 prapid prapidout 46

G1 Y-.0653 Z17.0814 plin plinout 46

G0 Y-.158 Z17.3667 prapid prapidout 46

Y-.0962 Z17.1765 prapid prapidout 46

G1 Y-.0344 Z16.9863 plin plinout 46

G0 Y-.158 Z17.3667 prapid prapidout 46

Y-.0653 Z17.0814 prapid prapidout 46

G1 Y-.0035 Z16.8912 plin plinout 46

G0 Y-.158 Z17.3667 prapid prapidout 46

Y-.0344 Z16.9863 prapid prapidout 46

Oh but atelast we see the problem the prapid and the plin varaibles that have control here are guess where. I will give you 3 chances to guess where they are and the first 2 do not count.

 

.

.

.

.

.

.

1: The moon. NOOOOOOOOOOOOOO

2: Mars. NOOOOOOOOOOOOOO

3: .PSB YESSSSSSSSSSSSS

 

 

So since I am a complete stupid if anyone has an idea how to acheive this task since the .psb side of MPGEN5AX is perfect I would greatly appericate it.

 

As always I appericate any help in this matter.

Link to comment
Share on other sites

If I force G1 out for the rapidout then all rapid moves become G1. There is a switch in MPGEN5AX to this already just changes everything to fedd moves not rapid. Looking to do 2000 parts so do not need extra 5-10 minutes a part becuase of feed moves. I guess I will have to do it the way we have been which is use one post for all the non-drilling and use another post for all the drilling then pates it all together. Funny this modifaction works perfect on MPFAN and MPMASTER. headscratch.gifheadscratch.gifheadscratch.gifheadscratch.gifheadscratch.gifheadscratch.gifheadscratch.gifheadscratch.gif

Link to comment
Share on other sites

Ron, I assume that drill 5-ax also passes through pmx postblock which is bin in the mpgen-5ax post. You might want to try setting a switch in the prapidout section based on the contour flags to position rapid but retract as g01. Or you might try a misc value and a switch for drill. I know there is a way to do this.

Link to comment
Share on other sites

Well I am looking at this for that control right now but busy so one of those have to get code done and come back to it:.........................................................................................................

quote:

Processing with rpd_typ_v7

The numeric variable rpd_typ_v7 was added to the MP language for Mastercam Version 8. It alters

internal post executable routines and data reading functions to avoid version change problems that

occur when features are added and data changed.

Processing with rpd_typ_v7 enabled (old form)

Mastercam V8 always writes the tool change rapid position from the tool change line (NCI Gcode

1000, 1001 and 1002) after the tool change line in the NCI file. The move is written as a rapid position.

This can be in the form of the NCI Gcode 0 or 11 with feed rate set to –2, depending on the toolpath

type.

In earlier versions of Mastercam, this rapid position was never written and the post customization file

would either call back to the tool change postblock or create the rapid positioning during the drill cycle

postblock calls. With the introduction of the mandatory rapid position in the NCI file, errors during

posting and in the NC output can be generated in posts written for the earlier NCI format when the

added rapid NCI line is encountered.

To avoid these problems, the numeric variable rpd_typ_v7 is added to the post customization file and is

set to 1. rpd_typ_v7 skips the rapid position after the tool change in the NCI file and reads the next twoline

set from the NCI file. This is usually the drill cycle definition (NCI Gcode 81) that was expected

by the older post customization file. rpd_typ_v7 also skips the new long code drilling calls if set on and

rotaxtyp is set to less than 6. See Volume 2, Rotary Processing for more information.

Processing with rpd_typ_v7 disabled (new form)

With the rpd_typ_v7 numeric variable set to 0 (that is, disabled), the post executable reads the added

rapid NCI line. This is desirable for two reasons:

􀂋 The tlchng_aft (tool change after) routine functions correctly in all cases. You can retrieve a valid

position move. This is required with 5-axis if you want to know the rotary positions in the tool

change postblock.

􀂋 The enhanced long drill cycles are available.

 

Processing long code

To enable drill cycle long code, set the numeric variables in the post customization (.PST) file as

follows:

usecandrill : no # Use canned cycle for drill

usecanpeck : no # Use canned cycle for peck

usecanchip : no # Use canned cycle for chip break

usecantap : no # Use canned cycle for tap

usecanbore1 : no # Use canned cycle for bore1

usecanbore2 : no # Use canned cycle for bore2

usecanmisc

1

: no # Use canned cycle for misc1

usecanmisc

2

: no # Use canned cycle for misc2

Drill cycle long code processing has been enhanced in the post executable file when the numeric

variable rpd_typ_v7 is disabled (that is, omitted or set to 0). The enhanced drill cycle long code provides

support in the post executable for tap, bore1, bore2, misc1 and misc2 drilling and boring cycles. All

these cycles are also supported with 5-axis drilling.

When numeric variable rpd_typ_v7 has been enabled, as required for earlier post customization files, the

long cycle drill motion must be explicitly generated in the post customization file for 5-axis drilling and

the tap, bore1, bore2, misc1 and misc2 drilling and boring cycles.

Note: With rpd_typ_v7 enabled, tap, bore1, bore2, misc1 and misc2 drilling and boring cycles call the

drill (feed in, rapid out) long code output.

But from what I understand juts make it long code not really alot to do with G1 or G0 output.

 

banghead.gifbanghead.gifbanghead.gifbanghead.gifbanghead.gifbanghead.gifbanghead.gifbanghead.gif

Link to comment
Share on other sites

Ron,

Volume 3 Chapter 2 page 86 in the post processor pdf. Check out variables common to gcode 11. If you don't have this pdf I will email it to you. I also have the pdf that goes over the mpgen5axfanuc post, let me know what you need.

 

[ 06-21-2005, 10:55 AM: Message edited by: Travis Buchanan ]

Link to comment
Share on other sites

Thanks I got both. I have been reading and seeing what I can come up with. The post does great expect for this. I have checked it in Predator and is doing code to make a good part with clearence and other things juts trying to make this not be a paste and post thing is all.

 

I just think if I could see these 2 varabiles not the whole psb.

Link to comment
Share on other sites

Ron,

I know nothin about 5 ax but you may be able to find what you need like this;

code:

prapidout       #Output to NC of linear movement - rapid

gcode, e #<<<<<<<<<<<<<<<<

opcode, e #<<<<<<<<<<<<<<<<<<<

drillcyc, e #<<<<<<<<<<<<<<<<<

if drillcyc >= 0,

[

pcan1, pbld, n, `sg01, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, "F100.", strctxt, scoolant, e

]

else,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, strctxt, scoolant, e

]

and you'll get

code:

N0986 G00 G90 X1.215 Y-.96 (B270.) B0. G54

N0988 G43 H06 Z6. S10000 M[#933]

gcode 0.

opcode 2.

drillcyc 1.

N0990 G00 Z4.15

N0992 G01 Z4.04 F10.

N0994 X1.2405 Y-.9855 F3.

N0996 G03 X1.266 Y-.96 I0. J.0255

By adding these lines (or others) in you may stumble onto something that you can use for a condition.

Link to comment
Share on other sites

First off i will say I was wrong about needing the varabiles for prapid and plin. I found a way to cheat this becuase I am using stuff from MPMASTER.

 

Here is what I came up with to work:

code:

prapidout       #Output to NC of linear movement - rapid

if opcode = 16,

[

pcan1, pbld, n, `sg01, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, "F100.", strctxt, scoolant, e

]

if opcode = 3 & tlplnno > 1,

[

pcan1, pbld, n, `sg01, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, "F100.", strctxt, scoolant, e

]

else,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, pccdia,

xout, yout, zout, p_out, s_out, strctxt, scoolant, e

]

plinout #Output to NC of linear movement - feed

punclamp

if opcode = 16,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia,

xout, yout, zout, p_out, s_out, *feed, strctxt, scoolant, e

if nc_lout <> m_one & feed = zero, psfeederror

]

if opcode = 3 & tlplnno > 1,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia,

xout, yout, zout, p_out, s_out, *feed, strctxt, scoolant, e

if nc_lout <> m_one & feed = zero, psfeederror

]

else,

[

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia,

xout, yout, zout, p_out, s_out, `feed, strctxt, scoolant, e

if nc_lout <> m_one & feed = zero, psfeederror

]

pcan1, pbld, n, `sgcode, sgplane, sgabsinc, `sgfeed, pccdia,

xout, yout, zout, p_out, s_out, `feed, strctxt, scoolant, e

if nc_lout <> m_one & feed = zero, psfeederror

pclamp

It produced code like so doing 5 axis and 3 axis all in one tool.

code:

N800 (  21/32 DRILL   )

( GAGE LENGTH=6. )

G0 G54 G90 X-13.32 Y-.8689 B0. A13.461 S2000 M3

H8 D8 Z22.2516 M8

G1 Y.2951 Z17.3889 F100.

G1 Y.3184 Z17.2917 F20.

G1 Y.2951 Z17.3889 F100.

Y.3416 Z17.1944 F20.

G1 Y.2951 Z17.3889 F100.

<------ Removed for example

Y.8305 Z15.1521 F20.

G1 Y.2951 Z17.3889 F100.

G1 Y.8072 Z15.2494 F100.

Y.8328 Z15.1424 F20.

G1 Y-.8689 Z22.2516 F100.

G0 A0.

X-30.48 Y1.2231 Z21.8425

G73 G98 Z15.6425 R16.9425 Q.1 F20.

X-35.23

X-43.905

X-8.375

X-3.625

X-17.05

X-21.8

X-48.655

G80

M5

I hope that helps someone out.

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