11.07.2015 Views

Agilent 33120A User's Guide

Agilent 33120A User's Guide

Agilent 33120A User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6 Application ProgramsUsing the APPLy CommandC / GPIB (Program 1)/***************************************************************************This program sets up a burst waveform with a 270 degree starting phase.By adding an offset voltage to the burst, a "haversine" is created.This program also shows the use of a trigger received over the GPIBinterface to initiate a single burst.***************************************************************************/#include /* Used for printf() */#include /* Used for atoi() */#include /* Used for strlen() */#include /* Header file from GPIB Command Library */#define ADDR 710L /* Set GPIB address for function generator *//* Function Prototypes */void rst_clear(void);void out_waveform(void);void command_exe(char *commands[], int length);void burst_trig(void);void check_error(char *func_name);/**************************************************************************/void main(void) /* Start of main() */{rst_clear(); /* Reset the instrument and clear error queue */out_waveform(); /* Set up burst modulation parameters */burst_trig(); /* Trigger the function generator */}/**************************************************************************/void rst_clear(void){/* Reset the function generator, clear the error queue, and wait forcommands to complete. A "1" is sent to the output buffer from the*OPC? command when *RST and *CLS are completed. */6}float value;IOOUTPUTS(ADDR, "*RST;*CLS;*OPC?", 15);IOENTER(ADDR, &value);/**************************************************************************/249

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!