Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit Buffer Rate

I am working with a NI USB 6353, sending analog data out of the board into third part software (Optirack Motive 2.2).

 

I am not using LabView with this hardware. 

 

Is it possible to control the data output buffer size if I am not using LabView? I don't see anything specific to this in the Measurement and Automation Explorer. I would like to see if I can reduce the buffer size as I am looking at a real-time data measurement application.

 

Thanks for the input.

0 Kudos
Message 1 of 7
(1,682 Views)

A few general thoughts:

 

1. You mention analog output so I kinda assume this to be a control signal.  USB is certainly not ideal for a real-time control.

2. Buffered analog output is (usually) even *less* suitable for real-time control because of the extra latency

3. An unbuffered output task gives you a better shot at lower latency, but it also subjects you to software-based timing.  You'll then be limited to the whims of Windows (or whatever other OS).

 

Provide more details of your needs and maybe I or someone else here can give more specific advice.  USB is convenient and portable, but it has downside when it comes to various aspects of performance (latency, bandwidth, sometimes more).   Your hardware may limit what you can actually hope to achieve.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 7
(1,660 Views)

Hi Kevin, thanks very much for your response.

 

I am not using the signals from the DAQ as control signals. For my application, I just want to be able to send the signals from the DAQ to my third party software (Optitrack's Motive v2.2). The software is designed to accept this signal and sync it other data. For my experiment, real-time really just refers to being able to collect and report the data as it is received, allowing for expected time delays (up to several hundred milliseconds is acceptable here). 

 

The trouble I'm running into is that the third-party software is grabbing the DAQ data before the buffer size of data is full. The third-party software rates are driven by different factors, and I don't have control over them. 

 

My hands are a bit tied here, as I'm using this third party software and not labview or anything else to control how these DAQs are operating. But I would like to know is there a way I can either reduce the buffer size in the DAQ, or control any other factors that could help make sure I have full data packets coming from the DAQ.

 

The answer to this may be no, but I wanted to check before I go down a very long path needing to develop my own software. It would be so much simpler to just have control of this DAQ.

 

Some follow up questions. Am I able to control whether the data coming out of the daq are buffered versus unbuffered? If so, where? When I run this experiment, all the data is synced to an internal clock.

 

Also, where can I find details on the current buffer size? I've been unable to find that.

Again, thanks very much for any input. It is greatly appreciated!

0 Kudos
Message 3 of 7
(1,612 Views)

One follow up question. Am I able to control whether the data coming out of the daq are buffered versus unbuffered? When I run this experiment, all the data is synced to an internal clock.

0 Kudos
Message 4 of 7
(1,621 Views)

When you set up a hardware sample clock, there's going to be a buffer.  SO that also means there's going to be latency.  There are some advanced DAQmx properties meant to give you a *little* more control over latency, but I've never explored the USB ones.

   In fact, there are typically 2 buffers.  One is the task buffer that you can control.  Its size is typically determined by the # of samples you write to the task the first time you write, but it can also be set explicitly.  The other is a hardware FIFO on the device.  It's size is fixed, but those advanced DAQmx properties may let you, sorta, "use less" of it.

 

(At least some, maybe many desktop and PXI devices support a hardware-timed but unbuffered mode, but it's really only meant for use under Real-Time.  AFAIK, no USB devices support this mode known as "hardware-timed single point")

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 5 of 7
(1,614 Views)

Thanks. Understand your points about latency. Excuse my slow question here

 

Where can I go to review the advanced DAQmx properties? When installing the device on the computer I got a software tool called 'Measurement and Automation Explorer'. Are there other tools I can use to control how this device is operating. Keeping in mind I'm not building my own set up in LabView.

 

For the task buffer, when you say the size of it is determined by the # of samples collected the first time I write... do you mean the first time I write after the device is turned on? I've been working on testing different sampling frequencies from the DAQ to see if that improves the outcome.

 

Also, you say the task buffer is something that can be set explicitly. Do you know where I would go to set that?

 

Again, appreciate you taking the time to help me understand.

0 Kudos
Message 6 of 7
(1,611 Views)

I'm not familiar with the API for DAQmx functions in other language environments.  In LabVIEW, quite a lot of it is pretty "discoverable" through menus, tool palettes, and a pretty extensive library of example code.   But many years of experience and tinkering have also helped.

 

Measurement and Automation Explorer (commonly referred to as MAX) is a very helpful thing, but it doesn't give access to the deeper, more advanced configurations, properties, etc.  You'll have to track down some docs or help about the API for the language you're using.

 

"Buffer" will be one of your keywords to search for, and there probably won't be a whole lot of matches among the API functions.  Similarly "USB" and perhaps "transfer" for the special tweakable properties.

 

Can you give an overview of what you're looking to do?  Things like sample rate & max allowed latency.  Are you continually re-calculating the output or do you generate something repeatedly for a while, but sometimes need to change to a different repetitive pattern?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 7 of 7
(1,607 Views)