Capture image using GPIB on Infiniium DCA86100 Oscilloscope
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Peter
le 24 Nov 2018
Modifié(e) : Andrew Borghesani
le 27 Nov 2018
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?
0 commentaires
Réponse acceptée
Andrew Borghesani
le 27 Nov 2018
Modifié(e) : Andrew Borghesani
le 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;
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Instrument Control Toolbox Supported Hardware dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!