01-11-2013 11:03 AM
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
01-14-2013
11:28 AM
- last edited on
10-31-2024
12:34 PM
by
Content Cleaner
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: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MXxSAM&l=en-US
You may find the following documents helpful also:
https://www.ni.com/en/support/documentation/supplemental/21/using-ni-daqmx-in-text-based-programming... - Using NI-DAQmx in Text Based Programming Environments
https://www.ni.com/en/shop/electronic-test-instrumentation/programming-environments-for-electronic-t... - LabWindows/CVI Real-Time: Bringing Mission-Critical Reliability and Determinism to ANSI C Programmers
Many thanks,