LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DAQ Assistant with three digital input channels

I am asking for help in writing a VI that will monitor three digital input channels using DAQ Assistant in Labview 8.0.  I want to use a case structure to execute code, depending on which digital input channel is active. Assume that only one channel will be active at a time. (In some cases, no channel will be active) 
 
The VI (attached) was written just to see if I could read  and "separate" each channel.  When I set up the DAQ Assistant I added the three virtual channels and tested each channel.  Each channel worked.   Each one is set up as a virtual channel in MAX.
 
I closed the DAQ Assitant and ran the VI.  I applied a "Hi" (+ 5 volts) dignal to the channels, one at a time. I expected that the top boolean on the front panel) to lite when I applied my "Hi" signal to channel 1.  The boolean did not change. I repeated for channel 2, same result. When I applied a "Hi" to channel 3, the top boolean lit up.  I expected to bottom one to lite.  I'm not that familiar with DAQ Assistant so I'm guessing I'm missing something very basic.
 
My goal is to take the ouptut of the DAQ Assistant (which is a 1D array of boolean) maniulate it somehow so a case structure can "read" the channel name.
 
Thanks fokr your help.
 
Bill
 
PS When should I use a virtual channel and when should I use the physical channel?
0 Kudos
Message 1 of 3
(3,211 Views)
Hello. The problem is that you're splitting the signal. Also I suggest you use the DAQmx Read.vi instead of the assistant. I modified your program. You only have to select which channel to use in your daq for each of the Channel Constants (the purple boxes) wired to the DAQmxRead.vi's. Another option is to define 3 tasks in the Measurement and automation explorer for your DAQ, specifying which channel to use ant type of signal and changing the Channel Constants to Tasks Constants, you'll find them in the DAQmx menu. I usually prefer this last option.
 
Hope this helps,
Ali
Message 2 of 3
(3,206 Views)
Thank you Ali, that worked.
 
Bill. 
0 Kudos
Message 3 of 3
(3,194 Views)