LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save waveform data into TDM with X-axis offset

Hi guys,

 

I have a IV that is supposed to display spectral data and save them into multiple TDM files. I have done this via waveform graph and Write To Measurement (WTM) File Express VI and everything works fine except one thing.

Since graph and WTM VI are located in different loops, signal coming into WTM VI is read from local variable, into which the data are sent from the waveform graph (see picture). In this graph, I used a property node to set an X-axis offset. However, although the waveform is shifted correctly in the graph, in generated TDM files there is no offset at all.

Is there any way, how to make WTM VI save waveform data with the offset?

 

Thank you for any advice,

Martin

0 Kudos
Message 1 of 4
(2,211 Views)

Hello,
your assumption that the graph scale offset modifies data is wrong. Basically it changes (adds offset) on the graph's scale only without touching the data. What you need is to add your offset to your data.
I can also recommend you to avoid using local variables for passing data between the loops and use queues instead. I am sending you example VI for inspiration...
Good luck!

 

Ondřej K.

NIEE AE

CLA, CTA, CLED
0 Kudos
Message 2 of 4
(2,175 Views)

Hi Ondro, thanks for the replay!

Ok, now I understand why my VI doesn't work correctly. I checked your VI but it's making Y axis offset - what I need is X axis offset hovewer. Like time shift, but the problem is that my waveform contains spectral data so the X axis shows wavelength instead of time. I tried to simply adjust the offset by setting t0 attribute in Build Waveform function, but the desired input is Time Stamp which I haven't found compatible with the wavelength values.

 

Thanks for the recommendation about queues - I had used them in this VI at the first place but I found that in this particular case local variables work as good as queues;)

0 Kudos
Message 3 of 4
(2,167 Views)

Hi,
sorry - my mistake... however the idea is the same. I would recommend you to check the Wfm palette I'm pretty sure you will find there the right functions for wfm data manipulation.

 

Ondřejk K.

NIEE AE

CLA, CTA, CLED
0 Kudos
Message 4 of 4
(2,162 Views)