Example 4 Reading The Data Of Screen Image - Rigol DS1204B Programming Manual

Digital oscilloscope, ds1000b series
Hide thumbs Also See for DS1204B:
Table of Contents

Advertisement

RIGOL

Example 4 Reading the Data of Screen Image

#define BUFFER_IMAGE_SIZE
void ImageUpload()
{
BYTE *bufImage = new BYTE[BUFFER_IMAGE_SIZE];
FILE *fp;
long headLen
long sizeImage = BUFFER_IMAGE_SIZE;
/*Judge the buffer validity*/
if (bufImage == NULL)
{
return;
}
/*Make a statement for the VISA status*/
ViStatus staDISP;
ViStatus sta488;
ViStatus staImage;
/*Make a statement for IEEE488.2 standard data header*/
BYTE head488[11] = {0};
/*Send the :DISP:DATA?\n command to read the data of screen
image*/
sta
= viPrintf(g_vi,":DISP:DATA?\n");
sta488
= viRead(g_vi,head488,headLen,&headLen);
staImage = viRead(g_vi,bufImage,sizeImage,&sizeImage);
if (sta == VI_SUCCESS && sta488 == VI_SUCCESS && staImage ==
VI_SUCCESS)
{
fp = fopen("C:\\scope\\screen.bmp","wb");
if
(fread(bufImage,sizeof(BYTE),BUFFER_IMAGE_SIZE,fp)
BUFFER_IMAGE_SIZE)
{
3-6
320*240+256*4+54+1;
= 10;
Programming Guide for DS1000B Series
!=

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ds1104bDs1064b

Table of Contents