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 output order on machine namne and machine group name


Recommended Posts

Hi!

 

I'm a newbie on post editing but has done a few successful edits before but I'm stuck this time.

What I'm trying to do is change the order of the machine name and the machine group that is outputted in the NC-header and still be able to disable the output of the machine group inside mastercam.

 

From this:

 

0 Begin PGM TEST POSTING MM

1 ; MCX FILE : TEST POSTING

2 ; POSTED : 18:00 - 29 / 09 / 2013

3 ; FILE DESCRIPTION

4 ; MACHINE NAME

5 ; MACHINE GROUP 1

6 ; MACHINE GROUP 1 COMMENT

 

To this:

 

0 Begin PGM TEST POSTING MM

1 ; MCX FILE : TEST POSTING

2 ; POSTED : 18:00 - 29 / 09 / 2013

3 ; FILE DESCRIPTION

4 ; MACHINE GROUP 1

5 ; MACHINE NAME

6 ; MACHINE GROUP 1 COMMENT

 

My post is a standard MPmaster with a few modifications.

 

The original code did look like this:

pcomment$ #Comment from manual entry (must call pcomment2 if booleans)

pcomment2

 

pcomment2 #Comment from manual entry

#1005 - As Comment

#1006 - As Code

#1007 - As Comment with output line, change at point

#1026 - As Code with output line, change at point

#1008 - Operation comment

 

#1051 - Machine Name

#1052 - Machine Group Comment

#1053 - Machine Group Name

#1054 - File Descriptor

 

spaces$ = 1

scomm$ = ucase (scomm$)

if sof & gcode$ >= 1051, n$, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1005, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1006, n$, pspc, scomm$, e$

if gcode$ = 1007, scomm_str, scomm$, scomm_end

if gcode$ = 1026, scomm$

if gcode$ = 1008 & header = zero, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1008, scomm_sav = ucase(scomm$)

spaces$ = sav_spc

 

I tried to change it like this:

pcomment$ #Comment from manual entry (must call pcomment2 if booleans)

pcomment2

 

pcomment2 #Comment from manual entry

#1005 - As Comment

#1006 - As Code

#1007 - As Comment with output line, change at point

#1026 - As Code with output line, change at point

#1008 - Operation comment

 

#1051 - Machine Name

#1052 - Machine Group Comment

#1053 - Machine Group Name

#1054 - File Descriptor

 

spaces$ = 1

scomm$ = ucase (scomm$)

if sof & gcode$ = 1054, n$, scomm_str, scomm$, scomm_end, e$

if sof & gcode$ = 1053, n$, scomm_str, scomm$, scomm_end, e$

if sof & gcode$ = 1051, n$, scomm_str, scomm$, scomm_end, e$

if sof & gcode$ = 1052, n$, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1005, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1006, n$, pspc, scomm$, e$

if gcode$ = 1007, scomm_str, scomm$, scomm_end

if gcode$ = 1026, scomm$

if gcode$ = 1008 & header = zero, n$, pspc, scomm_str, scomm$, scomm_end, e$

if gcode$ = 1008, scomm_sav = ucase(scomm$)

spaces$ = sav_spc

But of course it did not effect the order of the output.

 

I also tried to setup the 19248(machine group name) NCI parameter inside the pprep block and I did output it successful BUT I'm could not disable it inside of mastercam :(

 

I hope some one can help me with this or point me in the right direction!

 

 

Please, be nice to me, I'm a newbie on this :innocent:

Link to comment
Share on other sites

Show us the header section of the post. Are you sure it is coming from the pcomment2 section and not being called just out directly for those items?

 

Here is my pheader$ :)

pheader$ #Call before start of file

hour = int(time$)

min = int((time$ - hour)* 100)

if hour > 12, hour = hour - 12

if hour = 0, hour = 12

year$ = year$ + 2000

 

"0 BEGIN PGM", sprogname$, *smetric, e$

spaces$=1

n$, scomm_str, "MCX FILE : ", smcname$, scomm_end, e$

if spostname_sav = snull, spostname_sav = spostname

n$, scomm_str, "POSTED : " time$, "- "*day$, "/ ", *month$, "/ ", *year$, scomm_end, e$ # 24 hour H/MIN/DD/MN/YYYY

# *progno$, " ", scomm_str, sprogname$, scomm_end, e$

spathnc$ = ucase(spathnc$)

smcname$ = ucase(smcname$)

comment$ # File descriptor

spaces$=1

#scomm_str, "PROGRAM NAME - ", sprogname, scomm_end, e

#scomm_str, "DATE=DD-MM-YY - ", date, " TIME=HH:MM - ", time, scomm_end, e

#scomm_str, "MASTERCAM - V", *vers_no$, scomm_end, e$

# scomm_str, "MASTERCAM - X", scomm_end, e$

# scomm_str, "MCX FILE - ", smcpath$, smcname$, smcext$, scomm_end, e$

if spostname_sav = snull, spostname_sav = spostname

# scomm_str, "POST - ", snamepst$, scomm_end, e$

#scomm_str, "MP - V", *dll_vers$, scomm_end, e$

stck_matl$ = ucase(stck_matl$)

