LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control bits and join number

Solved!
Go to solution

When you expand a Index or Replace array they've auto indexed and starting from 0, so you can remove all of those 8 index integers and it'll be the exact same.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 14
(609 Views)
  • When you have 8 booleans and they are consecutive from bit #0 to bit#7 then they will form a byte. In this case you can simple use BuildArray to "collect" your bits and replace a block of 8 bits in your boolean array of 16 bits.
  • When your cluster only contains those 8 booleans (in the correct order) you can simple convert the whole cluster into an array.
  • Or you convert the 8-bit-array into an U8 number and join this one with another U8 with value "0"…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 14
(600 Views)

@A.Daniel01 wrote:

I just did this:

ADaniel01_1-1666251078178.png

 

 


You can simplify that quite a bit with a simple Cluster To Array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 13 of 14
(585 Views)

Boolean Array To Number has this property:

billko_0-1666272056428.png

So you don't even need to explicitly convert to i16.

 

Edit: Oops, I mean u16 - but you get the picture.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 14
(582 Views)