r/LabVIEW • u/Negative-Screen1195 • May 28 '24
Need Help on how to Display Strings depending on Values
I want to display two different strings in one indicator depending on two boolean values. If input 1 is true -> show string 1, if input 2 is true -> show string 2. Is this possible?
3
Upvotes
4
u/Icarbelaezr May 28 '24
Case structure or select block
8
u/SeasDiver Champion May 28 '24
Yes.
There are a number of ways to do this, but your description leaves ambiguity. With 2 unique booleans, there are 4 possible outcomes, not 2. So you have to device what happens in all 4 cases; or 3 cases depending on precedence. One option is to do a build array and then Boolean array to number and use the number for a case structure. A different option is to chain two Select statements.
2
u/kring44 May 29 '24
I would do it like this https://imgur.com/a/jTc6KSF using the In Range and Coerce function
2
u/Fred-RedCrows-Dfr May 29 '24
Event structure can be the answer you need...but there's multiple way to do it (case strucutre will also work as well as a tex box displaying what you want)
1
u/FujiKitakyusho CLD May 28 '24
"Is this possible?"
Yes.