How to get robot to safe space not matter what

  • I have created a program called SAFE:

    PR96=LPOS

    PR96,2=+1042

    L PR96 100mm sec FINE


    This sends the robot straight up when initiated.

    I want this to happen before basically any other program can run. That way I know it's not going to collide with anything. Is there a variable that could do this?

  • Put it at the beginning of your Main program. Use the correct program select method to ensure you always start with Main.


    Also make sure to set the correct UF and UT in your program above those lines of code, or bad things can happen.

  • If the robot is already up high, you will get a position not reachable or limit error. You could determine an absolute ceiling and subtract the current Z value from it. Use that value for PR96. And is it not the third component of the PR you need to assign that value?

  • 6. And is it not the third component of the PR you need to assign that value?


    yes it was axis 3, i was wrong. can I offset 2 axis on one move? i am trying to palletize and base all movements off the first placement. I am only building a pallet with 4 rows of 6 boxes stacked 4 high in colums. i did all the y axis moves with PR100,2=+259, now on the second through fourth layer I want to Offset PR100,3=+215. each layer will move up one box once,and move towards the robot 4 times.

  • The correct way to do what you want is to use Diag_GRP[1].CUR_TCP_X, Diag_GRP[1].CUR_TCP_Y, Diag_GRP[1].CUR_TCP_Z system variables to determine the currect robot TCP position in Cartesian Coords (WORLD) insite a BGLOGIC program running on High Priority.


    Use your own DOs depending the TCP Location. Create a home routine and use those DO signals to safely exit any danger zone (defined in the BG logic) and return home. BG logic will constantly update those DOs based on its current TCP location. Each time you will call your Home routine, the robot will use some branch logic (IF-ELSE) based on the signal ON from the BG LOGIC to decide the exit strategy and safely return home.


    You can even use CUR_TCP_W, CUR_TCP_P, CUR_TCP_R which represents your TCP orientation to better define your danger zone. Or you can use Space Function which is a standard function although I find that creating my own Space Function is a lot more reliable than the embedded space function that has a lot of bugs (especially when using continuous turn axis).

    This is a sample code that defines 3 "hazard zones" for my robot and constantly checks for them.




    and this is my R_HOME macro:


  • concerning the palletizing program, you could automate the function:


    This way you only need to teach 3 positions relating to approach and deposit of the first piece. Robot will calculate everything else.

Advertising from our partners