From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Select vs Case Select

Solved!
Go to solution

Hi,

My question maybe a bit stupide but Im not figuring the error.

This simple vi should:

- count any paire number und

- build the sume of every paire number

in a given array. Only the select function should be used and not the case select.

 

Building the sume ist working but counting is not working.

I ll appreciate any advise.

Thanks

 

 

 

 

select function.PNG

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 3
(2,042 Views)
Solution
Accepted by topic author Serikah

you made a small mistake, when the current value is not "paire" you select "0" and then add 1, it doesn't make sense.

what you need to do is add 1 if "paire" or keep the previous number

 

see this :

Clipboard01.png

 

on a side note, it make more sense to use i32 if you are dealing with integers.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 3
(2,031 Views)

Thank you.

That was my mistake.

0 Kudos
Message 3 of 3
(2,024 Views)