LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get my controls and indicators to clear after each run of the VI?

I am using LabVIEW for my Senior Design Project in EET for Purdue University-Indianapolis. After each run of my VI, I want the controls and indicators to go back to their default state (cleared). I don't see an option for this. For example, I have a password VI that allows a user to log in. Once this sub-VI is rerun, the password from the previous user is still there. How do I clear this??? after each run???

Thanks, D
0 Kudos
Message 1 of 6
(3,367 Views)
Use the property node and invoke node to clear.
In your block diagram,
********************
Function Platte.
>Application Control
>>Invoke Node
********************
Then right click the invoke node..
>From "select VI server class" option
>>choose "VI"
********************
Then right click again
>From "method" option
>>choose reinitialize all to default
********************
That will reinitialize all your value to default
if you want to reinitialize only your password to default then its simple
********************
right click the invokenode agian
>From "link to" option
>>Then link your invoke node to any control or indicators
********************
I attach one simple file for you
*******************
Hope that will work..
😛
Saw
Naing Aye(Maymaythar)
Message 2 of 6
(3,367 Views)
The solution mentioned by Saw will work very well, however you will want to make sure your default values are set to the expect values. You can do this by selecting Operate>>Reinitialize All To Default from the Front Panel Menu. You can set the default values here as well using Operate>>Make Current Values Default.

Hope this is helpful.
0 Kudos
Message 3 of 6
(3,367 Views)
You can also just use local variables of the controls to reset their value before the VI stops and closes.

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 6
(3,367 Views)
Hi Saw:
How about if I want to set a boolean control in the front panel that when I press it, it will clear all the charts?
Thanks
0 Kudos
Message 5 of 6
(3,367 Views)
> How about if I want to set a boolean control in the front panel that
> when I press it, it will clear all the charts?

Catch the button value change either using events or polling and
comparison. In the case where the button changes value, set the chart's
property for history to an empty array. Basically pop up on them as
they are created, and Create Constant to make empty data that matches
whatver type the chart has adapted to elsewhere on the diagram.

Greg McKaskle
0 Kudos
Message 6 of 6
(3,367 Views)