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:

CUSTOMIZE MILL.SET FILE


gibbs machine corp
 Share

Recommended Posts

Hello all. I am trying to customize my mill.set (setup sheet) file to pickup and print out what michine control I programmed to. We have 7 CNC mills and 1 CNC lathe. I currently have the file setup to prompt me for that information. I am just feeling a little lazy and would like mastercam to do the work for me. biggrin.gif When I ask my mastercam provider for help I don't always get what I need. I have better luck finding the answer here. I have been able to go in and make some changes on my own, but this one has me stumped. Thanks in advance for any help. cheers.gif

Link to comment
Share on other sites

Look at the post reference guide pg 83. The section starts on page 39. Both page references are adobe page numbers not what the guide has as page numbers.

The numbers are not correct all the time, usually 2 off so if #19105 the one you need doesn't yeild the info you want try extracting 19107 if thats not it try +/- 10 and you might find what you want.

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

Need to add question to the post. D oa search this has been covered a lot of time and should find some pretty detailed information on it.

 

It is the same as adding question to a post so if you have a post that ask question use it to road map what you need to do for the mill.set. It is a post jut in case you did not know.

 

HTH

 

BTW welcome to the forum.

Link to comment
Share on other sites

gibbs,

 

Are you trying to retrieve the 'Description' text for the active Machine when the toolpaths are posted?

 

What you would see in the Machine Group Properties page in the 'Machine' groupbox

 

Edit (button) Replace (button)

Description: My Big Blue Machine

From file: Mill Default.MMD

 

If so, that's easy to do...

Using MPFAN.PST in this example (look for the [ADDED] code) ->

 

code:

smachdescrip    # string variable to hold the 'description' [ADDED]

pmachineinfo$ [ADDED] this postblock>

#"prmcode ->",prmcode$ " : data -> ", sparameter$, e$ # for debugging, will dump everything

if prmcode$ = 17012, smachdescrip = sparameter$ # capture the desired Machine description [ADDED]

 

psof0$ #Start of file for tool zero

psof$

 

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

rd_md$ # Read the Machine Definition parameters [ADDED]

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

"%", e$

*progno$, e$

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

"(DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, ")", e$

"(Posted for machine:", smachdescrip, ")", e$ # Output Machine description info [ADDED]

Result is ->

 

%

O0001

(PROGRAM NAME - T )

(DATE=DD-MM-YY - 22-03-07 TIME=HH:MM - 17:22 )

(Posted for machine: My Big Blue Machine )

N100 G20

N102 G0 G17 G40 G49 G80 G90

( 1/2 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .5 )

N104 T1 M6

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

Leandro,

 

Try this...

 

I altered the standard MPFAN.PST for this example.

 

Add this code into your PST->

(If your PST already has the pparameter$ postblock, you’ll only add the stlp_name variable definition and the ‘prmcode = 20018’ statement into the existing pparameter$ postblock)

 

code:

stlp_name  # string variable to hold the ‘name’

pparameter$ #Parameter postblock

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

#"prmcode ->", ~prmcode$ " : data -> ", sparameter$, e$ # For Debugging

In psof$ I added code that outputs the contents of the stlp_mame string varaible.

code:

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

 

#pgetdata # My postblock to call when I want this data

 

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

"%", e$

*progno$, e$

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

"(DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, ")", e$

pbld, n$, *smetric, e$

pbld, n$, *sgcode, *sgplane, "G40", "G49", "G80", *sgabsinc, e$

sav_absinc = absinc$

if mi1$ <= one, #Work coordinate system

[

absinc$ = one

pfbld, n$, sgabsinc, *sg28ref, "Z0.", e$

pfbld, n$, *sg28ref, "X0.", "Y0.", e$

pfbld, n$, "G92", *xh$, *yh$, *zh$, e$

absinc$ = sav_absinc

]

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

 

"(", stlp_name, ")", e$ # <ADDED>

