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 > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-28-2008, 09:45 AM
chucker's Avatar  
Join Date: Nov 2007
Location: USA
Posts: 132
chucker is on a distinguished road
Macro Statment

Any macro programmers out there I have a Fanuc 18 control on a Kiwa mill. The machine has no tool life option .What I would like to do is put a statement in my program that would generate a alarm or an on screen message to change the drill after my drill ran lets say 375 parts then go to a program stop (M00). Is this possible.
Reply With Quote

  #2   Ban this user!
Old 01-28-2008, 10:42 PM
 
Join Date: Jan 2005
Location: USA
Posts: 49
DocHod is on a distinguished road

Try this , the number of holes depends on how many holes drilled per cycle so I put #516=#516+10 an arbitrary # of holes that I guessed that you would have per cycle either you would have more or less just change the 10 to what you drill per cycle. #515 is the one you would set to 375(#of hole/tool life) at the beginning of a new cycle run.


O7000(PROGRAM/MACRO COUNTER)
(515=#OF HOLE NEEDED)
(516=CURRENT # HOLES DRLLED)
Your program in this area


end of hole drilling cycle

#516=#516+10(AMOUNT OF HOLES DRILLED)
IF[#516 GE #515]GOTO300(HOLE QTY.MET?]
IF[#516 LT #515]GOTO400(HOLE QTY. NOT MET)
N300M00(HOLE QTY. MET CHANGE DRILL IN STATION #4 )
#516=0(ZEROS AMOUNT OF DRILLED HOLE QTY.)

N400 the rest of your program

M30
%
hope this helps and yes there are other ways to do it and it's whatever works for you!
Reply With Quote

  #3   Ban this user!
Old 01-29-2008, 07:17 AM
 
Join Date: Jan 2005
Location: USA
Posts: 237
cogsman1 is on a distinguished road

DocHod gave you a good sample. Here is one change to get the machine to ALARM when the counter is expired. Using the "M00" would allow the operator to just push the button and continue. This will create an alarm and put a message on the screen.


O7000(PROGRAM/MACRO COUNTER)
(515=#OF HOLE NEEDED)
(516=CURRENT # HOLES DRLLED)
Your program in this area


end of hole drilling cycle

#516=#516+10(AMOUNT OF HOLES DRILLED)
IF[#516 GE #515]GOTO300(HOLE QTY.MET?]
IF[#516 LT #515]GOTO400(HOLE QTY. NOT MET)

N300
#516=0(ZEROS AMOUNT OF DRILLED HOLE QTY.)
#3000=70(HOLE QTY. MET CHANGE DRILL IN STATION #4 )

N400 the rest of your program

M30
Reply With Quote

  #4   Ban this user!
Old 01-29-2008, 05:49 PM
 
Join Date: Jan 2008
Location: USA
Posts: 30
CAD/CAM Man is on a distinguished road

cogsman/dochood: Do you have to manually change #516 every time a hole is drilled? If not, how does it keep track?

chucker: does your machine have parameter to keep track of how many parts it has run? Generally FANUC controls have one that counts every time "M30" is read in the program. If it does have such a parameter, you could set a variable to equal that parameter value, and have the macro compare the diffrence of the 2 values. Then the diffrence is equal to or greater than the number of holes you want to drill, you can have the control output your change tool message.
Reply With Quote

  #5   Ban this user!
Old 01-29-2008, 09:43 PM
chucker's Avatar  
Join Date: Nov 2007
Location: USA
Posts: 132
chucker is on a distinguished road
Smile

Frirst thank you guys for your help
2nd Yes my machine does have a parts counter on the main screen but we use it for a daily parts count and zero it at the beginning of each shift. If I understand what Dochod and Cogsman1 posted once I set #516 then it will automatci from there the line #516=0 will reset the counter after reaches the amount set at #515 and #516=#516+10 adds 10 each time it is read. one question I have is could #3006=1(HOLE QTY. MET CHANGE DRILL IN STATION #4 ) be used in place of the #3001 I think I read that it will generate an alarm w/massage and let the operator push cycle start to continue if I have to push reset to clear the alarm I drop out of my Sub. The reason I want to genarate the alarm is so the big red light on top of the machine flashes to alert the operator. it wont do that at an M00

Thanks to all for sharing your Knowlage
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-30-2008, 06:57 AM
 
Join Date: Jan 2005
Location: USA
Posts: 237
cogsman1 is on a distinguished road
#3006=1

Yes, #3006=1 will stop the machine just like an "M00" but will give you a message on the screeen. I am not sure how your machine will handle the Red light, Try it and let us know.
Reply With Quote

  #7   Ban this user!
Old 01-30-2008, 10:44 AM
 
Join Date: Jan 2008
Location: USA
Posts: 30
CAD/CAM Man is on a distinguished road
#516?

I'm still not clear on how #516 knows how to advance automaticlly.

You have my curiosity piqued. I think I will try it on my FANUC 18i-MB5, and see what I can do with it.
Reply With Quote

  #8   Ban this user!
Old 01-30-2008, 02:13 PM
chucker's Avatar  
Join Date: Nov 2007
Location: USA
Posts: 132
chucker is on a distinguished road
#516 marco works great

Tested out the marco program today it worked just great to anwser cad/cam mans Question in the macro program the line #516=#516+10 adavances Register #516 10 each time it is read in the program so if the drill cycle is ran 2 times #516 will = 20
Reply With Quote

  #9   Ban this user!
Old 01-30-2008, 03:39 PM
 
Join Date: Jan 2008
Location: USA
Posts: 30
CAD/CAM Man is on a distinguished road

Thanks.....I see that now. I must be suffering from brain fade.
__________________
It is the poor craftsman that blames the tool
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
need help with macro raj gill Commercial CNC Wood Routers 1 04-06-2009 07:43 AM
Convert Fanuc Macro to Fadal Macro bfoster59 Fadal 1 11-08-2007 11:41 PM
M6 macro ben_heinman General CNC (Mill and Lathe) Control Software (NC) 2 03-30-2007 12:37 PM
Macro help fpworks Fadal 3 02-07-2007 04:13 PM
One More Macro ? 16I Bluesman General CNC (Mill and Lathe) Control Software (NC) 4 02-07-2006 05:06 PM




All times are GMT -5. The time now is 10:08 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