LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble Clearing previous indicators or data before target VI runs

How to clear the previous data which all are stored on indicators.

 

whenever we run any VI its should be host vi or target vi that clear should clear previous data.

in our case it is not happening.

 

whenever we run VI it holding previous value untill next command or msg comes.

 

but what we need is, VI should clear ever run. and make it as default values.

0 Kudos
Message 1 of 4
(339 Views)

Hi Manjula,

 


@Manjula18 wrote:

but what we need is, VI should clear ever run. and make it as default values.


Then you need to set all indicators as needed upon start of VI.

Btw. there's a method to set all frontpanel elements to their default value…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(335 Views)

Hi Manjula,

 

Call VI method "Default Values.Reinitialize All To Default" at the start of your VI:

raphschru_0-1701434065884.png

 

To obtain it, get the Invoke Node from the Function palette:

 

raphschru_4-1701434281888.png

 

Then, right-click on the node and select class "VI":

raphschru_5-1701434381153.png

 

Then, left-click on "Method":

raphschru_6-1701434465833.png

 

Select "Default Values -> Reinitialize All To Default":

raphschru_7-1701434533491.png

 

 

If you call this node at the start of your VI, it will reinitialize all controls and indicators to their default value.

 

Regards,

Raphaël.

0 Kudos
Message 3 of 4
(329 Views)

Another way is to set Clear indicators when called in the VI properties (works also when running a top-level VI):

 

pincpanter_0-1701436430188.png

 

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 4
(305 Views)