LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get lab view to read from multiple inputs?

I am trying to get LabView to read data from several sensors for the first few seconds of every hour by using a pair of loops, one of which cycles every hour, the other of which cycles every few seconds. For one sensor, I set it up like this:
 
[url=http://img2.freeimagehosting.net/image.php?cb3bde29d6.gif][img]http://img2.freeimagehosting.net/uploads/th.cb3bde29d6.gif[/img][/url]
 
And it worked just fine, when I tried to expand it into two inputs however....
 
[url=http://img2.freeimagehosting.net/image.php?30b8cad2e5.gif][img]http://img2.freeimagehosting.net/uploads/th.30b8cad2e5.gif[/img][/url]
 
Only the second input worked. How do I fix this?
0 Kudos
Message 1 of 7
(3,664 Views)
Oops, the picture didn't work quite right, nonetheless, you can just copy the URL's to see the code.
0 Kudos
Message 2 of 7
(3,658 Views)
Most Valuable Intern (or MVI where we work),
Thanks for posting to the NI Forums.  I took a look at your code and was able to see what might be causing your problem.  NI DAQ boards only have sample clock for analog input.  Therefore you can only have a single analog input task running at a time that uses the sample clock (ie that has an acquisition rate).  You can include more than one analog in channel in one task, however.  You can add the channel in series after the first channels is added.  In other words you can have more than one DAQmx Create Channel in a row.  Wire the DAQmx Task out on the first create channel to the task in on the second create channel.  Then the same sample clock will be used for both.  Set up the timing to sample both samples every few seconds and then ignore the data that comes in on the channel that you monitor every hour.
Hopefully this is helpful in getting you started.  If you need further clarification on my suggestions feel free to post back to this thread.  Good luck with your application.

Regards,

Neil S.
Applications Engineer
National Instruments


0 Kudos
Message 3 of 7
(3,630 Views)

Hi, I thought I would jump on this thread, since its close to my problem. I am a LB newbie, and I am

having problems reading my analog inputs. Here is my scenario.

I am using Labview 8.0 with a PCI-6225 card and I am trying to use the DAQ Assistant to set up the 30 voltage channels I am trying to read as input.

I don't need the data from all the 30 channels all at once, but usually 5 channels at a time, each 5 chanels relating to some specific voltages

for different tests. When I build the Daq Assistant, I select all the channels I want read and then the VI builds in my block diagram. I use the

signal splitter function to split these signals to various numeric fields where I access them at some point in my testing.

First question is, can I do this or is this not a good idea? Whats happening is that my first 5 channels listed in my DAQ Assistant seem to work, but the rest don't.

When it comes time to get that information from the respective number fields, there is really no data there, or if there is its small insignificant stuff.

II also have this DAQ assistant running in its own thread outside the main loop for my testing. I did this because I want the data to be updated all the time and when

I access the information from the fields it will be whatever its currently being read within 500 ms. Can anyone shed some light here? I am sure I am doing something very wrong here

althought it partially works, so I must be on the right trail somewhere.

Thanks.

Norm.

0 Kudos
Message 4 of 7
(3,570 Views)

Please ignore my previous message. I found the problem and it was a newbie problem... 🙂

 

Norm.

0 Kudos
Message 5 of 7
(3,555 Views)
Hi,
 
I am a Labview beginner and trying to figure quite a basic thing.
My DAQ Assistant is configured for two signal inputs.
(It is in a while loop; each time it reads N data points at a set
rate).
 
If I wire the output "data" to a waveform graph, I see both signals
on it.
 
However, how do I access each signal separately so that I can process and
store them separately? (i.e. there is just one "data" output for multiple signals;
how do I split them?)
 
Thanks in advance for the responses.
 
Prg
0 Kudos
Message 6 of 7
(3,494 Views)
The way to split signals is to use the 'Split Signals" function.Smiley Wink I have no idea which palette it's on with LabVIEW 8.x but it's on the Express>Sig Manip palette in 7.x. Your function palette has a search ability that you can use.
0 Kudos
Message 7 of 7
(3,473 Views)