Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1164

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

39
Reference
}
1164
size_t BytesRead = 0L;
double Time;
FILE *MaxFile;
FILE *MinFile;
fread( &waveformDataHeader, 1,
sizeof( WaveformDataHeader ), InputFile );
GetTimeConversionFactors( waveformHeader, &xInc, &xOrg );
MaxFile = fopen( "maxdata.bin", "wb" );
MinFile = fopen( "mindata.bin", "wb" );
if( MaxFile && MinFile )
{
if( waveformDataHeader.BufferType == PB_DATA_MAX )
{
OutputData( MaxFile, waveformDataHeader );
OutputData( MinFile, waveformDataHeader );
}
else
{
OutputData( MinFile, waveformDataHeader );
OutputData( MaxFile, waveformDataHeader );
}
fclose( MaxFile );
fclose( MinFile );
MaxFile = fopen( "maxdata.bin", "rb" );
MinFile = fopen( "mindata.bin", "rb" );
while( !done )
{
BytesRead = fread( (char *) MaxVolts, 1, MAX_LENGTH, MaxFile );
fread( (char *) MinVolts, 1, MAX_LENGTH, MinFile );
for( i = 0; i < BytesRead/4; i++)
{
Time = (j * xInc) + xOrg; /* calculate time */
j = j + 1;
fprintf( OutputFile, "%9.5e,%f,%f\n", Time, MinVolts[i],
MaxVolts[i] );
}
if( BytesRead < MAX_LENGTH )
{
done = TRUE;
}
}
fclose( MaxFile );
fclose( MinFile );
}
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents