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:

Another post question


SVO
 Share

Recommended Posts

Hello, I would like to put the line with the tool info from the main into the header of the sub when posting. I'm having trouble acomplishing this and understanding how to do it. Can anyone help?

 

Thanks, Dan

 

O0000

(910176-CAV-F-SS )

( JUN -12 -03 )

( T6 - 7/64 BALL - TL DIA =.1087 )

/ N1 T6 M6

N2 G0 G17 G40 G80 G90 G54

N3 X-3.6907 Y-4.1318 S6000 M3

N4 G43 H6 Z.1

N5 M98 P0009

 

 

 

 

 

 

O0009

( )

N6 G91

N7 G1 Z-.1544 F40.

N8 G19 G2 Y-.5692 Z-.5692 J-.5692

N9 Y-.5693 Z.5692 K.5692

N10 G1 X-.0049

Link to comment
Share on other sites

I just did this myself...not in a sub, but a normal program.

 

Look in your post and find where it talks about subs. Put the word "ptoolcomment" (without the quotes) in there.

 

Here is a clip out of our post:

 

ptlchg

 

#Toolchange

pcuttype

toolchng = one

if mi1 <= one, #Work coordinate system

[

pfbld, n, *sgabsinc, *sg28ref, "X0.", "Y0.", "Z0.", e

]

pbld, n, "M1", e

pcom_moveb

c_mmlt #Multiple tool subprogram call

comment

ptoolcomment

pcan

pbld, n, *t, "M6", e

pindex

sav_absinc = absinc

 

 

Thad

Link to comment
Share on other sites

Marc it's just a mpfan.pst that I did a little adjustment to so we could use it on all of our fanuc controls. The only changes I made were in the header area and tool change area. I don't know much about posts so I only make simple changes. Still using 9.05 with updated post.

 

Dan

Link to comment
Share on other sites

Try this...

 

code:

 

psub_st_m #Header in main level

result = nwadrs(stro, main_prg_no)

" ", e

*main_prg_no, e

ptoolcomment #<added this line here>

#G51/G68 requires absolute position on first move

if mr_rt_actv & absinc = one,

[

sav_absinc = absinc

absinc = zero

prv_absinc = m_one

prv_xabs = m_one

prv_yabs = m_one

]

else, pbld, n, sgabsinc, e

 


Link to comment
Share on other sites

Hey Roger, I did try inserting what you suggested. I couldn't get it to work until I inserted the "tool comment" info instead of ptoolcomment, and moved ptoolcomment down as shown. I'm also wanting a comment to post in the sub as well. Do you have any ideas?

 

Thanks Dan

 

 

psub_st_m #Header in main level

result = nwadrs(stro, main_prg_no)

" ", e

*main_prg_no, e

"(",*tnote,"-",pstrtool,*tldia,")", e

#G51/G68 requires absolute position on first move

if mr_rt_actv & absinc = one,

[

sav_absinc = absinc

absinc = zero

prv_absinc = m_one

prv_xabs = m_one

prv_yabs = m_one

]

else, pbld, n, sgabsinc, e

 

 

psub_st_s #Header in sub leveln

result = nwadrs(stro, sub_prg_no)

" ", e

*sub_prg_no, e

ptoolcomment

comment

pbld, n, sgabsinc, e

Link to comment
Share on other sites

SVO,

 

Doesn't your tool comment info have to be in the tool comment area of your post? Then later in the post in the tool call area or sub area, then the "ptoolcomment" callout?

 

For example:

 

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

# Tool Comment / Manual Entry Section

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

ptoolcomment #Comment for tool

tnote = t

toffnote = tloffno

tlngnote = tlngno

n, "(", pstrtool, ")", e #***Assigns tool info that I want in my post

 

pstrtool #Comment for tool

if strtool <> sblank,

[

strtool = ucase(strtool)

*strtool, " "

]

 

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

pcomment2

 

pcomment2 #Comment from manual entry

scomm = ucase (scomm)

if gcode = 1007, n, "(", scomm, ")"

else, n, "(", scomm, ")", e

 

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

# Start of File and Toolchange Setup

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

psof0 #Start of file for tool zero

psof

 

psof #Start of file for non-zero tool number

pcuttype

toolchng = one

if ntools = one,

[

#skip single tool outputs, stagetool must be on

stagetool = m_one

!next_tool

]

"%", e

 

n, *progno, "(", sprogname, ")", e

n, "(", month, 45, day, 45, year, 47, time, ")", e

pbld, n, *sgcode, *sgplane, "G40", "G80", *sgabsinc, "H0", "E0", "Z0",e

sav_absinc = absinc

if mi1 <= one, #Work coordinate system

[

absinc = one

absinc = sav_absinc

]

n,"G8", e

comment, e

ptoolcomment #***callout

pcom_moveb

c_mmlt #Multiple tool subprogram call

pcan

if stagetool >= zero, pbld, n, *t, "M6", e

 

#check for rigid tap

if opcode = 3 & nextdc = 7,

[

result = newfs (11, speed)

speed = speed + .2

pcan1, pbld, n, *sgcode, *sgabsinc, *speed, "M5", "M90", pfxout,

 

Thad

Link to comment
Share on other sites

Thad,

 

The tool comment info is in the tool comment area of the post. The only way I could get it to post in the sub was to also use it later in the post in the sub area. By no means am I a post guru. As a matter of fact I wish I understood the more. When I get back in on Monday I'll show you the areas of my post, and an example of the posted code.

 

Dan

Link to comment
Share on other sites

Hey Roger I was wrong. I edited the area of my post as you described and it worked just fine. Thank you for your help. I'm still trying to get a comment posted in the sub as well, but not having any luck.

 

Thanks Dan

Link to comment
Share on other sites

quote:

My file is 124meg i tried to do the set up sheet and had to esc after letting it run for over 20 min.

quote:

I'm not sure of exact time to post the code ,but i know it was less than 1/2 hour. i was trying to use mill.set

So... What is the time difference between posting and creating a setup sheet (on the same toolpaths) ?

 

Like I said before ->

MILL.SET could take "a bit" longer than your Post Processor, since it actually scans the NCI file twice and your PST may not have a need to do that.

Potentially, the Mill.SET could take almost twice the time to process.

First, determine the real time difference between posting and creating a setup sheet.

 

If it takes MUCH longer for the setup sheet...

You could try this ->

If you really do not need the XYZ limit information and the Comp information that the Mill.SET can output,

do this (Save a BACKUP of your Mill.SET first!) ->

 

Find these lines in the Mill.SET ->>

 

tooltable : 3 # Yes, do NCI pre-scan (do NOT change!)

xyz_limits : 2 # Output Max/Min X,Y,Z information, where?

look4comp : yes # Buffer null toolchanges to search for comp (yes or no)

 

and change the setting to ->

 

tooltable : 0 # Yes, do NCI pre-scan (do NOT change!)

xyz_limits : 0 # Output Max/Min X,Y,Z information, where?

look4comp : no # Buffer null toolchanges to search for comp (yes or no)

 

Now how much is the time difference betwen posting with your PST and creating a setup sheet with this Mill.SET?

 

You MUST change all three!

If you set ->

tooltable : 0 # Yes, do NCI pre-scan (do NOT change!)

and not the others, Mill.SET will error out.

(That's why the comment on the tooltable line says "do NOT change!")

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