LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about parallel daqmx tasks on cDAQ-9188

Hi,

 

I have a cDAQ-9188 chassis, housing four NI9203 modules.

 

I currently have two tasks which I wish to run under NI-DAQmx, one is acquiring 14 channels of analogue inputs (at 750 S/s) and the other is monitoring an encoder connected to the PFI inputs on the chassis.

 

I have configured the AI task to trigger an event every 75 samples, and I have configured this to be processed in the main execution thread.

 

I am using the execution profiler, and if I have the AI task running, the encoder task takes around 30ms each time to obtain a reading - it the AI task isn't running, this drops down to around 2ms which is much more reasonable.

 

Surely it must be possible to run these tasks in parallel without such a detrimental affect to the time taken to obtain an encoder reading?

 

What should I be doing to allow these tasks to run comfortably side-by-side?

 

Thanks for any help,

Chris

0 Kudos
Message 1 of 3
(3,089 Views)

Hello Chris,

 

I think it should well be possible but obviously there are a lot of variables here.

 

Could you possibly attach the code you are seeing this behaviour? I am happy to take a look and see if there is anything I can spot.

 

Also, this application is obviously dependent on the Ethernet connection, what is the context of this system in the network?

 

Best Regards,

Nick
0 Kudos
Message 2 of 3
(3,071 Views)

Hi Nick,

 

Sorry for not replying sooner, I've not been in at work.

 

I'm attaching some files which are a much stripped down version of my project.

 

In this cut-down version, the read encoder call takes approx. 10ms when the AI task is running and 1-2ms when it isn't, so it doesn't exactly duplicate my issue, but is representative.  The timings I'm quoting are obtained from the execution profiler.

 

Thanks in advance,

Chris

0 Kudos
Message 3 of 3
(3,056 Views)