LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure problem

Solved!
Go to solution

Hi Frends,

 

I have attached a simple case structure program (use LabView 8.6).

 

I just wonder why the LED-2 display are not same to LED-1, (they are connected together).

 

 

Thanks for your help!!!

 

 

Jack

 

 

0 Kudos
Message 1 of 5
(2,900 Views)
Solution
Accepted by topic author jackp6

LED-1 and LED-2 aren't actually the same wire.  When you pass through the case structure to LED-2, you have the terminal set to Use Default If Unwired.  When the False case executes the default value (false for booleans) is written to LED-2.  You'll need to wire the terminal in the False case to avoid this.

 

It's generally recommended not to put indicators inside case structures for this reason.  It won't neccessarily update when the user expects it, and internally the LabVIEW compiler can't optimize it as much.


--Using LV8.2, 8.6, 2009, 2012--
0 Kudos
Message 2 of 5
(2,888 Views)

Hi

 

Thanks for the answer.

 

But how can I make the LED-2 has same display as LED-1?

 

 

Thanks,

 

 

Jack

0 Kudos
Message 3 of 5
(2,879 Views)

If you want both indicators to show the same thing place them next to each other and connect to the same wire. (Of course if the are the same, there is no additional information and only one is really needed.)

 

You must have something else in mind, but it is not clear what. 😉

 

Your code is overly convoluted and there are a couple of things that don't look right (for example, there is no wait in the main loop).

Can you explain what the program is supposed to do and how to operate it?

 

Message 4 of 5
(2,875 Views)

Thanks,

 

The code is for control the LEDs on time and off time when the case is enabled.

 

I have found another solution.

 

Thanks,

 

Jack

0 Kudos
Message 5 of 5
(2,844 Views)