Capture image using GPIB on Infiniium DCA86100 Oscilloscope
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Peter
el 24 de Nov. de 2018
Editada: Andrew Borghesani
el 27 de Nov. de 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 comentarios
Respuesta aceptada
Andrew Borghesani
el 27 de Nov. de 2018
Editada: Andrew Borghesani
el 27 de Nov. de 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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Instrument Control Toolbox Supported Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!