This is good information, but I'm curious about a couple things: I get using DCS Zones to see if robot is here or there, but once you've determined you are inside that DCS zone are you then using LPOS to see where the robot is inside that Zone? How are you determining then where the robot is compared to the programmed position(s) to bring it home? Do you query each point of the program and see how close LPOS is to each point? Saying that out loud to myself sounds silly, so I know I'm missing something very obvious...Thanks for any input you can/may provide. I'd love to replace my lazy use of the breadcrumb trail (i.e. register setting). I definitely have seen where it can fail to do its job.
I have posted a sample R_HOME logic macro that answers your question . Only difference is that instead of DCS I use a BG logic routine to continuesly scan TCP location and activate certain DOs depending the location. You don't need to worry about the programmed positions but only for the current one. Using LPOS to save the current position and Linear move for exit move your TCP orientation will not change so you dont need to worry about crashes when exiting from a tight spot (provided you have programmed a correct exit move).
For the application that this macro takes place there are effectively 3 zones I need to look out for: a Barrel fixture, a feeding table and a double rotary wheel. When robot moves inside one of the 3 zones, BG logic activates the specified DO. If any of the specified DOs are not activated it means that the robot has a safe distance away from any fixture, so a simple JOINT move to P[1:Home] is safe and the robot need not check anything.