03-09-2015 03:04 AM
I want the data and the time for the tdms file generated?
how can i do that?
should i cinvert .tdms to .lvm and use the data storage option or excel add on option for .lvm file created?
cant i directly have the time stamp for tdms file generated?
03-09-2015 07:46 AM
How are you acquiring the data in the first place? That will matter in how we want to approach this.
01-28-2016 02:06 PM
I would like to ask again this question to find a good way to go about including the time stamp in my measurements. My situation is the following.
I take a measurements with 3 different insturments (DMM, LCR, Electrometer), each of these measurements is based off of output pin connections and will be grouped that way. As you can see in the TDMS file opened with the Excel Plugin that is how I have the data.
Each Pin connection has it's own tab, Pin 0 to 0, Pin 1 to 2, Pin 3 to 4, and Pin 2 to 4. And each tab has a history of the measurement taken between those pins. My problem is that I need to add a timestamp to have some reference for when things are happening.
This is a slow test stand as I am using a switch matrix and one insturment at a time to take these measurements, and although the DMM, LCR, and Electrometer take each round of measurements at different times, a single column of time stamps should suffice for now.
I have attached my main.vi and a few of the relevant subVIs to maybe get some help.
Thanks,
Kellen
01-28-2016 02:29 PM - edited 01-28-2016 02:29 PM
Just use another TDMS Write to write the timestamp.
01-28-2016 02:29 PM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-28-2016 02:58 PM
Like how James?
01-28-2016 03:03 PM
Is it necessary to use the "Convert to Dynamic Data to make this work like I have with the 1D array? Or is there a problem with doing it that way?
01-28-2016 03:14 PM
@rkmadse wrote:Like how James?
Did you click on the link?
You don't need to convert to dynamic data.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
01-28-2016 03:34 PM
James, Thanks for the example that was helpful. You answered both of my questions. A follow up question would be, is there a better method of storing my data while it waits to be written to a TMDS file? I am currently saving it as a double in a Clustor, but am needing to add in a timestamp for each measurement now. Should I just add Timestamp constants for each measurement to the clustor and then use a second array and a for loop at the output to make it work? The desired format is the following. Where there is a time stamp for each measurement.
The Producer Consumer (State Machine) method I am using looks like this (Excluding the Producer Loop)
01-28-2016 04:09 PM - edited 01-28-2016 04:26 PM
You need to store your timetsamp to the cluster when you acquire the data. Otherwise your timestamp won't be matching up with the actual time that the data was acquired.
The way you have it now could result in this scenario (and most definitely will on a smaller scale):
The above scenario results in a 102ms offset between the timestamp that is written to file and the actual time that the data was acquired.
You also do need to add a timestamp for all datapoints, not just a single timestamp. Does you acquisition include timestamp information? It's a VISA connection it looks like. Is it triggering the acquisition and then waiting for those points to come in, or is it acquiring the last few points from a buffer? You're going to have to come up with an array of Timestamps that match your data at some point. If you data is streaming, this might be best done by using a t0 value when the stream is first triggered and a dt value from there on. If the data acqusition is on a trigger basis, then you'll need to store a single timestamp and then calculate the others based on your sample rate.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'