Specifications
RIGOL
Programming Guide for DS1000B Series
3-5
void SetupDownLoad()
{
BYTE *bufSetup = new BYTE[BUFFER_SETUP_SIZE];
FILE *fp;
/*Judge the buffer validity */
if (bufSetup == NULL)
{
return;
}
/*Open the setup file*/
fp = fopen("C:\\scope\\setup.dat","rb");
if(fread(bufSetup,sizeof(BYTE),BUFFER_SETUP_SIZE,fp)!=BUFFER_SETUP
_SIZE)
{
fclose(fp);
return ;
}
fclose(fp);
/*Make a statement for VISA 32bit data type*/
ViUInt32 ret
/*Send the :SYSTEM:SETUP command to set the system parameters
by the setup file*/
viPrintf(g_vi,":SYSTEM:SETUP #8%08d",BUFFER_SETUP_SIZE);
if (viBufWrite(g_vi,bufSetup,BUFFER_SETUP_SIZE,&ret) == VI_SUCCESS)
{
viPrintf(g_vi,"\n");
}
}