Adding a RUN program into a MAIN.

  • :help:


    I'm trying to add a RUN program within my MAIN. However, I am getting a "Already Locked By Another Task" I am under the assumption that I need to add a "Handshake" to ensure this works correctly.


    Example of what I'm working with is:


    CALL: ROBOT HOME
    J P[1] 100% CNT100
    J P[2] 100% CNT100
    RUN: T_CLEAN
    J P[3] 100% CNT100


    This references that after the robot is called home, instead of waiting for the positioner to rotate to the next weld position to perform a Torch Clean, the robot will go ahead and perform a Torch Clean while the positioner rotates.


    Robot controllers that we run are: R30iA, R30iB, & R30iB+ if this helps any.

  • Place your Ad here!
  • You cannot run two programs simultaneously that both have access to the same motion group.


    Option 1: Mask out motion groups in main and sub program such that the RUN program cannot effect the same motion groups that the parent program can.
    Option 2: (Not what you want) use a CALL instead of RUN to pause the parent program and execute the sub program.


    General rule. The same motion group CANNOT be controlled by any two programs at the same time, macro, sub call, Karel, anything.

  • Robo_Eng_13 is correct. Make sure there is no motion in the "T_Clean" program. On the pendent, press select, cursor to the program, and select detail. Cursor down and onto the number 1 which is followed by a bunch of asterisks (*****). Change the number 1 to an asterick. You should now be able to execute your code as expected.


    If you have, and need, motion in both programs, you would need to configure the robot differently. If you have an 7th axis of some sort, you could set it up as an auxiliary axis (separate motion group). I'm a tad rusty on the subject, as I haven't touched anything similar in a while though.

  • I did exactly what you want to do in a welding application
    The system has 10 axis: the robot plus 2 auxiliary axis plus two extended axis
    The robot welds using coordinate motion using the 10 axis simultaneously


    Once the programs are created you can not mask the groups


    So I re-create the torch cleaning program and part reposition programs masking the groups
    that way I was able to run parallel programs


    The main program have all groups masked, and basically calls or runs the subroutines that actually puts the groups in motion.


    There are some variables you can use to check if a group is in use
    You add a wait instruction before calling or running a program


    I use CALL for,the welding routines and RUN for part repostion and Torch cleaning



    :dance2:

  • You can mask the groups after creating a program so long as there is no positional data saved in the program. Removing the positional data is the "difficult" part, as you may need to delete then re-load the program after modifying, as the positional data doesn't just disappear when you delete your positions. If you have ascii loader or roboguide, you can delete the positional data from the .ls file directly.


    Just a tip if that situation ever comes up.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners