LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple DAQmx tasks from multiple DAQ modules

Hi!

 

I am building a voltage measurement program that is to do in-situ measurement from 4 (or 5) DAQ modules that are NI-9205 (and NI-9223) that are connected to dock NI-9178. I have built 4 separate data sampling tasks but am getting an error that the task is already in use... I've found out that the dock is able to only have simultaneous tasks on 3 modules at a time...

 

What would be an elegant way to measure all of these modules in the same program in parallel. Must I create loops where I start and stop the task in a sequence? That seems like a hassle.. Is there anotherway?

 

I can provide my VI if necessary but it is just 4 parallel DAQmx measurement tasks in one while loop. Similar to this but 4x:

Akuaku_0-1621509800592.png

 

0 Kudos
Message 1 of 8
(3,394 Views)

Hi Akuaku,

 


@Akuaku wrote:

I am building a voltage measurement program that is to do in-situ measurement from 4 (or 5) DAQ modules that are NI-9205 (and NI-9223) that are connected to dock NI-9178.


Can't you put all/several modules into just one task?

 

Btw. the cDAQ9178 is called "chassis" (instead of "dock")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(3,382 Views)

If I can then that is very good solution. I've tried that though but perhaps did that wrong....

 

I've input the channels as follows: "cDAQ1Mod4/ai0:5;cDAQ1Mod5/ai0:5;cDAQ1Mod6/ai0:5;cDAQ1Mod7/ai0:5" but this is probably the wrong input.... How should this be done?

 

Also, now that I learned this is a possibility, can I add a NI-9219 resistance measurement to the same task? Or are AI-voltage and AI-resistance measurements always separate tasks?

 

Thanks for the help GerdW!

0 Kudos
Message 3 of 8
(3,368 Views)

Hi Akuaku,

 


@Akuaku wrote:

I've input the channels as follows: "cDAQ1Mod4/ai0:5;cDAQ1Mod5/ai0:5;cDAQ1Mod6/ai0:5;cDAQ1Mod7/ai0:5" but this is probably the wrong input.... How should this be done?


Do you get an error for the DAQmx task?

Can you attach your VI?

Did you select the channels using the channel reference selector?

Why do you use just 6 channels per module, when a single NI9205 offers 32 channels? Why do you need 4 modules, when one module can handle the job?

 


@Akuaku wrote:

Also, now that I learned this is a possibility, can I add a NI-9219 resistance measurement to the same task? Or are AI-voltage and AI-resistance measurements always separate tasks?


Let's start with your basic voltage measurement and handle other measurement channels once the voltage signals are working correctly…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 8
(3,362 Views)

@Akuaku wrote:

If I can then that is very good solution. I've tried that though but perhaps did that wrong....

 

I've input the channels as follows: "cDAQ1Mod4/ai0:5;cDAQ1Mod5/ai0:5;cDAQ1Mod6/ai0:5;cDAQ1Mod7/ai0:5" but this is probably the wrong input.... How should this be done?

 

Also, now that I learned this is a possibility, can I add a NI-9219 resistance measurement to the same task? Or are AI-voltage and AI-resistance measurements always separate tasks?

 

Thanks for the help GerdW!


Please mention which modules you are using in which slot.
It might be useful to start more than one task, e.g. because a 9223 offers a sample rate of 1MS/s for each channel compared to the aggreate 250 kS/s of a 9205.

Yes, it should be possible to add a NI-9219 to an 9205-task. I recently did this with a 9205 & 9217 module, and the 9217 is fairly similar to the 9219.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 5 of 8
(3,356 Views)

Hi Gerd!

 

I get the following error with the input channels: Error 200279 which is that the hardware is not able to keep up with the program. I suspect there is something wrong with my channel configuration however. 

 

I attached the VI. There are the voltage measurements from modules 4-7. Also another task measuring the resistances from module 1. Im trying to include the resistance measurement in the same task if possible. 

 

I dont use all the channels and use multiple modules because in another program I need to up the sampling rate of the channels and the module is capable only to a total 250kS/s. More modules provide sufficient sampling rate. 

0 Kudos
Message 6 of 8
(3,317 Views)

Hi Jens!

 

I included the VI in another message. I use modules 5 through 7 for NI 9205 and module 8 for 9223. I also have universal modules 9219 in slots 1-3. 

 

In this application the sampling rates and measurement specs for the 9205 and 9223 modules are the same so in that sense I could run them with the same Timing block if that is possible. 

0 Kudos
Message 7 of 8
(3,316 Views)

Some basic math:

 

You start your 9219 task with a daq-rate of 200 S/s, and then request 50 samples per channel on each read -> i.e. 0.25 s per DAQmx Read.

 

You start your 9205 task with a daq-rate of 240 S/s, and then request 10 samples channel on each read -> i.e. 0.04167 s per DAQmx Read.

 

Both Reads are inside the same while loop, hence the software buffer of your second task will overflow in short time, leading to error -200279.

 

EDIT: Solution: either run both task in independent loops or use a "-1" at the DAQmx-Read input at one of your two read-VIs.

 

Regards, Jens

Kudos are welcome...
Message 8 of 8
(3,313 Views)