Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Data Acquisition- program oddly resetting SampleRate

조회 수: 1 (최근 30일)
Dana
Dana 2013년 5월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello all!
I am using a DataQ acquisition device in Matlab 32-bit with the Data Acquisition toolbox.
On occasion, when I have my sample rate set to 300, it tells me: "Warning: This hardware could not support the requested value of 300 for SampleRate. SampleRate has been set to 1000"
However, if I set SampleRate to 1000, it sometimes sets it back to 300 with the same error message. It seems to me that either sample rate is supported some times and not others.
Also, if I set the program so that after the error displays and the device has started recording it returns the SampleRate, this is always at whatever I set it to, not what the program claims it changed it to.
Anyone have any idea how I find out what the actual sample rate was or keep it from resetting mine?? I need to know how many samples there are per second for further calculations
Thanks -Dana

답변 (1개)

cr
cr 2013년 5월 9일
Finding out the acquisition rate should be quite straightforward using get(ai,'SampleRate'), where ai is the analoginput object.
  댓글 수: 1
Dana
Dana 2013년 5월 9일
Yes, when I run get(ai, 'SampleRate') it returns the value I set it to, even if an error message has informed me that it was reset- so I am unsure which is true.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by