From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Channel data in tdms with along with Time

hi guys,

 

I need to save  a  BUS communication Protocol in TDMS  format. The different data say voltage ,current and bus signals are generated at  specific time intervals.

Whts an elegant method to save the Time Information( at which the specific signal say Voltage1[10000] or  BusConnect_Bool[10000], or ActivMode_U32[10000] )  along with the  Channel.

The channel is an Array of these values. I need the specific time for each specific element of the array, and every array.

The individual  signals are generated  at different  times eg voltage1 is measured at  t1, and  BusConnect_Bool  at t2.

the whole Dut test is also cyclic . thats why  10000 values.

 

regards,

Akshay

 

0 Kudos
Message 1 of 4
(3,359 Views)

Hi Akshay,

 

The standard approach for bus data is to dedicate a Group to each signal and write 2 channels to it, a "Time" channel and a "Data" channel.  Typically the Group name and the name of the "Data" channel are the same.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

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

Hello Brad,

 

thanks for the response,

Nice to hear from u after a long time.

Well thts a novell approach ! 

Now I just dont have Bus Data but also analog data.

And if I write time-info  for all Channels/Groups individually wont the File size  be kinda Huge.

 

The approach I am considering is tht I have a FGV_Clock_TestStartTime  Constantwhich provides me Start Time,  and everytime I write data to TDMS  in Waveform(DBL)  format, I Modify the ' dt' val wr.t.  this Constant,so I have a relative Time.

Whether this sort of approach is also in practise  or it may give Issues later, because the test would run for atleast 2 Weeks although the TDMS file willl be saved for a data of   30 mins.

 

regards

Akshay

 

 

 

0 Kudos
Message 3 of 4
(3,331 Views)

Hi Akshay,

 

The "dt" waveform property is meant to store the constant sampling period of that waveform channel.  If your sampling period is not changing, then you should not be changing the "dt" property.  If your sampling period is changing, then a waveform channel is not an appropriate storage mechanism in a TDMS file.

 

Bus data is by its definition not acquired at a constant sampling period, so a time channel is required to store the unevenly spaced time value of each measurement.

 

If you have analog data stored at a constant sampling rate as well as bus data, then you can store the analog data in waveform channels (using no time channel for each) while storing the bus data in groups with time channels.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(3,308 Views)