Restarting a run statement

  • I am currently working on a spot weld line and they are using run commands to run the tip wear in the background which is great because it does the update while the robot is moving and doesn't affect the cycle time. The only problem being is when it gets interrupted for whatever reason. When this happens you have to go to the teach pendants and pull it from the background to the foreground in order for it to restart and complete.
    I guess I'm asking is there a way of automatically restarting a background task?


    Thanks

  • Seems like you are talking about a TP program that uses the RUN instruction, as far as I know the only way to continue a paused task in background is using the Karel instruction CONT_TASK.
    I did this within Karel programs and I am not sure it will work on task launched from a TP program

  • I think the reason it's done the way it is, is so they can call it after or before welding and I didn't really want to redo all their spot weld robots.
    How would you suggest doing this maybe using a signal from the robot to trigger it?


    Thanks

  • I personally have never used the RUN command, anything I wanted running constantly I used Background Logic. Instead of using the RUN command, you could try just assigning your program in BG LOGIC. You could use a register in your weld program as a counter if you need it to update after every weld, I'm not exactly sure what you are doing with this program.

  • That makes sense this program just measures and updates the spot weld cap wear down at the end of the cycle. This way it updates the tcp on the servo gun and ensures that your close position is correct.

  • Hello,
    If you want to continuously RUN your program even if the main program is paused, you must set "Ignore pause" to ON. You can cancel exec of all programs by doing a FNCT->Abort All.
    An approach is to use some flags, internal outputs or registers to communicate between main task and secondary tasks in your TP programming.

Advertising from our partners