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;
s.TriggersPerRun = Inf;
s.ExternalTriggerTimeout = 200;