forked from M-Labs/artiq
pxi6733: minor fixes
This commit is contained in:
parent
9b87933287
commit
17f61b8e29
|
@ -35,7 +35,7 @@ class DAQmx:
|
||||||
configures a task to output those samples at each clock rising
|
configures a task to output those samples at each clock rising
|
||||||
edge.
|
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.
|
when the task has completed.
|
||||||
|
|
||||||
:param values: A numpy array of sample values to load in the device.
|
: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,
|
self.daq.DAQmx_Val_GroupByChannel, values,
|
||||||
byref(num_samps_written), None)
|
byref(num_samps_written), None)
|
||||||
if num_samps_written.value != len(values):
|
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))
|
.format(num_samps_written.value))
|
||||||
if ret:
|
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)
|
done_callback = self.daq.DAQmxDoneEventCallbackPtr(done_callback_py)
|
||||||
self.tasks.append(t.taskHandle)
|
self.tasks.append(t.taskHandle)
|
||||||
|
|
Loading…
Reference in New Issue