LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write t0 and dt to tdm header file for Diadem

I'd like to use the TDM writer VI (zone.ni.com/devzone/cda/tut/p/id/3542) to create a TDM header file for a binary data file.  The data file contains interleaved multi-channel data collected at a fixed rate.  I will then use Diadem to open the TDM/TDX file for analysis.  I want to write the start time (t0=0) and sampling rate (or time between sample, dt) to the TDM header so that Diadem will automatically show the data with the correct time scale.  I have not been able to find any documentation or example on how this can be done.  Any pointers would be greatly appreciated.  My SW is Labview 8.0.

S.

0 Kudos
Message 1 of 4
(2,515 Views)
I believe you need to write your channel data as waveform for DIAdem to use the those parameters (t0 and dt) for your graph. Writing those as custom Channel properties is doable, "Write Custom Property", but DIAdem leaves their use up to you, e.g., doing it the hard way and writing a script.

Bill
Message 2 of 4
(2,493 Views)
I found the data storage VIs (which I didn't notice before), and they will let me set the timing info if I send them the data in waveform format as Bill suggested.  But I think it would mean that I have to do this:
    1. read the multi-channel 2D data array from the binary file that I had created previously
    2. convert each row to a waveform
    3. set the time info and other properties of the waveforms
    4. combine individual waveforms into a waveform array
    5. wire the waveform array to the data storage write data VI to write the tdm/tdlk files

It seems like a fairly complicated process just to create a TDM header file.  Or am I way off base and there is a better solution?

S.
0 Kudos
Message 3 of 4
(2,463 Views)
There's a solution that is slightly more straightforward. Store the 2d array with "Write Data". Then you loop over the channels you created by doing that and use the "Set Property" VI from the Storage->Advanced palette to set the properties you need. Not the most beautiful code, but it'll get the job done easily.

Herbert
0 Kudos
Message 4 of 4
(2,451 Views)