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:

Creating custom prompts in my post processor.


Daniel M
 Share

Recommended Posts

I've forgotten how to do this...

 

Has to do with creating variables??

 

I need my post to kick out prompts for part number, revision, description of any changes, drawing information, stock size, part zero locations, etc...

 

 

Colin....you showed me how to do this once. I need a refresher.

Link to comment
Share on other sites

If your post is mpmaster based then there is a section "Question format statements" in the post where you can add your prompt.

 

i.e.

# Question format statements

#

revision : 1 # (declare the variable)

fq 1 stock_typ "Predator Stock

fq 2 cyl_typ "Cylindrical Stock Axis

fq 3 revision " revision number "

 

Then in pheader of the post block enter in the call for the question.

 

ie.

 

q3 ( where 3 stands for the 3rd question)

 

* As well keep in mind that the "revision" must be declared ( see above) and formatted(see below) as a variable in the post.

 

i.e.

 

fmt 2 revision # revision nmuber

 

 

HTH

Link to comment
Share on other sites

The post method guarentees 3 important things: 1)Consistancy...the information is always formatted the same and that helps the operator during his setups. 2) I don't run the risk of forgetting something because the post asks me every time I make a change and a thorough header help with tracability in case there's a boo boo. 3) And most important, it makes my boss happy to see the extra communication between programming and manufacturing which alot of times just wouldn't happen without stuff like this.

 

 

prompts me for specific input and that saves me from the risk of forgetting to enter the info.

Link to comment
Share on other sites

I understand your point. For us, I would al least want the prompt to auto fill in the last value so if it did not change we could just click "OK" or "next". Since we often test post, I would not want to fill in this info every time.

 

Do you know if the last values can auto-fill?

Link to comment
Share on other sites

No Auto Fill that picks up a "last entered" value. You can set the default for the prompt value though. When you set a default for a prompt question, the question box is displayed and the default text string is displayed and it is also selected (highlighted blue). This means you can hit enter to accept the default, or just start typing a new string to override the value.

 

There is a very handy free utility called Mastercam Notepad which gives you a handy place to store notes and common strings which you use over and over. This would be a handy place to keep some of your custom strings. You can then just cut and paste them into your prompt question boxes...

Link to comment
Share on other sites

It is some tools Ernie the owner of Verisurf has made that are free to Mastercam users. We have the note pad, Hole Axis, and other free goodies that are very cool. I have used Hole axis for years and it allows people to pick a cylindrical surface on a solid or surface and make a center point, Center line and circle is wanted. You can decide when you install it what features you want to install. Download it and check it out. If you have any specific question feel free to email me or post them up and I or someone else will do their best to answer them.

 

HTH

Link to comment
Share on other sites

Hi Bjorn,

 

To set the default string that shows up in a prompt question you need to hard code a string at the end of the question formatting line. Are you sure that it is possible to use a variable for this default string?

 

If that is possible, Mastercam's post processor has the ability to launch VBScripts and EXE files. The post also has functions that let you read and write to text files. So it would be fairly simple to do this, IF you can use a variable for the string default. We need to get an answer to this question first.

Link to comment
Share on other sites

Hi again,

 

I checked some posts. I think it will work.

If the variable assigned to the fq already has a value when the questions pops up, it will show. I guess this goes for strings as well. When creating a buffer, there's a setting to keep the buffer as an ASCII file. Next time you post, call the buffer before each question.

The post reference guide covers this.

Link to comment
Share on other sites

Here's how I am showing a string as default://sprogname$//

code:

srev  :  ""

.

.

.

 

fq 5 sprogname$ "Enter part number //sprogname$//"

fq 6 srev "Enter rev number/letter"

 

 

.

.

.

.

 

pgetprogname # Called in psof

q5

sprogname$ = ucase(sprogname$)

q6

srev = ucase(srev)

MP is a very powerful and versatile language, so what you want to do is very possible.

 

In pprep post block open an ext file that you can read into a buffer, then read back your defaults or last entries and assign the values or strings to your variables used.

 

Then use the double // slashes // to show it in the dialog box when q is called.

 

Then write them back to the ext file and close it after the response is given.

Link to comment
Share on other sites

I use buffer files in our 5-axis posts to store a bunch of critical data (gathered using the fq1,2,3.. questions at the beginning of the posting) so it does not have to be typed in every time you relaunch a program. The only time it asks the questions is when you launch a different file and that resets the data in the buffer file.

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