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:

Tool change post help for MPMASTER


Tim C
 Share

Recommended Posts

So, I decided to update the post I am using (mp v8.1) to the newer 11.1 mpmaster post. The old one was pretty good. One of the guys from my previous shop who was our lead until I took over actually had it custom made for him, and it was a really clean post for our Haas' and Fadals.

 

So, after using this one for this long, and always wanting a few things added, I decided to just update completely. I've done a bit of custom stuff on posts, but usually just the simple stuff, which brings me here to the experts.

 

What I would like to do is have a tool call (m6 style) at the end of each tool, but not at the end of the program. My mill is a side mount tool changer (haas vf3ss) so I can prestage the tool, which I am doing. I only really need an m6 at the end of each tool (minus the last tool) to get the machine to perform the toolchange, but I am not sure what I need to do to get it to do it without putting the m6 at the end of the program also.

 

The reason I don't want it at the end is it takes up time, and my g28g91y0z0 at the end is all I want there. Other than that, I really like the look of what I am getting from this post.

 

Any suggestions? - also, let me know if you need to see any of the post. It should be just the generic mpmaster 11.1.0811. I can post my code also if you would like to see it.

Link to comment
Share on other sites

Tim,

The newer posts have tool staging built in and it is controlled by the Control Definition file. Not certain what you've got in your V8 post for tool staging but because that post was written before the Machine & Control Def files were being used,... there are a number of settings that you could make in the machine & control def that the post will ignore.

 

As far as the M06 being posted at the end of your program check out the end of file postblock "peof" or if your post uses "pretract", you may find a M06 hard coded in the line associated with the G28 G91 Y0. Z0. reference call

Link to comment
Share on other sites

I put a number sign before where the M5 and G28Z0 code gets input at the end of tool so it doesn't put that useless code in. So, basically before the M01, I need the next tool called (which is already prestaged)so it can either be T?M6 or just plain M6.

 

Also, I don't need the first G94 in the program.

 

As far as the end of the program, it is exactly how I want it. I don't want any tool calls there.

 

 

 

 

 

 

 

%

O9191 (TEST PART FOR POST)

(T12 - 2" FACE MILL - H12 - D12 - D2.0000")

