Sample Programs C Programming Examples - Agilent Technologies Infiniium DCA Programmer's Manual

Wide-bandwidth oscilloscope
Table of Contents

Advertisement

Sample Programs
C Programming Examples
vpp = (float) 0;
/* turn off results */
write_IO (":MEASure:SEND OFF");
write_IO (":MEASure:PERiod? CHANnel1");
bytes_read = read_IO (period_str,16L);
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);
2-6
/* period channel 1 */
/* read in value and result flag */

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Infiniium dca-j86100a86100b86100c

Table of Contents