using a Binary Block Format to send information to an agilent instrument
3 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 9 Oct 2011
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)
See Also
Categories
Find more on Instrument Connection and Communication in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!