フィルターのクリア

Physical performance of "peekdata"

4 ビュー (過去 30 日間)
Kay
Kay 2012 年 3 月 1 日
Hi,
Is "peekdata" used to collect the most recent data as we call it?
SampleRate=500;
data=peekdata(ai,500);
From the two lines of code, will "data" contains the most recent 1 second of data before the peekdata command?
thanks, Kay

採用された回答

Walter Roberson
Walter Roberson 2012 年 3 月 1 日
If samples is greater than the number of samples currently acquired, all available samples are returned with a warning message stating that the requested number of samples were not available.
This and reading the rest of the documentation shows us that peekdata() only looks in the buffer of data that has already been acquired, and does not trigger any data acquisition. If enough data is already there, it returns the (500 in your case) most recent samples (the end of the buffer, most recent acquires, not from the start of the buffer), and if not enough data is already there it will return the data that is already available.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimultaneous and Synchronized Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by