LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to set a control value programatically?

Solved!
Go to solution

I am trying to make a vi that will allow for editing of values stored in an XML file.  I am able to store and retreive the XML data, however I do not have a good way to allow the user to edit the data. For example in other languages I can set the value of an text box input programatically when a file is opened and retreive it when the file is saved, is there a way to do this in LabView?

 

Thanks,

John

0 Kudos
Message 1 of 5
(2,778 Views)
Solution
Accepted by topic author JBART

Users can only manipulate Controls when a VI is running.

 

The value of a control can be set using a variety of methods.

 

1) pop-up create local change to write. Make sure your code carefully limits when the writting is happening. Race conditons can result.

 

2) Property node Value Similar to loca but uses Ui thread to make changes and is less efficient.

 

3) Porperty node value Signaling same as #2 but will fire an event if one is registered.

 

4) Set Control value similar to #3 but you have to know the name.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 5
(2,773 Views)

Hi John,

 

ofcourse there is!

 

Use a local variable or a property node, depending on your actual needs... Both are easy to create by right-clicking the terminal of the control.

 

Ah, Ben was faster with even better descriptions...

Message Edited by GerdW on 06-03-2010 03:43 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 5
(2,769 Views)

Thanks for the quick responses. 

 

John

0 Kudos
Message 4 of 5
(2,751 Views)

 

Ah, Ben was faster with even better descriptions...


What else is new Smiley Surprised!

Message 5 of 5
(2,747 Views)