User manual

Function Operation
AM700 Audio Measurement Set User Manual
4-131
H If double quote marks are used in a SCPI command, they must be escaped by a
backslash (\“string\”) in order to pass them to SCPI using the Tcl scpi
command.
H Precede all SCPI commands with the string “scpi”.
The Tcl parser looks first to see if it is a Tcl command that it knows about; if so, it
runs it as a Tcl command. If not, the parser looks for *, ?, or : in the command lines
to see if it is a SCPI command. Putting the letters “scpi” in front of the SCPI
commands tells the Tcl parser that it is a SCPI command, and the command is
immediately passed to the SCPI parser.
The example function program shown uses some of the commands that can be
needed to change application, signals, and displays. Some control changes may not
be required, because the default setting is correct for the function. You can use the
*RST command to set everything to its default state or the state of controls can be
explicitly set to avoid the possibility that the control is not in the default setting.
The following program uses the AM700 digital generator to supply the signal to the
AM700 Audio Monitor. The front panel XLR digital output connector must be
connected to the front panel XLR digital input connector to complete the setup. In
the sample function, the first line labels the function and the second line provides
some visual feedback to the front panel in the Function Output window that appears
in the Function control panel display.
#label: Digital Generator CCIF IMD
puts stdout "Digital CCIF IMD"
#Set the AM700 to its default states.
scpi *RST
#Select the digital generator for measurement
#CSTR1 has DSF1 and CSTR2 has DSF2
scpi CSTR1:FEED 'sens5'
scpi CSTR2:FEED 'sens6'
#Select the CCIF IMD test signal to be generated.
#DSF2 follows DSF1 by default.
scpi SOUR5:FUNC:SHAP CIMD
#Make sure the digital input path is the front-panel
#XLR connector
scpi ROUT3:CLOS 6
#Turn on the generator signal.
scpi GCON:OUTP:STAT ON