/***tag:Description*//**Divert to Elevator*/" @: n r5 h! b+ q
( _, T% e2 d% A* |
int operation = param(3);- v7 r; C& I. |2 u5 D, I
3 u' w9 b y/ ~7 _: y
#define AGV_LABEL_NAME "fs_AGV_Elev_State": ~1 a( a6 P. A# o. y' `& E j) H
if (operation == 0 && !objectexists(label(agv, AGV_LABEL_NAME))1 K0 c( n U+ i& m1 P r7 ]: X
&& (/** \nCondition: *//***tag:Condition*//**/fabs(zloc(currentCP) - zloc(agvinfo(agv, AGV_DEST_CP))) > zsize(agv)/**/)) { // if it's a pointer, then do the initial case" \9 J8 d6 W }/ C/ i
if (getquerymatchcount() > 0)7 ~8 \& Q3 X9 A; w' C
elevDisp = getqueryvalue(1, 1);5 q4 }# X/ b" O- t
} $ _3 H; s! N% a4 i, @( l2 a
if (!objectexists(elevDisp)) 6 x% V5 p( |9 C9 B! @ I& b
return 0;$ i n0 v! ^" s- @7 U8 u! o. F
treenode destCP = agvinfo(agv, AGV_DEST_CP);" N. V0 j! H' Z% l1 g3 i2 x
, h: w' j+ Z$ N, H, H, g
agvredirect(agv, /** \nDivert Point When None Available: *//***tag:WaitDivertPoint*//**/currentCP/**/, REDIRECT_AND_WAIT);9 b* M! s) X# d. v$ n4 D6 k- e
2 h- n8 s; Z4 w" G) r/ b
// Create the task sequence for the elevator ; p4 ^' l1 F- c5 d& c \