From 966d0ee3f255ea75c6fa1b38d674ff83f889d9e4 Mon Sep 17 00:00:00 2001 From: Yann Sionneau Date: Fri, 14 Aug 2015 10:36:03 +0200 Subject: [PATCH] pxi6733: fix verification of the number of buffered sample values --- artiq/devices/pxi6733/driver.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/devices/pxi6733/driver.py b/artiq/devices/pxi6733/driver.py index 22839ee04..2d139dc85 100644 --- a/artiq/devices/pxi6733/driver.py +++ b/artiq/devices/pxi6733/driver.py @@ -115,9 +115,9 @@ class DAQmx: ret = t.WriteAnalogF64(samps_per_channel, False, 0, self.daq.DAQmx_Val_GroupByChannel, values, byref(num_samps_written), None) - if num_samps_written.value != nb_values: - raise IOError("Error: only {} sample values were written" - .format(num_samps_written.value)) + if num_samps_written.value != samps_per_channel: + raise IOError("Error: only {} sample values per channel were" + "written".format(num_samps_written.value)) if ret: raise IOError("Error while writing samples to the channel buffer")