Programming Examples

9

/* Write actually waveform data. */

fwrite(waveform_data, sizeof(waveform_data[0]), (int)preamble[2], fp);

fclose(fp);

}

/*

*retrieve_waveform

*------------------------------------------------------------------

*This function retrieves previously saved waveform data from a

*file called "wave.dat".

*/

void retrieve_waveform(void)

{

FILE *fp;

fp = fopen("c:\\scope\\data\\wave.dat", "rb"); /* Read preamble. */

fread(preamble, sizeof(preamble[0]), 10, fp); /* Read the waveform data. */

fread(waveform_data, sizeof(waveform_data[0]), (int)preamble[2], fp);

fclose(fp);

}

Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Reference

567

Page 567
Image 567
Agilent Technologies 5000 Series manual Programming Examples