584,800 active members*
4,468 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2005
    Posts
    51

    Custom Macro Programming

    I am stuck. I'm working with a new horizontal with a 31i control. I am writing a program and need to look at the tool in the waiting station. I'm wondering if anyone knows if there is a # variable related to the next tool. I know #4120 is the last T code specified, but that is not necessarily the tool in the set up station. Any help would be greatly appreciated!

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    This a lot of times is determined by the MTB. I would check the documentation from them to see if they built a system variable for the tool that is currently in the wait arm. If no documentation shows this there is a few ways you can approach this.

    I usually write the current tool and the tool at wait into the common variables. If you do a tool call and the machine does not put the tool back in the magazine once it finishes changing tools you could program the variables to keep track of this with a few lines in your tool change macro. If your machine does not use a tool change macro and runs from ladder you can set one up so it calls with the M6 code.

    Set variable #519 equal to the tool in the spindle and #520 to the tool in the wait arm. You can use any parameters that you want but make sure you use above #500 so they don’t clear at power down.

    M6T6

    O9020(tool change macro)
    #20=#4120


    M6
    #520=#519
    #519=#20
    M99

    There is a chance that the MTB set up a system variable that is the tool in the wait arm. I like to run this short program to see what all the system variables are used for if I don’t have a list. I have had machines with the current tool being used with your input output variables. Your input signals are parameters 1000-1035 and your output signals are 1100-1135 (thats what they are on my controls, not sure about the 31i). Put a tool in the wait arm then run this program. See if any of the variables matches the tool in the wait arm. If so then put a different tool in the wait arm and run the same program. If the variables match then you can be sure that the system variable is for the wait tool.

    O0004
    #1=0
    #2=0
    WHILE[#1LT35]DO1
    #[100+#2]=#[1000+#2]--(#100-#135 will be equal to #1000-#1035 in seq. )order
    #[136+#2]=#[1100+#2]--(#136-#171 will be equal to #1100-#1135 in seq. )order
    #1=#1+1
    #2=#2+1
    END1
    M30

    Stevo

Similar Threads

  1. custom Macro B options
    By gup in forum Fanuc
    Replies: 2
    Last Post: 03-09-2009, 05:41 PM
  2. Custom macro!!!!
    By chrisryn in forum G-Code Programing
    Replies: 4
    Last Post: 05-28-2008, 04:13 AM
  3. Custom Macro B On A 18t.
    By JIMMYZ in forum Fanuc
    Replies: 3
    Last Post: 10-19-2006, 04:08 AM
  4. custom macro
    By The Metal in forum Daewoo/Doosan
    Replies: 2
    Last Post: 09-28-2006, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •