LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamps changed when saving a few dynamic signals to the same chanel in a tdm file

A series of dynamic signals are acquired at different time, and saved into a single channel of a 'tdm' file. While the time stamp (based on initial time and time increment) for the first signal is correct, the time stamp (or inintial time) of all other following signals were changed. Actually, all signals are combined into a single signal with the initial time same as the first signal.
 
The question is: if I want to save multiple signals into one channel of a tdm file while keeping all original time stamp, is there any simple approach I may use?
 
Interestingly, if I do the similar way, but save the multiple signals as a lvm file, the time stamps of all signals are correct. The time gap between two signals can easily identified.
 
Your helps are really appreciated.
 
Thanks,
 
Xiaoming
0 Kudos
Message 1 of 8
(3,508 Views)
Hi Xiaoming,

Could you please clarify what is meant by "all original time stamp"? Also, would you happen to have a sample of both vi's you mentioned below, I think that this will give me a precise understanding of the issue. Thanks!

Best regards,

Steven C
0 Kudos
Message 2 of 8
(3,488 Views)
Hi Steve,
 
Sorry for the slow response.
 
Please see attached example, the time stamp saved in tdm file is not the same as the one you put in. The initial or offset time is missing.
 
I was trying to append a new acquired dynamic data to the previous one, or say, save all dynamic data, acquired at different time,  into the same column. The time stamp was just not right. 
 
Thanks for help!
 
Xiaoming
0 Kudos
Message 3 of 8
(3,472 Views)
Hi Xiaoming,

Could you please post a couple of screen shots of where exactly you are looking? I just want to make sure we are looking at the same thing. Thanks!

Steven
0 Kudos
Message 4 of 8
(3,450 Views)

Hi Steve,

I should mention that 'always create new channel group' should be unchecked in the program.

Please see attached program and the data I got (excel file) from running the program. I have highlighted the problem and put a note in the excel file. 

Thanks,

Xiaoming

Download All
0 Kudos
Message 5 of 8
(3,448 Views)
Hi Xiaoming,

My suggestion would be to not use the express vi you included for timing. You should try to add a flat sequence with a wait unit next multiple function in it at at the right most part of your for loop. You might want to take the time stamp after that happens in the next frame. You should also run your wires through the sequence structure it to ensure that these are in fact the last things that happen in your loop. I hope that this helps. Currently in the vi you are using, the wait untill next multiple express vi is not ensured to execute at a precise moment, this may be causing a problem for you.

Best regards,

Steven C
0 Kudos
Message 6 of 8
(3,430 Views)

Hi Steve,

Many thanks for your reply.

It is true that the timing is not accurate enough. If you look at the recorded data in the excel file I sent to you last time, you would see the problem is not caused by timing. 'dt' was maintained for all data, no mater when the second or third dynamic data series was acquired. What I mean is 'write data' VI ignored all offset time in the following-up acquired dynamic signals starting at different time. I may walk around the problem by extract dt and t0 before saved into tdm file, but I'm worried that there is defect in 'write data' vi.

Regards,

Xiaoming 

0 Kudos
Message 7 of 8
(3,427 Views)
Hi Xiaoming,

Thanks for your post. From the posts above, I understood that you were referring to 5000 ms as being the time you need between each iteration so that you could subtract a known time delay to make your subsequent readings have the same initial time value as the first reading. In other words (assuming a delta t of 0.01 and a delay between loops of T=5000), you want the first to be 0.01, 0.02, 0.03, ..., the second to be 0.01+T, 0.02+T, 0.03+T,... and third to be 0.01+2T, 0.02 +2T, 0.03+2T,... and then finally subtract T from the second sequence and 2T from the third sequence for all data to have the initial "to=0.01". What I was suggesting is that you force your T delay to the end of the iteration to ensure the delay does not happen at a somewhat random spot in the loop iteration ensuring that you get accurate results after doing your subtraction. I hope this helps.

Best regards,

Steven
0 Kudos
Message 8 of 8
(3,412 Views)