Results 1 to 5 of 5

Thread: what kind of macro

  1. #1
    Osmanselim Guest

    Default what kind of macro

    hi,
    I have Fanuc Om Kontrol Machine by supermax,

    that machine;
    I was send rs232
    :9016
    G66P9017
    G#100
    G67
    G91G30X0
    G65H04P#101Q2R#1000
    G65H03P#102Q30R#101
    ..
    ..
    machine accept and record but

    not accept this kind of macro
    :9020
    #3003=1
    IF[#20EQ#0]GOTO100
    M70T#20
    G4X0.1
    IF[#1008EQ1]GOTO300
    IF[#20EQ0]GOTO100
    IF[#20GE100]GOTO90
    IF[#20GE21]GOTO100
    N90IF[#1012EQ1]GOTO101
    #140=0
    #149=#4003
    #148=#4001
    #147=#4006
    G0G91G80G49M19
    ..
    ..
    and give me alarm
    004 adress not found
    I was changed TV kontrol nothing,

    I try write "IF" impossible
    I try write "#" impossible

    What shell am I do?

  2. #2
    Join Date
    May 2008
    Location
    Great State of Wisconsin
    Posts
    1,211
    Thanks
    7
    Thanked 134 Times in 112 Posts

    Default

    Osmanselim you are on a bunch of forums. All the same ones as me. I never know which one to answer. I have answered this at 2 other forums. I know that this site can be picky about what kind of data is posted when it comes to options. So check the other forums for more information. This however is probably your problem.

    Address not find means that it read some of your statments but when it tries to GOTO it is not finding the N address that you are telling it to GOTO.

    At the beginning of your program take out the #3003=1 this is a single block suppression. Now you can single block through the program. You will then be able to see which GOTO line and it is alarming out on. For example if it reads the IF[#1008EQ1]GOTO300 line and alarms out it means that #1008 was equal to 1 and it is trying to jump to N300 line but could not find it in the program.

    Check that you have MacroB and not MacroA. This could also be your problem.

    Stevo
    (The opinions in this post are my own and not those of machinetoolhelp.com and its management)

  3. #3
    Osmanselim Guest

    Default

    This is tool changed macro İs this correct,

    :9020
    #3003=1
    IF[#20EQ#0]GOTO100
    M70T#20
    G4X0.1
    IF[#1008EQ1]GOTO300
    IF[#20EQ0]GOTO100
    IF[#20GE100]GOTO90
    IF[#20GE21]GOTO100
    N90IF[#1012EQ1]GOTO101
    #140=0
    #149=#4003
    #148=#4001
    #147=#4006
    G0G91G80G49M19
    M6
    IF[#1009EQ1]GOTO10
    WHILE[#1009EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO99
    G30Z0
    END1
    #140=0
    N10M71
    M72
    WHILE[#1010EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO98
    G30P3Z0
    END1
    #140=0
    M73T#20
    WHILE[#1009EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO99
    G30Z0
    END1
    M74
    G#148G#149G#147
    M75
    GOTO300
    N98#3000=20
    N99#3000=21
    N100#3000=22
    N101#3000=28
    N300
    #3003=0
    M99

  4. #4
    Join Date
    May 2008
    Location
    Great State of Wisconsin
    Posts
    1,211
    Thanks
    7
    Thanked 134 Times in 112 Posts

    Default

    Your #20 is not being set to the tool that you want to call. I assume that you are doing a M6T5 to call this program. The best way is at the beginning of the program Set #20 equal to your modal T call which would be 5 or whatever tool you want to call.
    #20=#4120
    Once you hit any of your WHILE statements they will loop until #140 is GE to 4 then they will alarm out. I am not sure what you are trying to do in those statements. What are all of your WHILE statements suppose to be doing with the system variables that you are using #1009, #1010????

    I think that you are way over complicating the tool change process. It is a rather short process. There is only a few lines of checks that you should need and a few special setting that you want to set. Really just skip the M6 command if your calling a tool that is already in the spindle that’s an easy command. Move to your tool change position, change tools and set the variables that you want and end the program. I also see that you have your M6 programmed before you move to your tool change position. You can’t change the tool with an M6 if your out of position.

    Below are some changes if you need to use all of this data. After this program I wrote one that you can prove out and try that is much cleaner.

    :9020
    #3003=1
    #20=#4120
    IF[#20EQ#0]GOTO100 I would make this equal to null so if a T is not specified the machine will alarm out change to this
    IF[#20EQ[#[0]]]GOTO100
    M70T#20
    G4X0.1
    IF[#1008EQ1]GOTO300 not sure what your doing here. Don’t know what system variable #1008 is in your machine. I see you are just sending it to the end of the program and turning of your single block supression
    IF[#20EQ0]GOTO100 –most machines can take M6T0 so this can probably be removed.
    IF[#20GE100]GOTO90
    IF[#20GE21]GOTO100 is this alarming because you have a 20 tool magazine max??
    N90IF[#1012EQ1]GOTO101 put this in place of IF[#20GE100]GOTO90. I don’t see why you are skipping the line above when your always going go read this line anyway if the program does not alarm
    #140=0
    #149=#4003
    #148=#4001
    #147=#4006
    G0G91G80G49M19
    M6
    IF[#1009EQ1]GOTO10
    WHILE[#1009EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO99
    G30Z0
    END1
    #140=0
    N10M71
    M72
    WHILE[#1010EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO98
    G30P3Z0
    END1
    #140=0
    M73T#20
    WHILE[#1009EQ0]DO1
    #140=#140+1
    IF[#140GE4.]GOTO99
    G30Z0
    END1
    M74
    G#148G#149G#147
    M75
    GOTO300
    N98#3000=20
    N99#3000=21
    N100#3000=22
    N101#3000=28
    N300
    #3003=0
    M99
    -----------------------------------------------------------------------------------------
    I like to set a variable equal to the tool in the spindle and track it that way. You could use the system variable that tracks the tool in the spindle. You have to find out which one it is. If you want to use the system variable replace it with #535. If you use a variable set it to the current tool in the spindle.


    Program a M6T5

    :9020
    #3003=1
    #20=#4120—sets #20 equal to modal T which is 5.
    IF[#20EQ[#[0]]]GOTO100
    IF[#1012EQ1]GOTO101
    IF[#20GT20]GOTO102
    IF[#20EQ#535]GOTO200—skips the M6 tool change if the tool call is the same as the spindle tool
    G40G80M19
    G90G49Z#5043—cancel offset and the tool will not move because of #5043
    G91G28Z0M9—tool change Z
    G28Y0M5---tool change Y
    G30P3Z0---UNLESS THIS IS YOUR TOOL CHANGE POSITION IN THE REFERENCE POSITION 3
    M6
    N200
    #537=#[2000+#20]+#[2200+#20]—tool geometry and wear(not need but I like to set my length here)
    G43Z[#5043-#537]H#20—sets tool H value with no tool movement(not needed same as above.
    #535=#20
    #3003=0
    M99
    N100#3000=22(NO T COMMAND)
    N101#3000=28(I DON’T KNOW THIS SYSTEM VARIABLE)
    N102#3000=10(20 TOOL MAGAZINE MAX)---probably don’t need this because machine should alarm out if you call a tool number lager then the machine can hold.
    (The opinions in this post are my own and not those of machinetoolhelp.com and its management)

  5. #5
    Join Date
    Dec 2009
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: what kind of macro

    HI,
    nice to see that you help with your experiances ,
    I am having a 20 fa fanuc contoller , and makino machine ,
    my machine dont have macro varibles of lost during format , now when we use machine on dnc , it gives buffer flow erroor
    , what is the programm which is used for nesting for a external devices and where to specify , provide me the process along with the programm i will be really thankfull sir.

Similar Threads

  1. Provide You With Varies Kind of CNC Machine Tools
    By Boob in forum For Sale/Wanted
    Replies: 0
    Last Post: 08-29-17, 09:41 PM
  2. FANUC MACRO COMPILER / Macro executor
    By ker2008 in forum Fanuc Controls
    Replies: 0
    Last Post: 03-13-17, 10:25 PM
  3. New 3 ph hookup. Leadwell 760 AP Discharge box getting hot and dripping out some kind
    By Telephone Machine in forum Machine Repair & Troubleshooting
    Replies: 0
    Last Post: 01-18-15, 04:08 PM
  4. macro a to macro b conversion needed
    By bantamjack in forum Programming / Applications
    Replies: 25
    Last Post: 03-01-13, 08:03 PM
  5. Difference between Brothers macro and Fanucs macro?
    By BigBrothersWatching in forum Programming / Applications
    Replies: 1
    Last Post: 10-20-11, 06:14 AM

Posting Permissions

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