LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reusing Indicators in True and False Cases

Hello,
I am using Labview version 8.0. I don't quite understand the flow of using the  Labview block diagram yet and still learning.
 
Attached is a very simple VI diagram. I am just trying to send a string from the "String to Send" box to the "Receive String" box when i click the "Send  String" button and would like to clear the "Receive String" box when i click  the button again.
 
The program will stop when the red button is pressed. I have a VI class that  will reinitialise the values at the start of the run. What i would like to know is how can I clear the "Receive String" indicator in the False case. Meaning if when the program is just started up the following is the steps i will take:
 
1)Enter text in "String to Send"
2)Click "Send String" button
3)Observe text in 1) is now in "Receive String"
4)Click  "Send String" button again
5)Want to observe that "Receive String" is empty.
 
The easiest method would be to use the VI class to reinitialise everything but
once i only want to empty or maybe enter another string into that 1 particular object.
0 Kudos
Message 1 of 5
(3,170 Views)
This is very easy. See attached example. Don't forget to insert a delay in the loop to avoid the loop using 100% of the CPU ressources by running as fast as possible.
0 Kudos
Message 2 of 5
(3,166 Views)
Yet a more optimized version, using 0% CPU ressources while waiting for user actions and showing the usage of events.
0 Kudos
Message 3 of 5
(3,162 Views)
Thanks very much for the examples Smiley Happy
0 Kudos
Message 4 of 5
(3,140 Views)
As JB's code so aptly demonstrates 90% of the time when you are thinking "user interface" you should be thinking "event driven".

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 5 of 5
(3,138 Views)