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:

O/T Subprogram call


TheePres
 Share

Recommended Posts

Im running a multiple part program on Fanuc 18i, using subprogram call. This machine needs more memory, so i have to save each individual sub to memory card before loading next batch of programs for secondary operation. Very time consuming.

Is it possible to have sub programs imbedded in main program and call them by block # instead of Prog # ?. I seen this done on Fadal, but find no reference to this function in Fanuc manual.

 

2nd option would be to DNC directly from flash memory card, has anyone done this ?

Link to comment
Share on other sites

quote:

Is it possible to have sub programs imbedded in main program and call them by block # instead of Prog # ?

If you are low on memory space,how would this help?

Curious though,it would be nice to do that on a fanuc like I can on my Okuma.

That way there is only 1 program to load to the stinking machine!.

Link to comment
Share on other sites

TheePres, I see that you are runnung an 18i control and I may be off base a little, but I am looking at a 6M operator's manual and it says in here, that if you give an M99 with a "P" code being a block number, it will skip to that block number. With some massaging, you could probably get it to work. If you like I could fax these pages to you.

 

Rob

Link to comment
Share on other sites

This is the way we do it...

 

N8T[#701]M6

N9T[#703]/M26

(4.0 DIA 5 FL FACE MILL)

N10G65P9222A4.981

N11G4P1M26

N12G0G55X-2.1438Y-22.1612S5000M3

N13G43H1Z1.

N14#656=1701

N15M98P1191

N16G54X2.156Y4.1773

N17G43H1Z1.

N18#656=2701

 

Then the sub would look like this:

O1191(0188.P01/PAL1/TOOLSUB)

(4.0 DIA 5 FL FACE MILL)

GOTO#656

N1701

N1X-2.1438Y-22.1612

N2Z.1

N3G1Z.01F100.

N6Y2.1612

N7Z.1

N8G0Z10.

N9M99

(4.0 DIA 5 FL FACE MILL)

N2701

N1X2.156Y4.1773

N2Z.1

N3G1Z.01F100.

N6Y-20.1773

N7Z.1

N8G0Z15.

N9M99

N19M98P1191

Link to comment
Share on other sites

Well we use macro #'s to call tools, so #701 is tool #1. we needed a way to tell if the tool was used again in the same program or a different operation so the first time the tool is called we write #656=1701, the second time or second operation is called then we write 2701, third is 3701 and so on... then when we get into the sub we then put a goto statement in the top of the sub to go to the particular code we need to run. so if there are multiple parts we just keep the #656 number the same and keep calling the sub

Link to comment
Share on other sites

I use a method something like Specv, but a little different. You must have custom macro B on your machine for it to work

 

The Main

N115T9115(100583 10.09 REAMER)

M6

M11

G90G0G58B0.

M10

G0G90G58X8.00Y12.075S450M3T9081

G43H99Z80.M8

#21=2054

M991028

N2054

G0G90G59X8.00Y12.075

Z80.

#21=2055

M991028

N2055

M5

G0G91G30Z0.M9

G0G91G30X0.Y0.

M01

 

 

The sub

N1028(TOOL 100583 B0.)

G0Z28.50

G1Z10.25F115.

G4P1000

G0Z28.5

Z80.

M99#[21] This jumps back to what ever you set #21 to.

Link to comment
Share on other sites

Thanks for responses, looking at your macro codes just now, seems like gibberish bonk.gif

 

I'll print ths out, take a look tonite and almost positive I can solve that code.

 

This method will not solve memory issues, was just after keeping all subs under same File in flash card, for ease of operators, as they currently have to transfer files individually from card for each set of parts cuckoo.gif

 

Now off to read James post on flash cards.

 

Thanks all

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