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 routines


CAM
 Share

Recommended Posts

get right to it

i have a plate,want to profile 28 parts out of this in depth cuts.toolpath's/next menu/transform etc..it is posting sub's but the prog. is a guzillion lines long.i can edit the program and get it to be 100 lines or less.but there has to be a way mastercam/post will do this work for me.any suggestions?

fanuc controller

sub box checked

using latest mpfan post

thanks

Link to comment
Share on other sites

It is better to use the Fanuc Macro B language to array your part rather than have a guzillion lines of part code that you get with the transform function. Just post the single part out and then use a main program to call out the part for different G52 XY coordinates. Using the macro language, you can increment G52 in a while loop, and very easily have maintainable and understandable code.

idea.gif

Link to comment
Share on other sites

+1 Hardmill...

Going from guzillion to under 100 is pretty drastic. headscratch.gif

 

 

You could also write just 1 program. Run it as a sub for the program I have in the example. Example below if for a horizontal machine with 2 four sided tombstones. Same idea though.

 

quote:

%

O1000(MAIN-PROG.SUB.100 )

G0G17G40G80G90

G0G91G28Z0.

G0G91G28X0.Y0.

G90G53X0.Y0.Z0.

B0.

G91G30Z0.

G30X0.Y0.

M1

N1G0G90G54

B0.

M98P100

M1

N2G0G90G55

B0.

M98P100

M1

N3G0G90G56

B0.

M98P100

M1

N4G0G90G57

B0.

M98P100

M1

G0G90G53B0.

G0G91G30XYZ0.

M0

M60

N5G0G90G58

B0.

M98P100

M1

N6G0G90G59

B0.

M98P100

M1

N7G0G90G54.1P1

B0.

M98P100

M1

N8G0G90G54.1P2

B0.

M98P100

M1

G0G90G53B0.

G0G91G30XYZ0.

M60

M30

%

Link to comment
Share on other sites

yes, i can use extended work ofsetts(28 parts?)and what i am edeting out is all the subs.each part is identical,but it post's out a sub for each individual part 27 subs.and i am going .250 total z depth on each part with depth cuts of.03 each cut on profile,so in the main prog. it has all of the z depths then calls sub thats about 233 z depths just in the main program!i guess i will create some kind of macro for this.any more suggestions is welcome,and thanks for your input

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