Results 1 to 7 of 7

Thread: M97 Internal Subprograms?????

  1. #1
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0

    M97 Internal Subprograms?????

    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. #2
    Registered
    Join Date
    Sep 2004
    Location
    Australia
    Posts
    196
    Downloads
    0
    Uploads
    0
    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. #3
    Registered
    Join Date
    Jan 2005
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0
    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. #4
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    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
    Registered
    Join Date
    Feb 2005
    Location
    USA
    Posts
    48
    Downloads
    0
    Uploads
    0
    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


  • #6
    Registered
    Join Date
    Jan 2005
    Location
    USA
    Posts
    7
    Downloads
    0
    Uploads
    0
    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
    Registered
    Join Date
    Apr 2004
    Location
    Memphis, TN USA
    Posts
    18
    Downloads
    0
    Uploads
    0
    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.


  • Similar Threads

    1. Lathe - internal facing tools?
      By kong in forum General Metal Working Machines
      Replies: 3
      Last Post: 03-09-2009, 02:26 PM
    2. Internal Addressing Error
      By BobL in forum Bridgeport and Hardinge Mills
      Replies: 11
      Last Post: 06-06-2005, 06:11 PM
    3. Internal addressing error
      By BobL in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 1
      Last Post: 05-26-2005, 12:55 PM
    4. Internal Gears???
      By itsme in forum General Metalwork Discussion
      Replies: 11
      Last Post: 02-11-2005, 03:21 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.