Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

[C/C# w/ MS] Acquire data and duration [NI USB-6251]

Hello,

I’m new in NI world, I’m a graduate student in his last year, and I’m doing my placement in a company from Liège (Belgium).

I’m working with a NI USB-6251, in C/C# without Measurement Studio, and I’ve to acquire data from a sensor for automatic door, and process them to display the duration of detections and so.

So I’m trying to understand how does the card work, I’m used to do real-time application in C on RTOS like QNX, but this time, I’ve got to do it under Windows with the NI USB-6251 and I’m a bit lost.

Like I said I’ve got to acquire data from a sensor, in a first time I’m working with digital pulse and have to measure them.

I’ve realize that even in C/C# the NI USB-6251 is working like a task that I’ve got to set up and I don’t have any control on it, but I can’t figure out how to set up the task.

For me I’ve got to:
•    Create a task
•    Wait for edge detection
•    Measure the edge duration
•    Store the data into internal buffer
•    At a determinate time (buffer full, after X seconds...) acquire data from the NI USB-6251 and the card must keep on reading data.

In real-time C it isn’t too difficult to do, but I don’t understand how I’ve got to set up my task.
I’m reading the sample giving with the DAQmx and trying to understand but it’s not so easy.

Thanks for your help.

I’ve also made a topic Topic in French



Vincent.
Belgian student doing his placement, trying to speak English...
Trying to use NI USB-6251 with C# w/ Measurement Studio.
0 Kudos
Message 1 of 1
(3,582 Views)