Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

acquire tdms file with timestamp in seconds starting at zero

260 views
Skip to first unread message

Nick H

unread,
Mar 9, 2007, 7:40:07 AM3/9/07
to
Hi
 
I'm looking to convert from saving data files in diadem dat format to saving in tdms format. Im using a PC-6143 using continuous acquisition on eight channels, I want to record up to eight channels of data with a single time channel (in seconds - no date etc) that starts at zero at the beginning of acquisition.
 
I can see how to record data to tdms but I'm not sure from looking at the available examples how to record a time channel let alone one that starts at zero seconds.
 
This is for importing into diadem. 
 
Any suggestions appreciated
 
Nick
 
 

Nick H

unread,
Mar 9, 2007, 8:40:10 AM3/9/07
to
Hi Ton
thanks for replying, the trouble with not recording time is that anyone openning the acquired data will not know the sample rate. I could record the sample rate in the data set comments but people would have to know to look for it.
Regards
 nick

SachaE

unread,
Mar 12, 2007, 7:10:08 AM3/12/07
to
Hi,
&nbsp; assuming you've read the information here :<a href="http://zone.ni.com/devzone/cda/tut/p/id/3539" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/3539</a> then there shouldn't be much of a problem. The initial start time and dt are stored in the tdms along with the channel data as attributes, rather than a separate channel, but if you wanted to create one yourself, then you could generate the data for the channel programatically.
Notice how in figures 2 and 3 of the above link, the write is done from the signal data type, and the read is bringing back waveform data automatically.
Hope that helps
Thanks
Sacha EmeryNational Instruments (UK)

Herbert Engels

unread,
Mar 12, 2007, 11:10:12 AM3/12/07
to
If your dT never changes, waveforms are by far your best bet. As people
mentioned earlier in this thread, they store both T0 and dT so DIAdem
will automatically recognize and use them. There are several examples
shipping with LabVIEW that show how to implement this (doesn't require
the blue Express type wire).

If your dT changes over time, you can create an additional channel for the time information.
- If your time starts at zero, make it a channel of type double and
just store the "time elapsed" in seconds. DIAdem will not recognize
that this is your time channel. The time and data channels have to be
assigned to each other in DIAdem either manually (drag&amp;drop) or
within a report layout or script.
- If you need absolute time, see
the example "TDMS - Write Event Data" for how to create a timestamp
channel. Note that DIAdem doesn't have a fully qualified time stamp
data type. It will round the time values to an accuracy of one second.
Again, it's up to you to assign time and date channels to each other.

Hope that helps,
Herbert

0 new messages