
2-14
Sample Programs
C Programming Examples
init_IO ( );
/* initialize device and interface */
/* Note: routine found in sicl_IO.c or natl_IO.c */
initialize ( );
/* initialize the scope and interface, and set up SRQ */
store_learnstring ( );
/* request learnstring and store */
change_setup ( );
/* request user to change setup */
get_learnstring ( );
/* restore learnstring */
close_IO ( );
/* close device and interface sessions */
/* Note: routine found in sicl_IO.c or natl_IO.c */
} /* end main */
/*
* Function name: initialize
* Parameters: none
* Return value: none
* Description: This routine initializes the analyzer for proper acquisition of data.
* The instrument is reset to a known state and the interface is cleared.
* System headers are turned off to allow faster throughput and immediate access to the data values requested by queries.
* Autoscale is performed to acquire a waveform. The signal is then
* digitized, and the channel display is turned on following the acquisition.
*/
void initialize ( )
{
write_IO ("*RST");
/* reset scope - initialize to known state */
write_IO ("*CLS");
/* clear status registers and output queue */
write_IO (":SYSTem:HEADer ON");/* turn on system headers */
/* initialize Timebase parameters to center reference, 2 ms full-scale (200 us/div), and 20 us delay */
write_IO (":TIMebase:REFerence CENTer;RANGe 5e-3;POSition 20e-6");
/* initialize Channel1 1.6v full-scale (200 mv/div); offset -400mv */
write_IO (":CHANnel1:RANGe 1.6;OFFSet -400e-3");
/* initialize trigger info: channel1 signal on positive slope at 300mv */
write_IO (":TRIGger:SOURce FPANel;SLOPe POSitive");
write_IO (":TRIGger:LEVel-0.40");
/* initialize acquisition subsystem */
/* Real time acquisition - no averaging; record length 4096 */
write_IO (":ACQuire:AVERage OFF;POINts 4096");
} /* end initialize ( ) */
/*
* Function name: store_learnstring
* Parameters: none
* Return value: none
* Description: This routine requests the system setup known as a learnstring.
* The learnstring is read from the scope and stored in a file called Learn2.
*/
void store_learnstring ( )
{
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: ......