10-28-2008 03:32 PM
Solved! Go to Solution.
10-28-2008 03:55 PM - edited 10-28-2008 03:55 PM
Use shift registers to wire a value through the loop. Use case structures to change the value within the loop. You could also use the Select Function
10-28-2008 04:39 PM
10-28-2008 05:57 PM - edited 10-28-2008 05:58 PM
Orion HE wrote:
Well, it's not as simple as I had hoped for, ...
You can probably simplify it quite a bit more and get away with a single "select" function. (all three switches (stop|Set|Reset) are latch action.)
10-28-2008 06:29 PM
10-28-2008 07:03 PM - edited 10-28-2008 07:06 PM
Maybe you should explain a bit more what you are actually trying to do.
If the output is just an LED or writing a command to an instrument, you could do the following. No shift register|feedback node needed. Remember that indicators have tier own memory and they only change when you actually write a new value to them.
The FALSE case is empty. (Make sure that the initial state of the LED is defined).
10-28-2008 09:35 PM
I'm gonna take heat for this, because they are "officially" discouraged, but I'm betting that what you really want is a local variable. Some condition happens somewhere to set your boolean true. Then something else happens later/elsewhere and now you need to set that same boolean false. Wire the false condition to the "local" copy of the boolean, and voila!, the boolean becomes false---both the variable, and all local copies. It works just like any named variable in a text based programming language.
You have now been given enough rope to hang yourself. Evil race conditions can develop. Apparently unrelated parts of your program can now interact, mysterious things can go bump in the night, etc., etc. But if you know what you are doing, local variables can be real posterior preserver.
I will now go out behind the woodshed and thrash myself for espousing such LabVIEW apostasy.