Clear Filters
Clear Filters

Capture image using GPIB on Infiniium DCA86100 Oscilloscope

8 views (last 30 days)
I want to capture the screen of the Infiniium DCA86100 oscilloscope using the GPIB interface.
The command that I am using is " :DISPLAY:DATA? JPEG " . When I query this command I only receive something lke this "#6188443ÿØÿà".
I though this shouldn't be the data for an entire image so I changed the input buffer size to a very large value but I still get something similar and of the same order every time I try.
Also how will I able to retrieve the actual image from this data?

Accepted Answer

Andrew Borghesani
Andrew Borghesani on 27 Nov 2018
Edited: Andrew Borghesani on 27 Nov 2018
After playing around with it a little, I was able to get a color image (although in a bitmap not JPEG) doing the following, where visaObj is an open visa connection rather than a GPIB. The SCPI commands and rest of the workflow should be the same though
% send command and get BMP.
fprintf(visaObj,':DISPLAY:DATA? BMP, COLOR');
screenBMP = binblockread(visaObj,'uint8');
fread(visaObj,1);
% save as a BMP file
fid = fopen('test1.bmp','w');
fwrite(fid,screenBMP,'uint8');
fclose(fid);
% Read the BMP and display image
figure;
imageMatrix = imread('test1.bmp','bmp');
image(imageMatrix);
% Adjust the figure so it shows accurately
sizeImg = size(imageMatrix);
set(gca,'Position',[0 0 1 1],'XTick' ,[],'YTick',[]); set(gcf,'Position',[50 50 sizeImg(2) sizeImg(1)]);
axis off; axis image;

More Answers (0)

Categories

Find more on Instrument Control Toolbox Supported Hardware 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!