Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 41 by
mhis...@gmail.com: Add AnalogOutput status calls
http://code.google.com/p/pylibnidaqmx/issues/detail?id=41
I'm attaching a patch that adds the GetWriteCurrWritePos() and
GetWriteTotalSampPerChanGenerated() calls.
These are useful for getting the status of an AnalogOutput task while it's
running.
I put them in the Task base object. Perhaps these should be split into
AnalogOutput and the corresponding GetRead calls should be in AnalogInput.
Thanks,
Mark
diff --git a/nidaqmx/libnidaqmx.py b/nidaqmx/libnidaqmx.py
index a349b72..d7e86d4 100644
--- a/nidaqmx/libnidaqmx.py
+++ b/nidaqmx/libnidaqmx.py
@@ -2556,6 +2556,26 @@ class Task(uInt32):
CALL('GetReadTotalSampPerChanAcquired', self, ctypes.byref(d))
return d.value
+ def get_write_current_position(self):
+ """
+ Indicates the position in the buffer of the next sample to
generate.
+ This value is the same for all channels in the task.
+ """
+ d = uInt64(0)
+ CALL('GetWriteCurrWritePos', self, ctypes.byref(d))
+ return d.value
+
+ def get_write_samples_per_channel_generated(self):
+ """
+ Indicates the total number of samples generated by each
+ channel. NI-DAQmx returns a single value because this value is
+ the same for all channels.
+ """
+ d = uInt64(0)
+ CALL('GetWriteTotalSampPerChanGenerated', self, ctypes.byref(d))
+ return d.value
+
+
def wait_until_done(self, timeout=-1):
"""
Waits for the measurement or generation to complete. Use this
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings