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:

MPMaster toolpath group name comments?


Recommended Posts

Hi,

 

 

How can you add the toolpath group comments to a MPMaster post? I would like to have it post out what I put in the name for the toolpath group name in the top of the program somewhere.

Like I have 2ND OP on the screen shot. Would like that to be somewhere on the top.

 

Right now I have to put in a manual entry to do this. The problem with that is that the manual entry still has the issue with not saving whatever you name it after you edit it every time. This has been this way since I can remember. What I mean by that is try to name the manual entry something then go back and change something in the manual entry and see what happens to what you named it. It will be gone and you will have to rename it every time you change it. This is has been a bug for awhile now.

post-1869-0-81804300-1377568176_thumb.jpg

  • Like 1
Link to comment
Share on other sites

Initialize variable

sgroupname : ""

 

Add to psof$, ptlchg$ and ptlchg0$ wherever you want the comment to come out, probably before/after "comment$".

 

sopen_prn, sgroupname, sclose_prn, e$

 

 

Add to pparameter$ postblock

 #Group Comment
 if prmcode$ = 20018, sgroupname = sparameter$	

Link to comment
Share on other sites

Initialize variable

sgroupname : ""

 

Add to psof$, ptlchg$ and ptlchg0$ wherever you want the comment to come out, probably before/after "comment$".

 

sopen_prn, sgroupname, sclose_prn, e$

 

 

Add to pparameter$ postblock

 #Group Comment
 if prmcode$ = 20018, sgroupname = sparameter$	

 

Thanks John. But for some reason I get a error. Maybe I am putting in at the wrong place.

 

 

Here is the error I am getting

 

g 2013 04:18:32 PM - <2> - Initialization of pre-defined post variables, strings, postblocks was successful.

27 Aug 2013 04:18:32 PM - <2> - Search for defined post variables, strings, postblocks was successful.

27 Aug 2013 04:18:32 PM - <2> - PST LINE (1742) - The post block output type processing has failed!, , Label has not been defined[4]

27 Aug 2013 04:18:32 PM - <2> - PST LINE (1742) - The post block output type processing has failed!, , Label has not been defined[27]

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'mtol$' was re-initialized from 0.0001 to 0.00001

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'met_mtol$' was re-initialized from 0.001 to 0.0001

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'ltol$' was re-initialized from 0.0005 to 0.002

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'maxrad$' was re-initialized from 999.9999 to 999.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'met_maxrad$' was re-initialized from 9999.999 to 9999.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'helix_tol$' was re-initialized from 0.0005 to 0.0001

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'met_helix_tol$' was re-initialized from 0.005 to 0.001

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'atol$' was re-initialized from 0.5 to 0.01

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'dec_seq_right$' was re-initialized from 3. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'dec_seq_left$' was re-initialized from 3. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'sub_seq_typ$' was re-initialized from 0. to 1.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'bldnxtool$' was re-initialized from 0. to 1.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'nobrk$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'nobrkxz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'nobrkyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lnobrk$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lnobrkxz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lnobrkyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'arcoutput$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'arcoutputxz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'arcoutputyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'larcoutput$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'larctypexz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'larcoutputyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'breakarcs$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'breakarcsxz$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'breakarcsyz$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lbreakarcs$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lbreakarcsxz$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lbreakarcsyz$' was re-initialized from 0. to 2.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'do_full_arc$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'do_full_arcxz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'do_full_arcyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'ldo_full_arc$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'ldo_full_arcxz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'ldo_full_arcyz$' was re-initialized from 1. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'rotfeed4$' was re-initialized from 2. to 1.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'rotfeed5$' was re-initialized from 3. to 0.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'lrotfeed4$' was re-initialized from 2. to 1.

27 Aug 2013 04:18:32 PM - <2> - CONTROL DEFINITION - Post variable 'sub_level$' was re-initialized from 0. to 0.

27 Aug 2013 04:18:32 PM - <2> - Successful completion of posting process!

 

 

 

 

 

This is where I added the changes.

 

pparameter$ # Run parameter table

if opcode$=13 | opcode$=14, result = fprm (opcode$)

if prmcode$ = 10000, stoper = ucase(sparameter$)

if stoper=snull, stoper = snullop

if prmcode$ = 10010, stock = rpar(sparameter$,1) # Stock to leave in Z

if prmcode$ = 10068, stock1 = rpar(sparameter$,1) # Stock to leave in XY

if prmcode$ = 12068, stock2 = rpar(sparameter$,1) # Stock to leave in Z facing

if prmcode$ = 10020, clearinc = rpar(sparameter$,1) #param 10020 is clearance now and 10021 indicates abs or inc

if prmcode$ = 15100, clearflg = rpar(sparameter$,1)

if prmcode$ = 15145, metvals = rpar(sparameter$,1)

