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

Table of Contents

Advertisement

/******************************************************************************
*
Function name: SetupDataTransfer
*
Parameters:
*
*
*
*
Return value:
*
Description: This routine sets up the waveform data transfer and gets
*
the number of bytes to be read.
*
starts with the # character followed by a number which
*
tells how many bytes to read for the integer which is the
*
total number of data bytes that are being transfered.
*
Following this is the waveform data.
*
bytes of waveform data is being transfered then this
*
information will be as follows:
*
********************************************************************************
********/
unsigned long SetupDataTransfer( double lTime, double rTime )
{
unsigned long BytesToRead;
char header_str[8];
char cData;
unsigned long BytesRead;
int Size;
char Range[100];
/* Find the index value of the first data memory location */
Start = Round((lTime - xOrg)/xInc);
if (Start < 1) {
Start = 1;
}
/* Find the number of data bytes that you want */
Size = Round((rTime - lTime)/xInc);
sprintf( Range, ":WAVeform:DATA? %d,%d", Start, Size);
WriteIO( Range );
/* Find the # character */
do {
ReadByte( &cData, 1L );
} while ( cData != '#' );
Waveform Commands
DATA? Example for Digital Channels
double lTime which is the time value of the first
waveform memory location of data.
double rTime which is the time value of the last
waveform memory location of data.
Number of bytes of waveform data to read.
#41024 <1024 data bytes>
30-32
The beginning of data
/* Request waveform data */
For example, if 1024

Advertisement

Table of Contents
loading

Table of Contents