Page 1 of 2 12 LastLast
Results 1 to 12 of 14

Thread: How/Where to save macros

  1. #1
    Registered
    Join Date
    May 2009
    Location
    Canada
    Posts
    9
    Downloads
    0
    Uploads
    0

    How/Where to save macros

    Hi all,

    I'm teaching myself to write G Code on a Fanuc controller and am getting a pretty good handle on it (thanks in large part to the forums at CNCzone). I want to incorporate macros so I can use variables and logic statements but I can't figure out or locate information on one important item: where and how do you save a macro in order to call it later in another program? LOts of info in manuals and forums on how to write macros... no info on what to do with them once they're written.

    Hope you'll take my elementary question with grace and good humour.
    Thanks for your help.


  2. #2
    Registered
    Join Date
    Mar 2005
    Location
    Silicon Valley, CA
    Posts
    988
    Downloads
    0
    Uploads
    0
    If these are macros you always want on the machine, then just give it a program number and save it on the control just like any other program. Then when you use it, you can call it up by G65, G66, G66.1 (if you're passing values through) or you can use an M98 sub call (if you're not passing values through).
    It's just a part..... cutter still goes round and round....


  3. #3
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    18,930
    Downloads
    0
    Uploads
    0
    What controller do you have? You can save and hide them if making them 9000 macro's.
    These can be write protected by parameter so that they do not inadvertently get erased.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design (Skype Avail).

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  4. #4
    Registered
    Join Date
    May 2009
    Location
    Canada
    Posts
    9
    Downloads
    0
    Uploads
    0
    Our manual says Fanuc Series Oi-MB... as for entering programs, we use Microvellum and ACAD. I'm learning code to get around the limitations of using those programs. I can write macros in a .txt file, but then where do I save them into the controller in order to call them later? I can also program G-code through the Fanuc CNC screen display function but can't seem to save them.

    Thanks for your help and patience...


  • #5
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2,499
    Downloads
    0
    Uploads
    0
    A macro is just another program. You save them all in the same place. If you give them program numbers from O8000 to O9999 they can be "locked" to prevent editing and/or erasing them inadvertantly.

    Your DIR might look like this:

    O1000 (MAIN PROGRAM)
    O1001 (SUB #1)
    O1002 (SUB #2)
    O8101 (BOLT-HOLE CIRCLE MACRO)
    O8102 (GRID MACRO)
    O9101 (TOOL CHANGE MACRO)


  • #6
    Registered
    Join Date
    May 2009
    Location
    Canada
    Posts
    9
    Downloads
    0
    Uploads
    0

    Ah so!

    A macro is just another program. You save them all in the same place. If you give them program numbers from O8000 to O9999 they can be "locked" to prevent editing and/or erasing them inadvertantly.

    Ah ha! I thought it might work something like that. I will try to find that directory and write something small today. I'll let you all know how it goes.


  • #7
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2,499
    Downloads
    0
    Uploads
    0
    "that directory" is just your control's program memory. Whenever you EDIT a program, it's in that directory.


  • #8
    Registered
    Join Date
    May 2009
    Location
    Canada
    Posts
    9
    Downloads
    0
    Uploads
    0

    still looking for that directory...

    Well, while I get the idea, I can't find the directory that contains programs within the controller. Generally I load files from the company server through the CNC Screen display. If I edit or write programs, I do it through Notepad (text editor). Even programs that I use regularly like surfacing are called from the server.

    So in order to call a macro, it needs to be in the controller's memory, right? I've gotta figure out how to load programs straight to the controller's memory, though my manual is offering no real useful help and all I know how to do is run programs from the server


  • #9
    Registered dcoupar's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    2,499
    Downloads
    0
    Uploads
    0
    If you press OFFSET/SETTING, then [SETING], what is your I/O CHANNEL set to?


  • #10
    Registered
    Join Date
    Feb 2006
    Location
    United States
    Posts
    293
    Downloads
    0
    Uploads
    0
    CNC3P0, Either there is a real communication glitch here, or your missing an important chunk of information we are taking for granted. (like ONLY ever used DNC modes...)

    Put the control in EDIT or MEMORY mode. Then press the PROG soft key, the the DIR soft key. That should be a pretty standard way to view the list of programs stored on your control.


  • #11
    Registered
    Join Date
    Jun 2008
    Location
    United States
    Posts
    1,509
    Downloads
    0
    Uploads
    0
    If you are loading programs from a company directory to the control then you are loading them into memory. Do the macro the EXACT same way as you would a normal program. Say you write a macro and it's program O5000. Once you load it to the control you can use it as a macro/subprogram. All you have to do is in your main program call it up either by a M98 subprogram call or a G65P5000 macro call.

    Now if you want to load them as a protected programs as Al stated which I always do, you make them a 8000-8999 or 9000-9999 program numbers. You will have to make sure the protection bit is not activated in order to load these program numbers. Once they are loaded then you lock them out. On this series control the parameters for locking them are:
    #3202.0 for the 8000-8999
    #3202.4 for the 9000-9999

    Stevo


  • #12
    Registered
    Join Date
    May 2009
    Location
    Canada
    Posts
    9
    Downloads
    0
    Uploads
    0

    almost there

    Morning all,

    @ dcoupar: My I/O channel is set to 4.

    @ dpuch: Yes, I have only used DNC mode. I am attempting to learn to program this machine myself without the aid of formal training, manuals, etc. It's all by way of forums, e-books, and trial and error.

    Now, I've located the directory of programs by entering MEM mode and pressing PROG and then DIR... but how do I add a program to this directory? I understand now that a macro is just a program in this directory, called with an M98 or G65, but how do I store this program in the controller permanently?

    @Stevo1: When I run programs from the company directory, I'm loading them into the controller, but as soon as I load a new program, the old one is gone. Will this change if I name my program "O8000.anc" instead of "16mmMaple.anc"? Does it know to keep the one named "O8000.anc" and discard the one named "16mmMaple.anc"?

    THanks for all the help...


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Need Help!- X3 CNC macros
      By trainfred in forum Syil Products
      Replies: 6
      Last Post: 05-20-2008, 08:42 PM
    2. Need Help!- help with macros
      By gj83 in forum General CNC (Mill and Lathe) Control Software (NC)
      Replies: 2
      Last Post: 04-11-2008, 09:42 PM
    3. Need Help!- macros
      By bob@apc in forum Mazak, Mitsubishi, Mazatrol
      Replies: 2
      Last Post: 02-04-2008, 12:42 PM
    4. Help with macros
      By afterburn25 in forum Haas Mills
      Replies: 4
      Last Post: 04-09-2007, 09:19 AM
    5. macros
      By toyoda in forum General CAM Discussion
      Replies: 0
      Last Post: 05-30-2004, 05:56 AM

    Tags for this Thread

    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.