From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing VI Elements to Default Values

Solved!
Go to solution

Hi All,

 

I know how to set values as default on the front panel.  However, when I run a VI multiple times without closing it, I need to re-initialize certain front panel values from their value at the end of the last run to the default values used in the next run.  Generally speaking, I do this using an "Init" state in a state machine or a first frame of a stacked sequence.  In either case, I just create a bunch of local variables and set the values to zero, or whatever other initial value they need.

 

When I was recently in Core 1 and Core 2 training, the teacher showed us a way to reset all these values without using local variables as described above.  But, for the life of me, I cannot remember what he said to do.


Any help jogging my rapidly-aging memory would be much appreciated.


Thanks!

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 1 of 6
(14,330 Views)
Solution
Accepted by topic author diarmaede

Invoke Node on the VI to Reinit values to default.

 

 

Message 2 of 6
(14,319 Views)
Just to highlight a point. The node RavensFan presented resets ALL controls and indicators to their default values.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
Message 3 of 6
(14,299 Views)

Thank you, gentlemen!

Forbes Black
Lapsed CLAD, LV 5 - LV 2022 (Yeah, I'm that old...)
0 Kudos
Message 4 of 6
(14,286 Views)

Additional info: if you want to reinitialize only specific controls/indicator, then you can create the corresponding invoke node for that control/indicator (right-click on control/indicator and select Create -> Invoke Node -> Reinitialize to Default).

Message 5 of 6
(14,277 Views)

A good reference for this problem can be found in the NI knowledge section:

 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MoZSAU&l=en-GB

0 Kudos
Message 6 of 6
(6,034 Views)