
2-6
Sample Programs
C Programming Examples
vpp = (float) 0;
/* turn off results */
write_IO (":MEASure:SEND OFF");
write_IO (":MEASure:PERiod? CHANnel1");
/* period channel 1 */
bytes_read = read_IO (period_str,16L);
/* read in value and result flag */
period = (float) atof (period_str);
if ( period > 9.99e37 )
printf ("\nPeriod could not be measured.\n");
else
printf ("\nThe period of channel 1 is %f seconds.\n", period );
write_IO (":MEASure:VPP? CHANnel1");
bytes_read = read_IO ( vpp_str,16L );
vpp = (float) atof (vpp_str);
if ( vpp > 9.99e37 )
printf ("Peak-to-peak voltage could not be measured.\n");
else
printf ("The voltage peak-to-peak is %f volts.\n", vpp );
} /* end auto_measurements ( ) */
/*
* Function name: transfer_data
* Parameters: none
* Return value: none
* Description: This routine transfers the waveform conversion factors and waveform data to the PC.
*/
void transfer_data ( )
{
int header_length;
char header_str[8];
char term;
char xinc_str[32],xorg_str[32],xref_str[32];
char yinc_str[32],yref_str[32],yorg_str[32];
int bytes_read;
/* waveform data source channel 1 */
write_IO (":WAVeform:SOURce CHANnel1");
/* setup transfer format */
write_IO (":WAVeform:FORMat BYTE");
/* request values to allow interpretation of raw data */
write_IO (":WAVeform:XINCrement?");
bytes_read = read_IO (xinc_str,32L);
xinc = atof (xinc_str);
write_IO (":WAVeform:XORigin?");
bytes_read = read_IO (xorg_str,32L);
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: ......