CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-27-2012, 03:37 PM
vincerace's Avatar  
Join Date: Feb 2010
Location: Canada
Posts: 19
vincerace is on a distinguished road
Toolchange macro to make multiple parts

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!
Reply With Quote

  #2   Ban this user!
Old 01-27-2012, 08:38 PM
fordav11's Avatar  
Join Date: Aug 2011
Location: Fordaville
Posts: 939
fordav11 is on a distinguished road

there is always interest in macros that do useful things. please post it here if you want to.
Reply With Quote

  #3   Ban this user!
Old 01-28-2012, 02:03 PM
 
Join Date: Nov 2006
Location: USA Texas
Posts: 310
John_B is on a distinguished road

I'd like to check it out as well!
Reply With Quote

  #4   Ban this user!
Old 04-02-2012, 07:45 AM
vincerace's Avatar  
Join Date: Feb 2010
Location: Canada
Posts: 19
vincerace is on a distinguished road
toolchange macro

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
%
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 01:21 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361