LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to have an if statement in labview?

Hi

As a first pass I would suggest you copy all of the code in the False case of the bottom case structure to the False case of the top case structure. Then delete the bottom case completely.
Then you need to connect the output of your "0.1 comparison VI" to the little green "?" on what is now your only case structure.
The result of your comparison will now run either the true or false case within the case structure.

As a second pass, a vast amount of the code within the two cases is common so it would make sense to only use the case statement to select the elements that are different, for example the filename. This would simplify your code greatly.

Good luck
Neil

Message Edited by NeilR on 04-07-2005 04:40 AM

0 Kudos
Message 11 of 13
(533 Views)
I notice that the way you are doing the comparison doesn't appear quite right.
I think you need to use Get Waveform Component and then use Index Array to select the element to compare.

See attached modified code. You'll still need to sort out the selection of the waveform element as you require.

Message Edited by NeilR on 04-07-2005 05:00 AM

0 Kudos
Message 12 of 13
(525 Views)
that works now, thanks a mil,
ruth
0 Kudos
Message 13 of 13
(516 Views)