Technical data

Table Of Contents
Waveform Commands 34
Agilent Infiniium 9000 Series Oscilloscopes Programmer's Reference 1099
file if it already exists */
if (fp != NULL)
{
while( !done )
{
BytesRead = ReadWord( buffer, &reason, BytesToRead );
switch( reason )
{
case I_TERM_MAXCNT:
done = FALSE;
break;
case I_TERM_END:
done = TRUE;
break;
case I_TERM_CHR:
done = TRUE;
break;
default:
done = TRUE;
break;
};
buff = (short *) buffer;
for(i=0;i<((BytesRead - 1)/2); i++)
{
Time = (j * xInc) + xOrg; /* calculate time */
j=j+1;
Volts = (buff[i] * yInc) + yOrg;/* calculate voltage */
fprintf( fp, "%e,%f\n", Time, Volts );
}
}
fclose( fp );
}
else
{
printf("Unable to open file 'pairs.csv'\n");
}
}
DATA? Example
for Digital
Channels
The following C example shows how to transfer both BYTE and WORD
formatted waveform data for digital channels to a computer. There is a file
on the Infiniium Oscilloscope Example Programs disk called readdig.c in
the c directory that contains this program.
/* readdig. c */
/* Reading Byte and Word format Example. This program demonstrates the
order of
commands suggested for operation of the Infiniium oscilloscope by LAN o
r GPIB.