MATLAB Answers


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

さんによって質問されました 2013 年 6 月 26 日
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.IsContinuous = false;
s.Rate = 1000000; %1MHz is the card's max capability
s.TriggersPerRun = Inf;
s.ExternalTriggerTimeout = 200;

  1 件のコメント

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?

サインイン to comment.

0 件の回答

Translated by