LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2010 - Display data in real-time, but only save the data once a button is pressed?

I tried out what JohnCS said to do and it worked perfectly. I added in changing the "Section Headings" to "Only One Heading" which allocated it to a single spreedsheet. Now that everything is working, I have a question just to make things work a tad nicer. Is there a way that I could have it append to the file until it reaches X seconds worth of data and then have it create a new file until that one reaches X seconds? This would increase decrease the import time into Excel for me.

 

Other than that, do you guys know of any knowledge banks that might have some information on creating an autocorrelation VI for Labview? I can always export it and do it in MatLab, but I'd rather be able to show it in real time.

 

Thanks for all your help so far!

 

Warm Regards,

Joseph Glaser 

 

0 Kudos
Message 11 of 35
(2,700 Views)

Look at the Autocorrelation VIs in the Signal Processing palette --> Point-by-Point.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 12 of 35
(2,696 Views)

Hey everyone,

 

Thanks for all your imput so far. I'm now able to collect data and display it more or less the way I wished. The question I now have is with the autocorrelation function for LabView.

 

For my data, I am autocorrelating a normalized postition over time data set in order to determine its mean-squared displacement. The function as described by L. Wilson of the University of Edinburgh is:

⟨Δx^2(T)⟩ = 2σ^2 - ⟨x(t)*x(t+T)⟩

 

Where σ^2 is the variance and the angle brackets mean averages over all values of t. Now my question lies in how I can take my exported .tdms file, have LabView read it, then compute the function, and finally export the data. The variance shouldn't be hard to have Labview do, but the shifting involved for the lag of the autocorrelation is where the problem starts occuring. Any ideas would be helpful.

 

Warm Regards,

Joseph Glaser

 

 

 

 

 

0 Kudos
Message 13 of 35
(2,661 Views)

Joseph,

 

I'm not entirely sure what your function looks like, because not all of the symbols showed up correctly.  However, I think the following resources will be helpful for the basics of what you are trying to accomplish.

 

Shift Registers - "Lag" - Remebering previous iteration values:

http://zone.ni.com/reference/en-XX/help/371361G-01/lvhowto/using_shift_registers_to_r/

https://decibel.ni.com/content/docs/DOC-12597

 

Reading from TDMS Files

Low level:https://decibel.ni.com/content/docs/DOC-16128

Express:http://zone.ni.com/reference/en-XX/help/371361G-01/lvexpress/read_lv_measurement_file/

 

Good Luck

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 14 of 35
(2,634 Views)

Hey Drew,

 

Thanks for the links. I was unware of Shift Registers. That may be slightly helpful. Below is my current set up for the postition tracker. Autocorrelation can be seen at the middle-top.

 

The equation is simply two times the variance minus two times the autocorrelation. This gives me the mean-squared displacement. However, currently this signal gives me a solid line over 10000 timesteps at zero with a negative spike at t=5000 which is the same as when the a laser is on or off. Any ideas why this is?

 

Warm Regards,

Joseph Glaser

 

 

0 Kudos
Message 15 of 35
(2,629 Views)

Joe,

 

I'm not sure what is going wrong in your VI, but it may have to do with mixing the point by point Autocorrelation with the regular Variance.  Please see the attachment for some examples of working autocorrelation VIs.

Drew T.
Camber Ridge, LLC.
0 Kudos
Message 16 of 35
(2,605 Views)

Hi all,

 

I'm doing the same task, and I have accomplished it, with che continous task reading. It works but is it a good way for it?

 

Thanks

 

Bye!

0 Kudos
Message 17 of 35
(2,427 Views)

Do you mean the continuous button on the toolbar?

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 18 of 35
(2,424 Views)

I mean setting a task in a continous reading.

 

Thanks

 

 

0 Kudos
Message 19 of 35
(2,417 Views)

You should start a new thread with a description of the problem or inquiry.  Be as detailed as possible.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 20 of 35
(2,411 Views)