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

Fanuc Macro Program Interruption Restart

  • dh71
  • February 24, 2025 at 8:51 PM
  • Thread is Unresolved
  • dh71
    Trophies
    2
    Posts
    3
    • February 24, 2025 at 8:51 PM
    • #1

    I have an issue with a robot that is using a Macro that runs in the background for a Tip Dress Program on 2 auxiliary Ped Pinch Weld guns. It is programmed as a Macro that is started by DI so the robot can continue its Material Handling tasks while the Tip Dress is performed periodically.

    My problem is: when this Macro gets interrupted, it will not continue. Someone has to pull up the background program and walk it through with the teach pendant to finish.

    Is there a way to resume a BG Macro like this?

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • February 24, 2025 at 9:28 PM
    • #2

    Don't confuse BG with macro, as they are 2 specifically different things.


    I generally dislike using macros unless absolutely necessary.


    Can you post the code inside the macro? Maybe there is another solution and seeing the code will help us to determine that.

  • rozzy323
    Trophies
    1
    Posts
    6
    • February 25, 2025 at 2:15 AM
    • #3

    can you use a monitor program to abort the macro, or some other function if the interrupt occurs when the macro is executing? I use a monitor program for camera comm interruptions. if a specific fault occurs, robot will reset, cycle start when the program is active, production continues seemingly uninterrupted.

  • RobcadSim
    Reactions Received
    8
    Trophies
    2
    Posts
    59
    • February 25, 2025 at 4:44 AM
    • #4

    I can not understand how to do that , Macro started by DI,and also run in the background ?

    you have the multi-process function?

    Nice day~!

  • dh71
    Trophies
    2
    Posts
    3
    • February 25, 2025 at 1:52 PM
    • #5

    Here is Macro Program. Again, called by a DI. When it gets interrupted, the robot program that is running in the foreground waits for a flag and a DO that is set/unset in this Macro to be off before continuing into the zone. When pull up the macro program, it is usually somewhere in the middle and can be finished through the teach pendant, and then everything will resume normally. This seems to be the only way to resume the macro.

    /PROG TIPDRESS_PED
    /ATTR
    OWNER = MNEDITOR;
    COMMENT = "TIPDRESS PED";
    PROG_SIZE = 1954;
    CREATE = DATE 20-08-18 TIME 22:55:24;
    MODIFIED = DATE 22-03-03 TIME 11:14:56;
    FILE_NAME = TIPDRESS;
    VERSION = 0;
    LINE_COUNT = 88;
    MEMORY_SIZE = 2378;
    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
    SPOT : TRUE ;
    SPOT Welding Equipment Number : 1 ;
    /MN
    1: !TIPDRESS PROGRAM ;
    2: R[90:Tip Dress Done]=0 ;
    3: ;
    4: F[3:TipDress_Init]=(ON) ;
    5: ;
    6: WAIT DO[137:ClearOf_TipDress]=ON ;
    7: DO[150:TIPDRESS_Active]=ON ;
    8: ;
    9: WAIT DO[144:R3_Welding]=OFF ;
    10: DO[138:Tipdress in Cycle]=ON ;
    11: DO[157:ReqPivot_HOME]=OFF ;
    12: ;
    13: !Ref Position ;
    14:J P[3:GUNS_OPEN] 100% CNT5 ;
    15: ;
    16: WAIT DO[135:GUNS_OPEN_RefPos]=ON ;
    17: !Home Position ;
    18:J P[1:GUNS_OPEN] 100% CNT5 ;
    19: ;
    20: !Turn On Tip Dresser ;
    21: DO[153:At_Tip_Dress_Pos]=ON ;
    22: ;
    23: !At Tipdress Position ;
    24: WAIT DI[34:TipDressRunning]=ON ;
    25: WAIT DI[36:TipDressAtHOME]=OFF AND DI[35:TipDressAtWORK]=ON ;
    26: ;
    27: IF DI[149:CapsChanged]=OFF,JMP LBL[20] ;
    28: ;
    29: !Tipdress New Caps ;
    30: ;
    31: !Pressure 350 lbs ;
    32: !Cutter thickness 8 mm ;
    33: !Pushing depth 6.0 mm ;
    34: ;
    35: PRESS_MOTN[SD=20,P=90,SEL=(1,1),t=8.0] ;
    36: WAIT R[195] ;
    37: ;
    38: JMP LBL[25] ;
    39: LBL[20:Used] ;
    40: ;
    41: !Tipdress Used Caps ;
    42: ;
    43: !Pressure 350 lbs ;
    44: !Cutter thickness 8 mm ;
    45: !Pushing depth 6.0 mm ;
    46: ;
    47: PRESS_MOTN[SD=20,P=90,SEL=(1,1),t=8.0] ;
    48: WAIT R[196] ;
    49: ;
    50: LBL[25] ;
    51: ;
    52: !Turn Off Tipdresser ;
    53: DO[153:At_Tip_Dress_Pos]=OFF ;
    54: ;
    55:J P[1:GUNS_OPEN] 50% CNT5 ACC50 ;
    56: DO[157:ReqPivot_HOME]=ON ;
    57: ;
    58: WAIT DI[34:TipDressRunning]=OFF ;
    59: WAIT DI[36:TipDressAtHOME]=ON AND DI[35:TipDressAtWORK]=OFF ;
    60: ;
    61: !Run Wear Update ;
    62: ;
    63: CALL WR_UPD01 ;
    64: CALL WR_UPD02 ;
    65: ;
    66: F[1:TipWearUpdateDone]=(ON) ;
    67: ;
    68: !AT HOME ;
    69:J P[1:GUNS_OPEN] 50% FINE ACC75 ;
    70: ;
    71: !Tip Dress Complete ;
    72: DO[156:Tip_Dress_Comp ]=PULSE,0.5sec ;
    73: DO[210:Ack Tip Dress W3]=PULSE,0.5sec ;
    74: DO[290:Ack Tip Dress W4]=PULSE,0.5sec ;
    75: DO[212:Caps Changed ]=PULSE,0.5sec ;
    76: DO[292:Caps Changed ]=PULSE,0.5sec ;
    77: WAIT DI[212:End of Stepper W3]=OFF ;
    78: WAIT DI[292:End of Stepper W4]=OFF ;
    79: ;
    80: !Reset Signals ;
    81: DO[153:At_Tip_Dress_Pos]=OFF ;
    82: DO[157:ReqPivot_HOME]=ON ;
    83: DO[138:Tipdress in Cycle]=OFF ;
    84: ;
    85: F[3:TipDress_Init]=(OFF) ;
    86: ;
    87: R[90:Tip Dress Done]=1 ;
    88: DO[150:TIPDRESS_Active]=OFF ;
    /POS
    P[1:"GUNS_OPEN"]{
    GP2:
    UF : 1, UT : 1,
    J1= 90.000 mm, J2= 90.000 mm
    };
    P[3:"GUNS_OPEN"]{
    GP2:
    UF : 1, UT : 1,
    J1= 90.000 mm, J2= 90.000 mm
    };
    /END

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • February 25, 2025 at 3:13 PM
    • #6

    You could try calling it as a normal program from your main program. Then it will behave as a normal program with the ability to pause/resume.


    That's what I usually do to get rid of macros.

  • RobcadSim
    Reactions Received
    8
    Trophies
    2
    Posts
    59
    • February 26, 2025 at 7:28 AM
    • #7

    oh,i got what you said,but it's an unavoidable problem if u want to multi-process.In some cases (Tipwear updata got error etc.) u have to abort the foreground program,and deal with the fault of the "background running pro" by run this marco on the TP.

    I have been thinking about how to solve similar problems quickly,but there's nothing effective yet as i know~ Maybe raising the cost budget can solve it:frowning_face:

    We are used to using "RUN" to deal with multi-process,it's clear for the program frame.

    Nice day~!

  • ssaul
    Reactions Received
    8
    Posts
    53
    • February 26, 2025 at 9:26 PM
    • #8

    I have the same problem and I still can't find a way to solve it.

  • HawkME
    Reactions Received
    568
    Trophies
    10
    Posts
    3,268
    • March 1, 2025 at 1:27 AM
    • #9

    You could test using the Run command in place of the macro and see how it responds to fault, hold, reset, resume via start signal.

    Another possible option is to purchase and install the multi-uop option. It allows you to UOP start different groups with different sets of UOP signals. It is a bit of a PITA to setup so I'd only use it if really necessary.

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 Macro Background
  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