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:

G08P1/G08P0


connormac
 Share

Recommended Posts

this is what I have in my post:

 

poc # Output contouring

spaces$=1

if stflg=0&gcode$=0&mach>4,"G08 P0",e$

if gcode1=2|gcode1=3,n$,sgcode,sccomp,pccdia,sgplane,x$,y$,z$,parctyp,pfr,e$

else,n$,sgcode,sccomp,pccdia,sgplane,x$,y$,z$,pfr,e$

if stflg=1&gcode$=0&mach>4,"G08 P1",e$

spaces$=0

stflg=0

 

It works great except when I am doing an outside contour then it puts in :

 

G08 P1

G08 P0

 

at the begining and then :

 

G08 P0

 

at the end. is there something about outside contouring that makes it freak out?? banghead.gif

Link to comment
Share on other sites
Guest CNC Apps Guy 1

What I do

 

phsmon # High Speed Machining Contour Control On

if opcode = 3 & mi8 >0, mi8=0

if mi8 = 1, pbld, n, "G8P1", "(LOOK-AHEAD ON)", e

if mi8 = 2, pbld, n, "G5.1Q1", "(AICC ON)", e

if mi8 = 3, pbld, n, "G5P10000", "(HPCC ON)", e

prv_mi8 = mi8

!mi8

 

phsmoff #High Speed Machining Contour Control Off

if prv_mi8 =1, pbld, n, "G8P0", "(LOOK-AHEAD OFF)", e

if prv_mi8 =2, pbld, n, "G5.1Q0", "(SHPCC OFF)", e

if prv_mi8 =3, pbld, n, "G5P0", "(HPCC OFF)", e

!mi8

Link to comment
Share on other sites

It looks like the first G08 might be coming from another postblock. Just a guess with the little info shown. Turn on your post debug info check box to see where it's comming from. What turns on/off stflg? Is postblock poc used during every contour depth of cut or only at the beginning/end of an operation?

Link to comment
Share on other sites
Guest CNC Apps Guy 1

I put phsmon the line after the "M6" in ptlchg_com in MPMaster based posts and pshmoff in pretract before the coolant turns off.

 

In MPFan based posts, probably needs ot go in psof and ptlchg for phsmon, and pretract for phsmoff.

 

Oh, you gotta set up the Misc. Int as well. But, you could right before the phsmon call set mi8 = 1 then it will always be on unless opcode is = 3 (drilling type cycles).

 

Thank you for the kind words Mark. cheers.gif

 

HTH

Link to comment
Share on other sites

James,

 

I added your code to my post and it works good for the most part. There are a couple of issues.

 

I have two operatons, surface finish parallel. The first operation is the for the first vice, second operation uses a different WCS with a different work offset for the second vice. I've tried different combinations of turning the misc value on or off in each operation to see if it will turn it on or off without a toolchange. I am only using the option 0 for off, and 1 for on.

 

1. If I have it set to "1" in both operations, it turns on at the beginning and off at the end. No problem!

 

2. If I have it set to "1" on the first op and "0" in the second op, it turns on the beginning of the first op and off at the end of the second op. How would I get it to turn off in between ops without forcing a toolchange?

 

3. If I have it set to "0" in the first op and "1" in the second op, then it doesn't get posted anywhere in the program. If I force a toolchange then it does get turned on and off.

 

Is there a way to turn it on/off in between operations?

Link to comment
Share on other sites

Matt,

I have the same problem.

 

James,

I did what you said but it seemed to turn it on on every tool whether I had misc8 check on or not

I ended up doing this:

 

if opcode$ <> 3& mach>4, n$, "G08 P1", e$

 

if prv_opcode$ <> 3 & mach>4, n$, "G08 P0",e$

 

It seem to work OK but I have the same problem as Matt. I need to be able to turn it off and on in the same tool with out forcinf a tool change. confused.gif

 

But thanks for the help on everything else!

Link to comment
Share on other sites

I've tried putting some condition in pncoutput but I'm getting mixed results. Is this where I should be checking for prv_mi8, and mi8 and comparing the values to determine if the next op should turn it on or the previous op needs to have it turned off?

Link to comment
Share on other sites

Tim or James,

we have an older special written post for 7 diffrent machines.

 

this is my ptlch0#

 

ptlchg0$ # Null tool change

if mi4$=1&op_id$<>prv_op_id$,stp1=1

else,stp1=0

if mi6$=1,*pstpl

if op_id$<>prv_op_id$,pnocomm

if opcode$=three,ptlchg0drl

!opcode$

if op_id$<>prv_op_id$,opid1=opid1+1

!op_id$

if mach<4,temp=tloffno$+20

else,temp=tloffno$

 

if I add in the phsmoff and phsmon it stacks up G08 P1 and G08 P0 right under the first G08 P1.

It looks like it puts in as many G08 P1 and G08 P0 as I have op's programed with that tool. 4 op's 4 sets of G08 P1 and G08 P0's . Help!

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Yeah, what Tim said. biggrin.gif

 

you'll need to create some "if prv_mi8&..." statements to clear the duplicate stuff out I think. I ALWAYS had it on unless I was drilling so I never had to deal with that issue. Once it was on, it stayed on. Any reason you're turning it off??? headscratch.gif

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Masterp,

 

This place is about the best resource for post stuff 'cept for CNC Software and your local reseller. Do yourself a favor, buy the Post CD from your reseller .

 

Also it helps to know exactly what you want your code to look like too.

Link to comment
Share on other sites

ConnorMac,

 

I dug up a mc9 post Kinglowie sent me a while back and it was this one. If you need a reason to make one post for one machine, then this post would make it. If you're editing this monster even every once in a while you may just want to start over. There's no chance in even trying to figure it out without a mc9 file.

 

Sorry

Link to comment
Share on other sites

Tim,

Yes that is the post I am using. The only good thing about it is it has an option in there for auto rotation of sub's for bi-locks. Can you believe that a previous programmer thought that that post was a good idea.

 

James,

 

No I'm not turning it off. Sometimes I cheat and use a spot drill to break the edge so I need to be able to turn it on after I use it to drill.

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Hmmmmmm.....

 

So then you basically need to check for 2 conditions, if it's on and you go to a drill type cycle, then turn it off, or if it's off and you go to any other type operation then turn it on.

 

Ok, so how I would start to approach it is by something like this in ptlchg0,

 

if opcode<>3&prv_opcode=3, phsmon

if opcode=3, phsmoff

 

Obviously you'll need to do some testing... biggrin.gif

 

HTH

Link to comment
Share on other sites
Guest CNC Apps Guy 1

Yes, 7 posts are much better than 1. With the Multipost.vbs script, there is no need to have 1 post do everything for every machine in sight. Having only 1 post is just not an efficient use of time IMHO. If you do something for 1 you may break something for another, it's just a tangled mess. Dump it IMNSHO!!!!

Link to comment
Share on other sites
Guest CNC Apps Guy 1

You have to set it up on the operation. The software does the rest. If you want, you can even sub out each tool quite easily. I did this on a post with the very capable help on this forum. Linky

 

Very good discussion on the subject in that post.

 

HTH you like it did me.

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