Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Ni6009 questions

I am building a simple acquisition program using NI6009 device, and encountered some problems.
The acquisition is simply writing the acquired data in a text file, one column per configured channel.
The problem is that the library seems to fail with a fifo overflow error (DAQmxErrorInputFIFOOverflow2, -200361) when using 2 channels at > 22000 samples per second. The actual limit may vary a little, but usually if it failed once than all next runs fail (even with much lower rates) until disconnect/reconnect the device.
The acquisition runs in it's own thread, and it is not disturbed by anything in the GUI.
The device should support this data rate. Actually the delivered application (DataLogger) can record some data at this speed for a few seconds, but it also reports the same error (attached).
I am building the program based on NIDAQMxBase dll (using Delphi and translated header file, but that is not very different compared to C/C++). Looking at the dll dependencies I can see that it is a wrapper for the labview runtime, which might introduce and extra wrapper level in our application.
Looking at the system resources with a specialized tool (taskinfo) I see that the process takes ~17000 windows handles (mainly events), where the whole system before loading the dll had ~9000.
Only the dll loading takes a few seconds on a pretty fast machine (AMD XP 2400+, 1GB RAM); I believe that this overhead is a little too much for simple applications like the ones we need.

Now the questions:
- can I improve somehow the performance?
- is it possible to use direct calls to the device? I am thinking about some kind of direct calls using Visa or VisaCOM; we succesfully build other visa based applications using Agilent devices. If possible, where can we find such information (I see that the device is reported in MAX as a USB raw resource)?
I used NISpy and I saw that all calls are translated to vi calls; so I hope there might be a solution.

Thanks for attention,
Gabriel
0 Kudos
Message 1 of 2
(4,019 Views)
Since Version 7.5 the USB-9006 is supported in NI-DAQmx. I would recommend to get NI-DAQmx 7.5, install it on your machine, and use the DAQmx API to program your device.
 
How you can call the DAQmx API from Delphi you can find here:
 
 
As the DAQmx C API calls directly to the driver dll, there is no LabView Runtime in between, and you should get peter performance-results.
 
Check this Link to see what you have to do to make it possible using the USB-6009 with DAQmx:
 
 
Hope this helps.
0 Kudos
Message 2 of 2
(4,010 Views)