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

Table of Contents

Advertisement

/*****************************************************************************
* Function name:
*
Parameters:
*
*
*
*
*
*
*
*
*
Return value: none
*
Description:
*
*
******************************************************************************/
void ConvertByteDataToVolts( char *byteData, double *byteVolts,
{
unsigned long i;
for (i = 0; i < AcquiredLength; i++) {
/* calculate voltage values */
byteVolts[i] = (byteData[i] * yInc) + yOrg;
}
}
Waveform Commands
DATA? Example for Analog Channels
ConvertByteDataToVolts
short *byteData which is a pointer to the array of
read byte values
double *byteVolts which is a pointer to the array of
calculated voltages
unsigned long AcquiredLength which is the number of data
bytes read
double yInc which is the voltage difference represented
by adjacent waveform data digital codes.
double yOrg which is the voltage value of digital code 0.
This routine converts the byte format waveform data to
voltage values using the values that describe the
waveform.
These values are stored in global variables.
unsigned long AcquiredLength,
double yInc, double yOrg )
30-24

Advertisement

Table of Contents
loading

Table of Contents