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:

Tapping feed decimal places


Recommended Posts

Ok, fmt for "F" is 15, so fs2 15 is my feed format line, correct?

Is this statement "fs2 15  0.2 0.1", stating 2 places after the decimal in inch mode & 1 place after the decimal in metric?

If so, as understand it, I can change this to "fs2 15  0.4 0.2", and things should be good.

But is there a way that I can use 2places after for G94 feeds and 4 places after just for G95 feeds?

Link to comment
Share on other sites

Yes.

 

#Default english/metric position format statements
fs2 1   0.7 0.6     #Decimal, absolute, 7 place, default for initialize (:)
fs2 2   0.4 0.3     #Decimal, absolute, 4/3 place
fs2 3   0.4 0.3d    #Decimal, delta, 4/3 place
#Common format statements
fs2 4   1 0 1 0     #Integer, not leading
fs2 5   2 0 2 0l    #Integer, force two leading
fs2 6   3 0 3 0l    #Integer, force three leading
fs2 7   4 0 4 0l    #Integer, force four leading
fs2 9   0.1 0.1     #Decimal, absolute, 1 place
fs2 10  0.2 0.2     #Decimal, absolute, 2 place
fs2 11  0.3 0.3     #Decimal, absolute, 3 place
fs2 12  0.4 0.4     #Decimal, absolute, 4 place
fs2 13  0.5 0.5     #Decimal, absolute, 5 place
fs2 14  0.3 0.3d    #Decimal, delta, 3 place
fs2 15  0.2 0.1     #Decimal, absolute, 2/1 place
fs2 16  0 4 0 3t    #No decimal, absolute, 4 trailing
#Default english/metric feed format statements
fs2 17  0.2 0.1     #Decimal, absolute, 2/1 place
fs2 18  0.4 0.3     #Decimal, absolute, 4/3 place
fs2 19  0.5 0.4     #Decimal, absolute, 5/4 place
fs2 20  1 0 1 0n    #Integer, forced output
fs2 22  0 4 0.3     #No decimal, absolute, 4/3 place
fs2 23  0 4 0 4lt   #no decimal, absolute, 4/4 place
fs2 25  1.4 1.3lt   #Decimal, absolute, 4/3 trailing
fs2 26  1.3 1.2lt   #Decimal, absolute, 3/2 trailing
fs2 27  0 5 0 5lt   #no decimal, absolute, 3/3 place

 

In this case use:

fmt  "F" 2  feed        #Feedrate
fmt  "F" 17 feed        #Feedrate

Notice that the "2" and the "17" correspond to the appropriate fs2 line.

 

Put this in your tapping postblock:

        if ipr_actv$ = 0,
         [
          result = nwadrs(strf, feed)
          result = newfs (17, feed)
         ]
This will switch from fs2 2 to fs2 17 if using ipm.
        
Your values may be different you may need to substitute a few things to match
your post.  However, this will give the power to switch formatting on the fly
based on which mode your currently using.

Link to comment
Share on other sites

Yes.

 

#Default english/metric position format statements

fs2 1   0.7 0.6     #Decimal, absolute, 7 place, default for initialize ( :)

fs2 2   0.4 0.3     #Decimal, absolute, 4/3 place

fs2 3   0.4 0.3d    #Decimal, delta, 4/3 place

#Common format statements

fs2 4   1 0 1 0     #Integer, not leading

fs2 5   2 0 2 0l    #Integer, force two leading

fs2 6   3 0 3 0l    #Integer, force three leading

fs2 7   4 0 4 0l    #Integer, force four leading

fs2 9   0.1 0.1     #Decimal, absolute, 1 place

fs2 10  0.2 0.2     #Decimal, absolute, 2 place

fs2 11  0.3 0.3     #Decimal, absolute, 3 place

fs2 12  0.4 0.4     #Decimal, absolute, 4 place

fs2 13  0.5 0.5     #Decimal, absolute, 5 place

fs2 14  0.3 0.3d    #Decimal, delta, 3 place

fs2 15  0.2 0.1     #Decimal, absolute, 2/1 place

fs2 16  0 4 0 3t    #No decimal, absolute, 4 trailing

#Default english/metric feed format statements

fs2 17  0.2 0.1     #Decimal, absolute, 2/1 place

fs2 18  0.4 0.3     #Decimal, absolute, 4/3 place

fs2 19  0.5 0.4     #Decimal, absolute, 5/4 place

fs2 20  1 0 1 0n    #Integer, forced output

fs2 22  0 4 0.3     #No decimal, absolute, 4/3 place

fs2 23  0 4 0 4lt   #no decimal, absolute, 4/4 place

fs2 25  1.4 1.3lt   #Decimal, absolute, 4/3 trailing

fs2 26  1.3 1.2lt   #Decimal, absolute, 3/2 trailing

fs2 27  0 5 0 5lt   #no decimal, absolute, 3/3 place

 

