LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Channel Analogue Aquisition

    Hi, I posted a post eariler and realized that it was not a good idea to attach the VI but rather some screen shots. So here they are!

I am an absolute beginner to Labview and began using the software just last week, and I think its great so far. I am primarely using it for data aquisition, since i plan using Matlab for post processing. So basically all I need for now is connecting multiple analog inputs to measure voltages. It seems there are many ways of doing things e.g NI DAQ assistant or the ways illustrated in the examples. My question is how can I add additional channels to the Cont-Acq-and-graph-voltage fie attached and display the result on the same measurement graph? I can add channels easily using the DAQ assistant, but I am finding it hard to add a channels to the Cont-Axq-and-Graph VI and displaying it on the same graph!!. In addition I created my own Vi named one analog inut channel, what is the difference between both files methodology ( the traditional way of aquiring or using DAQ assistant instead).

Thank you very much
Alloush
0 Kudos
Message 1 of 10
(3,883 Views)
Probably the following two changes will take care of things:

1. Change the channel control to an alphanumeric control and enter a channel list.

2. Change the polymorphic read waveform vi to read multiple waveforms.

(Right-click on the vis if you need to look at the help file to understand how to do this)
0 Kudos
Message 2 of 10
(3,876 Views)
Thank you for your help,

I changed the DAQmx read to read multi channels, but could not figure out how to changee the channel control to an alphanumeric control, since the only control I am able to wire to it is the I/O control that displayes a pull down list of all the channels.


0 Kudos
Message 3 of 10
(3,869 Views)
You do not need to change anything. For multiple channels, all you can click the browse option and do it from there. Hold down the CTRL key to select multiple channels. Or just type Dev1/ai0:3 for example. This will acquire channels 0 through three. Dev1/ai0,Dev1/ai2,Dev1/ai3 would be for nonconsecutive channels
Message 4 of 10
(3,861 Views)
Thank you

IT worked, but why do i need to stop the VI and rerun it so that the effects take place, cant I just change the channels and see the result while the VI is running, instead of having to stop, change the channels and run to see the effects.





0 Kudos
Message 5 of 10
(3,851 Views)
Works both ways but Dennis's approach is more elegant. it always bothered me that multiple channels used a string, but that's what the help suggested, so I just did it...
0 Kudos
Message 6 of 10
(3,850 Views)
Hi gwd,

can you point out to me where in the help does it suggest this, as I have been browsing allot and my last resort was this message board. Any suggestion on how to live update instead of having to stop and run the VI everytime.


Thank you
0 Kudos
Message 7 of 10
(3,849 Views)
Sure

now you have to realize I'm doing DAQmx with 7.1

go to DAQmx Create Virtual Channel.vi help

now you scroll down to physical channels where it says

physical channels specifies the names of the physical channels to use to create virtual channels. The DAQmx physical channel constant lists all physical channels on devices and modules installed in the system. You also can wire a string that contains a list or range of physical channels to this input. If you have an array of physical channels, use the DAQmx Flatten Channel String VI to convert the array to a list.

now I don't understand your "live update" issue but I would point out

you can use a constant instead of a control if you want the values to stay unchanged OR

you can rightclick the control and select Data operations> make current value default.
0 Kudos
Message 8 of 10
(3,846 Views)
Read the series of messages again. I think you want to change the active channel in real time?

To do that I think you need to either clear the task and start a new one OR start a task with all channels active and select the particular waveform you want inside the vi.
0 Kudos
Message 9 of 10
(3,843 Views)
Thank you gwd you have been of real help,

What i meant with my question is that for example I select channel a0 from the drop down list and run the VI, while the VI is running I would like to change it to channel A1 from the drop down list without having to stop the VI and running it again. But I think your answer addressed that so thank you again


0 Kudos
Message 10 of 10
(3,839 Views)