![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
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. |
|
#2
| |||
| |||
| 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! |
|
#3
| |||
| |||
| 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 |
|
#4
| |||
| |||
| 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. |
|
#5
| ||||
| ||||
| 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 |
| Sponsored Links |
|
#8
| ||||
| ||||
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 |
![]() |
| 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 |
| 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 |