1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Subprogram skips out of Main and shows Errors INTP-105 and MCTL-105

  • TP77
  • August 20, 2022 at 3:08 PM
  • Thread is Unresolved
  • TP77
    Trophies
    1
    Posts
    16
    • August 20, 2022 at 3:08 PM
    • #1

    Hello everyone,

    The situation is this:

    I have created a main program. In that program I call 2 different programs for different working areas (left and right).

    In those programs, there are sub -programs, makros and etc.

    While running the Main program in Manual T1/T2 (step mode) sometimes about 30 cycles or less, during running some subprograms, they skip out of Main program and it completely abort the Main, so the robot stays in the subprogram. When that happens it shows Error INTP-105 and MCTL-003 errors, but after i checked them in the Fanuc Alarm PDF - they don't say much. Only reset errors and continue. The only way to continue is after reset, to abort the subroutine and manually choose Main program, get back on the same place in the program and it continues like nothing happened without any errors.

    It looks like a buffer or Memory which cannot hold so many processes and needs to be reset. But this is not good for Automatic mode, obviously.

    Please, if you have knowledge of this, let me know.

    Regards

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • August 20, 2022 at 3:34 PM
    • #2

    It it was a memory issue, then id expect there to be a stack overflow error. That would generally be caused if you are accidentally using recursion, where a program ends up calling itself, maybe indirectly.

    I would need you to post or send your programs to see the issue.

  • TP77
    Trophies
    1
    Posts
    16
    • August 20, 2022 at 5:51 PM
    • #3

    Ok, so here they are. They are very long, but i gave few explanations in between to get a better picture.

    Don't mind the names, I was trying PNS program start method for testing, that is why. This is the Main program, which is selected with OTHER start method. From there I call program number 1 (line 43)

    Quote

    /PROG PNS0125

    /ATTR

    OWNER = MNEDITOR;

    COMMENT = "";

    PROG_SIZE = 1251;

    CREATE = DATE 22-08-02 TIME 12:09:40;

    MODIFIED = DATE 22-08-17 TIME 07:22:54;

    FILE_NAME = ;

    VERSION = 0;

    LINE_COUNT = 51;

    MEMORY_SIZE = 1687;

    PROTECT = READ_WRITE;

    TCD: STACK_SIZE = 0,

    TASK_PRIORITY = 50,

    TIME_SLICE = 0,

    BUSY_LAMP_OFF = 0,

    ABORT_REQUEST = 0,

    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = 1,*,*,*,*;

    CONTROL_CODE = 00000000 00000000;

    /MN

    1: LBL[1] ;

    2: ;

    3: !Robot in Main Folge ;

    4: GO[4]=125 ;

    5: ;

    6: UTOOL_NUM=6 ;

    7: UFRAME_NUM=0 ;

    8: ;

    9: !Home position ;

    10:J P[1] 100% FINE ;

    11: ;

    12: ;

    13: !Robot in Main Folge ;

    14: GO[4]=125 ;

    15: ;

    16: !Profilfrei Dockstation ;

    17: DO[41]=ON ;

    18: !Profilfrei VO1 ;

    19: DO[42]=ON ;

    20: !Profilfrei MA1 ;

    21: DO[43]=ON ;

    22: !Profilfrei KL1 ;

    23: DO[44]=ON ;

    24: !Profilfrei VO2 ;

    25: DO[45]=ON ;

    26: !Profilfrei MA2 ;

    27: DO[46]=ON ;

    28: !Profilfrei KL2 ;

    29: DO[47]=ON ;

    30: ;

    31: !Reset Fertig Meldung ;

    32: DO[34]=OFF ;

    33: DO[35]=OFF ;

    34: DO[36]=OFF ;

    35: ;

    36: !Reset Group No ;

    37: GO[1]=0 ;

    38: GO[2]=0 ;

    39: ;

    40: ;

    41: !Call Program 1 ;

    42: IF (GI[3]=1) THEN ;

    43: CALL PNS0001 ;

    44: ENDIF ;

    45: ;

    46: ;

    47: !Home position ;

    48:J P[1] 100% FINE ;

    49: ;

    50: JMP LBL[1] ;

    51: ;

    /POS

    P[1]{

    GP1:

    UF : 0, UT : 6, CONFIG : 'F U T, 0, 0, 0',

    X = 1827.738770 mm, Y = -47.215397 mm, Z = 661.819458 mm,

    W = 89.519997 deg, P = -1.918208 deg, R = 90.815048 deg,

    E1= 1041.082153 mm

    };

    /END

    Display More

    This is program no 1, here I call all subprograms, movements of the robot. For the moment the only active programs are from line 53, 3 programs.

    Quote

    /PROG PNS0001

    /ATTR

    OWNER = MNEDITOR;

    COMMENT = "";

    PROG_SIZE = 1783;

    CREATE = DATE 22-08-01 TIME 10:46:42;

    MODIFIED = DATE 22-08-18 TIME 10:29:44;

    FILE_NAME = ;

    VERSION = 0;

    LINE_COUNT = 83;

    MEMORY_SIZE = 2291;

    PROTECT = READ_WRITE;

    TCD: STACK_SIZE = 0,

    TASK_PRIORITY = 50,

    TIME_SLICE = 0,

    BUSY_LAMP_OFF = 0,

    ABORT_REQUEST = 0,

    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = 1,*,*,*,*;

    CONTROL_CODE = 00000000 00000000;

    /MN

    1: LBL[1] ;

    2: ;

    3: GO[4]=1 ;

    4: ;

    5: UTOOL_NUM=6 ;

    6: UFRAME_NUM=0 ;

    7: ;

    8: !Home Position ;

    9:J P[1] 10% FINE ;

    10: ;

    11: !CALL JUSTAGE ;

    12: IF (DI[54]=ON) THEN ;

    13: CALL BAUTEILJUSTAGE ;

    14: ENDIF ;

    15: ;

    16: //!CALL HOLEN WKZ1 ;

    17: //IF (DI[57]=ON) THEN ;

    18: //CALL TIEFENMESSER ;

    19: //ENDIF ;

    20: // ;

    21: //UTOOL_NUM=1 ;

    22: // ;

    23: //IF (DI[65]=ON AND GI[1]=0) THEN ;

    24: //CALL REFFMESSWKZ1 ;

    25: //ENDIF ;

    26: // ;

    27: //!CALL TIEFMESSUNG PROZESS ;

    28: // ;

    29: // ;

    30: //!CALL ABLEGEN WKZ1 ;

    31: //IF (DI[58]=ON) THEN ;

    32: //CALL TIEFENMASS_AB ;

    33: //ENDIF ;

    34: // ;

    35: // ;

    36: //UTOOL_NUM=2 ;

    37: // ;

    38: //!CALL HOLEN WKZ2 ;

    39: //IF (DI[59]=ON) THEN ;

    40: //CALL TRENNMITTEL ;

    41: //ENDIF ;

    42: // ;

    43: //!CALL TRENNMITTEL PROZESS ;

    44: // ;

    45: // ;

    46: //!CALL ABLEGEN WKZ2 ;

    47: //IF (DI[60]=ON) THEN ;

    48: //CALL TRENNMTTEL_AB ;

    49: //ENDIF ;

    50: ;

    51: ;

    52: ;

    53: !CALL HOLEN WKZ3 ;

    54: IF (DI[61]=ON) THEN ;

    55: CALL BUCHSESETZER ;

    56: ENDIF ;

    57: ;

    58: !CALL BUCHSENMATRIX ;

    59: CALL BUCHSEMATRIX ;

    60: ;

    61: !CALL ABLEGEN WKZ3 ;

    62: IF (DI[62]=ON) THEN ;

    63: CALL BUCHSESETZERAB ;

    64: ENDIF ;

    65: ;

    66: ;

    67: UTOOL_NUM=6 ;

    68: UFRAME_NUM=0 ;

    69: ;

    70: !Home Position ;

    71:J P[1] 100% FINE ;

    72: ;

    73: IF (GI[3]=125) THEN ;

    74: JMP LBL[500] ;

    75: ENDIF ;

    76: ;

    77: JMP LBL[1] ;

    78: ;

    79: LBL[500] ;

    80: GO[4]=0 ;

    81: CALL PNS0125 ;

    82: ;

    83: ;

    /POS

    P[1]{

    GP1:

    UF : 0, UT : 6, CONFIG : 'F U T, 0, 0, 0',

    X = 1827.724976 mm, Y = -47.214828 mm, Z = 661.797913 mm,

    W = 89.521095 deg, P = -1.917089 deg, R = 90.814964 deg,

    E1= 1041.074463 mm

    };

    /END

    Display More

    The working program Buxematrix on line 59 is where it all starts.

    Inside this program Buxematrix, I call subprograms (starting line 31 to 72) which do something and then go back to this program. That is where I get my error, in one of those programs, randomly after some time.

    Quote

    /PROG BUCHSEMATRIX

    /ATTR

    OWNER = MNEDITOR;

    COMMENT = "SCHMOLL-TRAVERSE";

    PROG_SIZE = 2684;

    CREATE = DATE 22-08-08 TIME 13:13:36;

    MODIFIED = DATE 22-08-19 TIME 11:37:10;

    FILE_NAME = NEWPLATZ;

    VERSION = 0;

    LINE_COUNT = 123;

    MEMORY_SIZE = 3136;

    PROTECT = READ_WRITE;

    TCD: STACK_SIZE = 0,

    TASK_PRIORITY = 50,

    TIME_SLICE = 0,

    BUSY_LAMP_OFF = 0,

    ABORT_REQUEST = 0,

    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = 1,*,*,*,*;

    CONTROL_CODE = 00000000 00000000;

    /APPL

    /MN

    1: UTOOL_NUM=7 ;

    2: UFRAME_NUM=2 ;

    3: ;

    4: ;

    5: ;

    6:J P[9] 50% FINE ;

    7:J P[11] 30% FINE ;

    8: ;

    9: ;

    10: ;

    11: ;

    12: !MATRIX ETAGE ;

    13: IF (DI[41]=ON) THEN ;

    14: JMP LBL[3] ;

    15: ENDIF ;

    16: ;

    17: IF (DI[42]=ON) THEN ;

    18: JMP LBL[2] ;

    19: ENDIF ;

    20: ;

    21: IF (DI[43]=ON) THEN ;

    22: JMP LBL[1] ;

    23: ENDIF ;

    24: ;

    25: ;

    26: ;

    27: ;

    28: ;

    29: ;

    30: LBL[3] ;

    31:L P[4] 1000mm/sec FINE ;

    32: !Position1A Etage3 ;

    33: IF (GI[2]<=6) THEN ;

    34: CALL MATRIXETAGE3 ;

    35: GO[2]=0 ;

    36: JMP LBL[4] ;

    37: ENDIF ;

    38: ;

    39: !Position1B Etage3 ;

    40: IF (GI[2]>6 AND GI[2]<=12) THEN ;

    41: CALL MATRIXETAGE3B ;

    42: GO[2]=0 ;

    43: JMP LBL[4] ;

    44: ENDIF ;

    45: ;

    46: !Position1C Etage3 ;

    47: IF (GI[2]>12 AND GI[2]<=18) THEN ;

    48: CALL MATRIXETAGE3C ;

    49: GO[2]=0 ;

    50: JMP LBL[4] ;

    51: ENDIF ;

    52: ;

    53: !Position1D Etage3 ;

    54: IF (GI[2]>18 AND GI[2]<=24) THEN ;

    55: CALL MATRIXETAGE3D ;

    56: GO[2]=0 ;

    57: JMP LBL[4] ;

    58: ENDIF ;

    59: ;

    60: !Position1E Etage3 ;

    61: IF (GI[2]>24 AND GI[2]<=30) THEN ;

    62: CALL MATRIXETAGE3E ;

    63: GO[2]=0 ;

    64: JMP LBL[4] ;

    65: ENDIF ;

    66: ;

    67: !Position1F Etage3 ;

    68: IF (GI[2]>30 AND GI[2]<=36) THEN ;

    69: CALL MATRIXETAGE3F ;

    70: GO[2]=0 ;

    71: JMP LBL[4] ;

    72: ENDIF ;

    73: ;

    74: LBL[4] ;

    75: !KLEBEN OR JUSTAGE ;

    76: ;

    77: ;

    78:J P[1] 30% FINE ;

    79:J P[2] 30% FINE ;

    80: ;

    81: ;

    82: !KLEBEN DI69 ;

    83: IF (DI[69]) THEN ;

    84: DO[44]=OFF ;

    85: ;

    86:L P[2] 100mm/sec FINE ;

    87:L P[7] 1000mm/sec FINE ;

    88: ;

    89: ;

    90: !VORPOS KLEBEN ;

    91:L P[5] 1000mm/sec FINE ;

    92: DO[69]=ON ;

    93: WAIT (DI[70]=ON) ;

    94: DO[69]=OFF ;

    95: DO[70]=ON ;

    96: !APPLY KLEBEN ;

    97:L P[3] 100mm/sec FINE ;

    98: DO[70]=OFF ;

    99:L P[5] 100mm/sec FINE ;

    100: ;

    101:L P[7] 1000mm/sec FINE ;

    102: DO[44]=ON ;

    103: ;

    104: JMP LBL[5] ;

    105: ENDIF ;

    106: ;

    107: ;

    108: !JUSTAGE DI50 ;

    109: IF (DI[50]) THEN ;

    110: JMP LBL[5] ;

    111: ENDIF ;

    112: ;

    113: ;

    114: ;

    115: LBL[5] ;

    116: ;

    117: ;

    118: !BUCHSETZEN ;

    119: IF (DI[80]=ON) THEN ;

    120: CALL BUXENINTRAVERSE ;

    121: ENDIF ;

    122: ;

    123: ;

    /POS

    P[1]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 102.414795 mm, Y = 201.688660 mm, Z = -38.547485 mm,

    W = -89.377579 deg, P = 1.210412 deg, R = -90.315117 deg,

    E1= -364.621277 mm

    };

    P[2]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 52.856201 mm, Y = 206.814331 mm, Z = -318.981262 mm,

    W = -91.051041 deg, P = .659841 deg, R = -90.351677 deg,

    E1= -364.621552 mm

    };

    P[3]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = -216.944946 mm, Y = -239.082458 mm, Z = -159.554535 mm,

    W = -91.048485 deg, P = .661919 deg, R = 173.973984 deg,

    E1= -364.621277 mm

    };

    P[4]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 40.962280 mm, Y = 2.246948 mm, Z = 10.739197 mm,

    W = -89.356941 deg, P = 1.168338 deg, R = -90.309959 deg,

    E1= -364.617920 mm

    };

    P[5]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = -216.945923 mm, Y = -239.082520 mm, Z = -199.874329 mm,

    W = -91.048492 deg, P = .661981 deg, R = 173.973969 deg,

    E1= -364.621277 mm

    };

    P[7]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = -216.978149 mm, Y = -239.039734 mm, Z = -345.209747 mm,

    W = -91.045006 deg, P = .665762 deg, R = 173.973648 deg,

    E1= -364.621002 mm

    };

    P[9]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 52.856323 mm, Y = 206.814270 mm, Z = -318.981140 mm,

    W = -91.051048 deg, P = .659843 deg, R = -90.351685 deg,

    E1= -364.621552 mm

    };

    P[11]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 102.477783 mm, Y = 201.682617 mm, Z = -38.623718 mm,

    W = -89.381874 deg, P = 1.210048 deg, R = -90.317734 deg,

    E1= -364.618042 mm

    };

    /END

    Display More

    In the end of previous program on line 120 i call another program (Buxeintraverse) from which when it ends calls back the program Buxematrix (Line 817). They go back and forth, until all conditions are satisfied, so in the end jump back to program number 1.

  • TP77
    Trophies
    1
    Posts
    16
    • August 20, 2022 at 5:57 PM
    • #4

    This is the one of the programs from line 31 to 72 in Buxematrix where i get the errors.

    Quote

    /PROG MATRIXETAGE3

    /ATTR

    OWNER = MNEDITOR;

    COMMENT = "";

    PROG_SIZE = 2549;

    CREATE = DATE 22-08-09 TIME 14:33:22;

    MODIFIED = DATE 22-08-19 TIME 13:51:18;

    FILE_NAME = ;

    VERSION = 0;

    LINE_COUNT = 137;

    MEMORY_SIZE = 3017;

    PROTECT = READ_WRITE;

    TCD: STACK_SIZE = 0,

    TASK_PRIORITY = 50,

    TIME_SLICE = 0,

    BUSY_LAMP_OFF = 0,

    ABORT_REQUEST = 0,

    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = 1,*,*,*,*;

    CONTROL_CODE = 00000000 00000000;

    /MN

    1: UTOOL_NUM=7 ;

    2: UFRAME_NUM=2 ;

    3: ;

    4: ;

    5: !Pos1A ;

    6:L P[1] 100mm/sec FINE ;

    7: IF (GI[2]=1) THEN ;

    8: GO[2]=1 ;

    9: WAIT (DI[68]=ON) ;

    10: DO[43]=OFF ;

    11: PR[10]=LPOS ;

    12:L PR[10] 100mm/sec FINE Offset,PR[11] ;

    13: DO[68]=ON ;

    14: WAIT (DI[50]=ON OR DI[69]=ON) ;

    15: DO[68]=OFF ;

    16:L PR[10] 10mm/sec FINE ;

    17:L P[1] 100mm/sec FINE ;

    18: JMP LBL[1] ;

    19: ENDIF ;

    20: ;

    21: !Pos2A ;

    22:L P[1] 100mm/sec FINE ;

    23: IF (GI[2]=2) THEN ;

    24: GO[2]=2 ;

    25: WAIT (DI[68]=ON) ;

    26: DO[43]=OFF ;

    27: PR[10]=LPOS ;

    28:L PR[10] 1000mm/sec FINE Offset,PR[14] ;

    29: PR[12]=LPOS ;

    30:L PR[12] 100mm/sec FINE Offset,PR[11] ;

    31: DO[68]=ON ;

    32: WAIT (DI[50]=ON OR DI[69]=ON) ;

    33: DO[68]=OFF ;

    34:L PR[12] 10mm/sec FINE ;

    35:L P[1] 1000mm/sec FINE ;

    36: PR[10]=LPOS ;

    37: PR[12]=LPOS ;

    38: JMP LBL[1] ;

    39: ENDIF ;

    40: ;

    41: ;

    42: !Pos3A ;

    43:L P[1] 100mm/sec FINE ;

    44: IF (GI[2]=3) THEN ;

    45: GO[2]=3 ;

    46: WAIT (DI[68]=ON) ;

    47: DO[43]=OFF ;

    48: PR[10]=LPOS ;

    49: //PR[10,2]=PR[52,2]-1 ;

    50:L PR[10] 1000mm/sec FINE Offset,PR[15] ;

    51: PR[12]=LPOS ;

    52:L PR[12] 100mm/sec FINE Offset,PR[11] ;

    53: DO[68]=ON ;

    54: WAIT (DI[50]=ON OR DI[69]=ON) ;

    55: DO[68]=OFF ;

    56:L PR[12] 10mm/sec FINE ;

    57:L P[1] 1000mm/sec FINE ;

    58: PR[10]=LPOS ;

    59: PR[12]=LPOS ;

    60: ;

    61: ;

    62: JMP LBL[1] ;

    63: ENDIF ;

    64: ;

    65: ;

    66: !Pos4A ;

    67:L P[1] 100mm/sec FINE ;

    68: IF (GI[2]=4) THEN ;

    69: GO[2]=4 ;

    70: WAIT (DI[68]=ON) ;

    71: DO[43]=OFF ;

    72: PR[10]=LPOS ;

    73:L PR[10] 1000mm/sec FINE Offset,PR[16] ;

    74: PR[12]=LPOS ;

    75:L PR[12] 100mm/sec FINE Offset,PR[11] ;

    76: DO[68]=ON ;

    77: WAIT (DI[50]=ON OR DI[69]=ON) ;

    78: DO[68]=OFF ;

    79:L PR[12] 10mm/sec FINE ;

    80:L P[1] 1000mm/sec FINE ;

    81: PR[10]=LPOS ;

    82: PR[12]=LPOS ;

    83: ;

    84: ;

    85: JMP LBL[1] ;

    86: ENDIF ;

    87: ;

    88: ;

    89: !Pos5A ;

    90:L P[1] 100mm/sec FINE ;

    91: IF (GI[2]=5) THEN ;

    92: GO[2]=5 ;

    93: WAIT (DI[68]=ON) ;

    94: DO[43]=OFF ;

    95: PR[10]=LPOS ;

    96:L PR[10] 1000mm/sec FINE Offset,PR[17] ;

    97: PR[12]=LPOS ;

    98:L PR[12] 100mm/sec FINE Offset,PR[11] ;

    99: DO[68]=ON ;

    100: WAIT (DI[50]=ON OR DI[69]=ON) ;

    101: DO[68]=OFF ;

    102:L PR[12] 10mm/sec FINE ;

    103:L P[1] 1000mm/sec FINE ;

    104: PR[10]=LPOS ;

    105: PR[12]=LPOS ;

    106: ;

    107: ;

    108: JMP LBL[1] ;

    109: ENDIF ;

    110: ;

    111: !Pos6A ;

    112:L P[1] 100mm/sec FINE ;

    113: IF (GI[2]=6) THEN ;

    114: GO[2]=6 ;

    115: WAIT (DI[68]=ON) ;

    116: DO[43]=OFF ;

    117: PR[10]=LPOS ;

    118:L PR[10] 1000mm/sec FINE Offset,PR[18] ;

    119: PR[12]=LPOS ;

    120:L PR[12] 100mm/sec FINE Offset,PR[11] ;

    121: DO[68]=ON ;

    122: WAIT (DI[50]=ON OR DI[69]=ON) ;

    123: DO[68]=OFF ;

    124:L PR[12] 10mm/sec FINE ;

    125:L P[1] 1000mm/sec FINE ;

    126: PR[10]=LPOS ;

    127: PR[12]=LPOS ;

    128: ;

    129: ;

    130: JMP LBL[1] ;

    131: ENDIF ;

    132: ;

    133: LBL[1] ;

    134: ;

    135: ;

    136: DO[43]=ON ;

    137: ;

    /POS

    P[1]{

    GP1:

    UF : 2, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 40.939575 mm, Y = 2.063477 mm, Z = 11.014099 mm,

    W = -89.343765 deg, P = 1.164568 deg, R = -90.308670 deg,

    E1= -364.615112 mm

    };

    /END

    Display More

    And this is the program Buxeintraverse from where i call back the working program Buxeinmatrix on line 817, so they go back and forth. I cut several hundred lines of code to be able to post it.

    Quote

    /PROG BUXENINTRAVERSE

    /ATTR

    OWNER = MNEDITOR;

    COMMENT = "";

    PROG_SIZE = 15488;

    CREATE = DATE 22-08-15 TIME 08:06:26;

    MODIFIED = DATE 22-08-19 TIME 10:05:00;

    FILE_NAME = ;

    VERSION = 0;

    LINE_COUNT = 818;

    MEMORY_SIZE = 15936;

    PROTECT = READ_WRITE;

    TCD: STACK_SIZE = 0,

    TASK_PRIORITY = 50,

    TIME_SLICE = 0,

    BUSY_LAMP_OFF = 0,

    ABORT_REQUEST = 0,

    PAUSE_REQUEST = 0;

    DEFAULT_GROUP = 1,*,*,*,*;

    CONTROL_CODE = 00000000 00000000;

    /MN

    1: UTOOL_NUM=7 ;

    2: UFRAME_NUM=1 ;

    3: ;

    4: ;

    5:L P[1] 100mm/sec FINE ;

    6: ;

    7: !VOR POS ;

    8:L P[4] 1000mm/sec FINE ;

    9: ;

    10: IF (GI[1]>10 AND GI[1]<=20) THEN ;

    11: JMP LBL[2] ;

    12: ENDIF ;

    13: ;

    14: IF (GI[1]>20 AND GI[1]<=30) THEN ;

    15: JMP LBL[3] ;

    16: ENDIF ;

    17: ;

    18: IF (GI[1]>30 AND GI[1]<=40) THEN ;

    19: JMP LBL[4] ;

    20: ENDIF ;

    21: ;

    22: IF (GI[1]>40 AND GI[1]<=47) THEN ;

    23: JMP LBL[5] ;

    24: ENDIF ;

    25: ;

    26: IF (GI[1]>47 AND GI[1]<=94) THEN ;

    27: JMP LBL[6] ;

    28: ENDIF ;

    29: ;

    30: //!VOR POS 1 ;

    31: //L P[6] 1000mm/sec FINE ;

    32: //L P[3] 100mm/sec FINE ;

    33: ;

    34: IF (GI[1]=1) THEN ;

    35: GO[1]=1 ;

    36: WAIT (DI[67]=ON) ;

    37: DO[42]=OFF ;

    38:L PR[32] 100mm/sec FINE ;

    39:L PR[32] 50mm/sec FINE Offset,PR[33] ;

    40: DO[67]=ON ;

    41: WAIT (DI[68]=ON) ;

    42: DO[67]=OFF ;

    43:L PR[32] 100mm/sec FINE ;

    44: PR[32]=LPOS ;

    45: WAIT (DI[68]=ON) ;

    46: JMP LBL[1] ;

    47: ENDIF ;

    48: ;

    49: IF (GI[1]=2) THEN ;

    50: GO[1]=2 ;

    51: WAIT (DI[67]=ON) ;

    52: DO[42]=OFF ;

    53: PR[32,1]=PR[32,1]+80 ;

    54:L PR[32] 100mm/sec FINE ;

    55:L PR[32] 50mm/sec FINE Offset,PR[33] ;

    56: DO[67]=ON ;

    57: WAIT (DI[68]=ON) ;

    58: DO[67]=OFF ;

    59:L PR[32] 100mm/sec FINE ;

    60: PR[32,1]=PR[32,1]-80 ;

    61: JMP LBL[1] ;

    62: ENDIF ;

    63: ;

    771: ;

    772: IF (GI[1]=47) THEN ;

    773: GO[1]=47 ;

    774: WAIT (DI[67]=ON) ;

    775: DO[42]=OFF ;

    776: PR[32,1]=PR[32,1]+3680 ;

    777: PR[32,7]=PR[32,7]+1600 ;

    778:L PR[32] 1000mm/sec FINE ;

    779:L PR[32] 100mm/sec FINE Offset,PR[33] ;

    780: DO[67]=ON ;

    781: WAIT (DI[68]=ON) ;

    782: DO[67]=OFF ;

    783:L PR[32] 100mm/sec FINE ;

    784: PR[32,1]=PR[32,1]-3680 ;

    785: PR[32,7]=PR[32,7]-1600 ;

    786: JMP LBL[1] ;

    787: ENDIF ;

    788: ;

    789: ;

    790: ;

    791: LBL[6] ;

    792: CALL BUXENINTRAVERSE2 ;

    793: JMP LBL[1] ;

    794: ;

    795: ;

    796: ;

    797: ;

    798: ;

    799: ;

    800: LBL[1] ;

    801: ;

    802: ;

    803: !VOR POS ;

    804:L P[4] 1000mm/sec FINE ;

    805: ;

    806: ;

    807: ;

    808:L P[1] 1000mm/sec FINE ;

    809: ;

    810: ;

    811: ;

    812: ;

    813: ;

    814: ;

    815: DO[42]=ON ;

    816: ;

    817: CALL BUCHSEMATRIX ;

    818: ;

    /POS

    P[1]{

    GP1:

    UF : 1, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = -164.872437 mm, Y = 177.151062 mm, Z = -54.056976 mm,

    W = 88.961906 deg, P = -.672048 deg, R = 6.027428 deg,

    E1= -364.617493 mm

    };

    P[3]{

    GP1:

    UF : 1, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 4.000610 mm, Y = -38.217285 mm, Z = -185.723328 mm,

    W = 88.987106 deg, P = -.692942 deg, R = 6.029487 deg,

    E1= -364.618042 mm

    };

    P[4]{

    GP1:

    UF : 1, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 4.044434 mm, Y = 104.391602 mm, Z = -25.982056 mm,

    W = 88.991119 deg, P = -.696894 deg, R = 6.030112 deg,

    E1= -364.617920 mm

    };

    P[6]{

    GP1:

    UF : 1, UT : 7, CONFIG : 'F U T, 0, 0, 0',

    X = 4.017700 mm, Y = -38.163086 mm, Z = -100.386963 mm,

    W = 88.991623 deg, P = -.695496 deg, R = 6.029430 deg,

    E1= -364.617920 mm

    };

    /END

    Display More
  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • August 20, 2022 at 6:03 PM
    • #5

    Delete line 81 on PNS0001. That is a bad recursive call.

    You should never call a parent program from a sub program. When the sub ends it will automatically return to the parent.

    You will need to address where it returns in the main program on line 44. You should also delete line 48 in your main to prevent it going home without the UF and UT set correctly. Since it jumps back to lbl 1 it will do that anyway.

  • TP77
    Trophies
    1
    Posts
    16
    • August 20, 2022 at 8:28 PM
    • #6

    Thanks HawkMe. I understood all points except this one. In line 44 of the main program I have ENDIF. I don't understand what do you mean - to address where it returns.

    Quote from HawkME

    You will need to address where it returns in the main program on line 44.

    Is it possible for you to check the rest of the code, in the working program Buxenmatrix, since the problems were actually there while testing? Or maybe these solutions that you gave me will do the job. Anyways, I cannot test any of these until Monday so I will let you know how it is going. Again, thanks.

  • HawkME
    Reactions Received
    568
    Trophies
    11
    Posts
    3,268
    • August 20, 2022 at 8:53 PM
    • #7

    I meant since you were never allowing the program to end it would never execute any code below that line. Now that it is, the behavior will be different so you have to make sure it works properly. By deleting the last move home it should take care of that.

    You mention that your other 2 programs call each other back and forth. You can't do that. It's unnecessary anyway and will just cause your program to error out over time. When a called program ends it returns back to the caller to continue on.

    If you need to do those 2 functions repeatedly then you need to call them 1 at a time from a parent program. Then use a jump label to repeat. You have to let each called program come to a complete end before you call it again otherwise you just keep stacking programs in memory, leading to a stack overflow.

  • TP77
    Trophies
    1
    Posts
    16
    • August 21, 2022 at 9:32 AM
    • #8

    That is right what you have said. I will try all of it. Thanks

  • NeySEA
    Reactions Received
    1
    Trophies
    1
    Posts
    31
    • April 8, 2025 at 6:12 AM
    • #9

    Very impressive debugging ! There is much Fanuc Robot Programming bedrock u can appreciate and learn from reading this thread. Thank you Hawk, TP77 and rest of forum members for this. John

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • Fanuc
  • error
  • Alarm
  • subprogram
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download