Stop ai manually
1 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I am using the DAQ toolbox to build a negative feedback system. Anyhow, Is there any method to stop the ai by typing stop(ai); ? I want to stop the data acquisition by hand instead of setting the SamplePerTrigger.
Thank you, Kay
0 个评论
采纳的回答
Chirag Gupta
2011-7-21
Hi Kay,
This is possible. Here is some sample code:
ai = analoginpt(....);
% Add channels and set it up
% Use SamplesPerTrigger property to achieve this by setting it to Inf
ai.SamplesPerTrigger = Inf;
start(ai)
% This will continue unless a stop(ai) command is issued
You may also want to refer to 'Continuous Acquisition Using Analog Input' demo in the documentation that covers the same scenario
3 个评论
Chirag Gupta
2011-7-21
I would suggest looking at the demo! Also, how are you running it? Can you post some sample code?
Chirag Gupta
2011-7-21
After running the stop(ai) command, check the value of ai.Running
or isrunning(ai)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Acquisition Toolbox Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!