956
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
34
Waveform Commands
fprintf( fp, "Time,Decimal Word Data,Hex Word Data,Hex Byte Data,Bi
nary Byte Data\n");
Binary[8] = '\0';
for ( i = 0; i < AcquiredLength; i++ ) {
// Create the binary formated byte data
for ( j = 7, k = 0; j >= 0; j--, k++ ) {
Binary[k] = ((byteData[i] & ( 1 << j )) >> j) + '0';
}
fprintf( fp, "%e,%d,%04X,%02X,%s\
n", TimeValues[i], wordData[i], wordData[i],
byteData[i], Binary );
}
fclose( fp );
}
else {
printf("Unable to open file 'digital.csv'\n");
}
}
/***********************************************************************
*******
*
Function name: Round
*
Parameters:
double number which is a floating point number
*
to be converted.
*
Return value:
The rounded integer value for the number parameter.
*
Description:
This routine takes a floating point number and create
s an
*
integer.
************************************************************************
*****/
int Round( double number )
{
if (number < 0.0f ) {
return ( (int) (number - 0.5f) );
}
else {
return ( (int) ( 0.5f) );
}
}
Understanding
WORD and BYTE
Formats
Before you can understand how the WORD and BYTE downloads work, it
is necessary to understand how Infiniium creates waveform data.
Analog-to-digital
Conversion
Basics
The input channel of every digital sampling oscilloscope contains an
analog- to- digital converter (ADC) as shown in
Figure 8
. The 8- bit ADC in
Infiniium consists of 256 voltage comparators. Each comparator has two
inputs. One input is connected to a reference dc voltage level and the
other input is connected to the channel input. When the voltage of the
waveform on the channel input is greater than the dc level, then the
Summary of Contents for Infiniium 90000 Q-Series
Page 1: ...s1 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference...
Page 50: ...50 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 2 Setting Up...
Page 274: ...274 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 14 Digital Commands...
Page 292: ...292 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 15 Disk Commands...
Page 318: ...318 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 16 Display Commands...
Page 364: ...364 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 17 Function Commands...
Page 382: ...382 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 19 Histogram Commands...
Page 412: ...412 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 21 Limit Test Commands...
Page 416: ...416 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 22 Lister Commands...
Page 696: ...696 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 25 Measure Commands...
Page 702: ...702 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 26 Pod Commands...
Page 760: ...760 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 29 Self Test Commands...
Page 818: ...818 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 31 System Commands...
Page 830: ...830 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 32 Time Base Commands...
Page 930: ...930 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 33 Trigger Commands...
Page 1018: ...1018 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 37 Error Messages...
Page 1150: ...1150 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference 38 Sample Programs...
Page 1186: ...1186 Agilent Infiniium 90000 Series Oscilloscopes Programmer s Reference Index...