NI DAQ analog output regeneration

7 ビュー (過去 30 日間)
Hunter Davis
Hunter Davis 2020 年 6 月 30 日
コメント済み: Daniel Hill 2020 年 10 月 29 日
Using an NI USB 6366 DAQ to generate a continuous output analog waveform, I keep getting underflow errors "Output underflow event: Last valid output was scan number 199977121". The output sample frequency is 2 MHz, and I have tried all sorts of different buffer sizes. In Labview, I can change the "allow regeneration" mode for analog outputs to allow the DAQ to just loop the onboard FIFO without requiring fresh data from the host computer. How do I do this in matlab? The waveform needs to be continously output for hours at a time, so this instability is really a problem.

採用された回答

Hunter Davis
Hunter Davis 2020 年 10 月 10 日
In case someone else stumbles on this, there is a low-level function daq.ni.NIDAQmx.DAQmxSetWriteRegenMode that allows you to directly modify this setting in the DAQ.
  1 件のコメント
Daniel Hill
Daniel Hill 2020 年 10 月 29 日
Hi Hunter,
I'm pretty green when it comes to programming and my labview/NI knowledge is extremey limited. I'm getting an 'Output underflow error' and I'm hoping this will help. I'm embarrassed to say that I have no idea how to implement it in matlab. I looked at the doc but can't firgure it out
(daq.ni.NIDAQmx.DAQmxSetWriteRegenMode is a function.
[status] = DAQmxSetWriteRegenMode(taskHandle, data)
Can you tell me what I need to call for 'taskhandle'and 'data' to get this thing to allow regeneration? (I'm assuming it's automatically in non-regeneration mode based on what I read here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019P1kSAE&l=en-GB).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangePeriodic Waveform Generation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by