09-06-2012 06:38 AM - edited 09-06-2012 06:39 AM
Hi,
Here is a simple question,but Iam not getting the expected results.I have a numerical array with values as zeros and ones only.I want to display them in an LED array with one-LED ON and zero-LED OFF.Attached is my VI.please help.That is for one values the LED will glow and for zeros the LEDs will be OFF.
Solved! Go to Solution.
09-06-2012 07:05 AM - edited 09-06-2012 07:06 AM
09-06-2012 07:07 AM - edited 09-06-2012 07:09 AM
Hi,
Here is one way to do it. It's not the best way to do it, but it gives you the result you ask for. Try getting the same result with a differet approach. For instance without the for loop, like GerdW's second solution, which is the best.
09-06-2012 07:14 AM
The function Number to Boolean array takes the number, converts it to binary then creates an array. Your VI will output the binary representation of the last element in the numeric array. What you need is something like this. It assumes that the entries are either >1 (True) or zero (False)
Ken
09-06-2012 07:35 AM
@Ken_Naylor wrote:
The function Number to Boolean array takes the number, converts it to binary then creates an array. Your VI will output the binary representation of the last element in the numeric array. What you need is something like this. It assumes that the entries are either >1 (True) or zero (False)
Ken
And the reason you have a while loop is because?
09-06-2012 07:46 AM
The original problem was in a loop and I just modified it! On review it [the loop] is a bit (!) redundant
09-11-2012 11:39 PM
Hi,
Thanks for reply.