# scomm_str, "MATERIAL - ", stck_matl$, scomm_end, e$

#scomm_str, "PROGRAM - ", sprogname$, sextnc$, scomm_end, e$

#scomm_str, "DATE - ", *smonth, "-", *day$, "-", *year$, scomm_end, e$ # MON-DD-YYYY

#scomm_str, "DATE - ", *year$, "/", *month$, "/", *day$, scomm_end, e$ # YYYY/MN/DD

#scomm_str, "DATE - ", *day$, "/", *month$, "/", *year$, scomm_end, e$ # DD/MN/YYYY

#scomm_str, "DATE - ", date$, scomm_end, e$ # DD-MM-YR

#scomm_str, "TIME - ", *hour, ":", *min, [if time$ < 12, " AM"], [if time$ >= 12, " PM"], scomm_end, e$ # 12 hour

#scomm_str, "TIME - ", time$, scomm_end, e$ # 24 hour

# scomm_str, "POST DEV - ", *slicense, scomm_end, e$

spaces$=sav_spc

 

if seqno$ = 0, omitseq$ = yes$

sav_progno = progno$

 

if tseqno = 1 & omitseq$ = 1,

[

seqno$ = 1

seqinc$ = 1

n$ = seqno$

]

sav_rot_on_x = 0

header = 0

 

 

 

 

I should capture these in pparameter$ postblock:

if prmcode$ = 19970, sGroupName = sparameter$
if prmcode$ = 19248, sMachineName= sparameter$

 

After this, you can output these strings everywhere you want. I assume in pheader$ postblock.

 

I did try that and if I try to capture them inside pparameter$ does I don't get any output? But if I capture them inside pmachineinfo$ so does it work. The only problem then is that I can´t disable/enable the output of them from inside mastercam in the machine group properties. :unsure:

Link to comment
Share on other sites

The pcomment2 section outputs one line at a time, in the order that they are read from the NCI. It can specify the formatting for different values of gcode$, but NOT the order of output. I would use the gcode selector areas to populate user-defined strings with the data you need, and then output the strings in the order desired. (outside pcomment2)

Link to comment
Share on other sites

Here is how I did it in my post and got what I wanted thanks to Roger Martin at CNC.

 

#"%", e

#!spaces$

spaces$ = 0

#*progno$, " (", sprogname$,")", e$

#spaces$ = prv_spaces$

#pbld, n$, *smetric, e

"(PROGRAM NAME - ", sprogname$, ")", e$

"(CUSTOMER - ", prdbcustp, ")", e$ # Added RDB

"(PART NUMBER - ", smachgrp_name, ")", e$ # ADDED Roger Martin

"(MODEL # - ", smachgrp_name, ".CATPART)", e$ # Added RDB

"(PROGRAMMER - RON B)", e$ # Added RDB

"(DATE - ", *smonth,"-",day$,"-",*year2,")", e$ #Date output as month,day,year - Ex. Feb. 12 2005

"(TIME - ",ptime,")", e$ #12 hour time output 3:52 PM

"(PROGRAM REV - ", psrev, ")", e$

"(TOOL LIST)", e$ #Giving it a title

"(--------------------------------------------------------------------------)", e$

spaces$ = 1

 

There are names for each one you will have to add this to the pmachineinfo$

 

Here is the one I used, but I am sure there are more just need to get the PDF about posts and it will help you greatly.

 

if prmcode$ = 19248, smachgrp_name = sparameter$
Link to comment
Share on other sites

But if I capture them inside pmachineinfo$ so does it work.

So does it work? Did you output it into your NC code? In your desired order? I'm a bit confused.

I checked your header, but I can not see any string output, that's why I asked.

 

The only problem then is that I can´t disable/enable the output of them from inside mastercam in the machine group properties. :unsure:

I'll take a look, but why you need to switch it On/Off?

Just askin'

Link to comment
Share on other sites

@Crazy^Mill/Turn

 

I has tried that but then I can't disable the output inside of mastercam. I have checked the pdf but the only NCI parameter I can find that control if the machine group name should be outputted is 1053 and I don't know how I should call it?

 

@Peter MoP

 

I'm sorry for my bad explanation!

That I mean is that I did get the output of the machine group name in the NC code with help of the NCI parameter 19970/19248 (both does output the machine group name) that I did place inside the pmachineinfo$ postblock and then added the string inside pheader$. But I couldn't disable the output of it from mastercam.

(The section of my pheader that you see is before I added the string)

 

What I would like to do is use me of the NCI code 1053 so I can disable it inside mastercam but I can't seams to call it right for I only get a empty line in the NC code but no error messages.

How should I call NCI 1053? Or do you have another solution?

 

I only wan't to output the machine group when I have multiple :)

 

I'm very thankful for all help!

And I hope you do understand my messy description..

post-42894-0-72168100-1381346211_thumb.png

Link to comment
Share on other sites
  • 1 year later...

So does it work? Did you output it into your NC code? In your desired order? I'm a bit confused.

I checked your header, but I can not see any string output, that's why I asked.

 

 

I'll take a look, but why you need to switch it On/Off?

Just askin'

Oops, I posted on the wrong topic.

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