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:

Mori Seiki Lathe Question


Dan@home
 Share

Recommended Posts

Okay guys, here it is.

 

I just got done typing it from a hardcopy so hopefully I didn’t fat finger anything.

 

:DISCLAIMER:

 

I haven’t run this macro in over 15 years so I don’t remember how everything worked exactly. This assumes that you have the same controller that this was originally written for (which I don’t remember either.T6 maybe.) The G200 switch is controlled by parameter 7050 (again I assume a T6 Fanuc controller). The spindle speed is coming from #4119 (look about halfway down). What that is, I don’t know.

 

It ran great as I remember but I don’t know if it needs any editing.

 

Good luck and keep me posted with your success.

 

Ken

 

 

%

O9010

(G200 CYCLE CALL)

(X- HOLE POSITION ABS.)

(Z- CLEARANCE POSITION ABS.)

(R- FEED START POSITION Z AXIS ABS.)

(D- DRILL DIA.)

(W- Z DEPTH BOTTOM OF HOLE ABS.)

(F- FEED PER REV.)

(EXAMPLE- G200X0Z.1R.1D.5W-4.F.006)

IF[#24EQ#0]THEN#3000=1(NO X VALUE)

IF[#26EQ#0]THEN#3000=2(NO Z VALUE)

IF[#18EQ#0]THEN#3000=3(NO R VALUE)

IF[#7EQ#0]THEN#3000=4(NO D VALUE)

IF[#23EQ#0]THEN#3000=5(NO W VALUE)

IF[#9EQ#0]THEN#3000=6(NO F VALUE)

#110=#24(X)

#111=#26(Z)

#112=#18®

#113=#7(D)

#114=#23(W)

#115=#9(F)

#116=#18-.1(R-.1)

#121=1(SET FEED FACTOR)

#100=3(SET PECK FACTOR)

#124=#4119(RPM)

GOX#110Z#111M8

Z#112

N1

IF[#100EQ3]THEN#120=[#113*[-3.0]]

IF[#100EQ2]THEN#120=[#113*[-2.0]]

IF[#100LE1]THEN#120=[#113*[-1.0]]

#101=#112+#120-.1(Z PECK DEPTH)

#112=#101+.1(NEW CLEAR DEPTH)

#123=#113*[-1.0](DRILL DIAMETER - NEGATIVE)

IF[[#122/#123]GT3.01]THEN#121=.9

IF[[#122/#123]GT4.01]THEN#121=.8

IF[[#122/#123]GT5.01]THEN#121=.7

IF[[#122/#123]GT8.01]THEN#121=.65

IF[#101LE#114]THEN#101=#114

S[#124*#121]

IF[#121LE.7]THEN#121=.8

G1Z#101F[#115*#121]

G0Z#111

IF[#114EQ#101]GOTO10

G4X1.0G0Z#112

#100=#100-1

GOTO1

N10

M99

%

Link to comment
Share on other sites

Okay. Why am I getting this output from a couple of our lathe posts?

 

G83Z-1.1R-.15F.003

 

Not what I want. A simple G1Z-1.1F.003 will suffice. Think I did change it on one post, but didn't write it down, and now I can't recall what I changed.

 

Also I will post a simple drill cycle from the Hardinge lathes. I use it on all the Fanuc controlled lathes.

Link to comment
Share on other sites

Dan, here is a simple deep drill cycle from Hardinge. The referral to P9135 is a note for me. Some older lathes came with that program for deep drilling. Not quite as flexible as the P9136 sub.

 

G65P9136K-2.565B.02F.008W.7C.25A.2Z-.375

 

#4 READS CURRENT Z POSITION. IT DOESN'T IN P9135

 

K = FINAL DRILL DEPTH. MUST BE NEGATIVE

B = DISTANCE FROM PREVIOUS PECK THAT THE DRILL RAPIDS TO

F = YUP, YOU GUESSED IT

W = AMOUNT OF FIRST PICK

C = MINIMUM PECK (EXCEPT FOR FINAL PECK)

A = DWELL IN SECONDS AT RETRACT POINT

Z = DEPTH YOU WANT THE DRILL TO START DRILLING AT. Z0 UNDERSTOOD IF NO Z

 

*

 

 

 

:9136 (DEEP DRILL)

 

IF[#6GE0]GOTO70

G0W0

#4=#5002

#3=ABS[#3]

#2=ABS[#2]

IF[#19EQ98]GOTO1

#19=99

N1G#19F#9

#27=ABS[#23]

#28=ABS[#6]-ABS[#26]

#29=ABS[#26]

DO1

IF[#27LE#3]GOTO2

GOTO3

N2#27=#3

N3IF[#27GE#28]GOTO4

G0Z[#2-#29]

G1Z-[#29+#27]

G0Z#4

G4U#1

#28=#28-#27

#29=#29+#27

#27=#27*.5

END1

N4G0Z[#2-#29]

G1Z#6F#9

G0Z#4

M99

N70#3000=1(K MUST BE NEGATIVE)

%

 

I was going to make a couple minor changes at the end because some of our lathes stop loading as soon as they read the M99, but haven't gotten around to it yet. If your lathe is the same, simply make this change:

 

 

G0Z#4

GOTO71

N70#3000=1(K MUST BE NEGATIVE)

N71M99

 

EDIT: A sample from Hardinge lathe.

 

 

N100M91 (F DRILL)

G4T0101S700M13

X0Z.5

G65P9136K-1.32B.02F.004W.5C.22A.2

M91

M1

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