
2-82 Programming Guide
Programming Commands and Examples ESG Family Signal Generators
Using Queries, Example Program 3
400 OUTPUT Sig_gen;"*IDN?"
410 ENTER Sig_gen;C$
420 PRINT
430 PRINT "This signal generator is a ";C$
440 PRINT
450 OUTPUT Sig_gen;"SYST:COMM:GPIB:ADDR?"
460 ENTER Sig_gen;D$
470 PRINT "The GPIB Address is ";D$
480 PRINT
490 PRINT "Press the ‘Local’ key to return the instrument to LOCAL control"
500 PRINT "or Press RUN to start again."
510 END
Program Comments
10 to 110: Title and program description
120: Dimension string A$, string C$, and string D$ variables to contain responses.
130: Declares variable B as an integer.
140: Assigns the signal generator’s GPIB address to a variable.
150: Places the signal generator into LOCAL mode.
160: Resets the signal generator’s parser and clears any pending output from the source.
170: Clears the controller’s display.
180: Sets the signal generator to a defined state.
190: Queries the value of the signal generator’s CW frequency.
200: Enters the query response into the variable F. The response is always returned in
fundamental units (Hz, in the case of frequency).
210 to 220: Prints the instrument’s current source frequency (in MHz) to the controller’s display.
230: Queries the value of the signal generator’s CW power.
240: Enters the query response into the variable W.
250 to 260: Prints the instrument’s current source power (in dBm) to the controller’s display.
270: Queries the value of a discrete function, FREQ:MODE.
280: Enter the response into A$. The response will be a string that represents the function’s
present state.
290 to 300: Prints the value of A$ on the computer’s display.
310: Assigns a value of 0 to B variable.
320: Commented command for turning off modulation
330: Queries the on/off state for modulation.
340: Enters value for the modulation state.
Comentários a estes Manuais