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. . . continuedvoid out_waveform(void){/* Set the output frequency to 5 kHz with an amplitude of 10 Vpp andoutput the arbitrary waveform. */}static char *cmd_string[]={/* Copy arb waveform to non-volatile memory with name "PULSE" */"DATA:COPY PULSE, VOLATILE","FUNC:USER PULSE", /* Select the active arb waveform */"FUNC:SHAP USER" /* Output the selected arb waveform */};/* Call the function to execute the command strings shown above */command_exe(cmd_string, sizeof(cmd_string)/sizeof(char*));/* Call the function to check for errors */check_error("out_waveform");/**************************************************************************/void command_exe(char *commands[], int length){/* Execute one command string at a time using loop */int loop;for (loop = 0; loop < length; loop++){IOOUTPUTS(ADDR, commands[loop], strlen(commands[loop]));}}/* Set output termination to 50 ohms and output frequency to 5 kHz @ 5 Vpp */IOOUTPUTS(ADDR, "OUTP:LOAD 50", 12);IOOUTPUTS(ADDR, "FREQ 5000;VOLT 5", 16);6/**************************************************************************/259

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

Saved successfully!

Ooh no, something went wrong!