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: 

How can I use mutually exclusive numbers to control 4 logic values?

Hi, this is my first post on the forums, so forgive me if there's anything I miss

 

I'm trying to use LabVIEW to control a 16 channel external mux using 4 digital logic outputs.

 

Therefore I must somehow convert a user selectable integer to 4 separate boolean outputs as per the following table (ignore the "otuput" column)

http://www.kollewin.com/EX/09-15-17/truth_table.jpg

 

This should hopefully be easy for the seasoned programmers between you - alas any help would be extremely appreciated.  Thank you.

0 Kudos
Message 1 of 2
(2,229 Views)

It sounds like you  have a number and you would like to convert it to a Boolean Array.  Perhaps in the Boolean pallete there is a function that converts a "Number to Boolean Array". 

 

If you want separate booleans, use Index Array (pull down the bottom to give the first 4 elements, no need to explicitly wire the indices since it will default to 0-3).  If you would like an Array (I would) use Array Subset to return the first four values.

 

Hopefully enough information.

Message 2 of 2
(2,218 Views)