06-23-2011 04:06 PM
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
06-23-2011 04:45 PM - edited 06-23-2011 04:45 PM
Look at the Autocorrelation VIs in the Signal Processing palette --> Point-by-Point.
06-27-2011 12:35 PM
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
06-28-2011 10:26 AM
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
06-28-2011 11:27 AM
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
06-29-2011 03:17 PM
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.
01-12-2012 04:36 AM
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!
01-12-2012 07:22 AM
Do you mean the continuous button on the toolbar?
01-12-2012 09:12 AM
I mean setting a task in a continous reading.
Thanks
01-12-2012 10:51 AM
You should start a new thread with a description of the problem or inquiry. Be as detailed as possible.