using a Binary Block Format to send information to an agilent instrument
3 ビュー (過去 30 日間)
古いコメントを表示
I need to use the Arbitrary option of the device: 'Agilent Pulse Function Arbitrary Noise Generator' -81150A in the manual it gives me two options to feed a vector in to it one way is via text: ':DATA:DAC VOLATILE, 8187, 4098, 0, -4096, -8187' and one using a Binary Block: ':DATA:DAC VOLATILE, #1801020304' while the first method is easy to implemnt i need to use the other method for my project i have tried to use fwrite and BinBlockwrite but the machine is not responding the command i was trying to use is:
binblockwrite(AWG,A,'schar' ,':DATA VOLATILE, ','%s')
AWG is the device and A is the vector. what am i doing wrong?
0 件のコメント
回答 (1 件)
Walter Roberson
2011 年 10 月 9 日
Twice your DATA statement has ':DAC' in it, but the header you coded for your binblockwrite() does not have ':DAC' in it. Are you sure that is correct? It looks to me from the documentation as if the '#' is enough to signal that binary data follows.
It is not clear to me that 'schar' is correct. Perhaps you want 'int16' ? Your sample values such as 8187 and -4096 are too large to fit in a "char" (8 bits)
参考
カテゴリ
Help Center および File Exchange で Instrument Connection and Communication についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!