Intersection Zone
An intersection zone is a useful feature to allow only a specified number of XBots in an area. It can be employed to avoid deadlocks between XBots, or to prevent an XBot from entering an area while a process is ongoing. It simplifies the user code, as the user does not have to worry about writing their own synchronization functions.
How to set up intersection zones
Use Define Zone to define the area where the zone should be created, and use the
Mode
parameter to specify how many XBots are allowed in the zone at any one time.To enable the intersection zone, use Zone Fence to build the fence around the area.
For PMC versions >= 117.14.66, the intersection zone operates on a first come first serve basis, i.e., if there are several XBots waiting to enter the zone, the first XBot to have arrived at the zone will be the first one entering it once it is free.
For previous versions, the order is based on the XBot ID, i.e., the smaller XBot ID will enter the zone first.
Intersection zone example
Consider 2 XBots going to the same target position, but coming from opposite directions

If the motion commands are sent almost at the same time, they would end up in collision, creating a deadlock

While commands like Wait Until can be used to ensure one XBot goes before the other, it is not always practical to keep track of the trigger XBot ID. It is also not convenient when creating Macros, since a different Macro would be needed for each trigger XBot.
Therefore, a simple solution is to use an intersection zone.
The zone is defined using Define Zone, with
BottomLeftX = 0.18
,BottomLeftY = 0.36
,TopRightX = 0.30
,TopRightY = 0.48
andMode = 1
to allow only 1 XBot at a timeIt is then enabled using Zone Fence, with
Level = 1
to build the fence

The motion commands can now be sent, and only 1 XBot will enter the critical area at a time, while the other XBot will be in Obstacle outside of it

Once the first XBot is out of the zone, the second XBot will now be able to enter it and continue its motion
