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:

Change tap cycle from ipm to ipr


Recommended Posts

Hello I have a Medlas m3 control (Mitsubishi). On my post i need to output feed in Inches per revolution

 

ptap$ #Canned Tap Cycle

pdrlcommonb

"M05", e$

pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,

prdrlout, *feed, *speed, strcantext, e$

pcom_movea

 

I added the ( "m05", e$ ) line to stop the spindle which works

but I need to change the feed form F44.57 to F.0625 (3/8-16 tap)

 

 

G00G90G54X0.Y-8.886B90.S713M03

G43H203Z2.M08T123

M05

G98G84Z.787R1.5375F44.57S713

 

Thanks

Pete

X7 mu2

Link to comment
Share on other sites

It's odd that you wouldn't have use_pitch

 

you should have a variable named pitch, so on the line before your cycle output, put in this line:

 

pitch = 1/n_tap_thds$

 

and replace *feed with *pitch in the output line.

 

 

 

And never use * in a formula the way you typed it - the asterisk is used to force output into the final code; but in a formula it's used for multiplication.

Link to comment
Share on other sites

The post he is using could be an older post from a previous version, Pete you could borrow some logic from another post to accomplish the pitch output.

 

This tapping cycle is from the MPFan post that gets installed with Mcam. To use the asterisk as part of an equation there needs to be a space between what you're multiplying, if you use the asterisk with no space it creates a force condition.

 

fmt "F" 2 pitch #Tap pitch (units per thread) <<< don't forget to format the variable "pitch", fs2 should output a 4 place absolute decimal

 

ptap$ #Canned Tap Cycle

pdrlcommonb

 

result = newfs(17, feed) # Set for tapping Feedrate format <<< this will reset the decimal output to two places, if you do not want 2 place output use the pound sign "#" to comment out the line. The other way to do it would be to use fs17 when you format "pitch" check the format statements, for 2 place output it should look like this "fs2 17 0.2 0.3" This will result in two place for inch and three place for metric.

 

if met_tool$,

[

if toolismetric, pitch = n_tap_thds$ #Metric NC Code - Metric Tap

else, pitch = (1/n_tap_thds$) * 25.4 #Metric NC Code - English Tap

]

else,

[

if toolismetric, pitch = n_tap_thds$ * (1/25.4) #English NC Code - Metric Tap

else, pitch = 1/n_tap_thds$ #English NC Code - English Tap

]

pitch = pitch * speed #Force Units Per Minute for regular Tap cycle

pbld, n$, sg94, e$

pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,

prdrlout, *pitch, !feed, strcantext, e$

pcom_movea

Link to comment
Share on other sites

The post he is using could be an older post from a previous version, Pete you could borrow some logic from another post to accomplish the pitch output.

 

This tapping cycle is from the MPFan post that gets installed with Mcam. To use the asterisk as part of an equation there needs to be a space between what you're multiplying, if you use the asterisk with no space it creates a force condition.

 

fmt "F" 2 pitch #Tap pitch (units per thread) <<< don't forget to format the variable "pitch", fs2 should output a 4 place absolute decimal

 

ptap$ #Canned Tap Cycle

pdrlcommonb

 

result = newfs(17, feed) # Set for tapping Feedrate format <<< this will reset the decimal output to two places, if you do not want 2 place output use the pound sign "#" to comment out the line. The other way to do it would be to use fs17 when you format "pitch" check the format statements, for 2 place output it should look like this "fs2 17 0.2 0.3" This will result in two place for inch and three place for metric.

 

if met_tool$,

[

if toolismetric, pitch = n_tap_thds$ #Metric NC Code - Metric Tap

else, pitch = (1/n_tap_thds$) * 25.4 #Metric NC Code - English Tap

]

else,

[

if toolismetric, pitch = n_tap_thds$ * (1/25.4) #English NC Code - Metric Tap

else, pitch = 1/n_tap_thds$ #English NC Code - English Tap

]

pitch = pitch * speed #Force Units Per Minute for regular Tap cycle

pbld, n$, sg94, e$

pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,

prdrlout, *pitch, !feed, strcantext, e$

pcom_movea

 

The part in red is exactly what OP is trying to avoid.

Link to comment
Share on other sites

hello

I replaced my, ptap$ #Canned Tap Cycle

with

 

ptap$ #Canned Tap Cycle

pdrlcommonb

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

if met_tool$,

[

if toolismetric, pitch = n_tap_thds$ #Metric NC Code - Metric Tap

else, pitch = (1/n_tap_thds$) * 25.4 #Metric NC Code - English Tap

]

else,

[

if toolismetric, pitch = n_tap_thds$ * (1/25.4) #English NC Code - Metric Tap

else, pitch = 1/n_tap_thds$ #English NC Code - English Tap

]

pitch = pitch * speed #Force Units Per Minute for regular Tap cycle

pbld, n$, sg94, e$

pcan1, pbld, n$, *sgdrlref, *sgdrill, pxout, pyout, pfzout, pcout,

prdrlout, *pitch, !feed, strcantext, e$

pcom_movea

 

from MPFAN.pst

 

this is what i got- G99G84Z-.5R.1

this is what i want G99G84Z-.5R.1S713F.0625

 

here are the errors

 

15 May 2014 10:27:13 AM - <0> - Report created.

15 May 2014 10:27:13 AM - <2> - Initialize posting log file

15 May 2014 10:27:13 AM - <2> - Using MP run version 16.00 and post components version 16.00

15 May 2014 10:27:13 AM - <2> - Initiate opening the post processor file(s).

