![]() | |
| 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
| |||
| |||
When I was a tool maker I programed several Haas machines They have a real nice feature on them The M97 code for intenal sub programs This code is just like the M98 on the standard funuc controls but you are able to program the subs at the end of the program instead of on a different page Is it possible to add this code to a standard fanuc control 6M, 18M, 0M, & 10M Many of the above controls do not have custom Macros enabled on them |
|
#2
| |||
| |||
| Hi CAMCRASH, sorry to get your hopes up by replying, I also would love this feature in a fanuc, the fact that you need a seperate program for a sub is quite painful when altering the sub, because your jumping backwards and forward between main program and sub program it would also make it easier when backing up the programs. |
|
#3
| |||
| |||
| I use a Fanuc 0M and have used Fanuc 6M's in the past without any knowledge of an M97 command or anything similar. You can accomplish this task using the GOTO command as in: :1 G54 M24 Goto 100 N101 Goto 200 N201 ... ... G91 G0 G30 Z0 M19 G90 X#500 Y#501 Z#502 M25 M30 N100 G54 M24 M1 ... Goto 101 N200 G54 M24 M1 ... Goto 201 I understand that this is more cryptic than you would like, but I don't believe there is an M97 solution. |
|
#4
| |||
| |||
| Several controllers out there have internal sub routines but I haven't seen Fanuc with one either. GOTO's are about the only way. Cumbersome though. I'd rather use subs. Also, depending on the control and version, this could actually increase your cycle, especially with really large programs, because the control is constantly searching for the 'N' block. Newer ones are barely noticeable if at all. |
|
#5
| |||
| |||
| This is something of what I was lookig for but I do see some problems for repetative cycles like spot dill , drill , tap & also repetative mill cycles Is ther any way for drilling to advane the end number of the so called sub so the first tool would Call N100 as a sub and then at then returns N101 then the Next tool calls N100 again but returns to N102 for forward program progression from the 2nd tool? Also is there any way to call a loop for mill cycles? right now it looks like I would need to call a N99 at the line prior to the GOTO 100 line then at the end of the sub call a N99 for repetative loops which looks like this would cause it to go into a infinte loop that never stops Thanks for the help |
| Sponsored Links |
|
#6
| |||
| |||
| CAMCRASH - I'm getting a little confused, but here goes: :1 N1 G54 M24 M6 T1 G90 G0 X0. Y0. G43 Z.1 H1 S3500 M13 #100 = 101 Goto 100 N101 N2 G54 M24 M6 T2 G90 G0 X0. Y0. G43 Z.1 H2 S900 M13 #100 = 102 Goto 100 N102 M30 N100 G99 G81 X0. Y0. Z-.5 R.1 F12. X... Y... X... Y... G80 Goto #100 And yes there is a loop call: While [#101 LE 10] Do1 ... ... ... End1 But it sounds like you should set up a G65 simple call passing parameters. If you're not familiar with macro programming read the Fanuc Operators Manual and understand the difference between local, common & system variables. Also, find out what happens to your common variables when the machine is reset and/or powered down (can be conrolled with parameters). Again, everything here is based on the Fanuc11M control. Well I'm not sure if I've helped or made things more confusing. |
|
#7
| |||
| |||
| G97 is HAAS specific. Some FANUCs will read an M99Pxxxx as an internal sub call but it is looking for a line number and must be before the M30/M2. As for leaving a sub and going back to a different spot in the main, yes you can with any FANUC. From the sub program the format is like this: M99P100 where P100 is a line number in the main, be very careful with this. This is a one shot technique and will not build the instance of the return point like you desire. The only way to enter at the same point and leave at a different one is with the use of counters and macro programming. I don't really follow you loop counting question but the number of loops is set in the sub call. Depending on the control, one of two formats will most likely be used: 1) M98 P1000 L10 would loop program 1000 10 times. 2) M98 P100010 would do the same. The control will not accept both, one or the other should work. There are numerous other ways to accomplish this with Macro programming.
__________________ Experience is what you get when you don't get what you want. |
![]() |
| 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 |
| Lathe - internal facing tools? | kong | General Metal Working Machines | 3 | 03-09-2009 02:26 PM |
| Internal Addressing Error | BobL | Bridgeport and Hardinge Mills | 11 | 06-06-2005 06:11 PM |
| Internal addressing error | BobL | General CNC (Mill and Lathe) Control Software (NC) | 1 | 05-26-2005 12:55 PM |
| Internal Gears??? | itsme | General Metalwork Discussion | 11 | 02-11-2005 03:21 PM |