Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 68980

How to execute a case statement only once when a sub VI is called

$
0
0

HI,

 

the issue I am having is that I have a large "Main" VI which contains several "Sub" VI's all of which are called in certain situations. In some of the "sub" VI's I want to write to a common Excel file. What I find is happening is that everytime I call one of the Sub VI's it writes tot he excel file. This is not what I want to happen.

 

What I would like to happen is that when a "button" is pressed on the front panel the sub VI will then write tot he excel file once. I can then call the VI as many times as I want and it will not write to the VI again until I press the button again.

 

I have attached an example of one of the VI's I use and the issue occurs in.

You will see in stack "1" in the bottom right of the block diagram I am trying to set 2 indicators called "stamped in" and Stamped out" to true (ON) when the control "Stamp IN" or "stamped out" is pressed. what happens however is that if the button was pressed once and I reenter the VI it re-writes to the excel file.

 

I have tried several senarios, like registers etc but none seem to work. I have also tried numerous different button mechanisms and again this does not seem to fix the issue.

 

can anyone help?

 

thanks in advance.

 

Seamus

 


Viewing all articles
Browse latest Browse all 68980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>