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:

Fadal Subroutine Post


Carl Vallance
 Share

Recommended Posts

I would like to share this post with other Fadal users. It has been 10 Years in development.

I've fixed, added, updated, fought with, hated, had fun with, pulled my hair out over

(I'm now bald), and just plain cussed it sense ver 4 of Mastercam. It outputs a program using

Fadal subroutines instead of subprograms and prompts for the number of fixture offsets

(E1 - E24) that you want. It also supports Fadal canned cycles L94xx to L99xx in drill cycles.

It is now designed to support the features of Mastercam v9. The one problem I've had sense

I first wrote this mess is the line numbers are out of order in the finial output of the NC file.

You must renumber the program before you can run it on the mill. (If anyone knows how or

is willing to try to fix this, please let me know.) Other then this it is a very sound post.

Anyway its been an excellent learning experience and I hope of some benefit to other MC

users. The file is called fadalsubroutine.zip, it has been uploaded to the FTP site. It can be

found in the Text_&_post_files_&_misc directory. As a finial note, Thanks to all involved with

this forum. It's a great place to learn and share about MC.

Link to comment
Share on other sites

Carl,

 

It's doable, but takes a little work. Seeing you like to pull your hair out (I got this from you working on this for 10 years!!! tongue.gif ) I will gladly give you some ideas on how to do this.

 

First, MP will make a call to a postblock called PPOST. This call is made at the end of processing after all files have been closed and before exiting. Using this postblock, you can open the NC file as a buffer and read the lines of code one at a time, doing a renumber and then writing them back out to a temporary file. Once complete, delete the existing NC file and rename the temp file to NC. Now you can always not write the original file with line numbers and this makes it easy as you just add a line number to every line, however now you have line numbers on blank lines, comments, and any other line where you do not want them.

 

Hint - process the file with line numbers being used and format the line numbers with a suffix character that you will not find in the file otherwise. As you read each line search the line for this character. If found this will tell you the end of the sequence number in the string. Strip it out and replace it with the new line number. Use the strstr and brksps functions.

 

It works real well, but takes some work. If you don't feel like pulling the rest of your hair out, let me know and I will e-mail you an example.

Link to comment
Share on other sites

Carl,

 

On the line numbering, depending on how old the fadal machining centers are. The new machines will

number the program as it is loaded into the pendant. So what I found is not to output line numbers. You may whish to consider to upgrade the software chips in the machining centers. Since the only cost is the travel time and installation time for the servicemen, the new chips have no cost.

Link to comment
Share on other sites

Jim,

Thanks for the samples. I wil try to add this to my post.

 

Kenneth,

I emailed you the post. Let me know what you think.

 

Perfecseal,

Excelent advice about the machines. I will contact my dealer about updateing the chips.

I still want to fix my post to number right. Its the principle of it all you know.

 

biggrin.gifbiggrin.gifbiggrin.gif

Link to comment
Share on other sites

Could someone give detailed instructions on how to download from the FTP site.I have yet to do this. I would like to download the Fadal subroutine post. I rarely have time to post on the Forum but must say the comments and insights have been invaluable.

Dave

Link to comment
Share on other sites
  • 18 years later...
On 6/6/2002 at 9:20 AM, Jim Evans from CNC Software said:

PPOST. This call is made at the end of processing after all files have been closed and before exiting. Using this postblock, you can open the NC file as a buffer and read the lines of code one at a time, doing a renumber and then writing them back out to a temporary file. Once complete, delete the existing NC file and rename the temp file to NC.

Anyone willing to share an example of the code used to do this?  For some reason, I can’t read the buffer that the NC file is saved to. Thx

Link to comment
Share on other sites
  • 4 weeks later...

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