if prmcode$ = 15339, clearstrt = rpar(sparameter$,1)

if prmcode$ = 15346, comp_type = rpar(sparameter$,1)

if prmcode$ = 15182, miscvalon = rpar(sparameter$,1)

if prmcode$ = 20010, sconstplname = ucase(sparameter$)

if prmcode$ = 20011, sconstplcomm = ucase(sparameter$)

if prmcode$ = 20012, stoolplname = ucase(sparameter$)

if prmcode$ = 20013, stoolplcomm = ucase(sparameter$)

if prmcode$ = 20014, swcsplname = ucase(sparameter$)

if prmcode$ = 20015, swcsplcomm = ucase(sparameter$)

if prmcode$ = 20016, smatlname1 = ucase(sparameter$)

if prmcode$ = 20017, smatlname2 = ucase(sparameter$)

if prmcode$ = 20018, stpgrpname = ucase(sparameter$)

if prmcode$ = 12025, rotary_axis2 = rpar(sparameter$,1) #Capture the axis of rotation in Multiaxis Drill and Curve 5 Axis

if prmcode$ = 15371, axissubdir = rpar(sparameter$,1)

if prmcode$ = 12628,

if prmcode$ = 20018, sgroupname = sparameter$ #Group comment <<<<<<<----------- Added this here.................>>>>>>>>>>>>>

[

hst_flg = 1

hststyle = rpar(sparameter$,1)

]

pwrttparam$ #Information from parameters

 

 

Misc variables

tcnt : 0 #Count the number of tool changes

toolcount : 1 #Tool counter for logic control

toolcountn : 0 #Next tool counter for logic control

toolcountp : 0 #Previous tool counter for logic control

tooltotal : 0 #Tool tool count

nexttool : 0 #Next actual tool

counter : 0 #Counter

nstrlen : 0 #Length of string

stock_typ : 0 #Predator Stock Type

cyl_typ : 0 #Predator Cyl Stock Type

z_min$ : 99999 #Min Z

z_tmin : 99999 #Overall min Z

z_max$ : -99999 #Max Z

z_tmax : -99999 #Overall max Z

sav_mi9 : 0 #Saved mi9 value

rotretflg : 0 #Flag used for indexing lock code output

compwarnflg : 0 #Flag for compensation warning output

sof : 1 #Indicates start of file through toolchange

header : 1 #Indicates start of file (header) for comment output

miscvalon : 0 #Flag for warning that misc values are set to post default

abs2incflg : 0 #Flag for post change from abs to inc output for rot_type = 2

axissubdir : 0 #Direction of current axis substitution 0 = CCW, 1 = CW

retractflg : 0 #Flag to indicate retract at null toolchange

mr1_flg : 0 #Flag to indicate whether look ahead function is active or not

lim_flg : 0 #Flag to only output limit warning once

tilt_flg : 0 #Flag to only output tilt limit warning once

hst_flg : 0 #Flag to output HST comments

sgroupname : "" #Flag to output groupname comments <<<<<<<<<<<<<<<< Added this here............>>>>>>>>>>>>>>>>>>>>>>

 

 

# --------------------------------------------------------------------------

# Start of File and Toolchange Setup

# --------------------------------------------------------------------------

psof0$ #Start of file for tool zero

psof$

sopen_prn, sgroupname, sclose_prn, e$ <<<<<<<<<<<<<<<<<<<<<<<<Added this here.......................>>>>>>>>>>>>>>>>>>>>>>>

psof$ #Start of file for non-zero tool number

ptravel

pwritbuf5

pcuttype

Link to comment
Share on other sites

I just took a look at the mpmaster post and the logic is already there for what you want to do. Remove all the code that I gave you earlier and uncomment the following in pcomment3

 

#	 if stpgrpname <> snull, pbld, n$, pspc, scomm_str, "TOOLPATH GROUP - ", stpgrpname, scomm_end, e$

 

Just for reference the issues with the what you had were

1. The IF statement was inside of another IF improperly.

2. Not sure that was exactly where you whanted the sgroupname to be output

3. Your post didn't have "sopen_prn" and "sclose_prn" strings defined.

Link to comment
Share on other sites

I just took a look at the mpmaster post and the logic is already there for what you want to do. Remove all the code that I gave you earlier and uncomment the following in pcomment3

 

#	 if stpgrpname <> snull, pbld, n$, pspc, scomm_str, "TOOLPATH GROUP - ", stpgrpname, scomm_end, e$

 

Just for reference the issues with the what you had were

1. The IF statement was inside of another IF improperly.

2. Not sure that was exactly where you whanted the sgroupname to be output

3. Your post didn't have "sopen_prn" and "sclose_prn" strings defined.

 

Great thanks . Worked perfect. I thought it was in there.

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