LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save Digital signal to TDMS with timestamp

Solved!
Go to solution

Hello everyone,

 

I have multiple analog and digital signals which are logged in separate statemachines. The analog signals can directly wired to the 'TDMS_Write' function (even as array). All attributes (timestamp, name,...) are still intact.

 

I am having trouble logging the digital signals. The signals are also in an array but it is not allowed to wired them directly. After some search one suggestions was to convert it to U8 and wire it to the 'TDMS_Write'. Now the timestamp information is gone.

 

digital_tdms.png

 

How can I save a digital signal (arrray) to TDMS and still have the same functionality as the analog signal datatype?

0 Kudos
Message 1 of 6
(2,504 Views)

Hi sh,

 

by converting to a plain U8 array you remove all attributes stored in the waveform.

 

You could

  1. read all attributes from your digital waveform
  2. convert to U8
  3. create an analog waveform
  4. set your attributes in the analog waveform
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(2,489 Views)

Would this not effect performance?

 

When I trigger my signals I start continuously measuring and especially digital signals I want to read as fast as they appear. When I start transforming huge arrays into another huge arrays I may slow down my statemachines.

 

Or do I underestimate the data handling of LV?

0 Kudos
Message 3 of 6
(2,475 Views)
Solution
Accepted by topic author s.h._tech

Hi sh,

 


@s.h._tech wrote:

Would this not effect performance?


Yes.

 

Why don't you use TDMSWrite to save your digital waveforms? I just succeeded to connect a digital waveform to TDMSWrite and it gave no error:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(2,467 Views)

I wrote a little vi which converts a digital array to analog array with all the attributes based on @Gerd_W suggestion. I tested it with increasing busload and samplerates. So far I did not notice a performance issue or missing frames.

 

 

0 Kudos
Message 5 of 6
(2,465 Views)

Ok. Thats better. It just does not accept digital arrays. Looping over the array and setting the proper channel (in the digital group of my tdms) for each signal should do the trick

 

Thank you.

 

 

0 Kudos
Message 6 of 6
(2,461 Views)