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:

main progam to run sub programs


Rick46
 Share

Recommended Posts

I have a main program that I used on a fanuc model 18i series control few years back for cutting electrodes at different wcs and it worked great but Im trying to use the same main on a newer 18i-mb series fanuc and its not working properly..

 

I have my paths stripped of all the safe start header and wcs output as well as a M99 at the end of the paths I run. the problem im having is it fails to cancel the tool length offset in the control and errors out when it goes back to running in AI NANO mode. here is an example of the main im running..

 

 

%
O0003(MULTIPLE WCS 3X)
G00G40G49G80
G91G28Z0.
(PROGRAM TO CALL SUBPROGRAM)
G00G90G55
M198P1000
G00G90G56
M198P1000
G00G90G57
M198P1000
M05
G91G28Z0.
G91G28Y0.
M30
%

 

 

the machine isn't going back to the top to run the safe start header before running the next subprogram and there for does not cancel out the tool length offset and causes me the AI NANO error..

 

any help on modifying this is greatly appreciated. also the machine is a toyoda FV1680

 

thanks in advance..

Link to comment
Share on other sites

You should never have to cancel a tool length offset when switching between WCO systems. Fanuc is still very down ward comparable, An old program should work fine.

Some thing like this

 

N1G28G91Z0M5

GOG40G49G80G90G98

T1M6

G54X1.Y1.M3S6500

G43Z3.H1M8

M98P1000

G55X1.Y1.

M98P1000

G56X1.Y1.

M98P1000

M9

G29G91Z0M5

G28G91Y0

M30

 

Your WCO system should adjust for the Z values.Are you using positive or negative offsets?

  • Like 1
Link to comment
Share on other sites

cause I get an error stating a modal code has not been reset before running G5.1 Q1 on my next path due to the tool length offet not being canceled out. its error 5111 in my fanuc manual and also a fanuc rep told me the same but could not tell me which one. After watching it I found the g43 was not returning back to g49 before starting new path. thanks all I will try your suggestions today..

 

@Mr Zx yes im using positive offsets in my programs. and my lengths offsets page as well.. thanks.

Link to comment
Share on other sites

like ben said, id cancel that in the subs too, heres what the end of my subs look like, used on a fanuc 16i , 18i and 32i doosan horizontals,

 

G00 Z3.712

G05.1 Q0

M09

G91 G28 Z0.

G49 G90

M01

M99

 

hth

 

I modified my post to output the end of my subprograms as recommended by Brandon Renwick and has been working great all day. thanks for everyone else's suggestions on the matter as well.

  • Like 1
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...