585,888 active members*
3,972 visitors online*
Register for free
Login
Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2013
    Posts
    49

    Question Please help with this macro program

    Please help with this macro program

    the machine is Stama 320 with Fanuc Om controlling system .
    it's been equipped with 4th and 5th axes .
    the manual says the 5th axis should be controlled by parametric programming .it says you should write the program like :
    ---------------------------
    G66 p9050 ;(program number for macro calling 5th axis )
    I45 ;( the angle of rotation )
    g67 ;
    ---------------------------

    and here is the program 9050 .

    ---------------------------
    %
    :9050
    (4 U.5 ACHSE DREHEN)
    G65H82P7Q#8104R1
    G65H01P#104Q#8004
    G65H81P73Q#8105R1
    G65H80P8
    N7G65H82P73Q#8105R1
    G65H01P#104Q#8005
    N8G65H86P1Q#104R0
    G65H01P#1115Q0
    G65H80P2
    N1G65H01P#1115Q1
    N2G65H81P3Q#4003R90
    G65H01P#1114Q0
    G65H80P4
    N3G65H01P#1114Q1
    N4G65H01P#1133Q#104
    G65H81P100Q#8104R1
    G65H81P101Q#8105R1
    N73G65H99P73
    N101
    M75
    N10G65H80P99
    N100
    /M76
    N99M99
    %
    ----------------------------
    (when block skip is on) it runs the program and subprogram but there is no movement in 5th axis .
    (when block skip is off) the machine stops (while the BUF key is on) in ( /M76) and again no movement in 5th axis .
    do you think there may be problem with program or else ?
    i was wondering if someone could help .
    ------------------------------
    Ps : I'm not familiar with macro programming .

  2. #2
    Join Date
    May 2004
    Posts
    4519
    What happens when you enter each line and execute line by line in MDI?

    For proper assistance, one would need to know all variables and subprograms in addition to this sub program.

  3. #3
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by Behnod View Post
    Please help with this macro program

    the machine is Stama 320 with Fanuc Om controlling system .
    it's been equipped with 4th and 5th axes .
    the manual says the 5th axis should be controlled by parametric programming .it says you should write the program like :
    ---------------------------
    G66 p9050 ;(program number for macro calling 5th axis )
    I45 ;( the angle of rotation )
    g67 ;
    ---------------------------

    and here is the program 9050 .

    ---------------------------
    %
    :9050
    (4 U.5 ACHSE DREHEN)
    G65H82P7Q#8104R1
    G65H01P#104Q#8004
    G65H81P73Q#8105R1
    G65H80P8
    N7G65H82P73Q#8105R1
    G65H01P#104Q#8005
    N8G65H86P1Q#104R0
    G65H01P#1115Q0
    G65H80P2
    N1G65H01P#1115Q1
    N2G65H81P3Q#4003R90
    G65H01P#1114Q0
    G65H80P4
    N3G65H01P#1114Q1
    N4G65H01P#1133Q#104
    G65H81P100Q#8104R1
    G65H81P101Q#8105R1
    N73G65H99P73
    N101
    M75
    N10G65H80P99
    N100
    /M76
    N99M99
    %
    ----------------------------
    (when block skip is on) it runs the program and subprogram but there is no movement in 5th axis .
    (when block skip is off) the machine stops (while the BUF key is on) in ( /M76) and again no movement in 5th axis .
    do you think there may be problem with program or else ?
    i was wondering if someone could help .
    ------------------------------
    Ps : I'm not familiar with macro programming .
    I'm surprised program O9050 is even launched with the G66 call, unless your control is equipped with User Macro B. If this were the case, I'd then expect an error to occur when the G65 Blocks are executed, as these are all User Macro A functions.

    G65 is a Simple Macro Call in User Macro B, while Macro Programs in User Macro A are called as a Sub Program using M98 or an M Code registered to call a program from O9001 and O9003 inclusive.

    G66 is a Modal call in User Macro B and is canceled with G67. Its my understanding that User Macro A doesn't have a Modal Call function.

    I would set parameter bit 0011.5 so that the control will stop after each Macro statement in O9050, when in Single Block Mode. In this way you will be able to follow the program flow and observe the values of Variables as they're set, in the Macro Variable pages.

    M Codes, such as M01, M02, M03, M04, M05, etc follow a universal convention, but there are many where their function is allocated by the MTB. M75 and M76 will be two such M code. From your machine's operating manual, for what purpose are M75 and M76 used.

    Regards,

    Bill

  4. #4
    Join Date
    Jan 2013
    Posts
    49
    Dear friends
    Tnks for your quick reply .

    today i realized that this program moves the 4th axis . there is no problem with G66 . it runs the program p9050 . the axis movement problem was because of 4th's brake .
    i ran it in single block mode and there was no problem with the program .
    but the problem is that the character (i) moves the 4th axis instead of 5th axis .
    is there any way that i could change it to move the 5th axis .

    Regards
    Behnod

  5. #5
    angelw Guest
    Quote Originally Posted by Behnod View Post
    Dear friends
    Tnks for your quick reply .

    today i realized that this program moves the 4th axis . there is no problem with G66 . it runs the program p9050 . the axis movement problem was because of 4th's brake .
    i ran it in single block mode and there was no problem with the program .
    but the problem is that the character (i) moves the 4th axis instead of 5th axis .
    is there any way that i could change it to move the 5th axis .

    Regards
    Behnod
    This is not a standard version of User Macro A. The way in which the G66 Call works, is that the Macro Program being called remains Modal and is launched every time the axis address is called, in the case of your example 4th axis "I45". You must understand that the whole Macro Program is executed and will follow the program flow based on the Conditional Statements H81 through H86 each time the 4th axis address is specified after a G66 and before G67. In a more convention machine, a Macro that performs a machining operation at Axis address is commonly used. For G66 to be used just to move an axis seems a bit strange, unless G66 has a different use in this case, but the Format doesn't suggest that.

    To modify this program to move the 5th axis, you need to understand the O9050 Macro program explicitly. I'd say that the #8000 series Variables used are System Variables introduced by the MTB. Accordingly, you need to find out what all the Variables greater than #1000 are being used for. The #100 Series Variables are just Common Variables.

    Is M75 and M76 associated with the 4th axis brake?

    Regards,

    Bill

  6. #6
    Behnod Guest
    Dear Bill

    I can't find any reference to #8000 series variables .
    unfortunately because the machine is used one , it doesn't contain much reference manuals .
    do you think i could find it through the net ?
    by the way the M codes of 4th axis brake are M57 and M54 .


    Thanks

    Behnod

  7. #7
    angelw Guest
    Quote Originally Posted by Behnod View Post
    Dear Bill

    I can't find any reference to #8000 series variables .
    unfortunately because the machine is used one , it doesn't contain much reference manuals .
    do you think i could find it through the net ?
    by the way the M codes of 4th axis brake are M57 and M54 .


    Thanks

    Behnod
    Hi Behnod,
    I'd be contacting the Machine Tool Builder for information regarding these Variables.

    I'd imagine that the 5th axis may also have a brake. Accordingly, you will need to know what M code is used, if any, for the 5th axis, to be able to write a Macro Program for it.

    Regards,

    Bill

  8. #8
    Behnod Guest

    SolveD

    Bill

    Thanks to your kind help , i could solve the problem .

    just changed (M76) to (M75) ,the 5th axis started to move as (I) defines .
    it works as an indexer and cannot be defined by G01 or G00 command .
    the brake is commanded by M45 and M44 .


    Best Wishes

    Behnod

Similar Threads

  1. Macro Program Repeat
    By Erik1000 in forum Haas Mills
    Replies: 13
    Last Post: 03-23-2012, 03:26 PM
  2. macro program
    By curly3456 in forum Fanuc
    Replies: 1
    Last Post: 02-04-2012, 11:26 PM
  3. Replies: 2
    Last Post: 03-27-2009, 09:15 PM
  4. G65 macro B PROGRAM
    By gollame in forum G-Code Programing
    Replies: 2
    Last Post: 05-11-2008, 05:26 PM
  5. Macro program
    By pioneerproducts in forum News Announcements
    Replies: 4
    Last Post: 10-08-2007, 09:44 PM

Tags for this Thread

Posting Permissions

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