LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

convert 8 bit unsigned integer to binary (base 2)

i am trying to convert an 8 bit unsigned integer to binary (base 2) representation and use 8 LED's to show this representation.
Like for integer 10, the binary is 00001010.....so the LED' s 1 and 3 should be on...
 
0 Kudos
Message 1 of 16
(7,531 Views)
Use "Number to boolean array" from the boolean palette. 🙂
Message 2 of 16
(7,527 Views)
hi i also trying to do this problem. After I connect the number indicator  then connect it to 8 (number to boolean array) then from there i try to connect to 8 Led Indicators. It can't work. Can anybody pls give me some tips? will really appricate it thanks
0 Kudos
Message 3 of 16
(7,250 Views)

If your Booleans are in an array, then you should have no problem. If they are not for some reason, just use the Index Array function.

 

This is very basic. Have you seen the free tutorials?

Message 4 of 16
(7,239 Views)

The LED (boolean) indicators are simply placed into an array.

 

To "borrow" an example of such a display, you could have a look at the code written for the parallel port example that can be found under the Help menu:

 

Help > Find Examples :  Search "parallel"  HAve a look at the 1st or 2nd example.  They have LED's wired to a U8 array  (I think..  It's been a while since I looked at the example... 😉  )

Message 5 of 16
(7,230 Views)
thanks guys for the help. now i got another question. I trying to do the assignment that requires me to calculate the age of a person. Now the problem that I face is I should have only one output for age which will be shown in the front panel. In the block diagram I have 2 output which I got no idea how should I connect them. Can give me any tips? Thanks
0 Kudos
Message 6 of 16
(7,208 Views)

Your image is impossible to see and understand.  Perhaps you can post the actual VI?  (.png files are better to post than jpeg's.  You should search online for the Code Capture Toolkit.)

 

Why do you have two outputs?  What does each mean?  If you weren't thinking computers and LabVIEW and you were doing this in your head, how would you handle these two "outputs"?

 

Why don't you just combine the values into true dates and do a subtraction between them?

Message Edited by Ravens Fan on 09-15-2009 02:46 PM
Message 7 of 16
(7,200 Views)
here the VI picture. Wat u mean of true dates?
0 Kudos
Message 8 of 16
(7,189 Views)

The .pdf is a bit clearer.

 

True dates as in Time Stamp controls.

0 Kudos
Message 9 of 16
(7,181 Views)

Okay, if you really want some help, DO NOT poset some code in a pdf file. Creating a pdf is silly since all you have to do is attach an image and the best way to get help is to post an actual VI.

 

Message 10 of 16
(7,179 Views)