オシロスコープの波形データをinstrument control toolboxを用い​て取得する際、pre​cisionによって​取得データ数が異なる

9 次查看(过去 30 天)
裕太
裕太 2024-7-24,7:29
编辑: Takafumi 2024-7-25,1:23
Tektronixのオシロスコープの波形データをmatlabのinstrument control toolboxを用いて取得しようと考えています。
取得データのprecisionを変化させると、データの取得数が変化してしまいます。
オシロスコープで実際に取得されているサンプル数とデータ取得数を一致させたいです。
以下が現在のソースプログラムです。
-----
fopen(obj);
fprintf(obj, 'CURVe?'); %オシロへ波形データ取得の命令を出す
data = binblockread(obj, 'int16'); %'int16'部分がprecision
-----
data = binblockread(obj, 'int16');
のprecisionをint8に変更するとオシロのサンプル数とデータ取得数は一致します。
しかし、int16の取得データを見てみると、取得データ数はオシロのサンプル数の半分になっています。
どうにかint16でデータを取得し、その取得数をオシロのサンプル数と一致させることはできないでしょうか?

回答(1 个)

Takafumi
Takafumi 2024-7-25,1:23
编辑:Takafumi 2024-7-25,1:23
Tektronix のどの機種使われているかわかりませんが、
tds1000のマニュアルを拝見する限り、
https://www.tek.com/ja/oscilloscope/tds1000-manual
waveformでデータ送信の設定ができるようですが、そこでは8bitデータが基本のようです。
プログラミングマニュアルをご覧になって、試行錯誤していただければと思います。
Textronix のサポート窓口の活用も、検討いただければと思います。
Internally, the oscilloscope uses one 8-bit data byte to represent each waveform data point, regardless of the acquisition mode. The DATa:WIDth command lets you specify the number of bytes per data point when transferring data to and from an oscilloscope. This provides compatibility with other digitizing oscilloscopes.

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!