Repeat outputs with analogoutput without requiering to use putdata repetadly
1 次查看(过去 30 天)
显示 更早的评论
Hi all!
I've got my analogoutput channel working as I want. When it receives a digital trigger on line PFI1 it starts the function that I loaded.
ao_Ref = analogoutput('nidaq','Dev1');
addchannel(ao_Ref, [1]);
set(ao_Ref,'TriggerType','HwDigital')
set(ao_Ref,'HwDigitalTriggerSource','PFI1');
putdata(ao_Ref, xt);
start(ao_Ref)
However once its started (and finished) the "buffer" on the nidaq card is empty. Triggering again doesn't do anything. Currently, I need to reload the data on the card by repeating the whole code.
Surely there is a much more efficient way to make it output the same data every time the trigger is activated.
Thanks,
Michael
0 个评论
采纳的回答
Walter Roberson
2011-9-22
No there isn't, not unless your hardware supports storing a buffer of data and sending the buffer on request. Which some hardware does, but most does not.
4 个评论
Walter Roberson
2011-9-26
I would need to research that; I am not familiar with how to program those devices, such as to construct the waveform buffer.
Which model device are you using?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!