
(* Rising edge triggered wrapper of the ReadXbotState command *)
FUNCTION_BLOCK CheckXbotState
	IF(Execute = FALSE)THEN
		Done := FALSE;
		ReadXbotState(Enable := FALSE,PM_Controller := PM_Controller);
	END_IF;

	IF(Execute = TRUE AND Done = FALSE)THEN
		Done := TRUE;
		ReadXbotState(Enable := TRUE,PM_Controller := PM_Controller,XbotID := XbotID);
		Valid := ReadXbotState.Valid;
		State := ReadXbotState.State;
	END_IF;
END_FUNCTION_BLOCK
