Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Time sample from Daq read

Hi,
 
 
I am wondering if there is property that specifies the exact time a sample was read. I am coding in C#.   I was looking at the provided samples and it calls AsyncCallback function but I believe this just returned the data read.  I tried getting a TickCount and then dividing that by the total samples but I notice that anything I do while running the program will not return the read data at the same time.  I would like to call a Syncronized function or if whatever is collecting the data can also record the time that would be great because even if there is a delay on retrieving the data it would have a time stamp along with it.  Any help would be appreciated.  Thank you.
 
 
 
0 Kudos
Message 1 of 2
(3,197 Views)

Hi Danny P,

If I understand you correctly, you want to have a timestamp for each data point that you acquire.

If you read your data in as a waveform, you can access timing information from the acquisition. You must set the Timing enumeration of the WaveformAttributeModes property to gather the time data and include it with your waveform data.

Alternatively, there is a GetTimeStamps function in the WaveformTiming Class in Measurement Studio that can extract this information from a waveform.

Please post back if you have any questions. Have a great day!

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 2 of 2
(3,173 Views)