Skip to content

Commit 1c377cc

Browse files
NI_DAQmx: Bugfix: Update check if all DOs are zero to work with the unstructured array.
1 parent 5161201 commit 1c377cc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

NI_DAQmx/blacs_workers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,7 @@ def program_buffered_DO(self, DO_table):
205205
# Check if DOs are all zero for the whole shot. If they are this triggers a
206206
# bug in NI-DAQmx that throws a cryptic error for buffered output. In this
207207
# case, run it as a non-buffered task.
208-
self.DO_all_zero = all(
209-
DO_table[port].sum() == 0 for port in DO_table.dtype.names
210-
)
208+
self.DO_all_zero = not np.any(DO_table)
211209
if self.DO_all_zero:
212210
DO_table = DO_table[0:1]
213211

0 commit comments

Comments
 (0)