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:

Fanuc 21i Macro


tomdorgan
 Share

Recommended Posts

Running some parts that require a lot of pocketing and have very limited memory on this machine.

I have used Macro programming on my 18i controls with no issues but the 21i keeps puking on it.  Runs part of it then skips to next tool .

 

Wondered if anyone could see any problems with this program macro in the attached NC file.

 

Thanks in advance.

  • Like 1
Link to comment
Share on other sites
  • 2 weeks later...

Running some parts that require a lot of pocketing and have very limited memory on this machine.

I have used Macro programming on my 18i controls with no issues but the 21i keeps puking on it.  Runs part of it then skips to next tool .

 

Wondered if anyone could see any problems with this program macro in the attached NC file.

 

Thanks in advance.

I do not see the attachment, would you be willing to try a different pocketing macro? Are you doing a rectangle or circle pocket?

Link to comment
Share on other sites

I wrote this a few months back. It has been proven on NC plot. I wrote it for another operator in another state and he tells me that it works great. Give it a try if you cannot sort out your other macro.

 

 

O3334(ROUGH POCKET)

(ABSOLUTE MACRO)

(MUST HAVE START HOLE IN CENTER)

(PROVEN ON NC PLOT ONLY)

(FORMAT G65/G66 XYQSTRZEF)

(X = #24 - X DIMENSION)

(Y = #25 - Y DIMENSION)

(Q = #17 - STEPOVER IN Z/ DOC)

(S = #19 - STEPOVER IN XY/ PERCENTAGE)

(T = #20 - TOOL DIAMETER)

(R = #18 - PLANE)

(Z = #26 - Z START/ TOP OF STOCK)

(E = #8 - END OF POCKET IN Z)

(F = #9 - FEEDRATE)

(*********************************)

IF[[#24*#25*#17*#19*#20*#8*#9]EQ0]GOTO1000

(CALCULATE DOC IN Z)

#100=ABS[#26]-ABS[#8]

#100=ABS[#100]

IF[[#26*#8]GE0]GOTO1

#100=ABS[#26]+ABS[#8]

N1#101=ROUND[#100/#17]

#102=#100/#101

IF[#102GT[#100/2.]]THEN#102=#100

(CALCULATE DOC IN X)

#103=[#19*.01]*#20

#104=[#24/2.]-[#20/2.]

#105=ROUND[#104/#103]

#106=#104/#105

IF[#106GT[#104/2.]]THEN#106=#104

(CALCULATE DOC IN Y)

#107=[#19*.01]*#20

#108=[#25/2.]-[#20/2.]

#109=ROUND[#108/#107]

#110=#108/#109

IF[#110GT[#108/2.]]THEN#110=#108

(STORE POSTIONS AND GO TO Z START)

#111=#5001

#112=#5002

#114=#112

#115=#111

#116=#112

#117=#111

G0G90X#111Y#112

Z[#26+.1]

G1Z#26F#9

#113=#5003-#102

#120=#105

IF[#120LT#109]THEN#120=#109

#125=#105

#129=#109

#130=#120

WHILE[#101GE1.]DO1

IF[#101EQ0]GOTO10

#101=#101-1.

G90G1Z#113F#9

WHILE[#120GE1.]DO2

IF[#120EQ0]GOTO100

(CALCULATE TOOL PATH)

IF[#109LE0]GOTO20

#114=#114+#110

N20

IF[#105LE0]GOTO30

#115=#115-#106

N30

IF[#109LE0]GOTO40

#116=#116-#110

N40

IF[#105LE0]GOTO50

#117=#117+#106

N50

(CUT POCKET)

G1G90G41Y#114F#9

X#115

Y#116

X#117

Y#114

X#111

(DOWN COUNT)

#105=#105-1.

#109=#109-1.

#120=#120-1.

END2

N100

#105=#125

#109=#129

#114=#112

#115=#111

#116=#112

#117=#111

#120=#130

X#111Y#112G40

#113=#113-#102

END1

N10

X#111Y#112

Z#18

M99

N1000

M00(DATA LACKING)

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