LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear values on stopping

Solved!
Go to solution

Hi I have a tab with a series of pages which proeeds sequentially. E.g. on pressing a button on page 1 it proceeds to page 2 and so on. All these pages have many indicators in form of string, numeric, dial, slide, etc. I want to clear all these values while stop button is pressed. how do i do it? and should i do it inside or outside the case structure? and during the last case or in the cases where the indicators are present?

0 Kudos
Message 1 of 6
(1,789 Views)

After completion of your task ( If Stop is pressed), pass default values (zero) to ur your Controllers/Indicators. For that you need to Take Reference/Local Variable and write it to zero (or any other if you want).

Munna
0 Kudos
Message 2 of 6
(1,783 Views)

It is difficult to tell without seeing the code. 

 

Do you have one case per tab page? That is often not a very efficient way to write the program.  Is the data used in more than one case of the case structure?

 

I often place the terminals outside the case structure and inside the loop. The data is on shift registers so that it ia available to all cases if needed. With this configuration it is easy to write default values to the shift register (and thus the terminals) in the shutdown case.

 

Lynn

0 Kudos
Message 3 of 6
(1,782 Views)

Hi there are about 10 tabs and 11 cases  and each not exactly coinciding with a particular tab. the case is already inside a while loop. kindly have a look at the code. some terminals are open as the labview program is connected to a communication module. and i haven't attached the subVIs.

0 Kudos
Message 4 of 6
(1,767 Views)

Somehow you attached a wavefrom constant to the case selector terminal in place of the enum. Or maybe it became corrupted because the control files were not included.

 

I think that if you replace all the local variables and Value property nodes with wires and shift registers you will have easy control of the displayed values.

 

Lynn

0 Kudos
Message 5 of 6
(1,758 Views)
Solution
Accepted by topic author shreya005

Once [stop] is pressed, the values of the indicators is irrelevant because you are in edit mode. It seems more important to clear them when the program starts nex time. To do this, simply go to "vi properties...execution" and enable "clear indicators when called".

 

As Lynn already said, the code is a bit of a mess with all these local variables, so it is hard to tell what you actually want.


@shreya005 wrote:

 All these pages have many indicators in form of string, numeric, dial, slide, etc. I want to clear all these values while stop button is pressed. 


Do you also  want to clear the controls, or just the indicators?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 6 of 6
(1,739 Views)