LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Add date and time stamp to continuously streaming data

Solved!
Go to solution

Hi all,

 

I am new to the LabView Environment and I am trying to setup a program to perform the following:

1. Prompt users to select an experiment 

2. Display prompt messages to guide the users through an experiment

3. Collect Data from NI-DAQ in continuous mode.

 

I have completed task 1 and 2 but for task 3, I want to add time stamp adjacent to each data acquired. But I have not been able to do so. Please suggests what changes can I make to the attached VI to achieve my goals. 

 

PS: Any suggestions on making the VI better would be highly appreciated.

 

Thanks 

 

0 Kudos
Message 1 of 3
(1,428 Views)
Solution
Accepted by parajulis

I would try using the waveform instance of DAQmx Read to get time from the data acquisition system (and to time your loop). A little rearranging of the string manipulations, and here is an implementation that may work for you:

 

DAQ Loop with Write to File.png

 

which produces a file like:

DP1 DP2 DP3 P1 8:02:26 PM 4/23/2021
0.0250 0.0250 0.0250 0.0250 8:02:37 PM 4/23/2021
0.0250 0.0250 0.0250 0.0250 8:02:38 PM 4/23/2021
0.0250 0.0250 0.0250 0.0250 8:02:39 PM 4/23/2021

...

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 2 of 3
(1,396 Views)

Thank you Doug,

 

That worked very well. 

0 Kudos
Message 3 of 3
(1,344 Views)