forked from M-Labs/artiq
1
0
Fork 0

pxi6733: minor fixes

This commit is contained in:
Sebastien Bourdeauducq 2015-04-21 16:23:09 +08:00
parent 9b87933287
commit 17f61b8e29
1 changed files with 4 additions and 4 deletions

View File

@ -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"
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)