01-16-2014 10:14 AM
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
01-17-2014 02:40 AM
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
01-17-2014 03:20 AM
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;)
01-17-2014 03:31 AM
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