LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying different results with if statements

Solved!
Go to solution

Hello,

 

I am trying to do a very simple logic but can't figure out how to do it visually in LabView. Please have a look in the file. As you can see on the right, I have a group of 9 possibilities, for each one being true I want the DIALED NUMBER indicator to show a different result. I tried to use the case structure but I couldn't get the indicator icon into other subdiagrams. I've also thought about putting the results into an array and choose the element according to which the possibilities.

 

But I am sure there's a simpler way. Please help.

 

Thanks,

LD

0 Kudos
Message 1 of 5
(2,884 Views)

I just realized that instead of having the indicator inside the case structure with different sub levels, I should have 9 case structures and the indicator should be outside.

 

Thanks,

LD

0 Kudos
Message 2 of 5
(2,876 Views)
Solution
Accepted by topic author LD_PVL

You put the indicator terminal outside of the case structure.  Then each case wires its respective result into the tunnel that leads out of the case structure to the indicator.

 

(Alternative, but not recommended, use a local variable of the  indicator in all the other cases if you use the terminal in one of the cases.)

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
0 Kudos
Message 3 of 5
(2,875 Views)
Thanks 😉
0 Kudos
Message 4 of 5
(2,872 Views)
I have a small side question. You know you gotta assign each tunnel with a value, is there a way to assign a value which is nothing? I mean, for example when I use True-False structures, if the case is True, I'd like to assign x = 5; but if the case is False, I'd like to keep x's value whatever it is and just do nothing.
0 Kudos
Message 5 of 5
(2,862 Views)