From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ speed slow

Solved!
Go to solution

Hi,

     I am using a CompactDAQ to measure signals. Currently I am reading 10 signals: 2 channels of 2-lead resistance (thermistor) from NI9219, and 8 channels of thermocouple. I am running LabVIEW 8.6. I read one sample in all channels a time and then read another sample. I don't know why I can only get one sample of all channels every 3 seconds. The hardware specs are better than this. Please see attached program.

 

 

Ryan

Download All
0 Kudos
Message 1 of 9
(3,757 Views)

You did not include the 'EventTimer' subVI.

 

Not sure why you are referring to any hardware specs. Since you are using single point acquisition (software timed), none of the acquisition rates in the spec will apply.

Message 2 of 9
(3,755 Views)
Solution
Accepted by RyanWu

Hi Ryan,

 

There a number of things you can do to improve your performance.

 

First, you are using the NI 9219 in High Resolution timing mode.  That puts your converstion time at 510ms for all channels.  Was that intentional?

 

Second, you are reverifying and committing your task with every iteration of your for loop.  Since there was no explicit state transition, the task will unwind after each read and have to setup the task again before each subsequent read.  Put a Start vi just before your for loop.  This will leave your task in the running state and greatly increase your performance.

 

Finally you are using on demand timing.  Is this what you want?  If you're trying to go as fast as possible on the NI 9219 you might want to consider using hardware timing.  This way the device samples in the background and you can read data when it is available.  Note that you need to pay attention to the max rate.  If you use hardware timing and sample at a rate faster than your NI 9219 reports, it will return repeated data.

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

Here is the 'EventTimer'.

 

Ryan

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

Hi Mark,

     I was not aware that I put NI9219 in high resolution timing mode. The code was generated by the DAQ assistant. I will take a look at this.

     Could you please give a example of the Start.vi?

     I misunderstood the on demand timing with hardware timing, I will change that.

     I guess I would be happy with sampling all channels every 1 second, so I am pretty sure that 9219 can handle this.

 

Thanks,

 

Ryan

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

By Start I mean "DAQmx Start Task.vi".  You can find it on the "DAQmx - Data Acquisition" pallette.

 

As for on demand versus hardware timing, that depends on how often you want to acquire data.  Do you want to acquire as fast as possible?  At set intervals?  When a user requests it?

 

Depending on your accuracy requirements, you can go faster than 1Hz with the NI 9219.  Take a look at the various timing modes listed in the NI 9219 specifcations.

Message 6 of 9
(3,740 Views)

Mark,

      I added the  "DAQmx Start Task.vi" to the program and now my real program (more complicated than the test code) runs about 2 samples per second. So far, I am happy.

 

Ryan.

0 Kudos
Message 7 of 9
(3,738 Views)
You should not mark your response as solving the problem. Better to indicate Mark's answer as the solution. You can click on the 'Options' button and change it.
Message 8 of 9
(3,732 Views)

Dennis,

 

Thanks for pointing it out.

 

Ryan

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