11-13-2018 06:55 AM
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??
Solved! Go to Solution.
11-13-2018 07:23 AM
11-13-2018 07:31 AM
You don't need a third loop.
You need 1 loop that has a DAQmx task set up to read 3 channels.
11-13-2018 07:34 AM
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.
11-13-2018 07:54 AM
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
11-13-2018 08:04 AM - edited 11-13-2018 08:06 AM
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.
11-13-2018 08:15 AM
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?
11-13-2018 08:25 AM
Help >> Find Examples
Search "DAQmx"
"Basic Power Measurement.vi" was one near the top that showed multiple channels.
11-13-2018 08:32 AM
Sorry, but I don't see "Basic Power Measurement.vi". Who posted it?
11-13-2018 08:34 AM
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