LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4 to 16 line decoder - is there an easier way in Labview?

CD41515 4 bit to one of 16 output decoder. Is there an easy way without drawing a full digital schematic?
 
 
I need to decode a number (or 4 bit array) to a 1 of 10-16 indicator to show DAQ channel output activity.
 
Any clues?
 
Thanks,
Barry
barry


Message 1 of 12
(6,313 Views)
is this what you want?
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 2 of 12
(6,307 Views)
What version of LV are you running?
0 Kudos
Message 3 of 12
(6,296 Views)
 
Building on the previous reply ...
 
A quick approach:
 
Build the four booleans into an array then convert the array to a numeric.
Use the numeric to drive a case structure with 16 cases that have 16 boolean outputs.
 
Another way:
Use the output to drive the index of a "replace array subset' for an array of 16 false booleans and replace with a True.
Use Index array sized up for 16 outputs. Done.
 
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 12
(6,293 Views)
LV 8.5
 
Below is what I have so far, just seems kinda cumbersome but it will fit into the 20 I/O connector I guess
barry


0 Kudos
Message 5 of 12
(6,288 Views)

Simplest way I know.

 

P.S.  You could also take the output of this and convert to cluster for front panel display.



Message Edited by centerbolt on 04-03-2008 01:44 PM
Message 6 of 12
(6,282 Views)

Centerbolt posted

Maybe I am confused but I thought a 4-to-16 accepte four bits and returned 16 bits were only ONE of the returned lines was true at any time.

Ben

 

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

Ben,

If you convert the integer 1 to 16bit binary there is only one bit set to a one.  All the rotate does is move that one to the right bit position.

Here is working vi.

Message 8 of 12
(6,259 Views)
Here is an image that will make more sense from a bit sense.
 
 
Message 9 of 12
(6,248 Views)
Thanks centerbolt, that is slick and much better than the enclosed. LOL
barry


Message 10 of 12
(6,247 Views)