(T13 - 1/2 FLAT ENDMILL - H13 - D13 - D0.5000")

(T14 - 1/2 CENTERDRILL - H14 - D14 - D0.5000")

(T15 - 1/4 FLAT ENDMILL - H15 - D15 - D0.2500")

(T16 - NO. 29 DRILL - H16 - D16 - D0.1360")

(T17 - .156 REAMER - H17 - D17 - D0.1560")

(T18 - NO. 8-32 TAPRH - H18 - D18 - D0.1640")

(T19 - 1/4 DRILL - H19 - D19 - D0.2500")

(T20 - LTR. B DRILL - H20 - D20 - D0.2380")

(T21 - 1/4 REAMER - H21 - D21 - D0.2500")

G00 G17 G20 G40 G80 G90

G91 G28 Z0

T12 M06 (2" FACE MILL)

G00 G17 G90 G54 X-5.25 Y-1.8333 S10000 M03

G43 H12 Z3. M08 T13

Z.1

G94 G01 Z-.03 F100.

G41 D12 X-3.25

Y-.5

Y.5

Y1.8333

G40 X-5.25

G00 Z3.

X5.25

Z.1

G01 Z-.03

G41 D12 X3.25

Y.5

Y-.5

Y-1.8333

G40 X5.25

G00 Z3.

X2. Y-7.95

Z.1

G01 Z-.03

G41 D12 Y-5.95

X.5

X-.5

X-2.

G40 Y-7.95

G00 Z3.

Y7.95

Z.1

G01 Z-.03

G41 D12 Y5.95

X-.5

X.5

X2.

G40 Y7.95

G00 Z3. M09

M01

T13 M06 ( 1/2 FLAT ENDMILL)

G00 G54 X-1.775 Y7.2 S10000 M03

G43 H13 Z3. M08 T14

Z.1

G01 Z-.26 F100.

G41 D13 Y6.7

X-1.75

X1.75

X1.775

G40 Y7.2

G00 Z3.

X4.25 Y.525

Z.1

G01 Z-.26

G41 D13 X3.75

Y.5

Y-.5

Y-.525

G40 X4.25

G00 Z3.

X1.775 Y-7.2

Z.1

G01 Z-.26

G41 D13 Y-6.7

X1.75

X-1.75

X-1.775

G40 Y-7.2

G00 Z3.

X-4.25 Y-.525

Z.1

G01 Z-.26

G41 D13 X-3.75

Y-.5

Y.5

Y.525

G40 X-4.25

G00 Z3. M09

M01

T14 M06 ( 1/2 CENTERDRILL)

G00 G54 X-1.45 Y6.2 S10000 M03

G43 H14 Z3. M08 T15

G98 G81 Z-.15 R.1 F25.

X-.875

X.875

X1.45

X3.3425 Y0.

X2.9562

X2.57

X1.812

X0.

X-2.57

X-2.9562

X-3.3425

X-1.45 Y-6.2

X-.875

X.875

X1.45

G80 M09

M01

T15 M06 ( 1/4 FLAT ENDMILL)

G00 G54 X-.0996 Y0. S12000 M03

G43 H15 Z3. M08 T16

Z.1

G01 Z0. F100.

G41 D15 X-.1095

G03 X-.1095 Y0. Z-.0361 I.1095 J0.

X-.1095 Y0. Z-.0721 I.1095 J0.

X-.1095 Y0. Z-.1082 I.1095 J0.

X-.1095 Y0. Z-.1443 I.1095 J0.

X.1006 Y-.0433 Z-.16 I.1095 J0.

X-.1095 Y0. I-.1006 J.0433

X.1006 Y-.0433 I.1095 J0.

G01 G40 X.0915 Y-.0393

G00 Z3.

X-.031 Y0.

Z-.06

G01 Z-.16

G41 D15 X-.041

G03 X-.041 Y0. Z-.1735 I.041 J0.

X-.041 Y0. Z-.187 I.041 J0.

X-.041 Y0. Z-.2005 I.041 J0.

X-.041 Y0. Z-.214 I.041 J0.

X-.041 Y0. Z-.2275 I.041 J0.

X-.041 Y0. Z-.241 I.041 J0.

X-.041 Y0. Z-.2545 I.041 J0.

X.0342 Y-.0226 Z-.26 I.041 J0.

X-.041 Y0. I-.0342 J.0226

X.0342 Y-.0226 I.041 J0.

G01 G40 X.0259 Y-.0171

G00 Z3. M09

M01

T16 M06 ( NO. 29 DRILL)

G00 G54 X-2.9562 Y0. S12000 M03

G43 H16 Z3. M08 T17

G98 G81 Z-.5 R.1 F25.

X.875 Y-6.2

X2.9562 Y0.

X-.875 Y-6.2

X.875 Y6.2

X-.875

X-2.9562 Y0.

X2.9562

X.875 Y6.2

X-.875

G80 M09

M01

T17 M06 (.156 REAMER)

G00 G54 X-2.9562 Y0. S6000 M03

G43 H17 Z3. M08 T18

G98 G81 Z-.4 R.1 F20.

X.875 Y-6.2

X2.9562 Y0.

X-.875 Y-6.2

G80 M09

M01

T18 M06 ( NO. 8-32 TAPRH)

G00 G54 X.875 Y-6.2

G43 H18 Z3. M08 T19

S2080

G98 G84 Z-.4 R.2 I.1 F65.

X-.875

X-2.9562 Y0.

X2.9562

X.875 Y6.2

X-.875

G80 M09

M01

T19 M06 ( 1/4 DRILL)

G00 G54 X-2.57 Y0. S10000 M03

G43 H19 Z3. M08 T20

G98 G81 Z-.5 R.1 F25.

X2.57

X1.812

G80 M09

M01

T20 M06 ( LTR. B DRILL)

G00 G54 X3.3425 Y0. S10000 M03

G43 H20 Z3. M08 T21

G98 G83 Z-.5 R.1 I.3 J.1 K.1 F25.

X-3.3425

G80 M09

M01

T21 M06 ( 1/4 REAMER)

G00 G54 X3.3425 Y0. S5000 M03

G43 H21 Z3. M08 T13

CUSTOMIZABLE DRILL CYCLE X3.3425 Y0. Z-.4

CUSTOMIZABLE DRILL CYCLE X-3.3425 Y0. Z-.4

G80 M09

M01

T13 M06 ( 1/2 FLAT ENDMILL)

G00 G54 X-2.05 Y-6.75 S10000 M03

G43 H13 Z3. M08 T15

Z.1

G01 Z-.26 F100.

G41 D13 X-2.

Y-6.45

Y-5.95

G02 X-1.75 Y-5.7 I.25 J0.

G01 X-.75

Y-.75

X-3.5

X-3.55

G40 Y-.8

G00 Z3.

X-3.8 Y.8

Z.1

G01 Z-.26

G41 D13 Y.75

X-3.5

X-.75

Y5.7

X-1.75

G02 X-2. Y5.95 I0. J.25

G01 Y6.45

Y6.5

G40 X-2.05

G00 Z3.

X2.05 Y6.75

Z.1

G01 Z-.26

G41 D13 X2.

Y6.45

Y5.95

G02 X1.75 Y5.7 I-.25 J0.

G01 X.75

Y.75

X3.5

X3.55

G40 Y.8

G00 Z3.

X3.8 Y-.8

Z.1

G01 Z-.26

G41 D13 Y-.75

X3.5

X.75

Y-5.7

X1.75

G02 X2. Y-5.95 I0. J-.25

G01 Y-6.45

Y-6.5

G40 X2.05

G00 Z3. M09

M01

T15 M06 ( 1/4 FLAT ENDMILL)

G00 G54 X-1.9 Y-6.6 S12000 M03

G43 H15 Z3. M08 T12

Z.1

G01 Z-.26 F100.

G41 D15 X-1.875

Y-6.45

Y-5.95

G02 X-1.75 Y-5.825 I.125 J0.

G01 X-.625

Y-.625

X-3.5

X-3.525

G40 Y-.65

G00 Z3.

X-3.65 Y.65

Z.1

G01 Z-.26

G41 D15 Y.625

X-3.5

X-.625

Y5.825

X-1.75

G02 X-1.875 Y5.95 I0. J.125

G01 Y6.45

Y6.475

G40 X-1.9

G00 Z3.

X1.9 Y6.6

Z.1

G01 Z-.26

G41 D15 X1.875

Y6.45

Y5.95

G02 X1.75 Y5.825 I-.125 J0.

G01 X.625

Y.625

X3.5

X3.525

G40 Y.65

G00 Z3.

X3.65 Y-.65

Z.1

G01 Z-.26

G41 D15 Y-.625

X3.5

X.625

Y-5.825

X1.75

G02 X1.875 Y-5.95 I0. J-.125

G01 Y-6.45

Y-6.475

G40 X1.9

G00 Z3. M09

M5

G28 G91Z0

G28 Y0

M30

%

 

 

 

 

 

 

Here is what I'd like to see...no g94, I realize the tool calls are semi redundant, but this has worked the best for me, and since the M6 shuts off the spindle while the machine is going to Z0, it is the fastest way to do it.

 

 

 

%

O9191 (TEST PART FOR POST)

(T12 - 2" FACE MILL - H12 - D12 - D2.0000")

(T13 - 1/2 FLAT ENDMILL - H13 - D13 - D0.5000")

(T14 - 1/2 CENTERDRILL - H14 - D14 - D0.5000")

(T15 - 1/4 FLAT ENDMILL - H15 - D15 - D0.2500")

(T16 - NO. 29 DRILL - H16 - D16 - D0.1360")

(T17 - .156 REAMER - H17 - D17 - D0.1560")

(T18 - NO. 8-32 TAPRH - H18 - D18 - D0.1640")

(T19 - 1/4 DRILL - H19 - D19 - D0.2500")

(T20 - LTR. B DRILL - H20 - D20 - D0.2380")

(T21 - 1/4 REAMER - H21 - D21 - D0.2500")

G00 G17 G20 G40 G80 G90

G91 G28 Z0

T12 M06 (2" FACE MILL)

G00 G17 G90 G54 X-5.25 Y-1.8333 S10000 M03

G43 H12 Z3. M08 T13

Z.1

G01 Z-.03 F100.

G41 D12 X-3.25

Y-.5

Y.5

Y1.8333

G40 X-5.25

G00 Z3.

X5.25

Z.1

G01 Z-.03

G41 D12 X3.25

Y.5

Y-.5

Y-1.8333

G40 X5.25

G00 Z3.

X2. Y-7.95

Z.1

G01 Z-.03

G41 D12 Y-5.95

X.5

X-.5

X-2.

G40 Y-7.95

G00 Z3.

Y7.95

Z.1

G01 Z-.03

G41 D12 Y5.95

X-.5

X.5

X2.

G40 Y7.95

G00 Z3. M09

T13M6

M01

T13 M06 ( 1/2 FLAT ENDMILL)

G00 G54 X-1.775 Y7.2 S10000 M03

G43 H13 Z3. M08 T14

Z.1

G01 Z-.26 F100.

G41 D13 Y6.7

X-1.75

X1.75

X1.775

G40 Y7.2

G00 Z3.

X4.25 Y.525

Z.1

G01 Z-.26

G41 D13 X3.75

Y.5

Y-.5

Y-.525

G40 X4.25

G00 Z3.

X1.775 Y-7.2

Z.1

G01 Z-.26

G41 D13 Y-6.7

X1.75

X-1.75

X-1.775

G40 Y-7.2

G00 Z3.

X-4.25 Y-.525

Z.1

G01 Z-.26

G41 D13 X-3.75

Y-.5

Y.5

Y.525

G40 X-4.25

G00 Z3. M09

T14M6

M01

T14 M06 ( 1/2 CENTERDRILL)

G00 G54 X-1.45 Y6.2 S10000 M03

G43 H14 Z3. M08 T15

G98 G81 Z-.15 R.1 F25.

X-.875

X.875

X1.45

X3.3425 Y0.

X2.9562

X2.57

X1.812

X0.

X-2.57

X-2.9562

X-3.3425

X-1.45 Y-6.2

X-.875

X.875

X1.45

G80 M09

T15M6

M01

T15 M06 ( 1/4 FLAT ENDMILL)

G00 G54 X-.0996 Y0. S12000 M03

G43 H15 Z3. M08 T16

Z.1

G01 Z0. F100.

G41 D15 X-.1095

G03 X-.1095 Y0. Z-.0361 I.1095 J0.

X-.1095 Y0. Z-.0721 I.1095 J0.

X-.1095 Y0. Z-.1082 I.1095 J0.

X-.1095 Y0. Z-.1443 I.1095 J0.

X.1006 Y-.0433 Z-.16 I.1095 J0.

X-.1095 Y0. I-.1006 J.0433

X.1006 Y-.0433 I.1095 J0.

G01 G40 X.0915 Y-.0393

G00 Z3.

X-.031 Y0.

Z-.06

G01 Z-.16

G41 D15 X-.041

G03 X-.041 Y0. Z-.1735 I.041 J0.

X-.041 Y0. Z-.187 I.041 J0.

X-.041 Y0. Z-.2005 I.041 J0.

X-.041 Y0. Z-.214 I.041 J0.

X-.041 Y0. Z-.2275 I.041 J0.

X-.041 Y0. Z-.241 I.041 J0.

X-.041 Y0. Z-.2545 I.041 J0.

X.0342 Y-.0226 Z-.26 I.041 J0.

X-.041 Y0. I-.0342 J.0226

X.0342 Y-.0226 I.041 J0.

G01 G40 X.0259 Y-.0171

G00 Z3. M09

T16M6

M01

T16 M06 ( NO. 29 DRILL)

G00 G54 X-2.9562 Y0. S12000 M03

G43 H16 Z3. M08 T17

G98 G81 Z-.5 R.1 F25.

X.875 Y-6.2

X2.9562 Y0.

X-.875 Y-6.2

X.875 Y6.2

X-.875

X-2.9562 Y0.

X2.9562

X.875 Y6.2

X-.875

G80 M09

T17M6

M01

T17 M06 (.156 REAMER)

G00 G54 X-2.9562 Y0. S6000 M03

G43 H17 Z3. M08 T18

G98 G81 Z-.4 R.1 F20.

X.875 Y-6.2

X2.9562 Y0.

X-.875 Y-6.2

G80 M09

T18M6

M01

T18 M06 ( NO. 8-32 TAPRH)

G00 G54 X.875 Y-6.2

G43 H18 Z3. M08 T19

S2080

G98 G84 Z-.4 R.2 I.1 F65.

X-.875

X-2.9562 Y0.

X2.9562

X.875 Y6.2

X-.875

G80 M09

T19M6

M01

T19 M06 ( 1/4 DRILL)

G00 G54 X-2.57 Y0. S10000 M03

G43 H19 Z3. M08 T20

G98 G81 Z-.5 R.1 F25.

X2.57

X1.812

G80 M09

T20M6

M01

T20 M06 ( LTR. B DRILL)

G00 G54 X3.3425 Y0. S10000 M03

G43 H20 Z3. M08 T21

G98 G83 Z-.5 R.1 I.3 J.1 K.1 F25.

X-3.3425

G80 M09

T21M6

M01

T21 M06 ( 1/4 REAMER)

G00 G54 X3.3425 Y0. S5000 M03

G43 H21 Z3. M08 T13

G98 G81 Z-.5 R.1 F25.

G80 M09

T13M6

M01

T13 M06 ( 1/2 FLAT ENDMILL)

G00 G54 X-2.05 Y-6.75 S10000 M03

G43 H13 Z3. M08 T15

Z.1

G01 Z-.26 F100.

G41 D13 X-2.

Y-6.45

Y-5.95

G02 X-1.75 Y-5.7 I.25 J0.

G01 X-.75

Y-.75

X-3.5

X-3.55

G40 Y-.8

G00 Z3.

X-3.8 Y.8

Z.1

G01 Z-.26

G41 D13 Y.75

X-3.5

X-.75

Y5.7

X-1.75

G02 X-2. Y5.95 I0. J.25

G01 Y6.45

Y6.5

G40 X-2.05

G00 Z3.

X2.05 Y6.75

Z.1

G01 Z-.26

G41 D13 X2.

Y6.45

Y5.95

G02 X1.75 Y5.7 I-.25 J0.

G01 X.75

Y.75

X3.5

X3.55

G40 Y.8

G00 Z3.

X3.8 Y-.8

Z.1

G01 Z-.26

G41 D13 Y-.75

X3.5

X.75

Y-5.7

X1.75

G02 X2. Y-5.95 I0. J-.25

G01 Y-6.45

Y-6.5

G40 X2.05

G00 Z3. M09

T15M6

M01

T15 M06 ( 1/4 FLAT ENDMILL)

G00 G54 X-1.9 Y-6.6 S12000 M03

G43 H15 Z3. M08 T12

Z.1

G01 Z-.26 F100.

G41 D15 X-1.875

Y-6.45

Y-5.95

G02 X-1.75 Y-5.825 I.125 J0.

G01 X-.625

Y-.625

X-3.5

X-3.525

G40 Y-.65

G00 Z3.

X-3.65 Y.65

Z.1

G01 Z-.26

G41 D15 Y.625

X-3.5

X-.625

Y5.825

X-1.75

G02 X-1.875 Y5.95 I0. J.125

G01 Y6.45

Y6.475

G40 X-1.9

G00 Z3.

X1.9 Y6.6

Z.1

G01 Z-.26

G41 D15 X1.875

Y6.45

Y5.95

G02 X1.75 Y5.825 I-.125 J0.

G01 X.625

Y.625

X3.5

X3.525

G40 Y.65

G00 Z3.

X3.65 Y-.65

Z.1

G01 Z-.26

G41 D15 Y-.625

X3.5

X.625

Y-5.825

X1.75

G02 X1.875 Y-5.95 I0. J-.125

G01 Y-6.45

Y-6.475

G40 X1.9

G00 Z3. M09

M5

G28 G91Z0

G28 Y0

M30

%

 

 

 

Thanks a bunch guys. Sorry for the long post - I thought there was a way to attach programs without having them take up so much room

Link to comment
Share on other sites

Thanks Keith. I actually tried that method before. It does almost exactly what I need...however, the toolchange is also at the end of the program. I guess this is ok, but is there any way to avoid that last toolchange?

 

It just means that I have to wait to start blowing the chips off the part while it changes tools...I get very impatient that way...lol

Link to comment
Share on other sites

Ok Tim, I think I have something for you,

 

ptlchg$          #Tool change
     pcuttype
     toolchng = one
     toolcount = toolcount + 1
     if toolcountn <= tooltotal, nexttool = rbuf(4,toolcountn)
     else, nexttool = first_tool$
     if wcstype = one, #Work coordinate system
       [
       pfbld, n$, *sg28, "X0.", "Y0.", e$
       pfbld, n$, "G92", *xh$, *yh$, *zh$, e$
       ]
     pbld, n$, "M06", e$
     if mi10$=one, n$, *sm00, e$
     else, pbld, n$, *sm01, e$
     ptlchg_com

 

I added the 4th line from the bottom to the ptlchg postblock and it stopped it from outputting the M06 at the end of file.

Let me know if it works!

Link to comment
Share on other sites

And that is why I come to the experts! Awesome. Thanks Keith.

 

 

The only thing I would like to get rid of, since I believe it is unnecessary is the G94 that gets posted out at the first feed move (at the very beginning of the program). Any thoughts there?

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

Just another (hopefully) quick question regarding the tool name output for you guys.

 

This post (same one discussed) seems to not like a decimal in the tool name, and will not post anything written after the period(.)in the tool name description..

 

example -

 

if tool 21 is a NO. 28 DRILL

it posts (T21 - NO - H21 - D21 - D0.1405")

 

If it is a simple .5 endmill it posts (T1 - DEFINE TOOL NAMES - H1 - D1 - D0.5000")

 

Notice it put the NO (number) on the first one, then the period stopped further input, whereas the second one had the period at the beginning and the "define tool names" alarm came up...

 

I've drawn a blank as to how to fix this.

Link to comment
Share on other sites

Tim, Are you familiar with the post debugger? If so can you run it and see where the tool name is coming from. I am thinking (could be way off) it is a format statement you will need to change...you will need to find the variable which holds the tool name then look for that where all the variables are formatted and change it. Here is mine for the mpmaster (V13.0).

 

fmt "TOOL - "   	4   tnote   	# Note format
fmt " DIA. OFF. - " 4   toffnote	# Note format
fmt " LEN. - "  	4   tlngnote	# Note format
fmt " DIA. - "  	1   tldianote   # Note format

 

And this is what I get in the posted code

(T14  - .750 SPOTDRILL   	- H14  - D14  - D0.7500")

 

This seems like it would be pretty simple for someone more fluent in the post language, have you tried contacting your reseller?

Link to comment
Share on other sites
Notice it put the NO (number) on the first one, then the period stopped further input, whereas the second one had the period at the beginning and the "define tool names" alarm came up...

 

Tim,

Did you select a tool from the Mcam library, or did you right click in the tool field and create a new tool?

Link to comment
Share on other sites

Tim,

Did you select a tool from the Mcam library, or did you right click in the tool field and create a new tool?

 

 

Just normal selecting from the mcam library.

 

 

Keith - I am switching from v13, so that is what I am familiar with (what you got for output). I am going to compare the two and perhaps I can switch the language to what 13 has instead.

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