#### Discussion

Back to discussions page
Posts: 5 Apprentice
I would like to know if it’s possible to define areas, and then if the robot is stopped in one of the area to recover back to home position if a reset button is pressed.

• Founding Pro, Tactile Sensor Beta Testers Posts: 1,171 Handy
You can do that, just need to define the areas in if statemtents and then query the current position of the robot to determine where it is. Within the if statements you would define the path back to home from that zone. Anytime the robot is started that hiking routine would run.
• Posts: 5 Apprentice
Would I need to query the position of each axis ?

For example if the robot is at x=40 y =60 and z=30
If CurrentPos(x)>30 and CurrentPos(x)<50
If CurrentPos(y)>50 and CurrentPos(y)<70
If CurrentPos(a)>10 and CurrentPos(z)<40
Then if it is all = True I must be in the defined area ?
Thank you for your response !

• Posts: 14 Apprentice
What I can't understand about this is how it's possible that when you do the AutoMove manually on the teaching pendant, the robot always comes back through the safe path, but then you need to program checking the coordinates to do the same thing.
• Founding Pro, Tactile Sensor Beta Testers Posts: 1,171 Handy
Not sure I understand about the robot coming back through the safe path using auto move. The robot will come back the most efficient path using auto move. If the arm is inside a machine and the starting point of my program is on the other side of the machine wall then auto move will try to go through that wall.

Like @Loïc said you can define a region inside one if statement and then execute the path home. If you use else if statements you could then have a series of areas where the robot is and then have different paths.

We do this on pretty much all our robots to make it easy on the operator to restart the cell. Sometimes it’s as simple as if z is below a certain height go to a clearance height straight up and then go home.
• Posts: 5 Apprentice