ptoolcomment

comment$

pcan

This resulting NC output -->

%

O0000

(PROGRAM NAME - T )

(DATE=DD-MM-YY - 18-09-07 TIME=HH:MM - 12:02 )

N100 G20

N102 G0 G17 G40 G49 G80 G90

( TOOLPATH GROUP-1 (IN 1ST MACHINEGROUP) )

( 1/2 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .5 )

( ROGER'S - MACHINE GROUP #1 )

N104 T1 M6

N106 G0 G90 G54 X-1.7155 Y1.1038 A0. S1069 M3

 

*** Note that you need to have the “Output group name to NC” option checked you the Machine Group Properties.

 

MachineGroupName.jpg

Link to comment
Share on other sites

Roger:

I understand this logic. However this is not exactlly that what I am looking for.

In your logic the variable stlp_name get the value of the Toolpath Group and the Machine group is outputed just as a comment.

 

What I am looking for is to load the Machine Group name to the variable stlp_name.

 

Is this possible ??

Link to comment
Share on other sites

Thanks for that Roger this is how I was doing it and getting reduntant code.

 

code:

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 - Group Comment

#1053 - Group Name

#1054 - File Descriptor

 

spaces$ = 0

scomm$ = ucase (scomm$)

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

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

if sof & gcode$ = 1053, scomm_str, "PART # - ", scomm$, scomm_end, e$ # This was my line

if sof & gcode$ = 1054, 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

Then here:

code:

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

 

"%", e$

spaces$=0

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

spathnc$ = ucase(spathnc$)

smcname$ = ucase(smcname$)

comment$ # File descriptor

"(PROGRAMMER - RON
B)
", e$

Which then got me this:

code:

O3281 (M382110)

N100 (CUSTOMER - FUJI)

