LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

if input is one constant from a range, is there a tool that can make output select for that number

Solved!
Go to solution

I'm not really sure if this has a name, but I want to input a constant between 0 and 7. I would like there to be 8 outputs, and depending on the value of the input, the corresponding output is selected. The output could be 1,0 or T/F. I think I could achieve the same goal with a lot of programming, but I wondered if this was already a tool.  Thanks.

0 Kudos
Message 1 of 8
(2,840 Views)

Put the eight values in an array and use the "input" to index the array for the output.

Unless I completely misunderstood your intention...

0 Kudos
Message 2 of 8
(2,839 Views)

case statement? the cases can be setup to be your inputs, they don't have to be specifically 0-7, case can contain anything to output. Of course, if you want 0,1 in some cases and T,F in other it gets a bit more complicated, but that could be handled in a number of way.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 8
(2,835 Views)

I have made a quick sketch of what I need. Im not sure if this is what you were describing.  Thanks

 

https://docs.google.com/drawings/d/1ytM01yggd1WrcJT1ygPw_iouDmsntCCKYltCnb2YSSY/edit?usp=sharing

0 Kudos
Message 4 of 8
(2,831 Views)

Can you just attach your drawing to a message.  I can't get into Google Docs.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 8
(2,813 Views)
Solution
Accepted by Adamramm23

Index Array will do what you want.  Just have all of your possible outputs in an array and index out whichever element you want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 7 of 8
(2,805 Views)

Or are you looking for something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 8
(2,801 Views)