Starts the task and waits until it is done.

def StartAndWait(self):
        """Starts the task and waits until it is done."""
        self.StartTask()
        self.WaitUntilTaskDone(pydaq.DAQmx_Val_WaitInfinitely)
        self.ClearTask()