Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't log correct snippets of waveforms in TDMS files

Hello,

 

Using cRIO-9063, NI 9242 and NI 9203, I am acquiring current and voltage waveforms for the purpose of extracting some features and logging them into TDMS files.

 
The features are:
-RMS values of both signals
-Active and reactive powers
-Snippets of both signals
 
The features are logged separately: The first TDMS file has the first four features mentioned above. The second has the last 2. Both files contain relative TimeStamps.
 
While the logging of the first file is done correctly, the second one has 2 main problems:
-The 3 channels have different lengths. This was solved by getting one waveform's components and increment t0 by dt in a For Loop of the same length as the Y component. But even though, it is still not correct, since Fs=2.5kHz and the RT Producer loop runs a rate of 250ms. Meaning I should get 5k values (5k in length).
 
Images intégrées 4
 
-The TimeStamp is not correct, it seems to be stuck repeating the same values after a number of Y values. Which is weird, because the waveforms do change every iteration of the loop! Also, the 
Images intégrées 1
 
Images intégrées 2
 
Images intégrées 3
 
Could you please help?
 
I thank you for your time and effort!
 

 

0 Kudos
Message 1 of 3
(2,498 Views)

Can you reattach the images? I am having trouble seeing the images that you used to describe the behavior.

 

In addition, when does the timestamp seem to start repeating values?

Brian.D
NI Product Owner
VeriStand
Message 2 of 3
(2,442 Views)

Dear Brian,

Thank you for your reply. With the help of NI tec support, the problem was solved. Apparently I had to add a get date/time function to specify the t0 of both waveforms when I created them every iteration of the producer loop. Because otherwise, they'll be getting the same t0 every time and thus the problem.

For others who might have the same problem, here is the subVI where I had to add the get date / time function. 

0 Kudos
Message 3 of 3
(2,437 Views)