02-22-2010 11:38 AM
Hi,
I'm a newbie to LabVIEW.Currently I'm doing few design peoblems for my assignment.
One of question I'm having right now is to create a front panel that has 8 LED indicators and vertical slider control that is an 8 bit unsigned integer.The problem is to turn the 8 LEDs into a binary(base2) representation for the number in the slider.
Solved! Go to Solution.
02-22-2010 11:45 AM
02-22-2010 11:47 AM
Hi,
I have attached the new code. Notice that I have only made minimal changes. Two main things I have changed:
1. Your slider was in double. I changed it to U8 like you said. You need to watch out for formatting.
2. Since the number is a U8 now, I can use number to boolean array to convert the number to binary.
Yik
02-22-2010 12:02 PM
Just a couple of points to add to the earlier posts. As they imply, using an array of booleans simplifies the display and the code. The slider has a datatype, you should set it, and it has a digital display so no need to wire to a separate indicator.
I show two ways to convert to the boolean array, the usual is using 'Number to Boolean Array' which gives you computer ordered results (LSB first). If it is just for show (and it usually is) I use type cast with Convert 4.x selected to give a human ordered array (MSB first). You can also reverse the Number to Boolean Array result if you wish.
02-23-2010 08:08 AM
Hi,
Thanks for the help.the solution is what I want only if able to change the indicator reading from LSB(right) to MSB(left).currently is LSB(left) to MSB(right).
Rgds,
Vic
02-23-2010 08:51 AM
Hi,
Thank you for the help.My LabView is version 8.6 occured the problem to open version9.possible to send me again because I need to change MSB(Left first) then LSB(Right).
02-23-2010 08:58 AM
02-23-2010 09:32 AM
Hi,
Thanks, you are right.Question sloved!:)
Best Rgds,
Vic