LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not sending"false" out when not true

Hey
 
I have a program where i  whish  to send out the value from the source,  only when  the true signal comes.  Using case structurs or true/false sends something outwhen  the  state is false. I want it to only send when true.
 
What I want to happend in the program is, that I check a array  off leds. When I have found the index off it Iget a true signal. and the index in the for loop gives me the decimal off the position. Problem is that I dont want a decimal out when the signal is false. Only when  I  get the truth signal i  want it to be written out.
0 Kudos
Message 1 of 8
(3,107 Views)
Hi
 
I'm not sure about what you want to do, but in general, you can't have a wire without a value.
 
If you have a wire, it always transports a value. You can't avoid this, as this is due to the dataflow.
 
You could just define a special value (often -1), which is passed out of your structures, if you did not find a valid index. By the way - this is what the "search 1D array" function does.
 
Hope this helps.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 8
(3,093 Views)

Thank you very  much

 

so I can  put -1 on false input? Cause I want the position like 0, 1, 2 and so on.  And when i get the position on  the true signal want the value  out  and translate  the "position decimal" to a binary word.

0 Kudos
Message 3 of 8
(3,094 Views)

I can't give you a helpful answer, if I don't understand what you want to do.

Could you clearify a little bit or post what you've done up to now (vis or picture (no *.bmp)).

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 8
(3,087 Views)
The only way is to execute the relevant code inside the true case of a case structure. Outside the case structure the boolean must have a value.


LabVIEW, C'est LabVIEW

Message 5 of 8
(3,081 Views)
What you want to do (or at least how you describe it) cannot be done.

Instead, define a "nonsense" value which is passed if no TRUE is found, this way by checking if the index is equal to this value, you know no TRUE was found.

As stated already, this is exactly what "Search array" does.

See attached vi and tell us what's wrong with that.....

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 6 of 8
(3,076 Views)
You could use an empty array, populating only the "true" instances from the input array.  If all the inputs are false, the array is still empty.  In general, I am more interested in which indicators are true, so I included an array of indexes to capture them.
0 Kudos
Message 7 of 8
(3,062 Views)
Thanks for all replys. I will come back with picktures and better explanations on monday. And will take a look at it then.
 
thanks a lot!
 
Jonas
0 Kudos
Message 8 of 8
(3,053 Views)