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 ProgramsDownloading an Arbitrary Waveform over GPIB. . . continued300 ! Download data points to volatile memory from array310 !320 DISP "Downloading Arb..."330 OUTPUT @Fgen;"DATA VOLATILE,";Waveform(*)340 DISP "Download Complete"350 !360 OUTPUT @Fgen;"DATA:COPY PULSE, VOLATILE" ! Copy arb to non-volatile memory370 OUTPUT @Fgen;"FUNC:USER PULSE" ! Select the active arb waveform380 OUTPUT @Fgen;"FUNC:SHAP USER" ! Output the selected arb waveform390 !400 OUTPUT @Fgen;"OUTP:LOAD 50" ! Output termination is 50 ohms410 OUTPUT @Fgen;"FREQ 5000;VOLT 5" ! Output frequency is 5 kHz @ 5 Vpp420 !430 ENDC / GPIB (Program 3)/***************************************************************************This program uses the arbitrary waveform function to download andoutput a square wave pulse with a calculated rise time and fall time.The waveform consists of 4000 points downloaded over the GPIBinterface as ASCII data.***************************************************************************/#include /* Used for printf() */#include /* Used for malloc(), free(), atoi() */#include /* Used for strlen() */#include /* Header file from GPIB Command Library */#define ISC 7L /* Assign GPIB select code */#define ADDR 710L /* Set GPIB address for function generator *//* Function Prototypes */void rst_clear(void);void get_data(void);void download_data(float *waveform, int num_points);void out_waveform(void);void command_exe(char *commands[], int length);void check_error(char *func_name);/**************************************************************************/256

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

Saved successfully!

Ooh no, something went wrong!