To download NI software, including the products shown below, visit ni.com/downloads.
1. Overview
This VI Shows a method to save control configuration to a TDMS file, and how to retrieve the values saved in said file to write them back to a VI's front panel controls.
2. Description
This VI was created when running multiple series of test and measurement experiments. The function was created so the values from Front Panel controls could be saved into the same TDMS file as measurements, therefore allowing users to re-load these configuration settings into another test sequence. This keeps the front panel control data in the same TDMS file, without the need for a separate configuration file.
The values are obtained from the controls using an invoke node that calls the "Control Value: Get All" method, which returns an array of clusters containing the name and data of each control.
3. Requirements
4. Steps to Implement or Execute Code
5. Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines.**
Description-Separate-2Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
This vi doesnt seem to work:
I get the following error
error code 116
Flattened String To Variant in TDMS variant conversion.vi->TDMS read front panel controls.vi->TDMS example main.vi
are you just running the example? what type of control are you trying to read/write from?
just running the example....extracted the zip file and opened the project. Ran the TDMS example main.vi
Was this incorrect?
no this is correct. When running the example, did you write a tdms file first, and then re-run the main vi with the read option selected?
yes I ran with the enum set to write first then re-ran it with the enum set to read and selecting the same file that I wrote to originally.
Is it working on your end? what version of labview are you running? Are there some add ons that are required for writing and reading to tdms files?
I have spotted the reason for the error message.. The reason for the error 116 message is the zip file is saving to tdms file version 1.0 rather than 2.0.. 2 changes are needed. On the TDMS Open in the TDMS example main.vi (save to file case) and the TDMS read front panel controls.vi change the constants to 2.0.
**I shall upload a new zip that fixes this error soon**