![]() | |
| 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
| ||||
| ||||
There is someone interested by a toolchange macro i created that loop each tool for mutiple parts. IE you set one variable at the program start for the part quantity for example #800=4 and the machine take the tool 1 and make all the operations on G54,G55,G56,G57 and also if you want G54 P1, G54 P2, etc. and then take the tool 2 and do all operations in reverse G57,G56,G55,G54...really usefull when you want to choose part QTY right on the floor.It also support the G5 P10000 (ai Nano HPCC) function that doesn't support macro calculation when activated. If interested reply and i will post all is needed to do it! |
|
#4
| ||||
| ||||
I finally posted it there's the macro O9000(TOOLCHANGE*MACRO) IF[#4113EQ98]THEN#10=1 IF[#4EQ1]GOTO13(GO*BACK*TO*CURRENT*TC) IF[#5NE#0]GOTO6(WPC*UP) IF[#6NE#0]GOTO9(WPC*DOWN) IF[#10EQ1]GOTO14(SEND*TO*END*OF*PROGRAM) #3=#4114(SEQUENCE*N*FLAG) #11=#149/100 #11=FIX[#11](CALC*TOOL) #12=[#149-[#11*100]](CALC*PRELOAD) IF[#11EQ0]THEN#11=#12(MANUAL*TC) IF[#11EQ#12]THEN#12=#0 IF[#11EQ30]THEN#11=0(PROBE=T30*FOR*PRELOAD) IF[#11EQ#702]GOTO5(SAME*TOOL*SKIP) IF[#703EQ0]GOTO2(SKIP*ROTARY*PROTECT*IF*DISABLED) IF[#1EQ#0]GOTO1(MANUAL*TC*PROTECTION*WITH*ROTARY) IF[#7741EQ0]GOTO15(ALARM*IF*FACEPLATE*PROBING*NOT*DONE) IF[#5021+[#1-#5041]GT#7741]GOTO2(SKIP*IF*TC*IS*SAFE) IF[#5021+[#1-#5041]LE#7741]THEN#1=#5041-[#5021-#7741](ROTARY*TC*PROTECTION) G5P0 M9 G91G28Z0M19 G90X#1 GOTO2 N1 IF[#5021LE#7741]THEN#1=#5041-[#5021-#7741] G5P0 M9 G91G28Z0M19 G90X#1 N2 IF[#3GE2]GOTO3 IF[#4014NE54.1]THEN#801=#4014(SET*FIRST*WPC*G54-G59) IF[#4014EQ54.1]THEN#801=#4130(SET*FIRST*WPC*G54*P1-P48) N3 IF[#5021+[#1-#5041]LE0]THEN#1=#0(X-*OT*CHECK) IF[#5021+[#1-#5041]GE60.7]THEN#1=#0(X+*OT*CHECK) IF[#5022+[#2-#5042]LE-30.]THEN#2=#0(Y-*OT*CHECK) IF[#5022+[#2-#5042]GE0]THEN#2=#0(Y+*OT*CHECK) #700=#4001(MOVE*TYPE*FLAG) #701=#4003(ABS*INC*FLAG) M46 IF[#4120NE0]THENGOTO4(PROBE*SPINDLE*LOCK) S0M47 N4 G5P0 M9 G91G28Z0T#11M19 G90X#1Y#2M6 #702=#4120 T#12 #1=#0 #2=#0 N5 G#700 G#701N#3 #1=#0 #2=#0 M1(OPTIONAL*STOP) (SET*WPC*MULTIPART*SECTION) IF[#800LE1]GOTO12(SKIP*SECTION*IF*ONE*PART) #7=#3/2(CHECK*IF*TC*NWORD*IS*ODD*OR*EVEN) #8=FIX[#7] #9=FUP[#7] IF[#8EQ#9]GOTO9(SEND*TO*WPC*DOWN*IF*ODD) N6(WPC*UP) #4=1 IF[#5NE#0]THEN#5=#5+1 IF[#5EQ#0]THEN#5=#801 IF[#5LE48]GOTO7 G#5 GOTO8 N7 G54P#5 N8 IF[#5EQ[[#800-1]+#801]]THEN#5=#0 IF[#5EQ#0]THEN#4=#0 GOTO12 N9(WPC*DOWN) #4=1 IF[#6NE#0]THEN#6=#6-1 IF[#6EQ#0]THEN#6=[[#800+#801]-1] IF[#6LE48]GOTO10 G#6 GOTO11 N10 G54P#6 N11 IF[#6EQ#801]THEN#6=#0 IF[#6EQ#0]THEN#4=#0 N12(RETURN*TO*PROGRAM) M99 N13(GO*CURRENT*TC) IF[#800LE1]GOTO14 M56 #4=#0 M99P#3 N14(SEND*TO*END*OF*PROGRAM) #3=#3+1 #10=#0 #800=#0 #801=#0 M99P#3 N15 #3000=1(PROBE*ROTARY*FACEPLATE) M99 (#1=TC*X*RAPID) (#2=TC*Y*RAPID) (#3=CURRENT*TOOL*NWORD) (#4=RETURN*TO*CURRENT*TC*FLAG) (#5=CURRENT*UP*WPC) (#6=CURRENT*DOWN*WPC) (#7=CURRENT*TOOL*SPLIT*TO*ROUND) (#8=ROUND*DOWN) (#9=ROUND*UP) (#10=END*OF*PROGRAM*FLAG) (#11=TWORD) (#12=CURRENT*PRELOAD) (#700=MOVE*TYPE*FLAG) (#701=ABS/INC*FLAG) (#702=CURRENT*TOOL) (#800=PART*QTY) (#801=FIRST*WPC) there's a sample program % O6001 (18-19) #800=1 (PART QUANTITY) G17 G20 G40 G54 G90 G98 #1=-2.875 #2=-1.25 N1 T0610 (ENDMILL 3/8" CARBIDE 2FL.) M3 S10000 G5 P10000 G0 X-2.875 Y-1.25 M8 G43 H6 Z-.175 G1 Y.25 F75. G0 Z.5 X2.875 Z-.175 G1 Y-1.25 G0 Z.5 X2.2813 Y-.5 Z.1 G1 Z-.275 F40. X2.2822 G3 I-.001 G1 X2.2813 G0 Z.5 X-2.2813 Z.1 G1 Z-.275 X-2.2803 G3 I-.001 G1 X-2.2813 G0 Z.5 G5 P0 #1=0 #2=-.625 N2 T1000 (DRILL 5/32") M3 S4890 G0 X0 Y-.625 M8 G43 H10 Z.5 G81 X0 Y-.625 R.1 Z-.2719 F29.3 G80 M98 P9000 N3 M9 G53 X30. Y0 Z0 M19 M30 % |
![]() |
| 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 |
| How do I make multiple passes on arc. | Andrew96 | Vectric | 4 | 07-01-2011 11:16 PM |
| Toolchange macro/sub for OSP5000L | nlh | Okuma | 7 | 10-02-2010 05:31 AM |
| Need Help!- how to get multiple parts from a bar | firekoe | Fanuc | 13 | 02-11-2010 08:23 AM |
| KIWA excel 510 toolchange macro help | bensoli | General Metal Working Machines | 0 | 12-29-2009 11:49 AM |
| Macro b multiple choice menu? | tomi6678 | Parametric Programing | 2 | 12-12-2009 02:16 PM |