NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Allof, Anyoff used on Arrayand other Array Mathmatics

Solved!
Go to solution

Pretty sure this should be set up as an improvement but as far as I could tell you cannot Allof or Anyof a Boolean array. Its kind of a pain to type out locals.array[0],locals.array[1],...etc for say 50 variables. any thoughts on this or suggestions on going about it a different way?

0 Kudos
Message 1 of 6
(3,281 Views)

AlloffAnyoff.PNG

 

is this the one you are talking about?

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 6
(3,236 Views)
Solution
Accepted by topic author brett.fowler.L3

Hi Brett,

 

Yes - it would be great to drop an array into these two functions rather than call out each element but unfortunately that's how they work Smiley Indifferent

 

However, you can use the Contains() function to achieve the desired effect:

 

Locals.Any = Contains(Locals.Array, True) //Sets Any to True if any of the elements in Array are True

Locals.All = Not(Contains(Locals.Array, False)) //Sets All to True if all of the elements in Array are True

 

I hope this helps,

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

Message 3 of 6
(3,231 Views)

yup!

0 Kudos
Message 4 of 6
(3,220 Views)

Contains sounds good ill give it a try but it sounds like it will work for what im attempting to accomplish. Thanks!

0 Kudos
Message 5 of 6
(3,218 Views)

No problem, glad I could help!

Charlie Rodway | Principal Software Engineer | Certified TestStand Architect (CTA)

Computer Controlled Solutions Ltd | NI Silver Alliance Partner | GDevCon#1 Sponsor

0 Kudos
Message 6 of 6
(3,214 Views)