LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple channel sampling using DAQ-max

Hi
 
I would like my sub-vi ( to sample multiple analogue input channels.  Presently it samples just 1 analogue input channel and this is triggered by the analgue output as described at the foot of this message.
 
Is there a quick way I can modify the code so that it will sample multiple analogue input channels?
 
Many Thanks
 
Ashley.
 
 
The code runs in the following manner:
 
The for loop on the top left generates an array of data points to write to the AO write sub vi (the start voltage and stop voltage and number of steps in AO voltage being the parameters that determine the output of this loop.
 
In the main for loop the AO output is swept according to the settings generated above.   On each step of the analogue output voltage there is a short delay set by the DAQmx trigger before data is sampled to the AI channel. The loop executes N times and the mean of the N sweeps is plotted to the graph (outside the loop).
 
 
 
0 Kudos
Message 1 of 3
(2,535 Views)
Unless you want to acquire from these 4 channels with different ADC ranges, just do as shown in the attached VI
 
  • Add all 4 physical channel names in the same physical channel list with a comma seperator
  • Select type of the DAQmx read (polymorphic VI) as read muliple channels, multiple samples and 2D dbl.

Now you will get data in a 2D array format with each row corresponding to each channel in the scan list.

Regards

Dev

 

0 Kudos
Message 2 of 3
(2,526 Views)

Brilliant Dev.

Thank you very much.

Regards

Ashley

0 Kudos
Message 3 of 3
(2,521 Views)