DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ waveform + data/timestamp in tdms file; how to display?

I can't seem to find much about this seemingly simple task.  From Labview, I have several channels of DAQ data, written to a tdms file as waveforms.  Also, one or more channels of data, aquired manually at random intervals.  I write those to the file as two channels: the data and the corresponding timestamp.

 

Issues:

1.  Is this the preferred way of writing the randomly timed data? 

2.  How can I get the time for both sets of data to correspond and display properly?  Dragging the DAQ channels onto a graph with the other data doesn't seem to work.

3.  How do you even show the timestamp data of waveforms on a graph?  In a 2D axis graph, it only shows an index and I can't find any options for the x-axis.  In fact if you select a waveform in the data portal, the waveform start time doesn't even show up in the property window, even thought it's clearly part of the waveform (t0).   

 

All I want is all data sets on the same graph, with a common time scale on the x axis. 

0 Kudos
Message 1 of 10
(9,337 Views)

Hi Beck45,

 

Yeah, this is an unfortunate inconsistency between LabVIEW and DIAdem, but there are workarounds.  The absolute start date/time information in each TDMS waveform is loaded into DIAdem but hidden from the user, and DIAdem studiously ignores this information when plotting waveforms. You can, however, create a date/time channel for your waveforms with the attached VBScript function.

 

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 2 of 10
(9,317 Views)

Ok thanks that does work.  But quite a runaround to get the other data on the same plot!  First I create the DAQ data plot with the new time column.  Then create a 2nd plot with the other data (say only 10 points with their own separate time column).  Then by dragging these curves into the first plot, all are displayed correctly in time. 

 

But even two waveforms, each of different lengths (different sample rates) won't plot correctly.  I am puzzled: how could something like this not work/be overlooked?  Or is this something very strange to be doing with DIADem?  

0 Kudos
Message 3 of 10
(9,308 Views)

Hi Beck45,

 

The behavior of waveforms in DIAdem is excellent as long as you want to display the values vs. relative time, say starting at 0, and proceeding according to the delta time value stored in the waveform.  This is in fact the predominant use case for waveforms in DIAdem, though plotting waveforms vs. absolute date/time comes up much more often when the data originates in LabVIEW.  When we first implemented waveform channels in DIAdem 10.1, R&D made the conscious decision to make the relative time use case as easy as possible at the expense of the absolute date/time use case.

 

What we really need is an easy way in DIAdem to switch back and forth between displaying absolute date/time and relative time.  This is of particular interest for waveform channels but is also desirable for numeric and date/time channels.  I have asked R&D to look into this, and I am hopeful that we may see some progress on this front in the next version or two (after 11.1).

Would you please describe more clearly the scenario that is still not displaying correctly for you?

 

Are you able to send over the data set you're looking at so I can see exactly what you mean?


Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 10
(9,293 Views)

Thanks.  Well it does seem 2 different waveforms are displayed properly. 

 

I guess the main other point was that introducing data that's in 2 channels (1 for data, 1 for time) messes things up.  Create a plot with this 2ch data, fine.  Then drag in a waveform...it doesn't work.  I tried the other order (waveform first) and of course that woudn't work...   

 

Absolute vs. relative is fine, but either way the pgm. needs to know that timestamps and a waveform t0/dt are really the same thing and so can plot it all just by dragging--once you specify where your time channel is.  Pretty simple; I'd thought surely this would be doable in software costing this much Smiley Surprised Guess not... 

 

I can attach a tdms file if you still need me to...

0 Kudos
Message 5 of 10
(9,278 Views)

Hi Beck45,

 

Te problem is not dragging a [Time, Data] channel pair, then dragging a waveform afterwards onto the same graph.  Nor is the problem dragging a waveform, then dragging a [Time, Data] channel pair onto the same graph.  The problem is when the Time channel in the [Time, Data] pair happens to be a date/time channel.  If that Time channel instead contains relative time values, say starting at 0 seconds, then the above two actions work fine.  DIAdem only gets confused when you ask it to plot relative time and date/time on the same graph.  Unfortunately, in DIAdem 11.1 and prior versions, dragging waveforms always anly only uses relative time.

 

I would like to see a sample data set, if you don't mind,

Brad Turpin

DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 10
(9,268 Views)

Is there a new way of doing this?  I am trying to accomplish the same thing...I have multiple data channels that are all read simultaneously but I would like to be able to have a time/date channel (x-axis) to show the waveforms using a time base.

0 Kudos
Message 7 of 10
(8,006 Views)

Hi Ryan,

 

There is a new set of features in DIAdem 2011 that makes it much easier to support absolute date/time waveform channels.  You still need to create the DateTime channel, but now the ANALYSIS dialog "Numeric Channels <=> Waveform Channels" contains a radio button where you can select "Absolute time reference"-- this creates a DateTime channel of (absolute) X values instead of a Numeric channel of (relative) values.

 

Then all you have to do is plot the waveform (Y) channels vs. the DateTime (X) channel you just created.

 

The waveform's absolute starting date/time property now also shows in the Data Portal property table.

 

Ask if you have questions,

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 8 of 10
(7,971 Views)

speaking as a LabVIEW developer, is there a better way to save the data in the TDMS file to allow the users easier access in DIAdem?  My users like to see the data in graphical view, but then usually want to zoom in at a particular location and see the data in a spreadsheet view.  The data is usually from multiple channels with different sampling rates and they always want to see absolute (IRIG) time not relative time.

0 Kudos
Message 9 of 10
(6,690 Views)

Hi faustina,

 

Have you seen the general recommendations for TDMS file writing listed in this White paper?  I think this should answer the questions you're posing currently.

 

http://www.ni.com/white-paper/14252/en/

 

The short answer for viewing graphs in DIAdem with absolute date/time on the X axis is that you HAVE to have a date/time channel and plot XY curves with the date/time channel as the X channel.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

 

0 Kudos
Message 10 of 10
(6,655 Views)