How to continue the queueOutputData() after execute stop()

Hi,
Currently I have code below
s = daq.createSession('ni');
addAnalogOutputChannel(s,'cDAQ1Mod2',0,'Voltage');
s.IsContinuous = true;
s.Rate = 10000;
data = linspace(-1,1,5000)';
lh = addlistener(s,'DataRequired', ...
@(src,event) src.queueOutputData(data));
queueOutputData(s,data)
startBackground(s);
stop(s)
After executing stop(s), daq will stop generate new data. I just wanna to know if there is any way I can continue queueOutputData without create a new session?
Thanks sooo much!
My goal is to generate a triangular ramp signal that user could pause and continue whenever they want

답변 (1개)

Samatha Aleti
Samatha Aleti 2019년 8월 13일

0 개 추천

You may refer to the solution provided to the similar question here

카테고리

도움말 센터File Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

질문:

2019년 8월 9일

답변:

2019년 8월 13일

Community Treasure Hunt

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

Start Hunting!

Translated by