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:

Post Edit...Tooltable and prompt for input


Recommended Posts

Ok,

I have a modified post for mill that outputs a tool table at the top of the program.

 

Example:

%

O0010(GRINDING WHEEL FLANGE)

(CREATION DATE 05-16-03)

(=================================)

(=========== TOOL LIST ===========)

(OP#1 IS TOOL 1 - DIA .250)

( TOOL TYPE = 1/4 CENTERDRILL )

( OPERATION IS DRILL/TAP)

(OP#2 IS TOOL 2 - DIA .531)

( TOOL TYPE = 17/32 DRILL )

( OPERATION IS DRILL/TAP)

(OP#3 IS TOOL 3 - DIA .500)

( TOOL TYPE = 1/2 FLAT ENDMILL )

( OPERATION IS CONTOURING)

(======== START OF PROGRAM =======)

(=================================)

G20

....

 

It also prompts for a program name in MC before posting, it use to prompt for rev number and print number but that got to be too much. It prompts right after you select file name for the NC file. This is done like this

 

#Program Switch....

questions : yes #Prompt for Program Name

tooltable : yes #Activate Tool table

 

#Format for input questions

sprogname

 

fq 1 sprogname Enter The Part Name

 

#Begin of PHeader

....

"%", e

if questions = 0, *progno, e "(PROGRAM NAME - ", progname, ")", e

if questions = 1 & sprogname = sblank, *progno, e "(PROGRAM NAME - ", progname, ")", e

if questions = 1 & sprogname <> sblank , *progno, e "(", sprogname, ")", e

....

 

And this is how the tooltable is done:

....

if tooltable = 1,

[

"(=================================)", e

"(=========== TOOL LIST ===========)", e

]

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

]

 

"(======== START OF PROGRAM =======)", e

"(=================================)", e

 

My question is this.

First hopefully people can use this themselves after reading this.

 

I'd like to do the same for lathe now. I've tried and tried, I just do not get what I want. I can't get it to prompt for input of program name and tool list does output. I'd also like to try to add the stock size to the program by taking the vaules from the setup page.

 

All just dreams or what? smile.gif

 

If anyone would like to try to take a stab at it please do

 

Thanks cheers.gif

 

[ 05-16-2003, 03:46 PM: Message edited by: Brent Wilkerson ]

Link to comment
Share on other sites

my nc output is : .

 

( N1 - T1 3/8 SPOTDRILL H1 )

( N2 - T16 3/8 DRILL COOLING THROUGHT H12 )

( N3 - T8 DRILL 4.7 H37 )

( N4 - T3 1/2 HELI MILL H7 )

( N5 - T20 1/4 ROUGH ENDMILL H73 )

( N6 - T11 1/4 FLAT ENDMILL H5 )

( N7 - T7 1/8 FLAT ENDMILL H15 )

( N8 - T10 DRILL 5.2 H40 )

( N9 - T2 DRILL 7.0 H4 )

( N10 - T5 13/32 FLAT ENDMILL H11 )

 

(Name : 7759 C08 CENTRE )

 

(time : 11:32 )

(DATE: AVRIL -16 -03 )

 

(OVERALL MAX Z2. )

(OVERALL MIN Z-1.15 )

 

G20

G90 G80 G40 G0 G62 X0. Y0.

N1 T1 M6 ( T1 3/8 SPOTDRILL H1 )

G15H1

( SPOT DRILL )

G0 G90 X-2.2503 Y.8469

S2000 M3

G56 H1 Z2. M8

Z.1

G81 X-2.2503 Y.8469 Z-.02 R.1 F25. M54

X-3.7512 Y1.8233 Z-.08

......

I put N before call tool because a search N.. for jump another tool.

 

[ 05-17-2003, 11:13 AM: Message edited by: mario ]

Link to comment
Share on other sites

mario

 

We do the same thing. I personally like N numbers on every line for tracking changes made on the floor, but the operators like having N on the Toolchange line. I recently redid our posts and the operators have asked that we eliminate the tool list in the header. They want a good setup sheet and no redundant data in the program.

 

Dave

Link to comment
Share on other sites

Hi Brent,

 

Try this line

ptoolcomment #Comment for tool

tnote = abs(t)

toffnote = tloffno

strtool = ucase(strtool)

stoper = ucase(stoper)

stinsert2 = ucase(stinsert2)

"(", *tnote, *toffnote, ")", e

if posttype = two,

"(", *stoper, " ", *strtool, ")", e *stinsert, *stinsert2, ")", e

else,

"(", *stoper, " ", *strtool, ")", e

 

Then in ltlchg type in ptoolcomment

 

Hope this helps you.

Link to comment
Share on other sites

Scott,

 

That is for toolchange/new operation, I have this already in the post for lathe. What I'm looking for is a listing of all tools being used in the program printed in the header/begining of a lathe program. I have this done in mill but it's not the same in lathe.

 

Thanks anyway....we just may end up having to use a setup sheet instead for lathe.

 

cheers.gif

Link to comment
Share on other sites

Hi Brent,

 

This is what you want.

 

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

# NCI file pre-read look ahead routines

# Build the toolchange buffer, sets cycle and turret flags

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

pwrttparam #Information from parameters

if opcode = 104, result = fprm (opcode)

 

pwrtt #Buffer toolchange information, tooltable = 3 calls on 1003

save_spc = spaces

spaces = 0

if t>0, "(", *t, " ", strtool, ")", e

spaces = save_spc

if gcode = 1001, psetup

pcut_cctyp

if opcode=104 | opcode=105 | opcode=three | opcode=16, cc_pos = zero

if gcode <> 1001, plast_recd

pcur_recd

if gcode <> 1003, cc_pos = zero

!opcode, !tool_op

if gcode = 1003,

[

size1 = rbuf (one, zero)

rc1 = one

if rc1 < size1, preadcur_nxt

if cc_1013 = zero, cc_pos = zero

]

This will build the tool list for you.

Link to comment
Share on other sites

Scott,

 

For that area I has this:

 

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

# NCI file pre-read look ahead routines

# Build the toolchange buffer, sets cycle and turret flags

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

pwrttparam #Information from parameters

if opcode = 104, result = fprm (opcode)

 

pwrtt #Buffer toolchange information, tooltable = 3 calls on 1003

if gcode = 1001, psetup

pcut_cctyp

if opcode=104 | opcode=105 | opcode=three | opcode=16, cc_pos = zero

if gcode <> 1001, plast_recd

pcur_recd

if gcode <> 1003, cc_pos = zero

!opcode, !tool_op

if gcode = 1003,

[

size1 = rbuf (one, zero)

rc1 = one

if rc1 < size1, preadcur_nxt

if cc_1013 = zero, cc_pos = zero

]

 

Should I replace this with what you have then? Next where do I call it out in the header section.

 

Thanks

cheers.gif

 

[ 05-19-2003, 12:28 PM: Message edited by: Brent Wilkerson ]

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