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:

modifying a post


wildcat99
 Share

Recommended Posts

I am not a post writer by any means, but I have been playing with our post to clean up a few annoying details. These last two issues seem like simple fixes, but apparently they aren't. Our dealer and CNC have been working off and on with this for the past 6mo, but can't seem to finish the last 1%.

 

Our post, written for a xxxxor 8055 and a Quintax 5ax machine works fine except for a couple of things.

 

First, I would like a G58 after the first tool change only. It seems something like this should work:

if stagetool <= one,

pbld, n, "G58", e

But, so far I can get it to be after all tool changes or not there at all.

 

Second, I would like "G51 A150 E0.030" after every tool change. This is in the post now:

psof_tlchg_blck #Start position block

if use_g51, pbld, n, "G51", "A150", "E0.030", e

But, I get this after the first tool change only.

 

Any ideas? I can provide more information, files, samples, etc. if needed. Thanks for your help. Happy Holidays!

Link to comment
Share on other sites

Wow! I just read Cementhead's thread and realize there are a lot of hard feelings and strong opinions regarding posts.

 

However, if anyone would like to help me out, please read on.....

Through trial and error I've got the G51 issue resolved.

 

But I still have a G58 after all of the tool changes. Only need G58 after the first tool change.

 

BTW: This is a custom post that we paid for from our MasterCam dealer. I will get this last post problem solved myself eventually, but I would still appreciate any advice from those with experience writing posts to speed things up a bit.

 

Thanks for your help. No pirates or bad guys here, just someone trying to learn.

Link to comment
Share on other sites

This code sample is from what postblock ?

(The devil is in the DETAILS when doing posts!)

 

If you only want this to output on the fist tool of the program...

Declare a variable to be a switch for this output.

 

do_M58 : yes

 

Now in your code, just check the setting of that variable ->

 

code:

  

if stagetool <= one & do_M58 = yes,

pbld, n, "G58", e

do_M58 : no # Turn OFF the switch

Link to comment
Share on other sites

Roger,

Thanks for the quick response.

 

Our dealer added this code in 2 places in the post, trying to solve my problem. In my post it is on lines 854 and 865.

 

I will try the switch approach next.

 

quote:

(The devil is in the DETAILS when doing posts!)

I once took a programming course where the professor didn't care what the program looked like or how fancy it was. If it didn't work it was an automatic F. It's the details that kill ya.

Link to comment
Share on other sites

Thanks for your help. I wasn't able to put the switch in the right location to make it work, but your suggestion led me to look for other variables already defined that might be useful.

 

What finally worked was a line like this:

if t = one & n <= 132, pbld, n, "G58", e

 

I had to throw the n<=132 in there in case we ever grab the first tool again later in a program. Most likely this would occur at a sequence number much greater than 132.

 

So far the post works with all of my test examples....I'm calling it quits for the day!

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

True, more than likely it will but there are often cases where you can't find literal things. For example, I'm doing a 4 Axis lathe post. In the Toolchange / NC output Variable Formats section feed is not specified. You can't find feed defined as "F" anywhere. it's set by strf. This may be a similar situation. It may be called strg58 or something like that. Perhaps wthat's why it's not glaringly( is that a word?) obvious. Gotta take things on a case by case basis. That's all I'm saying.

 

JM2C

 

[ 12-27-2002, 04:03 PM: Message edited by: James Meyette ]

Link to comment
Share on other sites

quote:

So far the post works with all of my test examples

................

 

Thanks for the other ideas. I'm sure there are several ways to skin this cat. I did over-simplify the problem, though, in my original post.

 

In more detail, the G58 needed to be right after the tool change, but the G51... needed to be about 3 lines down after XYZBC moves, etc. There is a switch 'use_g51' already defined that is used in the post. Also the G58 and G51 are embedded in several if/else statements, etc.

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