
(* any flyway configuration 50 xbots - PMC_ConfigFBStreamExtended, PMC_ReadStreamFeedbackExtended, PMC_ReadXbotSpeed *)
FUNCTION_BLOCK Example31_extendedfeedback
	//setup extended feedback streaming
	XbotIDs[0] := 1;XbotIDs[1] := 2;XbotIDs[2] := 3;XbotIDs[3] := 4;XbotIDs[4] := 5;XbotIDs[5] := 6;XbotIDs[6] := 7;XbotIDs[7] := 8;XbotIDs[8] := 9;XbotIDs[9] := 10;
	XbotIDs[10] := 11;XbotIDs[11] := 12;XbotIDs[12] := 13;XbotIDs[13] := 14;XbotIDs[14] := 15;XbotIDs[15] := 16;XbotIDs[16] := 17;XbotIDs[17] := 18;XbotIDs[18] := 19;XbotIDs[19] := 20;
	XbotIDs[20] := 21;XbotIDs[21] := 22;XbotIDs[22] := 23;XbotIDs[23] := 24;XbotIDs[24] := 25;XbotIDs[25] := 26;XbotIDs[26] := 27;XbotIDs[27] := 28;XbotIDs[28] := 29;XbotIDs[29] := 30;
	XbotIDs[30] := 31;XbotIDs[31] := 32;XbotIDs[32] := 33;XbotIDs[33] := 34;XbotIDs[34] := 35;XbotIDs[35] := 36;XbotIDs[36] := 37;XbotIDs[37] := 38;XbotIDs[38] := 39;XbotIDs[39] := 40;
	XbotIDs[40] := 41;XbotIDs[41] := 42;XbotIDs[42] := 43;XbotIDs[43] := 44;XbotIDs[44] := 45;XbotIDs[45] := 46;XbotIDs[46] := 47;XbotIDs[47] := 48;XbotIDs[48] := 49;XbotIDs[49] := 50;
	PMC_ConfigFBStreamExtended1(PM_Controller := PM_Controller,Execute := Execute,nXbots := 50,XbotID := XbotIDs);

	//read position/speed of xbot 31
	PMC_ReadXbot31X(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 31,XBotAxisID := 1);	
	PMC_ReadXbot31Y(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 31,XBotAxisID := 2);
	PMC_ReadXbot31Z(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 31,XBotAxisID := 3);
	PMC_ReadXbot31Speed(Enable := PMC_ConfigFBStreamExtended1.Done,FeedbackType := 1,ID := 31,PM_Controller := PM_Controller);
	X31 := PMC_ReadXbot31X.FeedbackValue;
	Y31 := PMC_ReadXbot31Y.FeedbackValue;
	Z31 := PMC_ReadXbot31Z.FeedbackValue;
	
	//read position/speed of xbot 42
	PMC_ReadXbot42X(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 42,XBotAxisID := 1);
	PMC_ReadXbot42Y(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 42,XBotAxisID := 2);
	PMC_ReadXbot42Z(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 42,XBotAxisID := 3);
	PMC_ReadXbot42Speed(Enable := PMC_ConfigFBStreamExtended1.Done,FeedbackType := 1,ID := 42,PM_Controller := PM_Controller);
	X42 := PMC_ReadXbot42X.FeedbackValue;
	Y42 := PMC_ReadXbot42Y.FeedbackValue;
	Z42 := PMC_ReadXbot42Z.FeedbackValue;
	
	//read position/speed of xbot 50
	PMC_ReadXbot50X(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 50,XBotAxisID := 1);
	PMC_ReadXbot50Y(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 50,XBotAxisID := 2);
	PMC_ReadXbot50Z(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := 50,XBotAxisID := 3);
	PMC_ReadXbot50Speed(Enable := PMC_ConfigFBStreamExtended1.Done,FeedbackType := 1,ID := 50,PM_Controller := PM_Controller);
	X50 := PMC_ReadXbot50X.FeedbackValue;
	Y50 := PMC_ReadXbot50Y.FeedbackValue;
	Z50 := PMC_ReadXbot50Z.FeedbackValue;
	
	//read position/speed of any xbot
	PMC_ReadXbotAnyX(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := AnyXID,XBotAxisID := 1);
	PMC_ReadXbotAnyY(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := AnyXID,XBotAxisID := 2);
	PMC_ReadXbotAnyZ(PM_Controller := PM_Controller,Enable := PMC_ConfigFBStreamExtended1.Done,XbotID := AnyXID,XBotAxisID := 3);
	PMC_ReadXbotAnySpeed(Enable := PMC_ConfigFBStreamExtended1.Done,FeedbackType := 1,ID := AnyXID,PM_Controller := PM_Controller);
	XAny := PMC_ReadXbotAnyX.FeedbackValue;
	YAny := PMC_ReadXbotAnyY.FeedbackValue;
	ZAny := PMC_ReadXbotAnyZ.FeedbackValue;
END_FUNCTION_BLOCK
