02-05-2015 05:30 PM
Hello,
Basically, I have a parallel-input Serial-out shift register connected to an arduino UNO that is interfaced with labview. The shift register output is fed into the arduino digital pin with eight inputs as 1's or eight 0's. what I am trying to do is to assign each bit from the digital pin of the arduino to an LED in the front panel in labview. For example, if there are four 1's and fours 0's being read from the arduino pin then four led's should be on and four should be off. Any help would be grately appreciated.
Thanks in advance.
Solved! Go to Solution.
02-05-2015 06:22 PM
Just send the data through the serial port. Since you are talking about 8 digital lines, just assign each line to a bit and send that byte through the serial port. You can then read the byte in LabVIEW and parse the read byte.
02-05-2015 06:32 PM
02-06-2015 07:26 AM
Look in the LabVIEW Example Finder (Help->Find Examples). There is an ok example in there for a simple serial read using the VISA functions.
Since the VISA Read outputs a string, you will want to use String To Byte Array and then Number To Boolean Array and Index Array to split up the bytes into the individual lines that you care about.
02-27-2015 07:03 AM
Hello crossrulz,
can you please tell me how I can separate each boolean led that is in the first byte. please refer to the attached image for what I have done.
Thanks in advance
02-27-2015 07:20 AM
You already have the Number To Boolean Array. That was the part I was worried about you finding. Use Index Array to get the individual booleans out of the array. And Index Array is expandable, so you only need to call it once in this case. Just expand it to have 8 elements and wire up to your LEDs.
03-13-2015 07:23 PM
Thank you very much. It works
If its not too much to ask, is ppossible to make a monochrome image of these leds in labview using any sort of vi's. Any help will be grately appreciated.
Thanks
03-13-2015 08:18 PM
03-14-2015 06:15 AM