LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get all Values - Variant to String Problem

Hi,

 

I want to get all the control (and indicator) values and then just save them as a text or spreadsheet file for reference. A spreadsheet with two columns would be best i think (name and value - either numeric or text such as FALSE).  I'm having a problem converting the value to a string that I can then combine with the name to save. In the attched VI I want to have the data in Array 2 in a string format (in this case either 4 or false) to combine with the names.  Does anyone have any pointers, I've tried the unflatten and convert variant to data vi's but can't get it to work?

 

Many thanks 🙂

Chris

0 Kudos
Message 1 of 4
(3,210 Views)

Hi Chris,

 

have a look at this code:

 

I have used the 'Write Panel To INI' utility from OpenG. This open source VI stores all the values of a front panel to an INI file.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(3,197 Views)

 

Hi,

Thanks for that, although the websites seem to be down at the moment.  Is it free to download?

0 Kudos
Message 3 of 4
(3,168 Views)

Yes, the code is free to download but if you are having trouble getting to the website, the functionality is not hard to create and doing so might be a useful learning experience:

  1. Get a VI reference to the VI that you are wanting to process.
  2. Using this reference, read the Controls() property. The property consists of an array of control references to all the controls and indicators on the VI's front panel.
  3. Process each element in the array to extract the data you want. The only tricky part is determining the datatype of each control, but there is a current thread here that discusses that issue. Note especially that this processing will need to be recursive to handle any arrays or clusters.
Mike...

 


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(3,161 Views)