You are currently browsing the cadcamstuff.com posts tagged: Post processor


Mastercam Post are asking you the questions

Having your post asking you questions as it is processing code, and either using the data to trigger other functions in the post or a little more down to earth as we are going to do today, inputting the programmers name in the post header is an easy way to assure that each program is earmarked with programmers name and not becoming a ghost program no one dare to run or modify.
5

Lets open up our mpmaster with our favorite editor…

1
Insert your personal string…
The post processor can seems a little messy, but there is believe or not some order and I recommend you pick a clean area to add you stuff. The fact that I place mine above the “Error message” is not a coincidence, at anytime I need to find my string I can easily remember to search the keyword “Error” (Yep just one of those silly tricks).
So lets go ahead and insert our line number 539 and 540 string and comment.
2
Question format…
Searching through the post for the “Question format statement” you will see that the mpmaster post is already set up for 2 questions and I am going to insert “fq sprogna” as number 3 with the command asked by the post in between ” “.
3
pheader…
The pheader is where the post processor gets all the different information it inputs in the beginning of our NC code such as file name, program number, date and it is also here we want to throw in our question.
4
Where is the answer…
So the question is asked by the post processor, now we need to tell where we want it to stick it in our output, and I picked right underneath “Time”.
5
6
Conclusion…
The Post asking questions is defiantly a fan favorite between programmers at my work place. You could also ask questions like program cycle times and/or information to setup guy about stock pickup etc.
Tweaking your post to eliminate hand editing is most defiantly beneficial to the company in the long run, and adding bells like the post asking questions can only make the whole process more lean.

People will love your Mastercam Post comments

Time to have some code hitting the screen, check out the 3 intros if you missed them; Mastercam Post Processor Intro, Pick your Editor and Post for Mastercam and Post Debugging in MastercamX4.
If you want to make friends, make other peoples life easier. That is exactly what we are going to do today, even with out doing something really scary to our post and our code. Our post is going to translate some miscellaneous codes into our native tongue.
Find coolant on7
Make code easy reading…
There is no doubt that understanding code makes trouble shooting so much easier, and knowing what M09 does makes a better operator. Still you get the operator who’s vocabulary only contains the phrase “The machine did something weird, and I swear I did not do anything”. Adding comments in your post output might not make your operator litteraly learn code, but it might make the comnunication between programmer and operator easier, and even let less skilled operators run 1st piece on simpler parts.
Find coolant on
Find coolant call in post…
With the debug activated from previus post Post Debugging in MastercamX4 Press “Run” under Debug and let the post work itself to the M30. Now left click on the coolant on call “M08″ and notice the Post screen jump to “ptlchg_com”.
Find coolant on2
ptlchg_com…
So we know that our coolant is being activated in this string, we will open our mpmaster post in our editor and search for ptlchg_com.
Notice the line number 1777 this is the actual string, the other ptlchg_com are the post directing to this line. The way you can tell what is the actually string is it is all the way to the left and followed by a # and a comment.
Find coolant on3
*scoolantx…
Reading through ptlchg_com we end up with our M08 being a forced (the * tells us that) output in line (1) 3302. Anything between ” will be posted as is in the output, and anything in ( ) in NC gode will not be activated by the control, so having the post output (2) (COOLANT ON) is only a note, not a function!.
Notice (3) that I put #LARS in the end of my post line, this is simply a note to myself for future reference that I messed with this line. And of course remember to (4) save for this to take effect.
Find coolant on4
Note that coolant is off…
Left click on M09 and the Post window tells us that “pretract” is the string where this code is activated.
Find coolant on5
pretract…
Back to our editor and search for the string pretract, and as you start to scroll through the code, you will get 20 lines or so down…
Find coolant on6
Take care of M09 and M05…
“COOLANT OFF” and “SPINDLE OFF” in the same screen shot how convenient :-) . If you are using the downloaded mpmaster post from InHouse Solution it should be easy to fill in the blanks. Don’t forget to save before exiting out of the editor.
Find coolant on7
I hope this is helpful to you and others on the shop floor, and you could feks. also add other comments such as G43 (LENGTH OFFSET) or M03 (SPINDLE ON). The most important thing is that you are very careful with what you change, because these machines will only do what you tell them, also remember to backup your post before any changes. You might notice that I made all comments in CAPS, it is different from the machines how they like there letters. Haas don’t care but Fanuc will show gibberish.
Next blog post will be about your post processor asking you questions and insert your answer in the post….24 hours or so and it will be here.

Post Debugging in MastercamX4

bug
Time for the 3rd and last intro before the actual code hits the screen. The topic is post processor modification in Mastercam. If you need to back track here is the link to the two previous insect intros. Mastercam Post Processor Intro and Pick your Editor and Post for Mastercam if you are new to post modification and want to follow upcoming tutorials I recommend you give them a glance. Now let us talk Mastercams Post Debugging.
A post debugger with its own interface is fairly new in Mastercam, it can look a little overwhelming at 1st, but this tool as some great potential to be developed into something really useful (The debugger has a beta feel to it).
The debugger can be turned on or off, if you look at the above screen shot and do not see the ladybug you have to activate the debugger first.
The way to MCAMX Control Panel Applet
Activate Debugger…
1,Start => 2,All Programs => 3,MastercamX4 => 4,MCAMX Control Panel
Control Panel Applet
Post support => Enabled.

