Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ-9174 4 AI tasks

I know that cDAQ-9174 have 3 AI timing engines which gives me a maximum of 3 tasks with different sampling rates.
I have a system with 4 modules (9221, 9205, 9229 and 9211), one of which is for thermocouples.
I was wondering if there is anyway to have the 9211 sampled by an external source, giving me a total of 4 different AI sampling rates.

 

Thanks for the attention.

0 Kudos
Message 1 of 9
(3,927 Views)

@PedroBlois wrote:

I know that cDAQ-9174 have 3 AI timing engines which gives me a maximum of 3 tasks with different sampling rates.
I have a system with 4 modules (9221, 9205, 9229 and 9211), one of which is for thermocouples.
I was wondering if there is anyway to have the 9211 sampled by an external source, giving me a total of 4 different AI sampling rates.


Have you used 'DAQmx Timing (VI)'. Timing related modifications/configurations can be done using this function.

If you are planning 4 tasks, each task can have its own timing/triggering configuration.


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 2 of 9
(3,924 Views)

I'm sorry, but I don't see how it could help me.
The problem occurs before this VI is called. The "DAQmx Create Task.vi" throws the error -200022 which says that the requested resource is already reserved by another task. The resource that is reserved is not the module itself but the timing engine that generates de clock for sampling.
The thing is that I can't have 4 tasks created successively. Before creating the fourth, I have to clear one of the 3 tasks created before.
Am I right?

 

Thanks.

0 Kudos
Message 3 of 9
(3,915 Views)

@PedroBlois wrote:

I'm sorry, but I don't see how it could help me.
The problem occurs before this VI is called. The "DAQmx Create Task.vi" throws the error -200022 which says that the requested resource is already reserved by another task. The resource that is reserved is not the module itself but the timing engine that generates de clock for sampling.
The thing is that I can't have 4 tasks created successively. Before creating the fourth, I have to clear one of the 3 tasks created before.
Am I right?


Ohh.. Lemme confirm it.. I'm now going to simulate the hardware.. mean while you can have a look at:

Synchronize Multiple Devices with a Shared External Sample Clock using DAQmx


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 9
(3,910 Views)

Actually the problem doesn't occurs in the create task, but in the start task.

That was my mistake!

I'll look the link you've suggested.

 

Thanks.

0 Kudos
Message 5 of 9
(3,908 Views)

My bad here....!!

The link I shared talks about how to synchronize two devices USING RTSI BUS...!!
Thats not available on cDAQ chassis...!!

 

Well as you're specifying there are three timings engine available, where is the fourth timing source for the fourth module (say 9211)...??

can you share the code, just wanna see how are you specifying three different timing engines (sources) to three of the modules...!!


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 6 of 9
(3,907 Views)

That's the problem.
There is no fourth timing source in the cDAQ for the fourth module.
I was hopping that this could be done by an external source using, perhaps, the PFIO pin from NI-9205.
But I wasn't able to do it so far. I don't know if this is possible.

 

The code for using the 3 timing engine for each task is the simplest possible.
Just put 3 DAQ Assistant.vi in different loops and configure each to aquire samples from different modules.
It automatically choses one timing engine for each task, but you can force LV to use a specific timing engine in the tab "Advance Timing".

 

Thanks.

0 Kudos
Message 7 of 9
(3,903 Views)

Sorry for the delay in the reply...!!
Well, why are you using DAQ Assistant (which is easy to configure but also you have very less control).

 

You can probably use the low level DAQmx functions, which offers great control over configuring the task and performing data acquisition.

For you reference here is a good DAQmx tutorial series to start with.

 

You can play with attached code, with simulated device I cannot test much... specially timing related things... I feel that's because of limitation of simulated device.Smiley Sad

 


@PedroBlois wrote:

I was hopping that this could be done by an external source using, perhaps, the PFIO pin from NI-9205.
But I wasn't able to do it so far. I don't know if this is possible.


I tried to include that part (using PFIO line on NI-9205 for timing clock source), in this case you need to feed a clock signal...!!

4 Tasks with different timing source


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 8 of 9
(3,897 Views)

I used DAQ Assistant just to quickly make a code and send you, as you requested.
hehehehehe

 

Your code threw the same error. I'm using simulated device too, cause I don't have the hardware here with me.
Actually I had to change a few things to run it here (code attached). 

I put the errors like that just to prove the point that the last task is always throwing that error.


I think I'll just put two modules in the same task and live with it.

 

Thanks.

 

0 Kudos
Message 9 of 9
(3,892 Views)