Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1062

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
1062
do_query_string(":TRIGger:LEVel? CHANnel1");
printf("Trigger level, channel 1: %s\n", str_result);
do_command(":TRIGger:EDGE:SLOPe POSitive");
do_query_string(":TRIGger:EDGE:SLOPe?");
printf("Trigger edge slope: %s\n", str_result);
/* Save oscilloscope setup. */
/* Read system setup. */
num_values = do_query_ieeeblock(":SYSTem:SETup?");
printf("Read setup string query (%d bytes).\n", num_values);
/* Write setup string to file. */
fp = fopen ("c:\\scope\\config\\setup.stp", "wb");
num_values = fwrite(ieeeblock_data, sizeof(unsigned char), num_values,
fp);
fclose (fp);
printf("Wrote setup string (%d bytes) to ", num_values);
printf("c:\\scope\\config\\setup.stp.\n");
/* Change settings with individual commands:
/* Set vertical scale and offset. */
do_command(":CHANnel1:SCALe 0.1");
do_query_string(":CHANnel1:SCALe?");
printf("Channel 1 vertical scale: %s\n", str_result);
do_command(":CHANnel1:OFFSet 0.0");
do_query_string(":CHANnel1:OFFSet?");
printf("Channel 1 offset: %s\n", str_result);
/* Set horizontal scale and offset. */
do_command(":TIMebase:SCALe 0.0002");
do_query_string(":TIMebase:SCALe?");
printf("Timebase scale: %s\n", str_result);
do_command(":TIMebase:POSition 0.0");
do_query_string(":TIMebase:POSition?");
printf("Timebase position: %s\n", str_result);
/* Set the acquisition mode. */
do_command(":ACQuire:MODE RTIMe");
do_query_string(":ACQuire:MODE?");
printf("Acquire mode: %s\n", str_result);
/* Or, set up by loading a previously saved setup. */
/* Read setup string from file. */
fp = fopen ("c:\\scope\\config\\setup.stp", "rb");
num_values = fread (ieeeblock_data, sizeof(unsigned char),
IEEEBLOCK_SPACE, fp);
fclose (fp);
printf("Read setup string (%d bytes) from file ", num_values);
printf("c:\\scope\\config\\setup.stp.\n");
/* Restore setup string. */
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents