How Quickly Can I trigger a device using the DAQ Session interface with Triggers_per_run=inf

조회 수: 2 (최근 30일)
In my lab I am using an NI-6733 analog out card. I need it to output the same waveform every time it receives an external trigger, which I send it 5 times a second, all day every day. Currently I can achieve this by creating a session interface with the card, adding channels and triggers, setting to finite mode but with triggers_per_run set to inf, as shown below.
However, I find that the card does not always catch the trigger, and that its ability to do so depends on how much space there is between the end of the data and the next trigger. Right now, I leave 100ms, which is way way way more than enough as far as the card's hardware is concerned, but I still obtain flaky results, as in 1/50 triggers are dropped.
Can anyone tell me how it is that matlab implements this triggers_per_run = inf functionality, and whether there is any associated setup time before a new trigger?
s = daq.createSession('ni');
s.addAnalogOutputChannel('Dev1', 'ao1', 'voltage');
s.addTriggerConnection('external','Dev1/PFI6','StartTrigger');
s.IsContinuous = false;
s.Rate = 1000000; %1MHz is the card's max capability
s.TriggersPerRun = Inf;
s.ExternalTriggerTimeout = 200;
s.queueOutputData(v);
s.startBackground();
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 6월 27일
Have you taken steps to ensure that nothing else runs on the system? Virus checking turned off?
Your interrupt service routines: have you gone through them with an eye to reducing any dynamic memory allocations?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Hardware Discovery and Setup에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by