필터 지우기
필터 지우기

Stop ai manually

조회 수: 2 (최근 30일)
Kay
Kay 2011년 7월 21일
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

채택된 답변

Chirag Gupta
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
Documentation link for SamplesPerTrigger
You may also want to refer to 'Continuous Acquisition Using Analog Input' demo in the documentation that covers the same scenario
  댓글 수: 3
Chirag Gupta
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
Chirag Gupta 2011년 7월 21일
After running the stop(ai) command, check the value of ai.Running
or isrunning(ai)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile 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!

Translated by