LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Scan Channels with NI 9214 on NI cDAQ-9178

Hello All. I’m using the NI cDAQ-9178 and the NI 9214. I’ve attached my Temperature Measurement.vi and it’s working, but now I’d like to write LabVIEW code that automatically scans the 16 channels, one at a time and take a temperature measurement. Is there a way to step through the NI 9214 channels, using a case structure?? Or can this be done using the DAQ Assistant?? I’m new to LabVIEW, so I’m still learning. I’ve tried placing a “Physical Channel”  constant within and case structure with numbers as my cases, but was unsuccessful. Any suggestions or directions to links would be greatly appreciated.

0 Kudos
Message 1 of 4
(2,752 Views)
Your question does not make any sense. If your channel selection includes all channels (dev1/ai0:15) and the DAQmx Read is set for NChan, you will read all 16. The DAQ Assistant can be configured the same way. Absolutely no need for case statements.
0 Kudos
Message 2 of 4
(2,733 Views)

Ok. Let me try again. I was asked to modify my current vi, so that it scans each channel for one second, takes a measurement and output it to a file/report, with a time stamp. My current vi will record temperatures on all channels with time stamp, but the measurements are taken simultaneously. I wanted to step through the channnels one at a time and output the results in that order. Did I explain better?? 

0 Kudos
Message 3 of 4
(2,724 Views)
Then use a for loop where you pass in a channel array and the task is started and stopped. Setting the number of samples to equal the sample rate will give you 1 second of data. Of course, you can measure all 16 in one second with my idea or repeat the measurement 16 times. Why don't you want to measure all temps at the same time?
Message 4 of 4
(2,715 Views)