07-30-2012 10:53 AM
So I'm trying to control LEDs via LabView. I need to be able to turn on and off any combination of 32 LEDs based on a users input. I've been thinking that I would want to use a boolean array with 32 elements, but I don't know how I could have any user determined combination of the boolean values be changing. This is both a question for the theory as well as for the LabView implementation. Any helpful suggestions would be greatly appreciated.
Thanks
07-30-2012 10:56 AM
You will give the user an array of Boolean controls to work with? How would that not allow any combination? Or am I misunderstanding?
07-30-2012 11:07 AM
short answer: it can be done..give us a more specific answer to your requirements (to what specific user input to what specific boolean arrayed ouptut you need?)
07-30-2012 12:57 PM
Okay sorry for the lack of details. So what I now have is a boolean array in which the user can toggle between true/false(on/off) and these changes dictate the changes(equivalent) on the "resulting array". Now I need to make a system(using a breadboard for simplicity) where the "resulting array" is the breadboard with LEDs on them.
That is to say when boolean values at index 1, 4, 5, and 15(or whatever) are set for true in LabView, they're corresponding LEDs on the breadboard are on(receiving power.) When the values are set to false, the LEDs should not be receiving power, and should be off. This is being done on a classic breadboard and I'm trying to limit inputs.
Thanks
Zach
07-30-2012 01:16 PM - edited 07-30-2012 01:23 PM
So you are just trying to limit the number of wires you have to hookup to your breadboard? If you have the right DIO, a Serial to Parallel adapter might be of some help. For example, TI's SCLS555 will take a serial command and turn it into 8 lines. Granted, to get this to work in software will take some careful planning of your DIO lines and building of waveforms.
EDIT: Heh, upon actually reading the datasheet, the SCLS555 accepts a UART input and is addressable. It takes 2 commands per 8 bits. But you could have 3 of these chips, each has a different address, and you wire the serial port to each of the chips. Seems like the outputs should have enough drive to run the LEDs even.
07-30-2012 01:22 PM - edited 07-30-2012 01:26 PM
sounds simple, if your using a NI daq...goto your help>>find example>>hardware input and output>>daqmx>>digital generation>>write dig chan.vi...try that out
08-01-2012 11:05 AM
Okay so I'm using a Labjack u12.
I'm trying to use the digital signals of the labjack to turn leds on and off on a breadboard.
How can I make it so that the labjack turns on/off only the leds I code? aka routing power only through the digital outputs I request. Is that possible? Lastly, how do I communicate with the Labjack via labview? VISA seems not to be the answer...
08-01-2012 11:11 AM
Have you tried their drivers?
http://labjack.com/support/ud/examples/labview
08-01-2012 11:35 AM
It sounds like you're just asking how to turn on and off digital outputs of your DAQ with simple boolean controls. If so, that's about the simplest possible application for digital output. What have you tried? Where are you stuck? Both LabVIEW and LabJack have example code available. That should show you all you need to toggle some digital lines. If that's not all you need to do, post back and describe the whole project...
08-01-2012 01:03 PM
I've been using and looking through all the examples. I don't understand how Labview communicates with the labjack u12...
To be more detailed:
I'm trying to use the labjack commands LJUD_OpenLabJack.vi and the DigitalIO.vi blocks. I don't know what the ID number(it looks like -1 maybe,) the connection type, or the device type are...or at least how to dictate what they are within labview.
Thanks for the help I'm quite new to labview and definitely new to the use of the Labjack