LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform graph - How to store data without timestamp

Hi everyone - it's me (again) *sigh*

I am currently retrieving traces from a agilent spectrum analyzer. These traces can start somewhere at 15MHz and end at 19MHz (just as an example).

Now I can do the following: Get the data (Y values), get the start frequency and get the stop frequency. From these I can retrieve the startT, deltaT and Y values, whereas these are not time values but frequency values. I can then feed this triple into cluster into a waveform graph, which displays the data perfectly. Until here, everything is fine.
Now I want to save that data into a file. I thought I could use this tdm format, because it would be an automatic process and could save me some time, BUT this requires a waveform format as input. Now this is something I do not really have, because I do not have a timestamp or anything similar in the frequency domain and my values don't necessary start from 0.
I am asking you, which would be the best way to save this information. I have three different graphs with three channels each. They should be logically kept together tight. Is there some way to do that or do I have to save Y - values separated from start/stop values?

TIA
Thomas
0 Kudos
Message 1 of 6
(4,423 Views)
Thomas,

the issue you are seeing is that the data is represented/interpreted in different ways. So i best start with some introduction:
Each signal consists of samples which are stored in an array. The problem here is that you have no info about the start/end nor the increment. So there is another datatype: Waveform. This contains the data-array  as well as the start-"time" and the increment. The end-"time" is the result of start+(number of elements in array)*increment-increment.
The waveform-datatype always presumes that the start and increment refers to time. And this is your issue here.
So the solution would be to store only the array and create a second channel for the frequence-information. TDM fits very good for this since you can group your channels together in channelgroups just like you want to.

hope this helps,
Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 6
(4,414 Views)

Hi Thomas

Just to add to Norbetts good advice...

I have built an example in LV8 that saves 3 waveform graphs to a tdm file using Write To Measurement File and Read from Measurement File. You could also look at the Storage VI examples too for saving and retrieving your data.

Basically you can use your waveform data type without any problems. All you need to do is right click on the graph and make sure that ignore timestamp is deselected so that it is displayed correctly.

Hope this helps...

David

Message 3 of 6
(4,410 Views)
@Norbert: Thank you, that was just what I was thinking. It's good to hear that I didn't miss something important. I have used waveforms before, but always in the time domain, where this problem didn't arise. I never really thought about it, because it did exactely the job it was supposed to 🙂 Now when this problem came up, I was unsure how to handle the date in this case. Thank you again.

@David: Thank you for your example, I will immediately look at it and get the information I need.

0 Kudos
Message 4 of 6
(4,405 Views)
@David:

I tried to rebuild your example. I also used the "To Timestamp" to get a valid waveform, but when I feed the resulting waveform into a waveform graph, it starts from zero and not from the value I wired to the t0. Could you explain why it works in your example and why it doesn't in mine? Has that something to do with the waveform being converted to a dynamic signal type or am I missing some point. I attached a image of my part.


0 Kudos
Message 5 of 6
(4,395 Views)
Never mind, I just found out there are 2 places where you can uncheck "Ignore Timestamp" and I forgot about one of them .. sorry 🙂

0 Kudos
Message 6 of 6
(4,391 Views)