
2-7
Sample Programs
C Programming Examples
xorg = atof (xorg_str);
write_IO (":WAVeform:XREFerence?");
bytes_read = read_IO (xref_str,32L);
xref = atof (xref_str);
write_IO (":WAVeform:YINCrement?");
bytes_read = read_IO (yinc_str,32L);
yinc = atof (yinc_str);
write_IO (":WAVeform:YORigin?");
bytes_read = read_IO (yorg_str,32L);
yorg = atof (yorg_str);
write_IO (":WAVeform:YREFerence?");
bytes_read = read_IO (yref_str,32L);
yref = atof (yref_str);
write_IO (":WAVeform:DATA?");
/* request waveform data */
bytes_read = read_IO (data,1L);
/* ignore leading # */
bytes_read = read_IO (header_str,1L);
/* input byte counter */
header_length = atoi (header_str);
/* read number of points - value in bytes */
bytes_read = read_IO (header_str,(long)header_length);
Acquired_length = atoi (header_str);
/* number of bytes */
bytes_read = read_IO (data,Acquired_length); /* input waveform data */
bytes_read = read_IO (&term,1L);
/* input termination character */
} /* end transfer_data ( ) */
/*
* Function name: convert_data
* Parameters: none
* Return value: none
* Description: This routine converts the waveform data to time/voltage
* information using the values that describe the waveform. These values are
* stored in global arrays for use by other routines.
*/
void convert_data ( )
{
int i;
for (i = 0; i < Acquired_length; i++)
{
time_value[i] = ((i - xref) * xinc) + xorg; /* calculate time info */
volts[i] = ((data[i] - yref) * yinc) + yorg; /* calculate volt info */
}
} /* end convert_data ( ) */
/*
* Function name: store_csv
* Parameters: none
Summary of Contents for 86100A
Page 18: ...1 14 Introduction Status Reporting Figure 1 4 Status Reporting Data Structures...
Page 19: ...1 15 Introduction Status Reporting Status Reporting Data Structures continued...
Page 94: ...2 40 Sample Programs BASIC Programming Examples...
Page 124: ...4 16 Root Level Commands VIEW...
Page 132: ...5 8 System Commands TIME...
Page 140: ...6 8 Acquire Commands SWAVeform RESet...
Page 152: ...7 12 Calibration Commands STATus...
Page 192: ...11 12 Display Commands SSAVer...
Page 202: ...12 10 Function Commands VERTical RANGe...
Page 203: ...13 AREA 13 2 DPRinter 13 2 FACTors 13 3 IMAGe 13 3 PRINters 13 4 Hardcopy Commands...
Page 316: ...21 12 TDR TDT Commands Rev A 05 00 and Below STIMulus...
Page 332: ......