LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save data along configuration in one file

I acquire waveforms and images and need to save the raw data with their nested acquisition settings. Until now I used tdms and saved the settings as json string in a tdms parameter. Opening those files again works well as long as my application's settings cluster doesnt change.
I like to have configuration and data in one file. Any suggestions on how to achieve this more robustly regarding changing settings cluster? 

0 Kudos
Message 1 of 3
(868 Views)

Hi Quiztus,

 


@Quiztus2 wrote:

I acquire waveforms and images and need to save the raw data with their nested acquisition settings. Until now I used tdms and saved the settings as json string in a tdms parameter. Opening those files again works well as long as my application's settings cluster doesnt change.
I like to have configuration and data in one file. Any suggestions on how to achieve this more robustly regarding changing settings cluster? 


I still would use TDMS files, but instead of converting your (typedefined) clusters to JSON strings I would store the cluster elements as individual properties of the TDMS group/channel.

It's a little more overhead while writing/reading, but prevents all problems with your cluster typedefinitions: you can read all properties and use default values for non-existing items…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(859 Views)

I followed your advice and it looks promising. For the sake of completeness I upload my working snippet.

Save Config in TDMS.png

Quiztus2_0-1698226606832.png

 

Message 3 of 3
(822 Views)