Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create more than 2 channels in one VI using low level DAQmx

Hi all,

I have problem when using low level DAQmx to create more than 2 channels in one VI. I want to create more than 2 channels for AI measurement. The error said I can not use 2 "DAQmx start task" module at the same time. How to solve this problem?

BTW, do I need to set clock module for each channel? How to make them share the same clock settings?

It's not a problem when using DAQ assistant as I can easily choose more than 2 channels and make them share the same clock settings but with different input range.

Thanks

best

0 Kudos
Message 1 of 4
(4,164 Views)

If you want to share a timing source, create two channels and add them to the same task.

0 Kudos
Message 2 of 4
(4,149 Views)

So what you are doing with the DAQ Assistant is creating a single task with many channels in it.  You need to do the same with the DAQmx API.  Look at the DAQmx Create Channel VI.  There is an input for the task to add that channel to.  Use that to add channels to your task.  But then when you perform the read, be sure to use the Multiple Channels option on the DAQmx Read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(4,143 Views)

Hello iyearning;

The thing about what you are trying to use is that you can't create more than one AI input task at the same time, what you can do is select multiple channels for the same task, and that way you can acquire from them all. You can do so following this Knowledge Base:

 

http://digital.ni.com/public.nsf/allkb/A3A05920BF915F1486256D210069BE49

 

To address your question about the clock, you configure that for the task, so if you select multiple channels for that task, they will; all have the same clock configuration.

 

Juan B.

National Instruments

 

 

0 Kudos
Message 4 of 4
(4,128 Views)