Agilent Technologies Infiniium 8000A Programmer's Reference Manual page 105

Table of Contents

Advertisement

bytes_read = read_IO(header_str,1L);
header_length = atoi(header_str);
/* read number of points to download */
bytes_read = read_IO(header_str,(long)header_length);
Acquired_length = atoi(header_str);
bytes_read = 0;
fp = fopen("pairs.csv","wb");
while((bytes_read + MAX_LENGTH) < Acquired_length)
{
bytes_read += read_IO(data,MAX_LENGTH); /* input waveform data */
/* Convert data to voltage and time */
time_division = convert_data(time_division,MAX_LENGTH);
store_csv(fp,MAX_LENGTH);
}
/* input last of waveform data */
bytes_read = read_IO(data,(Acquired_length-bytes_read+1));
/* Convert data to voltage and time */
time_division = convert_data(time_division,(bytes_read-1));
store_csv(fp,(bytes_read-1));
fclose( fp );
} /* end transfer_data() */
An example header resembles the following when the information is stripped
off:
#510225
The left most "5" defines the number of digits that follow (10225). The number
"10225" is the number of points in the waveform. The information is stripped
off of the header to get the number of data bytes that need to be read from the
oscilloscope.
/* input byte counter */
/* open file in binary mode - clear file
if already exists */
/* Store data to disk */
/* Store data to disk */
Sample Programs
Sample C Programs
/* number of bytes */
/* close file */
6-11

Advertisement

Table of Contents
loading

Table of Contents