LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and logging multiple channels simultaneously

Solved!
Go to solution

I am using an NI PCIe-6363 board to acquire data from various sensors in an experimental engine.  I need to be able to display readouts and log the data on all channels simultaneously.  I am relatively new to Labview, so I think I'm doing things inefficiently.  I am also having an issue with displaying multiple signals.  I have attached the vi.  I look forward to any advice.

-------------------------------------------
PXIe-1071
PXIe-8115 Embedded Controller
PXIe-6363 X Series Multifunction DAQ
PXI-7854R FPGA
0 Kudos
Message 1 of 4
(5,223 Views)
Solution
Accepted by topic author Tokodaisei

DAQmx is capable of taking multiple sample simultaneously, so you would only need one wire spanning your While Loop. See this example VI that ships with LabVIEW; you can find others with the Help >> Examples menu and digging from there:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2012\examples\DAQmx\Analog Input\Voltage - Continuous Input.vi

 

The DAQmx initialization VI would need a different sort of input rather than "PXI1Slot2/ai0". I forgot the exact syntax but it would be something like "PXI1Slot2/ai0-15". Also, the DAQMx read VI is polymorphic so it can read all those channels in as an array. Then you would have to build the array of those PXI objects for the DAQmx initialization VI with LabVIEW's "Build Array" function, and index the array into 16 elements with the "Index Array" function. You will only need one Index Array function, just expand it down and it will automatically give you elements 0 through 15 (or however far you expand it) without having to wire in any indexes.

Message 2 of 4
(5,214 Views)

First off, can't open the VI as there are some bits missing, so can't easily comment on what you have (or at least there are bits missing in the version of LabVIEW I'm trying to access it with at the moment).

 

What I would advise is use the express VIs if you're new to labVIEW. In fact, use the express VIs if you're just new to that card, or that DAQ interface is usally a good rule of thumb, then, you can always open up the front panel and have a look at the code underneath to understand what is going on if you want to.

 

The express VI is just a button click and type a few numbers exercise, and it may save you some headaches for the basic DAQ interaction. It may not give you everything you need, which is why programming it yourself is a good plan, but it might help you get past the learning curve, or even provide the answer you need.

Message 3 of 4
(5,199 Views)

Thanks a lot for the explanation.  The arrays work perfectly, and now everything seems less cluttered too.  By the way, the syntax was to use a :   For example, PXI1Slot2/ai0:15    

-------------------------------------------
PXIe-1071
PXIe-8115 Embedded Controller
PXIe-6363 X Series Multifunction DAQ
PXI-7854R FPGA
0 Kudos
Message 4 of 4
(5,176 Views)