10-29-2009 01:37 PM
10-30-2009 11:33 AM
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
10-30-2009 12:05 PM
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:
Make sure you are starting and stopping your task outside the loop, as this can have a distinct impact on your loop time.
Regards,
10-30-2009 12:11 PM
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
10-30-2009 12:15 PM
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,
10-30-2009 04:02 PM