LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concatonate TDMS file data to live data

I am monitoring 20 or 30 channels at any given time and storing all data to a TDMS file (LV 8.6). At any given time we are only displaying 3 channels on a waveform chart. The chart displays 5 minutes of data. say for the first minute I am viewing channels 1, 2, & 3. Then I switch over to 4 - 6 but in addition to the live data coming in I want to see what has happened since the test started a minute ago (or up to 5 minutes ago), as if I had been viewing these three channels all along.

What I have tried is to read the stored data from the TDMS file, copy the most recent data (up to 15K samples = 5 min at 50Hz). Then I take the live acquired waveforms, break out the array of  Y values, concatonate with the Y values from file and rebuild the wavform. But it isn't workin. Seems like it should but I don't know what is wrong.

Any ideas?

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 10
(3,470 Views)
In the JPEG below, the old data should appear to the right of the sweep bar slowly being overwritten. I do notice that the time stamps are initially correct but are wrong after I append the extra/past data to the live array. Do I need to dynamically change t0? maybe to the current time minus 500 seconds?
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 2 of 10
(3,466 Views)
okay, any suggestions would be appreciated, but I seem to have another issue: my time stamps seem to be 26 hours in the future. think there is some underlying problem here that I may need to resolve first.
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 3 of 10
(3,457 Views)

lmd2 wrote:
okay, any suggestions would be appreciated, but I seem to have another issue: my time stamps seem to be 26 hours in the future. think there is some underlying problem here that I may need to resolve first.

1) Never analyze your data before you collect it. Smiley Tongue

 

2) The TDMS file viewer uses the "t0" times from when the data was collected. If you see this in your code, there are function on the Waveform data type palette that will let you paste new dat to the end of old.

 

3) "Ignore attribute" (chart property) will ignore the attributes of "t0" when plotting.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(3,452 Views)

Thanks Ben

the issue with the future data was my fault (obviously) while deconstructing and reconstructing the waveform data type I mistakenly wired the freq (50) instead of dt (.02)

so my files are correct again ...

I don't see any function on the waveform palatte for concatonating recalled data with live.

btw I do see a function for indexing a waveform from an array of  waveforms, should I not be using the normal index array function?

 thanx

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 5 of 10
(3,446 Views)

Thanks Ben

the issue with the future data was my fault (obviously) while deconstructing and reconstructing the waveform data type I mistakenly wired the freq (50) instead of dt (.02)

so my files are correct again ...

I don't see any function on the waveform palatte for concatonating recalled data with live.

btw I do see a function for indexing a waveform from an array of  waveforms, should I not be using the normal index array function?

 thanx

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 6 of 10
(3,446 Views)
well I tried using the "ignore attributes" property, both above the 'value' property, and below (top down ordering - didn't make any difference). Also I verified that the data is being concatonated; normally we are adding one point to the plot every 50mS, when we toggle to a different set of channels, the Y component of the waveform is not an array of one element but of (in this shot anyway) over 9000 elements. the screne seems to flash with a block of data and then the plot resumes filling 1 point at a time from the present time stamp. Maybe I can set an attribute of the x axis to be an earlier timestamp based on the number of points in the Y array?
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
Download All
0 Kudos
Message 7 of 10
(3,418 Views)

Still no luck, I noticed that on the Chart Properties Dialog box, on the scales tab is a check box "Ignore waveform time stamp on x-axis" but I am unable to check the check box (not sure that it would help, but it seemed like it would be worth a try). any ideas why that check box might be inactive? On the dispaly format tab I have selected absolute time (could be a factor) but if I select relative time I lose the timestamp on the x-axis and instead get some huge # - probably seconds since 1/1/1907 or whenever that date was. So if we need it to look like a time stamp, seems 'absolute time' must be selected?

I tried to coerce the timestamp on the left side of the x-axis, but the properties for both Range:minimum, and Range:start both accept dbl not time stamps. I also checked the Chart History Length buffer size = 45K I don't think that needs to be changed.

viewing the concatonated data seems like it should be doable, but I running out of things to try

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 8 of 10
(3,407 Views)

I have just noticed that during the initialization, the waveform chart reference is being cast to a more specific class when some properties are being set. I am not sure why or whether this is a good thing or a bad thing, or how it may affect my current dilema. Please see the screen shot below.

Can anyone explain why this is being done and if it is related to what I am trying to do.

thanx

lmd2

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 9 of 10
(3,402 Views)

Hi Lawrence,

 

You got a lot of questions here, so let me see if I can answer some of them. 

 

1) If you look at the block diagram of the Waveform index VI, you'll see it's pretty much using the normal index array VI.

2) In regards to the "to more specific class", if you press ctrl-H and hover over the wire before and after the VI, you should see that the reference type is different.  If it's not, then you don't need it and should be able to connect directly to the property node.

 

I hope this helps!  Let me know if there are still some specific question left unanswered.

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 10 of 10
(3,363 Views)