03-07-2014 04:35 PM
Hi,
DAQmxGetWriteTotalSampPerChanGenerated returns an wrong number of scans generated for NI USB-6351 using NIDAQmx driver version 9.8.0f0.
I am generating continuous data at 2.8MS/s, scans generated worked fine for hours, all the way up to 12884886483, then suddenly wrapped around to 8589983846 and continued counting from 2^33 as if nothing happened...
This is different from the following post (http://forums.ni.com/t5/Multifunction-DAQ/DAQmxGetWriteTotalSampPerChanGenerated-returns-wrong-numbe... where the reported number wrapped around 2^32 and started counting from 0 again.
Attached is an NI I/O Trace demonstrating the issue.
It seems that the wrap around 2^32 was fixed in an earlier version of the NIDAQmx driver, but now I'm observing a wrap around 2^33 where the new count started at 2^33...
Observe the highlighted line.
Thanks,
Wael Hemdan
MathWorks
03-10-2014 02:20 PM
Hi whemdan,
I just wanted to ask for some clarification.
Are you asking if this is expected behavior?
Is this behavior an issue to your application?
Has this issue occurred more than one time?
Answers to these question could be helpful as well as anything else you would like to add.
Regards,
03-13-2014 01:01 PM
Hi,
Thank you for the immediate response.
It is important for me to get the correct number of scans generated because I use this number to determine when I need to write more data to the device.
This problem seems to be happening pretty consistently using the NI USB-6351, generating analog output voltage data at the maximum rate (2.85MS/s) and running continuously until the error happens.
This time the number of scans generated reached 12884855967 before wrapping around 2^33.
DAQmxGetWriteTotalSampPerChanGenerated_start1: Configuration settings.
DAQmxGetWriteTotalSampPerChanGenerated_start2: I monitor the number of scans generated and queue more data as needed.
DAQmxGetWriteTotalSampPerChanGenerated_error: For this device, scans generated becomes wrong sometime after 2^33, and I no longer know when to queue more data to keep the generation running.
I do not see this problem with my other device: NI PXIe-4461.
Thanks,
Wael Hemdan
MathWorks
03-14-2014 05:48 PM - edited 03-14-2014 05:48 PM
Please double check to see if your code is applying the correct aritmetic or logic. In the mean time, I will escalate this issue to other engineers in our department as this seems like a very odd and unexpected issue. I will try and get back to you with further results.