LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Append time to measurement

Hi`all,

 

I got a small problem, i`m trying to do a measurement with a device which only generates data (it doesn`t send the real time of the measurement). Now i have to append a time to it in labview.

 

Everytime the read.vi measures, it reads in 25 values (these 25 values are in an array). For every value the read.vi produces there should be a time-value. I was thinking of a way that when the read.vi starts measuring, it triggers a loop that makes 25 time values. Something with parallel loops maybe?

 

There is a sample.vi in the appendix of how my program should look if it works correct.

 

Thank you all!

--------------------------------------------------
Currently using labview 8.2.1
0 Kudos
Message 1 of 3
(2,606 Views)

Your example VI doesn't seem to be a good representation of what you are trying to do.

 

But yes, you could use another loop, I would say a For Loop since you know you are trying to get 25 time values to build an array of times.  The only other thing you will need to know is what is your time interval between each of those 25 values so you can factor that into the calculation of the times.

0 Kudos
Message 2 of 3
(2,599 Views)

If your data rates are not too high, there's a simple way to do this.  Create a User Event so that every time you acquire a data point, you raise a User Event using the data.  The Event loop includes a high-precision clock, so you effectively get an automatic time-stamp of your data.  [Of course, that's the other way to do this -- whenever you acquire your data, generate a Time Stamp using the Timing VIs].

 

I recently programmed a touch screen for a behavioral task.  Every time the user touched (or "untouched") the screen, the location of the touch was generated (the data) and I used the Event loop scheme to give me the time of the touch.

 

0 Kudos
Message 3 of 3
(2,581 Views)