LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary indicator

Solved!
Go to solution

Hi All !

I have binary number, say 00000101. I want to indicate every bit by corresponding led on the Front Panel.

So in this case it'll be led0 and led2 on.

How can i do it?

 

0 Kudos
Message 1 of 8
(3,309 Views)
Solution
Accepted by topic author john7

Hi John,

 

use the function "Number to boolean array", found in the boolean function palette...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(3,307 Views)

Thanks a lot! Smiley Happy

0 Kudos
Message 3 of 8
(3,295 Views)

...and reverse the array if you want the MSB to the left.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(3,290 Views)

In addition you sometimes might want to reverse the array.

 

(In the binary numeric indicator, the lowest bit is on the right while the array starts with the lowest bit (i.e. it is on the left if the array indicator is horizontal).)

0 Kudos
Message 5 of 8
(3,289 Views)
Ah c'mon, Type Cast man is shaking his fists right now, he knows you just Type Cast that number to a Boolean Array in 4.x mode and it is human readable. A gratuitous display of arcane LV functions is sure to impress your boss and coworkers as well.
Message 6 of 8
(3,282 Views)

STAND-BACK EVERYONE!

 

Darin is reaching for the type cast again.

 

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 8
(3,276 Views)

@Darin.K wrote:
Ah c'mon, Type Cast man is shaking his fists right now, he knows you just Type Cast that number to a Boolean Array in 4.x mode and it is human readable. A gratuitous display of arcane LV functions is sure to impress your boss and coworkers as well.


Type Cast Man.png

=====================
LabVIEW 2012


Message 8 of 8
(3,256 Views)