From 17f61b8e2929622eb5f72b8fe3faf265a9cc3eaa Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 21 Apr 2015 16:23:09 +0800 Subject: [PATCH] pxi6733: minor fixes --- artiq/devices/pxi6733/driver.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/artiq/devices/pxi6733/driver.py b/artiq/devices/pxi6733/driver.py index 77cfb3078..b15e8df6b 100644 --- a/artiq/devices/pxi6733/driver.py +++ b/artiq/devices/pxi6733/driver.py @@ -35,7 +35,7 @@ class DAQmx: configures a task to output those samples at each clock rising edge. - A callback is registered to clear the task (unallocate resources) + A callback is registered to clear the task (deallocate resources) when the task has completed. :param values: A numpy array of sample values to load in the device. @@ -52,10 +52,10 @@ class DAQmx: self.daq.DAQmx_Val_GroupByChannel, values, byref(num_samps_written), None) if num_samps_written.value != len(values): - raise Exception("Error: only {} sample values were written" - .format(num_samps_written.value)) + raise IOError("Error: only {} sample values were written" + .format(num_samps_written.value)) if ret: - raise Exception("Error while writing samples to channel's buffer") + raise IOError("Error while writing samples to the channel buffer") done_callback = self.daq.DAQmxDoneEventCallbackPtr(done_callback_py) self.tasks.append(t.taskHandle)