Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel DAQmx analog reads at different acquisition rates

Solved!
Go to solution
I am running two 9172 chassis with a total of 11 modules. I have two 9217 modules for reading RTDs and a 9205 for reading level sensors. I set up three tasks, one for each module.
If I make an array of tasks and place DAQmx Read in a FOR loop I can read all the data no problem but the three tasks take 4.59 seconds per iteration (reading the RTDs seems to be slower). I need to update the level readings quicker, but if I make two parallel loops, attempting to read the RTDs in one loop (two tasks) and the level sensors in its own loop I get an error that the resource is not available - apparently only one instance of DAQmx Read can be called at a time.
Is there a work around for this?

thanx
lmd2
Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 1 of 3
(3,027 Views)
Solution
Accepted by topic author lmd2

Larry,

 

Your problems are all related to the Task State Model which is described in the DAQmx manual.  Each 9172 chassis can have 1 AI Task running at any given time.  If you try to start a second task you will get an error.  When you use the FOR loop your code is starting and stoping each task in sequence which takes a lot of time and explains the 4.59 seconds.  Ideal way is to config and start tasks in a init state and then begin acquiring data.  Only thing left to do is to release the I/O by stopping and clearing the tasks when you done.

 

One way to fix this would be to install the two RTD modules in one chassis and all the 9205 modules in the other chassis.  Another way would be to oversample the RTD's and deal with the extra data later.

Message 2 of 3
(3,007 Views)

Hi Wayne

actually the tasks are configured in MAX and the tasks are not cleared until the outer WHILE loop completes so I am not sure about the 4.6 seconds (even running the RTD readings without the level sensor task is very slow but for temps I am not to concerned I figured it is just the nature of RTDs(?) I have more experience with thermocouples) but I think the best way too speed up the level sensor readings is to move it to the second chassis. Thanx for the suggestion

 

Lawrence M. David Jr.
Certified LabVIEW Architect
cell: 516.819.9711
http://www.aleconsultants.com
larry@aleconsultants.com
0 Kudos
Message 3 of 3
(3,005 Views)