Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Performance Disparity of NI-9215 on Compact DAQ Chassis and USB Carrier

Hi, I'm currently using the NI-9215 to measure 3 analog voltage inputs simultaneously.  Before I had used the USB carrier (USB-9162), but we have a need for additional module slots, so I was attempting to use the Compact DAQ Chassis (NI-9172).  I'm continuously sampling 500 samples at 10kHz.  The problem is that the time to run each set of samples is very different between the two different platforms (DAQ Chassis and USB Carrier) using the exact same VI.  Using the DAQ Chassis it takes about 0.15 seconds whereas the USB carrier takes only about 0.07 seconds, per set of samples.  I have tried using DAQmx and DAQ assistant, as well as trying multiple computers and multiple NI-9215 modules, all with the same result.  I can find no clear differences between the specifications of the carrier and the DAQ chassis.  Does anyone have any suggestions or clues as to what could be causing this problem?  I can upload my VI if that helps, but it seems like this was more of a hardware issue.  Thanks for your time - Dan
0 Kudos
Message 1 of 6
(4,604 Views)

Hello,

 

One question I have is how are you benchmarking these performances? What are you measuring between to determine that one takes longer than the other? If you could post the code, it might help to take a quick look. I believe that the issue is likely due to the fact that the 9172 is simply a more complex device than the USB-9162 sleeve and would inherently have some added overhead to execute the instructions sent by the DAQmx driver. However, this would likely only affect the time between when you call the start function and when the task is actually confirmed to be finished by the DAQmx driver functions, which are non-deterministic calls anyway. This doesn't affect the actual hardware execution of the task. 

 

Go ahead and post your code and we can have a look.

 

Chris W

0 Kudos
Message 2 of 6
(4,581 Views)

A lot of this overhead is going to depend on how your code is configured.  I converted one of the shipping examples to measure average loop time under the conditions you gave.  I ran this with a 9215 in both a cDAQ-9172 chassis and a USB-9162 Chassis.  I ran the VI for about 2-3 seconds to get a good average.  For both the chassis and the carrier, I got about 0.050 - 0.051 seconds for my average loop time.  I've attached a VI Snippet of my test vi below:

Loop Time VI Snippet.png

Make sure you are starting and stopping your task outside the loop, as this can have a distinct impact on your loop time.

 

Regards,

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
Message 3 of 6
(4,573 Views)

Hi Chris, thanks for replying.  Well, the voltage measurements are from pressure transducer in an automated pressure tank system.  Originally I had just swapped the modules between the carrier and the compact daq.  Afterwards I noticed a reduction in the refresh rate of the pressure (it seemed to be about 50% of the original).

 

After this, I made these simplified VI's to isolate the measurements.  Attached is two methods of measurement I tried, one with the DAQ assistant and one with standard DAQmx blocks.  It may be that I'm not using the ideal method for these fast measurements, or for measuring the elapsed time between samples.  However, there is still the same difference in performance between the compact daq and the USB carrier.

 

Also, I noticed in MAX that the module is labeled as NI-9215 in the compact DAQ, but in the USB carrier it's labeled as USB-9215A.  I'm not sure if the A makes a difference, just something I noticed.  Please let me know if you need any additional information.  Thanks - Dan

 

Attached are the VI's in version 8.6

0 Kudos
Message 4 of 6
(4,572 Views)

The loop is taking longer in your test because you are starting and stopping the task in the loop.  Each time you start a task, it has to recommit all settings to hardware.  This takes different amounts of time, depending on the Chassis/Module combination you are using.  The cDAQ-9172 is a more complicated device than the USB-9162, so there is more that has to be committed each time your loop runs.  For DAQmx, it is best to always start and stop your task outside of any loop unless you have to change timing, triggering, or channel setting in the loop.

 

Regards,

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
Message 5 of 6
(4,570 Views)
Rearranging the start/stop blocks and using continuous samples helped immensely with the timing.  Thanks for all of your help and taking the time to explain these things to beginners like myself.
0 Kudos
Message 6 of 6
(4,547 Views)