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:

Sub output by nc file


Guest
 Share

Recommended Posts

Here's what I want to do, the question is can I and if so how.

 

I create a program, I set the NC Filename to be the I want output

 

Can I get the MPMaster to

 

Create a main, with all the starting positions and tool calls and correct ncfilename(subs) call, then output all of the opertaions as subs based on my ncfilename settings?

 

I am guessing I have to use subout but that's one function that's never quite been clear to me.

Link to comment
Share on other sites

This is something a little different than what the subrep output was meant to do.

 

In this case, let's say I have tool 1 with 3 rotations, A0, A90, A270

 

Tool 1

A0 = 5600

A90 = 5601

A270 = 5602

 

Tool 2

A0 5610

A45 5611

A90 5612

 

Tool 3

A180 5620

A720 5621

 

Tool 4

A0 5630

A90 5631

A180 5632

 

So I'd need the whole program, a number likely set with an MI variable, to reflect all the tool calls like subrep but the individual would be output based on the nc file names of the operations.

 

Convoluted, I know

Link to comment
Share on other sites

John here is a sample file using MpMaster, without edits to the post, the output is going to have the main calling subs internally.

 

N100 G00 G17 G20 G40 G80 G90

N110 G91 G28 Z0.

N120 T15 M06 ( 4" FACE MILL)

N130 G00 G17 G90 G54 B0. X4.6875 Y3. S1275 M03

N140 G43 H15 Z.35 T1

N150 M98 P0002

N160 G90 X4.6875 Y-3.

N170 M98 P0002

N180 G91 G28 Z0.

N190 G00 G90 G55 B90. X4.6875 Y3.

N200 G43 H15 Z.35

N210 M98 P0002

N220 G90 X4.6875 Y-3.

N230 M98 P0002

N240 G91 G28 Z0.

N250 G00 G90 G56 B180. X4.6875 Y3.

N260 G43 H15 Z.35

N270 M98 P0002

N280 G90 X4.6875 Y-3.

N290 M98 P0002

N300 G91 G28 Z0.

N310 G00 G90 G57 B270. X4.6875 Y3.

N320 G43 H15 Z.35

N330 M98 P0002

N340 G90 X4.6875 Y-3.

N350 M98 P0002

N360 M05

N370 G91 G28 Z0.

N380 M01

Link to comment
Share on other sites

Thanks CJep, I see what you have going on there, however, it's not what I'm looking for.

 

I'm going to try to find an example and clean it up

 

Essentially, each tool and every rotation within a tool is it's own sub-program, in this case on a vertical, so only running 1 part

Link to comment
Share on other sites

OK, so why when I put a subout$ at the bottom of a tool change section, so I get this?

 

03 Dec 2012 04:21:49 PM - <2> - RUN TIME - Inconsistent wire data for offset number with 'listrad$'.

 

I am trying to get a subout to work at the tool change level, so I am guessing I need to get it in there, so that I can capture each tool as a sub

 

I think I can worry about the specific logic of different subs once I can get them out and merged back in

Link to comment
Share on other sites

John,

 

Are you looking for something like this?

 

 

 

%

O228(JE80S 625-602-360 OP1)

(MACHINE NAME - ENSHU JE80S)

(DATE: OCT-18-12)

 

#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[#1000NE1]GOTO99003

IF[#10004GT13.75]GOTO99001

M06 T104 (4" LONG OMP400 PROBE)

M00 (OPEN DOOR)

M66

T06

#170=4010

#172=5002

#173=98

#174=0

#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[#1000NE1]GOTO99003

IF[#10006GT13.75]GOTO99001

M06 T06 (3/8" OFFSET FIVE FLUTE CARBIDE END MILL WITH .020 RADIUS)

M66

T07

#170=4020

#172=5005

#173=98

#174=0

#199=0

M08

M51

M52

M98P5013

M09

M56

M58

M05

G91 G30 X0 Y0 Z0

#153=#0

M01

 

(----------START TOOL PATHS----------)

 

O4012

(4" LONG PROBE LOWER PART)

IF[#153EQ#0]GOTO1

N0100 G00 G90 X.69 Y-24.405 (B0.) M19

N0110 G43 H04 Z8.625

N0120 G65 P9810 Z6.235 F200.

N0130 G65 P9811 X1.19

N0140 #5301=[[#135+#[[[#4130*20]-20]+14001]]+[0.]]

N0150 G65 P9810 Z8.625 F200.

N0160 X1.19 Y-23.905

N0170 G65 P9810 Z6.235 F200.

N0180 G65 P9811 Y-24.405

N0190 #5302=[[#136+#[[[#4130*20]-20]+14002]]+[0.]]

N0200 G65 P9810 Z8.625 F200.

N0210 X1.69 Y-23.655

N0220 G65 P9810 Z6.235 F200.

N0230 G65 P9811 Z5.735

N0240 #5303=[[#137+#[[[#4130*20]-20]+14003]]+[-.36]]

N0250 G65 P9810 Z8.625 F200.

N0260 Z11.43

N0270 #[[[#4130*20]-20]+14001]=#5301

N0280 #[[[#4130*20]-20]+14002]=#5302

N0290 #[[[#4130*20]-20]+14003]=#5303

N1 M99

 

O4014

(4" LONG PROBE UPPER PART)

IF[#153EQ#0]GOTO1

N0300 G00 G90 X-.69 Y-21.215 (B0.) M19

N0310 G43 H04 Z8.625

N0320 G65 P9810 Z6.235 F200.

N0330 G65 P9811 X-1.19

N0340 #5301=[[#135+#[[[#4130*20]-20]+14001]]+[0.]]

N0350 G65 P9810 Z8.625 F200.

N0360 X-1.19 Y-21.715

N0370 G65 P9810 Z6.235 F200.

N0380 G65 P9811 Y-21.215

N0390 #5302=[[#136+#[[[#4130*20]-20]+14002]]+[0.]]

N0400 G65 P9810 Z8.625 F200.

N0410 X-1.69 Y-21.965

N0420 G65 P9810 Z6.235 F200.

N0430 G65 P9811 Z5.735

N0440 #5303=[[#137+#[[[#4130*20]-20]+14003]]+[-.36]]

N0450 G65 P9810 Z8.625 F200.

N0460 Z11.43

N0470 #[[[#4130*20]-20]+14001]=#5301

N0480 #[[[#4130*20]-20]+14002]=#5302

N0490 #[[[#4130*20]-20]+14003]=#5303

N1 M99

 

O4021

(3/8" OFFSET FIVE FLUTE CARBIDE END MILL WITH .020 RADIUS RIGHT SIDE)

IF[#153EQ#0]GOTO1

N0500 G00 G90 X-2.5517 Y.2244 (B90.)

N0510 G08 P1

N0520 G43 H06 Z2.75 S6112 M03

N0530 G01 Z2.137 F250.

N0540 X-2.3622 Y.2981 Z2.1208 F152.8

N0550 G03 X-2.3234 Y.3234 Z2.117 I-.0407 J.1048

N0560 G01 X-2.2898 Y.3409

*

*

*

N13390 G01 X-1.1409 Y-1.1707 Z2.137

N13400 G00 Z2.75

N13410 Z9.0106

N13420 G08 P0

N1 M99

 

O4022

(3/8" OFFSET FIVE FLUTE CARBIDE END MILL WITH .020 RADIUS FRONT SIDE)

IF[#153EQ#0]GOTO1

N13430 G00 G90 X-.5453 Y.2118 (B0.)

N13440 G08 P1

N13450 G43 H06 Z2.1 S6112 M03

N13460 G01 Z1.552 F250.

N13470 X-.395 Y.2752 Z1.539 F152.8

N13480 G03 X-.3234 Y.3234 Z1.532 I-.0875 J.2073

N13490 G01 X-.2898 Y.3409

*

*

*

N23620 G01 X1.4775 Y-.9798 Z1.552

N23630 G00 Z2.1

N23640 Z5.805

N23650 G08 P0

N1 M99

 

Note: Ignore the sub calls in the main, They're calling a router program.

Link to comment
Share on other sites

Tim,

 

Thanks a bunch, that was the kick start I needed to understanding how subout worked.

 

I'm now getting close to triggers I need, I just will have to work out the rest of the logic on the when and how, that I CAN handle.

 

Thanks again, huge help!!!

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