Data Acquisition start(): NumScans argument ignored

I have a function that is called during my program that looks like the following:
function outputSingle(obj, magnitude)
stop(obj.dataAq);
flush(obj.dataAq);
preload(obj.dataAq, Write.getData(magnitude, obj));
start(obj.dataAq, "NumScans", 1);
end
start() in it gives the following message: "Warning: NumScans argument ignored."
The output is started earlier in another function with:
start(obj.dataAq, "RepeatOutput");
But as you can see in the first code section it is stopped and flushed.
I have confirmed that the output signal is being repeated when NumScans is ignored.
Can anyone answer why NumScans is being ignored, and how to fix this?

답변 (1개)

Srishti Sahni
Srishti Sahni 2022년 5월 18일

0 개 추천

I understand that the ignored argument, "NumScans" for the start() function is a cause of concern for you.
The function start(d,"NumScans",span) starts the background input acquisition to run for a finite span of time, specified as a number of scans. If the DataAcquisition has any output channels, the start occurs but the duration specification is ignored.
If you want to avoid this behaviour, please examine the output channels within DataAcquisition.
More details about the start() function and this behavior can be found on the following link: Start DataAcquisition background operation - MATLAB start (mathworks.com)

카테고리

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

제품

릴리스

R2020b

질문:

2021년 1월 27일

답변:

2022년 5월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by