ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Invert Digital Array, or Invert Boolean Array

Solved!
Go to solution

Is there an elegant way to invert a digital array so that every 0 becomes 1, and every 1 becomes 0? Or is it possilbe to invert a Boolean array so that every True becomes False, and every False becomes True?

Thanks,

Ron

 

(I'm currently using a "Select" too and placing a "F" on the top, and a "T" on the bottom.

0 Kudos
Message 1 of 6
(5,404 Views)
Solution
Accepted by topic author rsi77

On the boolean pallete you will find the not function. Feed the array through it.

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 6
(5,399 Views)

Thank you!

that's exactly what I was looking for.

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

rsi77,

 

You can Xor the array with TRUE:

 

invert boolean array.png

 

Rgs,

 

Lucither

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
0 Kudos
Message 4 of 6
(5,394 Views)

OK, that's prettry clever. I can use that as well.

0 Kudos
Message 5 of 6
(5,380 Views)

And if it is an array of 0's and 1's,  subtract the array from 1.

Message 6 of 6
(5,371 Views)