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:

Promt questions with X4


gms1
 Share

Recommended Posts

I get errors when I post because I use prompt questions when the post fires. Stuff like, job number, customer, part revision, etc... I thought I had it configured right but every time I post the stupid screen pops up telling me I have errors.

 

So this is how I have it setup now:

defined the variables at the top

 

code:

sjob_no		: ""    #Job number

spart_rev : "" #Part revision

spart_no : "" #Part number

scust_name : "" #Customer name

sstock_dol : "" #Stock size and type

swo_op : "" #Work order operation number

swo_com : "" #Program comment

defined the questions

code:

fq 1 stock_typ "Predator Stock [0=Box,1=Cylindrical]"

fq 2 cyl_typ "Cylindrical Stock Axis [1=X,2=Y,3=Z]"

fq 3 sjob_no "Job number"

fq 4 spart_no "Part number"

fq 5 scust_name "Customer"

fq 6 sstock_dol "Stock size and type"

fq 7 spart_rev "Part revision"

fq 8 swo_op "Work order operation number"

fq 9 swo_com "Program description"

then I ask the questions in the pheader$ section, right before the output starts.

 

code:

q3    #Job number

q4 #Part number

q5 #Customer

q6 #stock size and type

q7 #part revision

q8 #work order operation number

q9 #program description

Then it puts those values into the header block. What did I do wrong with this formatting to make mastercam keep telling me I got errors.

Link to comment
Share on other sites

I also Have this problem!! Here is what I get:

 

 

23 Jun 2009 04:14:03 PM - <2> - RUN TIME (QUESTION) Enter part number ? - OPERATION 71 NCI LINE 92.

23 Jun 2009 04:14:03 PM - <2> - RUN TIME (RESPONSE) fbva - OPERATION 71 NCI LINE 92.

23 Jun 2009 04:14:03 PM - <2> - RUN TIME (QUESTION) Enter subprogram start number? - OPERATION 71 NCI LINE 92.

23 Jun 2009 04:14:03 PM - <2> - RUN TIME (RESPONSE) 0. - OPERATION 71 NCI LINE 92.

Link to comment
Share on other sites

code:

23 Jun 2009 11:54:24 AM - <2> - PARAMETER DATA - - Possibly incorrect parameter number detected: 0

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Job number - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 2545 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Part number - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 3636 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Customer - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 5467576 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Stock size and type - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 53757 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Part revision - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 45757 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Work order operation number - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 4567547 - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (QUESTION) Program description - OPERATION 82 NCI LINE 92.

23 Jun 2009 11:54:24 AM - <2> - RUN TIME (RESPONSE) 457547 - OPERATION 82 NCI LINE 92.

The random numbers in there are just me typing to get the post output.

Link to comment
Share on other sites

its an mpmaster based post. from version X2 I believe and has been updated through the years to be current with X4.

 

Is it because of 'where' I defined them? Or am I just formatting it completely wrong

Link to comment
Share on other sites

Without looking at the .pst file my guess would be that it contains a rd_params$ command without the required rd_prm_op_no$ variable being set so it is attempting to read operation parameters for operation zero (and of course there is no operation #0).

 

I would try simply commenting out any lines containing rd_params$ (put a pound character at the beginning of the line). The operation parameters are read at every tool change in any case so the call to rd_params$ is really redundant unless it is used to read parameters from an operation other than the one currently being processed (and I have yet to see a post actually using it for that purpose).

 

If that doesn't fix the problem, send a zip2go over to me at [email protected] and I'll have a look (be sure to save the file before creating the .mcx or it will not be included in the zip2go file).

Link to comment
Share on other sites

That worked like a champ! There is only 1 instance of rd_params$ in the entire post and its called in the ptlchg0$ block

 

code:

ptlchg0$         #Call from NCI null tool change (tool number repeats)

if op_id$ <> last_op_id,

[

#rd_params$ # Read parameters - pparameter

pmisccheck

I commented it out and all the errors go away. I'm going to run some tests still to make sure everything is peachy.

 

Thanks a bunch Paul smile.gif

Link to comment
Share on other sites

FYI, this is what we just sent out in a bulletin to resellers:

 

Problem with rd_params$ function

 

Using the rd_params$ function too early in your post will result in an error message. For example, you cannot use this function in the pprep$ postblock.

 

The problem is that the rd_params$ function relies on the rd_prm_op_no$ variable to know what operation to read the parameters from, but this variable might not yet been set when rd_params$ is called. If you’re not sure whether you are using rd_params$ in an invalid postblock, just run the post in the debugger and verify that rd_prm_op_no$ has acquired a non-zero value before calling rd_params$.

 

The following line shows an example of the error message that will be created when you use rd_params$ in an invalid location:

code:

  08 Jun 2009 01:09:20 PM - <2> - PARAMETER DATA - - Possibly incorrect parameter number detected: 0

In general, no matter where you use the rd_params$ function, you need to make sure that rd_prm_op_no$ is properly set. It is set to 0 by default. Typically, it is a good practice to set it right before the function is called. Setting it equal to op_id$ is a useful technique to get the parameters for the current operation:

code:

pdo_something$         #sample postblock

if op_id$ <> last_op_id,

[

rd_prm_op_no$ = op_id$

rd_params$ # Read parameters - pparameter

pdo_something_else

]

To learn more about this function, see page 30 (“Reading operation parameters from any postblock”) in the NCI & Parameter Reference. This is available in your Mastercam installation: documentationMcamX4_NCI_Parameter_Ref.pdf.

 

(With apologies to Glen Bouman, who caught my embarassing typos in the original article...)

Link to comment
Share on other sites

quote:

Paul, could a customize_x.update_mill file for updatepost.dll be made up to deal with this issue ?

Possibly. The string entered into the customize.update file must match exactly (including any possible comments). If the line in the post is consistent then it should work.

 

In the case above you would need to add a section like this:

 

code:

// Comment out rd_params$ - common in MPMaster posts


The setting for 5. can be changed to FALSE if this line appears more than once in a post and you want to comment all of the occurances.

 

I'd have one of your post guys give it a try if this is going to be a common issue. smile.gif

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