ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ event support

Hi!

Right now I am using two NI USB-6009 devices and LabWindows/CVI 8.0 program to write data acquisition application. My program is doing continous polling (reading) to get data. My question is, is it possible to write event based program, so it only performs callback functions of external events supported by DAQ devices. If the USB-6009 device not supports DAQ events then can You suggest some other USB DAQ device, which supports it. Also this device must have at least 10 analog inputs and 30 digital inputs, sampling rate do not have to be high (USB-6009 48 kS/s is very OK). Is there any good example or tutorial how to write event based LabWindows application?

Thanks
0 Kudos
Message 1 of 4
(3,443 Views)

Hello Peeter,

Thank you for posting to the Discussion Forums. I see that you are trying to use your USB-6009 with LabWindows/CVI 8.0 and you want to use DAQ events and occurances. You will not be able to do that with our USB devices. USB devices are supported by our DAQmx driver only and DAQmx no longer utilizes DAQ occurances and events. 

You may want to look into triggering, timed loops for real-time applications. Let us know if you have any additional questions, we'd be glad to assist you.

Regards,
  Sandra T.

Applications Engineer | National Instruments

 
0 Kudos
Message 2 of 4
(3,418 Views)

Hi Peeter,
Most NI-DAQmx USB devices like the 6009 do not support Timed Loop because the Timed Loop is intended for real-time applications and latency over the USB bus is long (typically > 1 ms) and too jittery. 

However, you can use DAQmx devices in the LabVIEW event structure.  Event structure support is included in DAQmx 7.4 and later.  DAQmx includes examples that show how to use events in the event structure.
 
About the LabVIEW event structure:
 
https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/structures/event-structure.html

If you really need occurrences to tie into the rest of your application, your best bet is to create your own loop that calls DAQmx read.  Every time the read completes, you can fire off an occurrence.  This approach will work well with DAQmx because it is a multithreaded driver.  (This approach would not have worked well with Traditional NI-DAQ).
 
Hope this helps,
Jonathan
0 Kudos
Message 3 of 4
(3,410 Views)

Thank You for replies.

I have done in my application a separate thread with loop that reads DAQmx read, but it still seems to be too slow. I think one reason is that I am using two USB 6009 devices, so during every loop iteration the separate thread must read 2 times analog inputs and 2 times digital inputs. Does it means that the latency over the USB bus is 4 times longer? If it is so, is it wise to by a bigger (so I do not need 2 devices) and better USB device? What are suggestions and is there any NI-DAQmx USB device that supports timed loop?

Peeter

0 Kudos
Message 4 of 4
(3,388 Views)