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:

Slight post adjustment required


fastercam
 Share

Recommended Posts

Hi

 

We're currently using the following code at the "Start of file for non-zero tool number":

*progno, "(", progname, ")", e

 

For reasons that are way too involved to bore you with, we'd like for the post to output something more like:

*progno, "(", Toolpath Group 1, ")", e

 

In other words, we want the output that appears on this line in our nc file to reflect what the name of the operation group is and not what the program name is.

 

Thanks in advance.

 

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

Level 3 MIll Ver 9.1SP2 with Solids running on Win XP

Link to comment
Share on other sites

Greets Faster Cam.

 

Would it serve your purpose to rename the group?

 

 

My (very)standard FADAL post returns the following

code:

TA,1

%

N1O2283(THREAD)

N2G0G17G40G49G80G90H0E1Z0

N3T1M6(.125 RADIUS CUTTER DIA. - .264)

N4G0G90S4000M3E1X-.384Y-4.094

N5H1Z1.M8

The word "THREAD" comes from the name of the group in the Ops manager.

Is this what you would like"

 

-KLG

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

One way I can think of to get the post to do this is to set in your COnfiguration, NC Settings Tab, NCI Button, and have it Initialize NCI Path to "Active Operation Group's Name". Save the config settings. Go to your operations manager, select your group give it the name you want, then select all operations in that group, right click, go to Options, and select "Change NCI estination and it will rename the NCI destination to the name of your group. progname will then kick into your code if you call it. Now when you post, whatever the name of the Operation Group is you G-Code file will be that name as well.

 

HTH and BTW Welcome to the forum. cheers.gif

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

In a round about way we are accessing the name of the operation group. But I think you are correct Rekd you cannot directly access the Ops Manager for info. Maybe for X??? rolleyes.gifbiggrin.giftongue.gif

Link to comment
Share on other sites

I don't think i clearly explained in my initial post what I'm trying to achieve. We don't want the filename and group name to

 

be the same. Let me elaborate:

 

The shop I work at has 21 nc machines and we want the nc file name name to be, for example, filename.nc10.nc

This tells us what machine the program has been posted for (nc10) and the additional .nc extension tells us the program is

 

"unproven" and has not yet been run at the machine. We know all of this by merely looking at the file name.

 

When we're thru running the program and making any kind of necessary edits at the machine, we send it back thru dnc to the

 

server. When it sends it back, it strips the original nc10.nc extension and what remains on the server is filename.nc10

This now tells us the program was run at machine 10 and that it's been "proven out" (no .nc extension).

 

This is all fine and dandy but in order for it to work, the nc file must have in its' first line the name of the program with

 

no extension at all. In other words, the first line of the nc program must contain only "filename", with no extension. The

 

machine number is appended to the end of the filename when we send it back thru the dnc.

 

By the way, I'm already well aware of the "sextnc" command and if you use something such as "sextnc NC10.NC", Windows will

 

puke on it and output a file named this: FILENAME.NC10.NC10.NC10.NC

Again, the filename and toolpath group name must not be the same. (Filename needs 2 extensions, toolpath group must have no

 

extension and the post must output what is in the toolpath group name.)

 

sorry for the long winded explanation here but as I mentioned in my original post, it's kind of involved and abstract.

 

Thanks again

Link to comment
Share on other sites

fastercam,

 

Q?

Do you really need the Group Name?

 

You say you are posting out for a specific machine (NC10). Does this mean that you have a PST for each machine? -or- are you posting out just an indvidual Toolpath Group in your MC9 file out to a specific machine?

 

Just trying to get a clearer picture (I'm slow - I know!)

 

BTW, I've informed the Post Dept. about the filename extension thing.

Link to comment
Share on other sites

This code will rename the file output from the PST.

 

Assume that you have set in the is PST ->

sextnc ".NC10" # Posting for Machine 10

 

The PST will create 'file.NC10' (You knew that!)

The code presented here will tack on the '.nc' so you end up with -> 'filename.NC10.nc'

 

This renaming MUST occur in the PPOST postblock!

PPOST is called after the PST (actually MP.DLL) has closed all files.

 

code:

result : 0    # If RESULT is already declared in your PST, remove this line

sprgname # String variable to hold the Current filename

sprgnewname # String variable to hold the NEW filename (with '.nc' tacked on)

ppost

sprgname = spathnc + snamenc + sextnc

sprgnewname = sprgname = ".nc"

result = remove(sprgnewname) # In case our NEW filename already exists

result = rename(sprgname, sprgnewname) #Rename the output file


*Important to note*

The PPOST postblock is a bit "special".

Recall that all files have been closed.

If you type someting incorrectly in the code in PPOST, instead of the PST giving you an Error message - the Post may crash.

So do your PST testing on a toolpath file that you've already saved.

Link to comment
Share on other sites

quote:

sextnc ".NC10"

be aware that if you type an extension as shown above the sextnc call will include all text that follows. It is not advisable to include the (dot). me thinks

 

 

To continue an earlier thought.....

 

zzzzzz.....zzzzzz...zzz....

 

You could possibly rename the proven file as

 

proven.machine# when you punch the file out of the controller back to the server? I would stay away from using the file EXTENSION as an identifier.

just a thought

 

-Keith, from home

Link to comment
Share on other sites

Chef,

 

quote:

sextnc ".NC10"

quote:

be aware that if you type an extension as shown above the sextnc call will include all text that follows. It is not advisable to include the (dot). me thinks

The ".NC10" does work. I tested it.

Note that MP.DLL (which runs the PST) prior to v9.16 did not handle extensions set with SEXTNC longer than 3 characters (4 if you include the leading '.', which you can). Since MP.DLL v9.16 you can specify longer extensions. The issue I saw was having the '.' within the SEXTNC string (having text on both sides of a '.') like -> .NC10.NC Having the '.' at the start of the string in not a problem.

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