
(* 4x3 flyways 2 xbots - sun planet *)
FUNCTION_BLOCK Example07_sun
	(*async move to 60,60 and 60,180*)
	xbotID_array78[0] := 1;xbotID_array78[1] := 2;
	PosX_array78[0] := 0.06;PosX_array78[1] := 0.06;
	PosY_array78[0] := 0.06;PosY_array78[1] := 0.18;
	PMC_AutoDrivingMotion1(PM_Controller := PM_Controller,Execute := Execute,nXbots := 2,RoutingType := 0,ZoneID := 0,XbotID := xbotID_array78,PosX := PosX_array78,PosY := PosY_array78);

	(*set xbot 2 as a planet to xbot 1*)
	xbotID_array32[0] := 2;
	PMC_PlanetMotionCtrl1(PM_Controller := PM_Controller,Execute := PMC_AutoDrivingMotion1.Done,Level := 1,StarXID := 1,nXbots := 1,PlanetXID := xbotID_array32);

	(*move xbot 1 to 900,60*)
	PMC_XYMotion1(PM_Controller := PM_Controller,Execute := PMC_PlanetMotionCtrl1.Done,cmdLB := 3,XbotID := 1,Mode := 0,Type_ := 0,PosX := 0.9,PosY := 0.06,EndVel := 0,MaxVel := 1,MaxAcc := 10);

	(*move xbot 1 to 60,60*)
	PMC_XYMotion2(PM_Controller := PM_Controller,Execute := PMC_XYMotion1.Done,cmdLB := 4,XbotID := 1,Mode := 0,Type_ := 0,PosX := 0.06,PosY := 0.06,EndVel := 0,MaxVel := 1,MaxAcc := 10);

	(*disconnect xbot 2 from xbot 1*)
	xbotID_array32[0] := 2;
	PMC_PlanetMotionCtrl2(PM_Controller := PM_Controller,Execute := PMC_XYMotion2.Done,Level := 0,StarXID := 1,nXbots := 1,PlanetXID := xbotID_array32);

	(*move xbot 1 to 900,60*)
	PMC_XYMotion3(PM_Controller := PM_Controller,Execute := PMC_PlanetMotionCtrl2.Done,cmdLB := 6,XbotID := 1,Mode := 0,Type_ := 0,PosX := 0.9,PosY := 0.06,EndVel := 0,MaxVel := 1,MaxAcc := 10);

	(*move xbot 1 to 60,60*)
	PMC_XYMotion4(PM_Controller := PM_Controller,Execute := PMC_XYMotion3.Done,cmdLB := 7,XbotID := 1,Mode := 0,Type_ := 0,PosX := 0.06,PosY := 0.06,EndVel := 0,MaxVel := 1,MaxAcc := 10);

	Done := PMC_XYMotion4.Done;
END_FUNCTION_BLOCK
