LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquisition CompactDaq with 4 cards ??

Hi,

 

I have a big problem with LabView, and I'm totally a beginner on this soft, plus it's hard for me to understand english so I didn't manage to resolve my problem with things I found online.

 

So I'm using a CompactDaq-9138 with 4 cards : (9232, 9213, 9223 and 9203). And i'm on LabView 2012 (12.0). When I started my work The vi was already made for 3 cards and it work fine.

Now I need to use the 4 cards that I have. But when I try that I have an error : "- 200022 occured at DAQmx Start Task.vi : 4. Ressource requested by this task has already been reserved by a different task".

And I tried with only 3 cards, no matter which cards it was it worked, it's just when I have the 4 cards simultaneously. I always have this error on the "start.vi" of the fourth channel. I join my VI to this message, so it always occur at the "start vi" after the "start digital edge".

 

I already read some similar topics on the forum, about the clock of channels, things like that... But I'm really a beginner on LabView it's really hard for me to understand. (Plus I am french and the technical explanation in english on a soft that you don't know is complicated ^^").

So if someone know why I have this error and can explain it to me it would be really nice, because I've tried multiple things and don't know what to do now...

 

 

Thanks a lot

0 Kudos
Message 1 of 7
(2,686 Views)

Your problem is that the cDAQ-9138 only has 3 analog sample clocks.  This means you can only have 3 AI tasks.  What you need to do is put all of your analog input channels into a single task.  This will greatly simplify your code and make it more scalable.


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 2 of 7
(2,653 Views)

Thanks for your fast answer.

 

Ok too bad it can't have 4 tasks ^^".

Would it be possible that you explain to me how I can have 1 task for everything? I don't know if you opened the vi but I need all the acquisition to start at the same time.

So I don't know how to have everything start together with one analog sample clock, can you detail it to me a little or make a really simplified vi of that? I'm sorry again I barely understand what is a "task" it's the first time I use LabView and I'm alone on it without formation so I have trouble to understand how it work ^^"

0 Kudos
Message 3 of 7
(2,644 Views)

Krafter37 wrote: I barely understand what is a "task" it's the first time I use LabView and I'm alone on it without formation so I have trouble to understand how it work ^^"

In that case, start here:

Getting Started with NI-DAQmx

Learn 10 Functions in NI-DAQmx and Handle 80 Percent of Your Data Acquisition Applications


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 4 of 7
(2,623 Views)

Hello,

 

When you read the documents given by crossrulz, you can find an exemple with multiple tasks:

NI-DAQmx: Creating an Analog Input Task with Multiple Measurement Types in LabVIEW
http://www.ni.com/example/25899/en/

 

Have a good day

Eloise
NI France

0 Kudos
Message 5 of 7
(2,607 Views)

Hello,

 

Thanks for the documentation and thanks Eloise for the focus on that part that helped me a lot ^^

 

Just something that bother me : with the example all the channels have the same rate of acquisition if I understand right?

For me I need to have a different acquisition rate (again sorry for my english) for each channel (temperature, current, voltage, ...). Is it possible if I use only one analog sample clocks to have 4 differents rates?

 

Good day to you too

0 Kudos
Message 6 of 7
(2,595 Views)

Hi,

 

NI cDAQ-9138 chassis provide three timing engines for analog input. So you can't create more than 3 tasks with different timing :

How Many Different Tasks Can Concurrently Run on a CompactDAQ Chassis Gen II?
http://digital.ni.com/public.nsf/allkb/5E0B829E50ADE1BC86257AC50062B2D2

 

 

Eloise
NI France

0 Kudos
Message 7 of 7
(2,589 Views)