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:

X3 - post - How to prompt for variable?


Robert D. Smith
 Share

Recommended Posts

To elaborate on what alma said, your format line (fq) must start in the first column of the post file.

 

The question prompt line (q1) should have spaces padded so that it lines up with the other lines in the pheader section.

 

I'm not sure, but you might need to use the variable somewhere in the code being output...

 

try putting "~which" on a separate line somewhere below the program number output and see if anything happens...

Link to comment
Share on other sites

The FQ declaration has to start in coulumn #1 which causes it to be outside a postblock.

 

the q1 must be on a postline (indented and inside a postblock) which is part of a postblock.

 

The variable which must also be defined/declared as well.

 

Then somewhere along the line you must use the variable which either in a calculation or for output.

 

Example:

code:

which : 0 #declare and intialize variable which to zero

 

fmt Z 2 which #Format the variable which to FS number 2 and a prefix of Z for output

 

fq 1 which "Enter the z Value" #Define the question to call

 

psof$

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

 

q1 #Command to call question #1


Also, review your .err file in the NC folder to see if there were errors during posting. If it's not working, I guarantee you have some errors.

 

If none of this helps or makes sense, make it easier on yourself and send your post to your reseller for help.

Link to comment
Share on other sites

This goes in your string variables post section:

 

sjob_no "" #Job number

spart_rev "" #Part revision

 

This goes somewhere after, I have a section for Question format statements in my post:

 

fq 3 sjob_no "Job number"

fq 4 spart_no "Part number"

 

 

This goes in the pheader section of my post, yours might be needed in a different spot like psof section:

 

q3 #Job number

q4 #Part number

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