LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Monitor Multiple Analog Channels

Solved!
Go to solution

Greetings,

 

I am programming a production end of line test stand for small air pumps using consumer/producer architecture for the program structure. I have three analog inputs (0-10 VDC) being fed into a Ni USB-6363 DAQ. I would like to be able to monitor all three inputs (continuously updated) using numeric indicators while the program is running. I tried adding a third while loop but that caused the rest of the program to stop executing.

 

Any suggestions on how to get this done??

0 Kudos
Message 1 of 10
(2,930 Views)

Hi Dennis,

 

Can you show us what you tried so far ?

0 Kudos
Message 2 of 10
(2,915 Views)

You don't need a third loop.

 

You need 1 loop that has a DAQmx task set up to read 3 channels.

0 Kudos
Message 3 of 10
(2,911 Views)

Sorry, but when it didn't work as I planned I didn't save the changes I made. I have attached a screen shot of the case in the hardware loop where I read an analog input, however, it does not update continuously. Once the case executed I get one value.

0 Kudos
Message 4 of 10
(2,909 Views)

Please attach VIs.

 

     There are some excellent tutorials on DAQmx.  If you want to monitor Analog channels, you should not be doing one channel, one sample.  Have you used MAX (the Measuurement and Automation Explorer) to test out your DAQ device?  Have you seen that you can choose to acquire data from (say) Channel 1, 3, and 5, and can acquire 10 (or 1000, or any number of) samples at a time?  Did you know you can save such a configuration as a "Task" and thereby vastly simplify your DAQmx coding?  [It's all in the Tutorials].

 

Bob Schor

0 Kudos
Message 5 of 10
(2,902 Views)

You are set up to read 1 channel, 1 sample.  So I don't know how you are reading multiple channels now in order to be able to add a 3rd, because you are only reading 1 channel.

 

Change your DAQmx Read to N Channels N samples.  Then make sure you said up 2 or 3 or N channels wherever you create the task.  Right now that isn't seen in your code and it is odd you are using cluster of strings to define your channel rather than using a purple task wire.

 

Don't use Insert Into Array to add a data point to the end.  Use Build Array.  Much cleaner and more logical.

0 Kudos
Message 6 of 10
(2,898 Views)

Thanx for the tips, makes sense. I never got to the point of reading multiple channels. That's what I am trying to figure out. Maybe I didn't make it clear in my first post. Anyway sounds like this is what I was looking for, can you post a small example of, let's say, 2 channels being monitored?

0 Kudos
Message 7 of 10
(2,892 Views)

Help >>  Find Examples

Search "DAQmx"

 

"Basic Power Measurement.vi" was one near the top that showed multiple channels.

 

0 Kudos
Message 8 of 10
(2,888 Views)

Sorry, but I don't see "Basic Power Measurement.vi". Who posted it?

0 Kudos
Message 9 of 10
(2,885 Views)
Solution
Accepted by topic author Dennis_B.

It was in LabVIEW help, not posted.  But it is possible it was one that was installed with an add-on that you might not have.

 

Just search through the examples that come up for DAQmx.

 

Also look at Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications

Message 10 of 10
(2,883 Views)