08-23-2016 05:59 AM
Hello,
I take asynchronous measurements of different types voltage, current, bus-signals and savve them in a tdms file.
The whole cycle of measurement takes about 2-3 mins, as it goes thr' various states. I repeat this process for a week. I save each cycle of data 15-20 mins in one tdms file. What I need is absolute Time value for my data as tht's the only reference.
How can I have absolute Time added to my TDMS file. I did read the soln of making a Date/Time channel but how can this help me synch all my data in one File. say I want to parallely see my voltage measurements and Bus-Signals w.r.t time. The measurements also take place at some time which is inconsistent( no real time system here).
I need the absolute time info with each measurement.
regards,
Akshay
08-23-2016 07:53 AM
You never mentioned the data type that you were logging, or how you were acquiring your data, so I made some assumptions on this demo. It will log 100 data points. It will randomly choose if it is logging a scalar double to Signal 1 or Signal 2. When it does this it will also log the time for that signal. The result will be 4 channels in the log, one for the data of Signal 1 and Signal 2, and one for the time of Signal 1 and Signal 2. If you are getting waveforms of data the absolute start time, and the DT between samples is logged as properties of the channel, if you are logging dynamic data I believe it already makes a time channel.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-23-2016 07:56 AM
hey thnks
the Data I am saving is Waveform type
08-23-2016 08:32 AM
well the Dynamic data cannot save Absolute time.
The option I tested is by making a Time Channel which saves the abs. time value Info. The issue is I measure 4 different waveform values current, voltage bus signals at diff. times and it would have been of gr8 help had these signals the same Time base(same Time channel) so I can analyze them at once bcos, when Ch1_mA = 5 mA (measured at time t) the Bus is Aktiv = TRUE and I also save this Bus Signal as waveform which is measured at time (t+500ms).
08-23-2016 08:35 AM
Oh in that case try this. It will take a waveform (simulated) pull out the Y values, and create an array of X values that are the times of each sample then write them to the individual channels. Each write adds more to the data, and more to the time columns.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-23-2016 08:37 AM
well the Dynamic data cannot save Absolute time.
The option I tested is by making a Time Channel which saves the abs. time value Info. The issue is I measure 4 different waveform values current, voltage bus signals at diff. times and it would have been of gr8 help had these signals the same Time base(same Time channel) so I can analyze them at once bcos, when Ch1_mA = 5 mA (measured at time t) the Bus is Aktiv = TRUE and I also save this Bus Signal as waveform which is measured at time (t+500ms).
08-23-2016 08:41 AM - edited 08-23-2016 08:42 AM
The DAQ card (that I assume is taking the measurements) is likely an aggregate sampling card. Meaning if you tell it to read 4 channels at once, it will actually reach each of them one at a time switching between each of them very quickly. This means the time that each sample is taken is slightly after the previous one, depending on the sampling rate. This likely doesn't matter too much depending on how you are processing the data, and the rate of sampling.
My point is the absolute time that voltage is taken, is going to be slightly before the time that the current is taken, which is why you have different waveforms, and it is why the times are going to be slightly different. How different? Well that will depend on the settling time of the card which can be configured but it will be on the order of less than a millisecond for sure.
So the question you need to ask yourself is, if I have a single time column for all of my data, do I care if that is the time that the voltage was taken, and all the other signals were slightly after? If that matters then you need separate time columns. If you don't care that much than you can probably get away with generating one time column, for all samples, still using the function I just showed, but only for one of the signal waveforms.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
08-23-2016 12:06 PM
Hi there,
I am measuring the Voltage current and Bus in different States one after other, This is a Bus Komm test, and I start the Bus Communication, measure current, voltage bus signals and stop Comm. and measure again. I save the Protocol after this loop in TDMS and the cycle continues...
08-23-2016 12:31 PM
In that case any of the suggestions I gave are still applicable. Either log a new time with every sample of every signal, or log a new time for every collective sample of all signals, knowing that the time of each sample won't be exactly at that time, but close enough.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord