Example Code

VI Block - PRIORITY ENCODER 8 Inputs _ 3 Outputs

Code and Documents

Attachment

This VI simulates an 8 Inputs PRIORITY ENCODER.

Changing the states of the 8 Inputs values​​, you will have the Binary corrisponding to the 3 Outputs, but

at switching contemporary, you will get as output the highest value among the various inputs.

0 as the lowest Input value, follows 1, 2, ...

B0 as the lowest Output value, follows B1 and B2.

Follows the truth table:

     

InputB2B1B0
0

0

00

1 - 0

001

2 - 1 - 0

010
3 - 2 - 1 - 0011
4 - 3 - 2 - 1 - 0100
5 - 4 - 3 - 2 - 1 - 0101
6 - 5 - 4 - 3 - 2 - 1 - 0110

7 - 6 - 5 - 4 - 3 - 2 - 1 - 0

111

Mattia Perazzelli

Student at I.T.I. Guglielmo Marconi

Campobasso - Italy

Electronics and Telecommunications

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors