Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

6210/6218 USB: real-time sampling and control application

Dear NI support team/ forum,

We are trying to port over a real-time sampling and control application for research purposes (Windows XP, Visual C++ 6.0). The typical use case for the application is to read voltages from a number of analog channels, process the inputs and output them over a small number of analog/digital outputs. This control sequence is highly time critical and takes place within a time resolution of 2 ms.

Our earlier application was built using the S626 Sensoray PCI Card (data acquisition device). We used the device to generate interrupts every 2 ms, which was used to form the timing for our control sequence.

We now are looking to port our application over using the NIDAQ 6210/6218 USB cards. We are a little confused about which events we could use within the NIDAQmx ANSI C libraries to implement an interrupt and/or timer callback function which we could then use to implement our control sequence. We would appreciate any help in pointing us towards the right direction/functions/event handlers. Also is there any way of obtaining multiple clocks sourced from the internal clock of the device?

Best,
Naveed and Tobias

0 Kudos
Message 1 of 2
(5,183 Views)

Hi Naveed and Tobias,

 

Thank-you for your post and welcome to the NI forums.

 

As I understand, you have a time-critical piece of code (control of some hardware) which needs to operate every 2ms (or do you mean that it needs to operate to within a time error of 2ms?). I would recommend using retriggering so you can have the required delay and then trigger the I/O. Making it retriggerable obviously just means that you can trigger events more than once.

 

Please take a look at this example which would be suitable for modifying: http://zone.ni.com/devzone/cda/epd/p/id/2415.

 

You may find the following documents helpful also:

http://www.ni.com/white-paper/5409/en - Using NI-DAQmx in Text Based Programming Environments

http://www.ni.com/white-paper/3591/en - LabWindows/CVI Real-Time: Bringing Mission-Critical Reliability and Determinism to ANSI C Programmers

 

Many thanks,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 2 of 2
(5,155 Views)