What to program
What to debug?…
Keep it simple, the more code you throw at the debugger the longer it will take it to process, and trust me it is not rocket to start with. You are just about to realize what kind of calculations that actually take place when you hit that post processor button. Secondly remember that it is not really the difficulty of the part that is a problem with a post processor, the biggest issue is functions. Your goal is to have you post processor deliver NC code that has no need of human hand editing, and in most cases it is possible. A simple square contour and drill point will give plenty for the debugger to start with. Header of Post~ Lead in/out~ line compensation~ retract~ toolchange~ canned cycle.
start debugging
Start debugging…
Under normal debugging mode there is no need to have “Edit” checked, this will prevent the editor to open up, what we need the debugger will provide.

Post debugger setup
Post debugger setup…
When the debugger opens up you are being greeted by a large amount of different windows, and just the thought of trying to orginazing these can be a task. The following order is how you should rank there importance. 1″NC Window”, 2″Post Window”, 3″NCI Window” and 4″Watches Window”. In the next coming blog posts we only are going to use 1″NC Window” and 2″Post Window” so for now just make sure those are visible.
Turn off expanded
Turn off, Expanded view…
I recommend that you make sure to turn of this feature to begin with. The feature can come in handy, but for beginners I believe it just add confusion.
Debug Run
Run…
So pressing the ladybug just opened the debugger up, to actually get the debugger cranking you need to either go “debug” drop down or memorize some F-keys. No matter what your next decision is important. “Run Turbo” is tempting, but will not do more that process your code without any debug feature. “Run” is considered normal speed (you might think you system just froze, patience it can take minutes). “Run Step” is almost as slow as if you had to write the code by hand, this feature is normally used when you really need to dig down and see each line being executed.
Post Debugger guide
For the up coming blog posts you will not need to read to much, but there is a very handy 78 page Debugger guide in your MastercamX4 document you might want to consider looking through.
1st assignment is going to be safe but very useful. We are going to add comments in brackets for easier NC reading….that blog post will be here in 24 hours or so.

Pick your Editor and Post for Mastercam

When exploring a dark cave in real life a couple off items should be 1st. on your list, like a hard hat and a flashlight. When beginning exploring the dark caves of Mastercam Post modification a editor and the right Post Processor is the place to start.

Editor
You will have to use some kind of editor to modify the actual post processor, more or less anyone will do. I prefer PFE32 c:\mcamx\common\editors\pfe
pfe321
no matter which editor you choose I would recommend you place a shortcut on your desktop.

Post Processor
In your c:\mcamx folder you will find folders for mill, lathe, wire and router, each of these folders contain a sub folder that is called “post”, this is where you find the post processor selection Mastercam comes with. However I will recommend that you go to Canadian reseller In-House solution and download there mpmaster post This post is based on CNC Softwares Mpfan post with additional features, this is the post I will be using here on cadcamstuff.com.
Save the zip file and extract it to a folder on your desktop called “Mpmaster”. In the zip file you will find a PST file (Post Processor) a control file and one machine definition for horizontal and one for vertical machining center.
Start out by making a copy of the PST file, and name it Mpmaster-*your machine name*-*your name*.pst, by adding your name in the end there is a smaller risk for someone messing with your post by mistake.
Rule number 1 when doing Post Modification is backup backup backup, sometimes you end up going down the wrong tunnel and it is quicker recovery by throwing out 20min work and go back to last saved backup.
In Mastercam go Settings=> Machine Definition Manager and load the MMD file you extracted from In-House Solution.
In Mastercam go Settings=> Control Definition Manager and open up the control file you extracted from In-House Solution.
control

Click Post Processor in upper left corner and pick your downloaded Mpmaster post using “Add files” and click the “green” check mark.

pick-the-post-in-mcam1

In the drop down menu pick you post and hit the save icon in upper left corner.
save

Now we need to set this thing up so we actually can pick the machine.
Go Machine Type=>Mill=>Manage list
manage-list

In the upper left corner find you directory for the Mpmaster and choose you machine definition, and “Add” it to your Machine Definition Menu Items.
menu-managment

Now we should actually be ready to start thinking about posting and debugging, stay tuned………

Mastercam Post Processor Intro

Time to introduce some post processor stuff on cadcamstuff.com.
If you are a Mastercam user and find yourself on a regular basis editing your NC code manually, you need to consider changing the way you work.
post
The goal is to have every possible imagine custom switch triggered by the user inside Mastercam, without having to touch the NC code generated by the Post Processor. Every time you open up an editor to edit your code by hand you are one step closer to a crash. If you want to run more efficient in your shop, you need to have a Post Processor that works.

Some of the things we will be going through the following weeks will be:

<>Introduction to Mastercams new Post Debugger

<>Which Post should you choose

<>Add notes to help setup people and operators (My lead setup guy almost picked up my bar tap after I did this).

<>Setup a miscellaneous value so we can turn our chip conveyor on inside Mastercam.

<>Setup a miscellaneous value to activate our table probe, and then use miscellaneous real value to set a tolerance.

<>Have the Post Processor asking who the programmer for the specific job is.

There is not going to be any “Part1″, “Part2″ but instead I will save upcoming Post Processor Blog Posts in the “Mastercam Post Processor” Category and give it a skill level, but do not worry, we are not going to start messing with your $15,000 spindle, we will start with something safe and easy.

1st. we need to understand the fundamentals.

Each operation you create in Mastercam generates a toolpath. The operation contains, in addition to the toolpath motion, parameter information such as tool descriptions, speeds and feeds, and more. This information is written to an intermediate file, the NCI file.

What happens when you post an NCI file in Mastercam, in simple terms, is:

<> The post processor reads the NCI file, translates the NCI data into NC output based on the instructions it obtained from the post processor file.

If you have any interest in this subject make sure you hit the big orange button in the upper right corner or email subscribe to this site.

More to come………..