15 May 2014 10:27:13 AM - <2> - C:\USERS\PUBLIC\DOCUMENTS\SHARED MCAMX7\MILL\POSTS\MITSUBISHI MELDAS 4 - AXIS HMC.PST

15 May 2014 10:27:13 AM - <2> - The post processor file has been successfully opened.

15 May 2014 10:27:13 AM - <2> - Post version information (input):

15 May 2014 10:27:13 AM - <2> - UPDATEPOST Version 16. was used to modify this file.

15 May 2014 10:27:13 AM - <2> - The file was modified by this product on 05 Sep 2013 13:37:32

15 May 2014 10:27:13 AM - <2> - The post was written to run with Mastercam Version 16.

15 May 2014 10:27:13 AM - <2> - The post product type is Mill.

15 May 2014 10:27:13 AM - <2> - Initialization of pre-defined post variables, strings, postblocks was successful.

15 May 2014 10:27:13 AM - <2> - Search for defined post variables, strings, postblocks was successful.

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The formula/boolean failed (general message), , Label has not been defined[12]

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The formula/boolean failed (general message)

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The post block output type processing has failed!, , Label has not been defined[26]

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The post block output type processing has failed!, , Label was expected but was not found[32], Illegal character(s) encountered

15 May 2014 10:27:13 AM - <2> - PST LINE (1125) - The post block output type processing has failed!, , Label has not been defined[15]

15 May 2014 10:27:13 AM - <2> - PST LINE (1125) - The post block output type processing has failed!, , Label was expected but was not found[21], Illegal character(s) encountered

15 May 2014 10:27:13 AM - <2> - PST LINE (1129) - The formula/boolean failed (general message), , Label has not been defined[12]

15 May 2014 10:27:13 AM - <2> - PST LINE (1129) - The formula/boolean failed (general message)

15 May 2014 10:27:13 AM - <2> - PST LINE (1129) - The post block output type processing has failed!, , Label has not been defined[26]

15 May 2014 10:27:13 AM - <2> - PST LINE (1129) - The post block output type processing has failed!, , Label was expected but was not found[32], Illegal character(s) encountered

15 May 2014 10:27:13 AM - <2> - PST LINE (1130) - The post block output type processing has failed!, , Label has not been defined[15]

15 May 2014 10:27:13 AM - <2> - PST LINE (1130) - The post block output type processing has failed!, , Label was expected but was not found[21], Illegal character(s) encountered

15 May 2014 10:27:13 AM - <2> - PST LINE (1132) - The post block output type processing has failed!, , Label has not been defined[7]

15 May 2014 10:27:13 AM - <2> - PST LINE (1132) - The post block output type processing has failed!, , Label was expected but was not found[13], Illegal character(s) encountered

15 May 2014 10:27:13 AM - <2> - PST LINE (1135) - The post block output type processing has failed!, , Label has not been defined[19]

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'dec_seq_right$' was re-initialized from 3. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'arcoutput$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'arcoutputxz$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'arcoutputyz$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'larcoutput$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'larctypexz$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'larcoutputyz$' was re-initialized from 1. to 0.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'arccheck$' was re-initialized from 1. to 111.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'larccheck$' was re-initialized from 1. to 111.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'rotfeed4$' was re-initialized from 2. to 1.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'rotfeed5$' was re-initialized from 3. to 1.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'lrotfeed4$' was re-initialized from 2. to 1.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'lrotfeed5$' was re-initialized from 0. to 1.

15 May 2014 10:27:13 AM - <2> - CONTROL DEFINITION - Post variable 'peckacel$' was re-initialized from 0. to 1.

15 May 2014 10:27:13 AM - <2> - RUN TIME - PST(1129), NCI(100) - The math calculation/formula has an error

15 May 2014 10:27:13 AM - <2> - Successful completion of posting process!

Link to comment
Share on other sites
15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The formula/boolean failed (general message), , Label has not been defined[12]

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The formula/boolean failed (general message)

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The post block output type processing has failed!, , Label has not been defined[26]

15 May 2014 10:27:13 AM - <2> - PST LINE (1124) - The post block output type processing has failed!, , Label was expected but was not found[32], Illegal character(s) encountered

 

This message is referring to the user defined variables that were added to your post using the ptap postblock from MPFan. When you open the post in the Mcam or Cimco editor you will see a number variable calls with $ attached to their assends, those are predefined variables. When you create a new variable "user defined" it has to be formatted or initialized. I am guessing that you are working with an older post and it never had "pitch" or "toolismetric" as user defined variables. You can borrow the format for "pitch" from MPFan.

 

fmt "F" 2 pitch #Tap pitch (units per thread)

 

Like I said, don't forget to format the variable "pitch", fs2 should output a 4 place absolute decimal, without the "F" character there is no label for the value of pitch, without the format statement 2 the post does not know how to output the numeric value.

 

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

 

The newfs (17,feed) will reset the decimal output to two places, if you do not want 2 place output use the pound sign "#" to comment out the line. The other way to do it would be to use fs17 when you format "pitch"

Check the format statements, for 2 place output it should look like this "fs2 17 0.2 0.3" This will result in two place for inch and three place for metric.

 

Your post more than likely does not have the call for "toolismetric" this is another user defined variable, you can borrow the initialization from MPFan.

 

toolismetric : 0 #flag that tool is metric

 

To use the metric tool information you will need to setup a parameter call in postblock called pparameters$

 

# Check To See if tool is metric

if prmcode$ = 20007, toolismetric = rparsngl(sparameter$, 11)

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