Programming Examples
9
Agilent 6000 Series Oscilloscopes Programmer's Reference
593
*
XREFERENCE : int32 - specifies the data point associated
*
with the x-origin.
*
YINCREMENT : float32 - voltage difference between data points.
*
YORIGIN
: float32 - value of the voltage at center screen.
*
YREFERENCE : int32 - data point where y-origin occurs.
*/
printf("Reading preamble\n");
ipromptf(id, ":WAVEFORM:PREAMBLE?\n", "%,10lf\n", preamble);
/*
printf("Preamble FORMAT: %e\n", preamble[0]);
printf("Preamble TYPE: %e\n", preamble[1]);
printf("Preamble POINTS: %e\n", preamble[2]);
printf("Preamble COUNT: %e\n", preamble[3]);
printf("Preamble XINCREMENT: %e\n", preamble[4]);
printf("Preamble XORIGIN: %e\n", preamble[5]);
printf("Preamble XREFERENCE: %e\n", preamble[6]);
printf("Preamble YINCREMENT: %e\n", preamble[7]);
printf("Preamble YORIGIN: %e\n", preamble[8]);
printf("Preamble YREFERENCE: %e\n", preamble[9]);
*/
/* QUERY_WAVE_DATA - Outputs waveform records to the controller
* over the interface that is stored in a buffer previously
* specified with the ":WAVEFORM:SOURCE" command.
*/
iprintf(id, ":WAVEFORM:DATA?\n");
/* Query waveform data. */
/* READ_WAVE_DATA - The wave data consists of two parts: the header,
* and the actual waveform data followed by an New Line (NL)
* character.
The query data has the following format:
*
*
<header><waveform data block><NL>
*
* Where:
*
*
<header> = #800002048
(this is an example header)
*
* The "#8" may be stripped off of the header and the remaining
* numbers are the size, in bytes, of the waveform data block.
* The size can vary depending on the number of points acquired
* for the waveform which can be set using the ":WAVEFORM:POINTS"
* command.
You may then read that number of bytes from the
* oscilloscope; then, read the following NL character to
* terminate the query.
*/
waveform_size = WAVE_DATA_SIZE;
/* Read waveform data. */
iscanf(id, "%#b\n", &waveform_size, waveform_data);
if ( waveform_size == WAVE_DATA_SIZE )
{
printf("Waveform data buffer full: ");
printf("May not have received all points.\n");
}
else
{
printf("Reading waveform data... size = %d\n", waveform_size);
}
Содержание 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...