In this case use:

fmt  "F" 2  feed        #Feedrate

fmt  "F" 17 feed        #Feedrate

Notice that the "2" and the "17" correspond to the appropriate fs2 line.

 

Put this in your tapping postblock:

        if ipr_actv$ = 0,

         [

          result = nwadrs(strf, feed)

          result = newfs (17, feed)

         ]

This will switch from fs2 2 to fs2 17 if using ipm.

        

Your values may be different you may need to substitute a few things to match

your post.  However, this will give the power to switch formatting on the fly

based on which mode your currently using.

Awesome. Thanks I'm going to try this right now.

 

Zeke

Link to comment
Share on other sites

I would not.  If you change that line you will break functionality somewhere down the road.  You can make a new one.  In this example, the last format is 27 so for instance I could make this new one on my post:

 

fs2 28  0.2 0.1     #Decimal, absolute, 2/1 place

 

 

        if ipr_actv$ = 0,
         [
          result = nwadrs(strf, feed)
          result = newfs (
28, feed)
         ]

Link to comment
Share on other sites

Ok, my last fmt is 22 so I created:

 

fs2 23  0.2 0.1      #Decimal, absolute, 2/1 place

 

But my tapping postblock looks like this:

 

ptap$            #Canned Tap Cycle
      pdrlcommonb
      result = newfs(17, feed)  # Set for tapping Feedrate format
      pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,
        prdrlrout, *feed, strcantext, e$
      pcom_movea

 

So do I replace the "newfs(17, feed)" section with the

 

if ipr_actv$ = 0,
         [
          result = nwadrs(strf, feed)
          result = newfs (
23, feed)
         ]

 

section?

Link to comment
Share on other sites

This postblock should do the trick for you.

 

ptap$            #Canned Tap Cycle
       pdrlcommonb
       if ipr_actv$ = 0,
        [
         result = nwadrs(strf, feed)
         result = newfs (23, feed)
        ]
#       result = newfs(17, feed)  # Set for tapping Feedrate format
       pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,
         prdrlrout, *feed, strcantext, e$
       pcom_movea

Link to comment
Share on other sites

This postblock should do the trick for you.

 

#       result = newfs(17, feed)  # Set for tapping Feedrate format

  

Ok, cool, I just comment out the line, so that I can go back to my original if I break the post.

Thank you so much, I really appriciate your help.

 

Zeke

Link to comment
Share on other sites

Whenever there is an asterisk * before a variable, it forces the post to output the value of that variable, no matter what. A lot of variables are modal and won't output if they didn't change from the last time they were called. Putting * in front of feed means it will output the feedrate on every line of the drill cycle. For example, this is what it might look like without the asterisk:

 

G98 G81 X0 Y0 Z-1. R.1 F25.

X1.

Y1.

G80

 

And this is what it will look like with the asterisk:

 

G98 G81 X0 Y0 Z-1. R.1 F25.

X1. F25.

Y1. F25.

G80

  • Like 1
Link to comment
Share on other sites
  • 2 weeks later...

Whenever there is an asterisk * before a variable, it forces the post to output the value of that variable, no matter what. A lot of variables are modal and won't output if they didn't change from the last time they were called. Putting * in front of feed means it will output the feedrate on every line of the drill cycle. For example, this is what it might look like without the asterisk:

 

G98 G81 X0 Y0 Z-1. R.1 F25.

X1.

Y1.

G80

 

And this is what it will look like with the asterisk:

 

G98 G81 X0 Y0 Z-1. R.1 F25.

X1. F25.

Y1. F25.

G80

Thank you.

 

Zeke

Link to comment
Share on other sites

I keep getting this error, using the above code:

 

PST LINE (1804) - The formula/boolean failed (general message), , Label has not been defined[26]

PST LINE (1804) - The formula/boolean does not terminate properly

 

What is the "strf" supposed to be defined as?

I guess it would help if I was a little more specific.

This is the code Im using that is generating the error:

 

ptap$            #Canned Tap Cycle

       pdrlcommonb

       if ipr_actv$ = 0,

        [

         result = nwadrs(strf, feed)

         result = newfs (23, feed)

        ]

#       result = newfs(17, feed)  # Set for tapping Feedrate format

       pcan1, pbld, n$, *sgplane, *sgdrlref, *sgdrill, prdrlout,

         prdrlrout, *feed, strcantext, e$

       pcom_movea

Link to comment
Share on other sites

I keep getting this error, using the above code:

 

PST LINE (1804) - The formula/boolean failed (general message), , Label has not been defined[26]

PST LINE (1804) - The formula/boolean does not terminate properly

 

What is the "strf" supposed to be defined as?

 

The nwadrs(strf, feed) line assigns a new string prefix to the feed variable. In order to use it, you have to define the string strf in the post.

 

strf         : "F"   #String for address F

Link to comment
Share on other sites
  • 3 months later...

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