external triggers missed on PCIe-6321

3 views (last 30 days)
Adam Ranson
Adam Ranson on 1 Feb 2019
Hi
What I would like to do is to trigger output of an analogue waveform when an external trigger is received using a PCIe-6321. If further triggers are received while the waveform is being output I want these to be ignored. Once the waveform output is complete I want the trigger to be 'rearmed' and when received to play the analogue output again. This is the code:
daqSessionZ = daq.createSession('ni'); daqSessionZ.Rate = 10000;
daqSessionZ.IsContinuous = false; daqSessionZ.addTriggerConnection('External','Dev2/PFI12','StartTrigger'); daqSessionZ.ExternalTriggerTimeout = Inf;
daqSessionZ.TriggersPerRun = Inf;
waveform = linspace(0,5,10000)'; queueOutputData(daqSessionZ,waveform);
daqSessionZ.startBackground();
This does trigger in response to 5v pulses on Dev2/PFI12 but often misses triggers because it seems to take ~300ms to 'rearm' after the waveform has finished playing. Am I not doing this in the right way?
Thanks
Adam

Answers (0)

Categories

Find more on Signal Integrity Kits for Industry Standards in Help Center and File Exchange

Tags

Products


Release

R2013b

Community Treasure Hunt

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

Start Hunting!