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

Table of Contents

Advertisement

/*****************************************************************************
* Function name:
*
Parameters:
*
*
*
*
*
*
*
*
Return value: none
*
Description:
*
*
******************************************************************************/
void WriteCsvToFile( double *TimeValues, double *wordVolts,
{
FILE *fp;
unsigned long i;
fp = fopen( "pairs.csv", "wb" ); /* Open file in binary mode - clear file
if (fp != NULL) {
fprintf( fp, "Time,Word Volts,Byte Volts\n");
for ( i = 0; i < AcquiredLength; i++ ) {
fprintf( fp, "%e,%f,%f\n", TimeValues[i], wordVolts[i], byteVolts[i] );
}
fclose( fp );
}
else {
printf("Unable to open file 'pairs.csv'\n");
}
}
WriteCsvToFile
double *TimeValues which is a pointer to an array of
calculated time values
double *wordVolts which is a pointer to an array of
calculated word format voltage values
double *byteVolts which is a pointer to an array of
calculated byte format voltage values
unsigned long AcquiredLength which is the number of data
points read
This routine stores the time and voltage information about
the waveform as time, word format voltage, and byte format
voltage separated by commas to a file.
double *byteVolts, unsigned long AcquiredLength )
DATA? Example for Analog Channels
if it already exists */
Waveform Commands
30-25

Advertisement

Table of Contents
loading

Table of Contents