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 Low-Level CommandsQuickBASIC / GPIB (Program 2)REM $INCLUDE: ’QBSETUP’’’ This program uses low-level SCPI commands to configure’ the function generator to output an AM waveform.’ This program also shows how to use "state storage" to’ store the instrument configuration in memory. The program’ is written in QuickBASIC and uses the 82335B GPIB card’ and GPIB command library.’ISC& = 7 ’ GPIB select code is "7"Dev& = 710 ’ Assign I/O path to address 710Timeout = 5’ Configure device library for a 5 second timeoutCALL IOTIMEOUT(ISC&, Timeout)IF PCIB.ERR NOERR THEN ERROR PCIB.BASERRCALL IORESET(ISC&)’ Reset the 82335B GPIB cardIF PCIB.ERR NOERR THEN ERROR PCIB.BASERRCALL IOCLEAR(Dev&)’ Send a device clear to the function generatorIF PCIB.ERR NOERR THEN ERROR PCIB.BASERRCALL IOREMOTE(Dev&)’ Place the function generator in the remote modeIF PCIB.ERR NOERR THEN ERROR PCIB.BASERRInfo1$ = "*RST"’ Reset the function generatorLength1% = LEN(Info1$)CALL IOOUTPUTS(Dev&, Info1$, Length1%)IF PCIB.ERR NOERR THEN ERROR PCIB.BASERRInfo1$ = "OUTP:LOAD 50" ’ Output termination is 50 ohmsLength1% = LEN(Info1$)CALL IOOUTPUTS(Dev&, Info1$, Length1%)IF PCIB.ERR NOERR THEN ERROR PCIB.BASERRInfo1$ = "FUNC:SHAP SIN" ’ Carrier waveshape is sine waveLength1% = LEN(Info1$)CALL IOOUTPUTS(Dev&, Info1$, Length1%)IF PCIB.ERR NOERR THEN ERROR PCIB.BASERR6Info1$ = "FREQ 5000;VOLT 5" ’ Carrier frequency is 5 kHz @ 5 VppLength1% = LEN(Info1$)CALL IOOUTPUTS(Dev&, Info1$, Length1%)IF PCIB.ERR NOERR THEN ERROR PCIB.BASERR253

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

Saved successfully!

Ooh no, something went wrong!