08-25-2013 07:58 AM
Hi,
Is there any way to improve the performance we're getting with DAQmxWriteRaw under Visual C++ 2012 (32-bit and 64-bit)? We're using a USB-6501 with a program that creates a task, creates a digital output channel for port 0, starts the task, and sends software-driven events to one of our hardware devices by sending one 8-bit sample per event to the digital output channel using DAQmxWriteRaw, but we're averaging 0.955ms (min 0.536ms, max 1.5ms) latency for the function call over a 3-minute run with about 500 events.
I've attached a minimal program that exactly demonstrates our performance problem for reference.
Thank you,
Brian
08-27-2013 10:21 AM
Hello BrianUW,
If you only do a single write to the port, without using the software-driven event, how much time does it take? Depending on the operating system, using software-driven events will not be deterministic, which might explain the average time range you provided.
08-27-2013 11:22 AM
That's a good question. In the write_performance.c attachment on the original post, I'm just sending each byte from 1 through 255 and timing the calls to DAQmxWriteRaw, which produces the same kind of performance as the code that used software-driven events on Windows 7 (64-bit version), but with a much tighter standard deviation. I'm really hoping to be able to drop from an average per call of around 0.9ms to <0.1ms, I have no idea if that's possible with this device...
Brian
08-28-2013 03:56 PM
Hi BrianUW,
Looking at benchmark results for the USB-6501, all results yielded an average update interval of 1.0 ms with the DAQmx API. So it sounds like we won't be able to reduce that update rate using this particular device, having in mind as well the benchmarking results that you have so far.