594
Agilent 6000 Series Oscilloscopes Programmer's Reference
9
Programming Examples
}
/*
* save_waveform
* ------------------------------------------------------------------
* This function saves the waveform data from the get_waveform
* function to disk.
The data is saved to a file called "wave.dat".
*/
void save_waveform(void)
{
FILE *fp;
fp = fopen("c:\\scope\\data\\wave.dat", "wb");
/* Write preamble. */
fwrite(preamble, sizeof(preamble[0]), 10, fp);
/* 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);
}
Содержание DSO6014A/L
Страница 1: ...A Agilent 6000 Series Oscilloscopes Programmer s Reference...
Страница 16: ...16 Agilent 6000 Series Oscilloscopes Programmer s Reference...
Страница 30: ...30 Agilent 6000 Series Oscilloscopes Programmer s Reference 1 What s New...
Страница 540: ...540 Agilent 6000 Series Oscilloscopes Programmer s Reference 6 Error Messages...
Страница 562: ...562 Agilent 6000 Series Oscilloscopes Programmer s Reference 7 Status Reporting...
Страница 584: ...584 Agilent 6000 Series Oscilloscopes Programmer s Reference 8 More About Oscilloscope Commands...
Страница 624: ...624 Agilent 6000 Series Oscilloscopes Programmer s Reference 9 Programming Examples...