![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I have this macro for deep hole drilling on a lathe with fanuc control, it works great but it only works drilling in the Z minus direction. I would like to modify it to drill in the Z positive direction so that I can use it to drill on my sub spindle. I don't have a clue how to do it. O9136(DEEP DRILL) IF[#6GE0]GOTO70 G00W0. #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 G00Z-[#29-#2] G1Z-[#29+#27] G00Z#4 G4U#1 #28=#28-#27 #29=#29+#27 #27=#27*.5 END1 N4G00Z[#2-#29] G1Z#6F#9 G00Z#4 GOTO99 N70#3000=1(K MUST BE NEGITIVE) N99M99 Any help would be appreciated |
|
#2
| |||
| |||
| Try This..... I only changed a couple of things and simulated on NCplot but it looks as if it will work for you.. % :1234 T101M8 G97S500M3 G0X0.Z-.1 G65P9003X0.Z0.K3.0B.05W.1C.35A.1F.005 G0Z-.5 M30 :9003 IF[#6LE0]GOTO70 G00W0. #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 G00Z-[#2-#29] G1Z[#29+#27] G00Z#4 G4U#1 #28=#28-#27 #29=#29+#27 #27=#27*.5 END1 N4G00Z-[#2-#29] G1Z#6F#9 G00Z#4 GOTON99 N70#3000=1(K MUST BE POSITIVE) N99 M99 % bRYAN Last edited by bdyenter; 06-19-2009 at 09:18 AM. |
|
#3
| |||
| |||
| That is the Hardinge deep drill cycle. I had thought to modify the program to drill in either direction, but haven't since it is almost never needed on the subspindle for the type of parts we run. Bryan, why not add a block, modify one, and delete a few blocks? :9003 G00W0. #4=#5002 #6=ABS[#6] #3=ABS[#3] #2=ABS[#2] IF[#19EQ98]GOTO1 #19=99 N1G#19F#9 #27=ABS[#23] #28=#6-ABS[#26] #29=ABS[#26] DO1 IF[#27LE#3]GOTO2 GOTO3 N2#27=#3 N3IF[#27GE#28]GOTO4 G00Z[#2-#29] G1Z[#29+#27] G00Z#4 G4U#1 #28=#28-#27 #29=#29+#27 #27=#27*.5 END1 N4G00Z-[#2-#29] G1Z#6F#9 G00Z#4 M99 % |
|
#4
| |||
| |||
| G-Codeguy is right. It is much easier to just add another block and modify another one. It is easier to diagnose for future alterations, rather than changing signs to accomodate quickly. ONE FIX FROM ABOVE...... I FORGOT A NEGATIVE SIGN IN THE BEGINNING OF THE LOOP. THE WAY IT WAS IT WOULD RAPID INTO POSITIVE .05 TO START DRILLING. NOW IT WILL START @ Z-.05 AND DRILL IN POSITIVE DIRECTION. SEE CORRECTION BELOW: :9003 G00W0. #4=#5002 #6=ABS[#6] #3=ABS[#3] #2=ABS[#2] IF[#19EQ98]GOTO1 #19=99 N1G#19F#9 #27=ABS[#23] #28=#6-ABS[#26] #29=ABS[#26] DO1 IF[#27LE#3]GOTO2 GOTO3 N2#27=#3 N3IF[#27GE#28]GOTO4 G00Z-[#2-#29] G1Z[#29+#27] G00Z#4 G4U#1 #28=#28-#27 #29=#29+#27 #27=#27*.5 END1 N4G00Z-[#2-#29] G1Z#6F#9 G00Z#4 M99 % Last edited by bdyenter; 06-19-2009 at 09:31 AM. Reason: FORGOT NEGATIVE SIGN IN BEGINNING OF LOOP |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "difference between Custom Macro A and Custom Macro B" | arulthambi | Parametric Programing | 4 | 10-05-2009 03:34 PM |
| Testing program for Macro (Fanuc Macro B) | NickDP | Fanuc | 2 | 03-27-2009 03:15 PM |
| Macro A or B ? | tonper | G-Code Programing | 6 | 03-20-2009 11:12 AM |
| Convert Fanuc Macro to Fadal Macro | bfoster59 | Fadal | 1 | 11-08-2007 11:41 PM |
| Macro | omkargupta | Fanuc | 1 | 09-11-2007 02:35 PM |