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:

Add N#'s at tool comments


Recommended Posts

I am trying to edit a post for a 3 axis vmc, I am a programmer and have 6 operators that need cnc programes to be very basic to help with set ups and such, Ive been pretty succesfull in my first attemps to create post that leave very little editing to be done to cnc programe. But I need one last thing and cant figure it out. I would like the tool commet lines that are at the begining of the respective tools cycle to be numbererd sequentialy, but not nescarily the smae number as tool number, more like a cycle number. Using MX4 MU3

 

What I get now is

 

(3/8 spot drill H1)

T3M6

xxxxx

xxxxxx

(#31 Drill H2)

T2M6

xxxxx

xxxxxx

(3/8 SPOT DRILL)

T1M6

xxxxx

xxxxxx

 

What I want is

 

N1(3/8 spot drill H1)

T3M6

xxxxx

xxxxxx

N2(#31 Drill H2)

T2M6

xxxxx

xxxxxx

N3(3/8 SPOT DRILL)

T1M6

xxxxx

xxxxxx

 

Makes it much easier for operators to jump to a specific cycle and re-run if needed, also matches the set-up sheet.

Right now I have to hand edit in those numbers

 

Any help would be much appreciated

Link to comment
Share on other sites

I have this in post, It may not be the correct way, but it works!!

 

*tseq=1

pcom_moveb

c_mmlt$ #Multiple tool subprogram call

*tseq,*t$, "M6", ptoolcomment #e$ *speed,

tseq = tseq +1

 

this is in the psof section

 

 

*tseq,*t$, "M6", ptoolcomment #*speed,

tseq = tseq +1

 

and this in the ptlchg block.

Link to comment
Share on other sites
also matches the set-up sheet

Where do you get the #'s that you use on the set up sheets from?

 

%
(MCX FILE - \\A111.MCX-5)
(DNCID NEW PRINT 10-11-2011)
(FILENAME C:\NEW_FP\COMMUNIC\48G&L\NEW PRINT 10-11-2011)
(PROGCAT G&L)
(DATE=13-10-11 TIME=10:01)
N1(       		1    	BEGIN)  	<<<<<<<<<<<<<<<<<<<<<<<< 1 is the number on my set up sheet for this cut....  next path is 2, then 3.....
(OP # 8)<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<this is the op # of this operation in my operations manager
N100G00X-12.Z3.H11M00
N102T01H11(TNR = 0.1875)
N104M41C650.S200.M03
N106G00X-10.4566Z-1.9955

 

^^^^ what my programs look like

Link to comment
Share on other sites

This is how it post now..

 

O0000 ( TEST )

( 13-10-11 )

( T1 | 3/8 X 90 SPOT DRILL | )

( T2 | 7/16 X 50 DEGREE ENDMILL | )

G20

G0 G17 G40 G49 G80 G90

N100 ( 3/8 X 90 SPOT DRILL | TOOL - 1 )

T1 M6

G0 G90 G54 X0. Y5.93 S7500 M3

G43 H1 Z.1 T2

/M8

G99 G83 Z-.1 R.1 Q.05 F20.

Y6.45

Y6.97

Y7.49

G80

M9

G91 G28 Z0. M5

M01

N102 ( 7/16 X 50 DEGREE ENDMILL | TOOL - 2 )

T2 M6

G0 G90 G54 X0. Y5.02 S7500 M3

G43 Z.25 T1

/M8

Z.1

 

 

 

I would like the N101/N102 numbers to be N1/N2

 

Our setup sheets are Hand typed using an Excel format the old programmer created works great its simple and to the point

Link to comment
Share on other sites

Keith not to sure this can be used with setup sheet the way it is at moment. Also if you use the same tool more than once you would have two N #s assigned to the same tool making the operators job a bit more complicated!

For me the N number is just a quick way of searching the prog!

@ mwright780 I also use an excel setup sheet! looks pretier than the mcam ones, and you can get more info about the job on it!

 

In the psof section change the

 

*tseq=1

 

to

 

*tseq=1-99

which will get the N1 at first tool call, and by the looks of it you may have an extra "tseq = tseq +1" in there somewhere?

Link to comment
Share on other sites

Here's how I do it using the MPmaster style post;

 

Create a variable,

seq_tool_n  : 0     # Sequence number for tool start blocks

 

Format the variable,

fmt  N  4   seq_tool_n    #Sequence number for tool start blocks

 

Add code in postblock ptlchg_com,

ptlchg_com      #Tool change common blocks
     pcom_moveb
     if machine = 80, p_toolsetter
     c_mmlt$ #Multiple tool subprogram call
     sav_cantext = cantext$
     if cantext$ <= 10, pcan
     if mi7$ <> 0, pstopcomment
     if (mi2$ = 12 | mi2$ = 16 | mi2$ = 22 | mi2$ = 25 | mi2$ = 38)
      & toolcount <> 1 & mi2count = 0, pinvertmacro12
     if (mi2$ = 13 | mi2$ = 15 | mi2$ = 17 | mi2$ = 23 | mi2$ = 26
      | mi2$ = 35 | mi2$ = 37 | mi2$ = 42 | mi2$ = 61)
      & toolcount <> 1 & mi2count = 0, pinvertmacro13
     sav_mi3 = mi3$
     sav_mi4 = mi4$
     sav_mi5 = mi5$
     sav_mi8 = mi8$
     if mi9$ = 1, second_tool = t$
     if mi9$ = 2,
       [
       if second_tool = 0, next_tool$ = t$
       else, next_tool$ = second_tool
       ]
     pvirt_tlplnno
     if plane$ < 0, plane$ = 0
     if stagetool >= zero, #   <<<<<<<<<< loook for this
       [
       seq_tool_n = seq_tool_n + 1 # add this line<<<<<<<<<<<<<<
#        seq_1n = seq_1n +1
       seq_2n = seq_2n +1
       seq_tool_n, "G91", "G30", "X0", "Y0", "Z0", e$ # add variable to this line <<<<<<<<<<< 
       "#153=1", e$

 

My g-code looks like this;

 

%
O112(JE80S 709-807-166 OP1)
(MACHINE NAME - ENSHU JE80S)
(DATE: MAY-22-09)

#152=0

N101 M98P5501 (PROGRAM PREP)
G00 G17 G20 G40 G49 G80 G90 G94

IF[#913EQ2]GOTO105(START OPERATION2)

IF[#525EQ3]GOTO2
#152=1
WHILE[#525EQ2]DO1
IF[#524EQ1]GOTO2
GOTO1
END1

N1 G91 G30 X0 Y0 Z0 <<<<<<<<<<<<<<<<<<<<<<<<<
#153=1
IF[#10004GT13.75]GOTO99001
M06 T104 (4" LONG OMP400 PROBE)
M00 (OPEN DOOR)
M66
T07
#170=4010
#172=5002
#198=0
#199=1
M98P5502
M98P5013
M05
G91 G30 X0 Y0 Z0
M00 (CLOSE DOOR)
#153=#0
M01

IF[#913EQ3]GOTO105
#524=1
IF[#526EQ1]GOTO108

N2 G91 G30 X0 Y0 Z0 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
#153=1
IF[#10007GT13.75]GOTO99001
M06 T07 (1/4" DIA, 3/4 FLUTE VARIMILL WITH .016 CHAMFER)
M66
T08
#170=4020
#172=5002
#199=0
M[#926]
M[#925]
M[#927]
M98P5013
M09
M56
M58
M05
G91 G30 X0 Y0 Z0
#153=#0
M01

N3 G91 G30 X0 Y0 Z0 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
#153=1
IF[#10008GT13.75]GOTO99001
M06 T08 (HANITA 1/4" FOUR FLUTE CARBIDE END MILL)
M66
T33
#170=4030
#172=5002
#199=0
M[#926]
M[#925]
M[#927]
M98P5013
M09
M56
M58
M05
G91 G30 X0 Y0 Z0
#153=#0
M01

and so on .......

Link to comment
Share on other sites

This is what i did; just add *n$ in the ptoolcomm post block.

 

ptoolcomm # Comments from tool library

spaces$ = 0

strtool$=ucase(strtool$)

if strtool$<>snull, pspc1, *n$, "(", *strtool$, ")", e$ <------------ (add *n$ in this line.)

else, pspc1, "(", "DEFINE TOOL NAMES", ")", e$

spaces$ = sav_spc

 

Hope that helps.

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