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:

Anyone know this error?


Recommended Posts

Ive been trying for hours to get my post to post 4 decimal plae for a tap cycle. I finally got it to post 4 decimal places, but then I get this error. It was a lot harder than I thought it would be, for something so simple. I can upload other pics of what I changed on my post. But it also errors out when there is not a tap cycle in the program.

post-42691-0-90274000-1440521468_thumb.png

Link to comment
Share on other sites

You have a problem with something on line number 1483. If you open your post in the Code Expert text editor, your can press CTRL + G to jump to a line number.

 

"label has not been defined" means you have used a variable name that has not been initialized. When you create a "new variable", you have to put an entry a the top of the post like this:

 

tap_feed : 0

 

That "initializes" the variable, and assigns it a starting value.

 

This could be because you tried to use a new variable, or you've just got a name with a spelling error. That will trigger an error message, since that variable name is not defined.

 

Fix that naming error first, and then run the post again. If there is another error, then it would be more obvious, once that name is fixed.

 

After you create a variable, you need to assign it a Format Assignment line. This tells the post processor how you want the numeric portion of the variable to be formatted (4 decimal places for example), and also allows you to assign an optional Prefix string, and Suffix string. In your case, for a feedrate value, you want the string "F" assigned to the variable output.

 

fmt   "F"   12  tap_feed

 

 

Then, in your tapping post block, you could do something like this:

    

ptap$            #Canned Tap Cycle
      pdrlcommonb
      #result = newfs(17, feed)  # Set for tapping Feedrate format
      tap_feed = fr$ #Get feedrate value from operation
     

Note that there is some default logic inside the 'ptap$' post block that will change the feed format for you. Look at the 'result = newfs(17, feed)' line. (I commented it out in the sample above). That line assigns a new format assignment value for that variable. All you normally have to do is change that number. (number 12 gives you a 4 place decimal).

 

So you might consider going back to where you started, and just playing around with changing that number to get the feedrate you want output on the line.

 

Also, be aware that there are two different tapping cycles setup in the stock Mastercam posts. There is "Tap", and then there is "Rigid Tap", in the cycle drop-down menu.

 

UPDATE: Ok, I just looked over the logic in the tapping post blocks, and realized there is a bug in the 'ptap$' post block. The "newfs" line assigns a new format to the 'feed' variable, but if you look at the output of that post block, it is the 'pitch$' variable that controls the output of the "F" value!!!!

 

So change the 'result = newfs(17, feed)' line to 'result = newfs(12, pitch)'...

 

That will fix your feedrate output for tapping...

Link to comment
Share on other sites

From what you copied, I'm guessing 'strf' is not defined. Go to the "#String and string selector definitions for NC output" section of your post. It should look something like this:

# --------------------------------------------------------------------------
#String and string selector definitions for NC output
# --------------------------------------------------------------------------
#Address string definitions
strm         : "M"
strn         : "N"
stro         : "O"
strp         : "P"
srad         : "R"
srminus      : "R-"
sblank       : ""

Then add a new entry like this:

# --------------------------------------------------------------------------
#String and string selector definitions for NC output
# --------------------------------------------------------------------------
#Address string definitions
strm         : "M"
strn         : "N"
stro         : "O"
strp         : "P"
srad         : "R"
srminus      : "R-"
sblank       : ""
strf         : "F"
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...