(PART # - 143T8213-5)

(PROGRAMMER - RON
B)

(DATE - SEP-18-2007)

(TIME - 10:16 AM)

(T3 - 8. MM COOLTWIST DRILL - H0 - D0 - D0.3150")

(T4 - 6.4 DRILL - H0 - D0 - D0.2510")

(T14 - 3/4 X 100 DEG C-SINK - H14 - D4 - D0.7500")

(T2 - 3" OD MILL TEC - H2 - D2 - D2.5000" - R0.0312")

(T1 - 1/2 EM CARB ROUGH - W/.060RAD 3/4LOC - H1 - D1 - D0.5000" - R0.0600")

(T10 - 3/4 FLAT ENDMILL - H10 - D10 - D0.7500")

N110 G0 G17 G20 G40 G80 G90

N120 T3 M06 ( 8. MM COOLTWIST DRILL)

N130 M10 (UNLOCK)

N140 G0 G55 X-2.39 Y.869 A0. S424 M3

N150 M11 (LOCK)

N160 G43 H0 Z4.75

N170 G98 G81 Z2.3954 R2.85 F2.

N180 Y1.839

N190 X-.15 Y1.8386

N200 Y.869

N210 G80

N220 M5

N230 G91 G28 Z0.

N240 M01

N250 T4 M06 ( 6.4 DRILL)

N255 (PART # - 143T8213-5)<---- Because of the comment$ I got it at every toolchange

N260 M10 (UNLOCK

Now that I have the right code from the NCI I can eliminate that thanks. cheers.gifcheers.gif

Link to comment
Share on other sites

Upon further digging MPMASTER already had it in it. Guess when I was doing the MPFAN just never looked at the MPMASTER oh well I got it really great now. Nope I was wrong you are getting the group name output not by this line:

 

code:

"(", stlp_name, ")", e$  # <ADDED>  

You get this line: ( ROGER'S - MACHINE GROUP #1 ) from the comment$ correct? So you would have you have both order to get them?

 

 

Thanks again.

 

[ 09-18-2007, 02:24 PM: Message edited by: Crazy^Millman ]

Link to comment
Share on other sites

OK...

You want the Machine Group "name" captured and stored into a (user defined) string variable, for some use "later" on...

 

Try this ->

 

code:

smachgrp_name ""  # string variable to hold the name

 

pmachineinfo$ # postblock called to retrieve data

 

#"prmcode ->", ~prmcode$ " : data -> ", sparameter$, e$ # For Debugging

 

# Capture the desired parameter

if prmcode$ = 19248, smachgrp_name = sparameter$

... now down in the psof$ posblock ...

 

code:

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

rd_tlpathgrp$ # call 'pmachineinfo$' to retrieve toolpath group data <ADDED>

 

pcuttype

toolchng = one

if ntools$ = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool$

]

"%", e$

*progno$, e$

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

"(DATE=DD-MM-YY - ", date$, " TIME=HH:MM - ", time$, ")", e$

 

# Output the ‘name’ we captured...

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

"-> Machine Group Name = ", smachgrp_name, e$ # <ADDED>

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

*Note that you could put the rd_tlpathgrp$ call in the pheaer$ postblock instead of psof$ if needed.

 

Results in this NC output ->

%

O0000

(PROGRAM NAME - T )

(DATE=DD-MM-YY - 18-09-07 TIME=HH:MM - 16:00 )

---------------

-> Machine Group Name = Machine Group-1

---------------

N100 G20

N102 G0 G17 G40 G49 G80 G90

 

 

*What is nice about this approach is that it does not matter what the 'Output comments to NC file' options are set to. smile.gif

Link to comment
Share on other sites

That was the one. Thank you sir for that piece of information.

 

Here is my posted code now;

 

code:

%

O3282 (M382110)

(CUSTOMER - FUJI)

(PART # - 143T8213-5)

(PROGRAMMER - RON
B)

(DATE - SEP-18-2007)

(TIME - 2:06 PM)

(T3 - 8. MM COOLTWIST DRILL - H3 - D0 - D0.3150")

(T4 - 6.4 DRILL - H4 - D0 - D0.2510")

(T14 - 3/4 X 100 DEG C-SINK - H14 - D4 - D0.7500")

(T2 - 3" OD MILL TEC - H2 - D2 - D2.5000" - R0.0312")

(T1 - 1/2 EM CARB ROUGH - W/.060RAD 3/4LOC - H1 - D1 - D0.5000" - R0.0600")

(T10 - 3/4 FLAT ENDMILL - H10 - D10 - D0.7500")

N100 G0 G17 G20 G40 G80 G90

N110 T3 M06 ( 8. MM COOLTWIST DRILL)

All done from the posted code.

 

Incase anyone want a cool way to call customers from the post and using Mr values here is how I did it.

 

code:

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

 

"%", e$

spaces$=0

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

spathnc$ = ucase(spathnc$)

smcname$ = ucase(smcname$)

scomm_str, "CUSTOMER - ", prdbcustp, scomm_end, e$ # Added RDB

the prdbcustp was added as well as this last line.

 

Then this was added:

prdbcustp

if mr10 > 0,*scust

 

Then this string was added:

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

# Customer selector

scust0 "ADD CUSTOMER"

scust1 "BOEING"

scust2 "L"

scust3 "F"

scust4 "G"

scust5 "M"

scust6 "N"

scust7 "G"

scust8 "R"

scust9 "N"

scust10 "D.O.D."

scust11 "L"

scust12 "V"

scust

 

fstrsel scust0 mr10$ scust 13 -1

The cool thing about this is if you have 20 customers you just keep adding and changing the 13 to 21 and adding lines like shown above.

 

So you would then have scust20 "CUSTOMER 20"

 

I hope that is helpful to someone.

 

Done forget to change this in your post as well:

 

code:

[misc reals]

1. ""

2. ""

3. ""

4. ""

5. ""

6. ""

7. ""

8. ""

9. ""

10. "Customer Output [1=Boeing, 2=F, 3=....]"

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