![]() | |
| 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
| ||||
| ||||
I'm primarily a MasterCAM programmer, but am teaching myself to understand Gcode. So this may be a very elementary question. I have a program that drills and taps a series of holes in a steel plate. We use a product called BoeLube to lubricate our taps. I have designed a small cup with a flip-up lid and a magnetic base. This cup sits on the mill table somewhere out of the way, and has its own work offset assigned to it. The subprogram I will write should move to the cup, use the tip of the tap to flip open the lid, dip the tap in the cup, and then close the lid again. The subprogram will then return to the main program. I would like to call this subprogram from within a tapping canned cycle so that the tap gets BoeLube on it before each hole. Can this be done? For reference, I have attached my tapping cycle code as a text file. Cheers, Fred Last edited by TXFred; 12-07-2010 at 02:15 PM. |
|
#2
| ||||
| ||||
| Two problems. 1. What control? 2. You didn't attach your tapping cycle code. At least not that I can see. I don't believe it can be done on a Fanuc, as it would probably try to tap another hole every time an axis was commanded. |
|
#3
| ||||
| ||||
| The attachment is in the original post now. Fred |
|
#4
| |||
| |||
| Write a sub to lube the tap and tap a hole. Instead of calling the sub with a G65 call it with a G66, the sub will be modal until canceled with a G67. Parameters to the sub would be X and Y locations Z and R could be hard coded or passed in, etc.. Code: (MAIN PROG) . . . G66 P1 X1.0 Y1.0 Z-1.0 X2.0 X3.0 G67 . . . M30 O1(SUB) (LUBE) . . . (TAP) G84X#24Y#25Z#26R0.2 ... G80 M99 Last edited by Andre' B; 12-07-2010 at 03:41 PM. |
|
#5
| ||||
| ||||
| The next step will be to find a way to make MasterCAM post the code to call the sub. Ideally, I'd like to specify a tapping cycle in MasterCAM, and when I post, have it replace the tapping command with a call to the lube and tap subroutine, using the feeds, speeds and depths that I specified in MasterCAM. Because we're a MasterCAM shop, we have a policy of not manually editing the code. We want the code to always be a reflection of what is in MasterCAM, so that if we change something in MasterCAM and repost, we won't lose any modifications to the program. I'm going to have to study up on post processing next. Pass the Advil! Thanks for the help on this. Sincerely, Fred |
| Sponsored Links |
|
#6
| |||
| |||
| I did not think of it before but you can setup a sub to be called by a G code or and M code. Usually program numbers 9010 thru 9019 are reserved for this. Each of those program numbers has a parameter associated with it, you just set that parameter to the code number you want to use to call the 901x program. There are some limitations etc. and I have only used Fanuc and Mit controls so Haas may be different. Dig out the books. ;-) |
![]() |
| 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 |
| canned cycle? | Cartel, LLC | Haas Mills | 2 | 09-27-2010 10:06 AM |
| Canned Cycle Help | vanbry | Okuma | 14 | 12-14-2009 05:48 PM |
| Problem- Canned cycle | tsaladyga | Post Processors for MC | 1 | 08-29-2009 06:31 PM |
| Need Help!- OKUMA Mill Poste Edit for " NCYL " subprogram call | QAZEWQ | Mastercam | 7 | 06-14-2009 08:56 AM |
| Call local sub and G52 shift while in a canned cycle | JWK42 | Haas Mills | 1 | 10-23-2008 03:12 PM |