A-13
A1
A
used when entering a command. Figure A-4 shows some single SCPI
commands for setting up and querying a serial interface.
SYSTem:COMMunicate:SERial:BAUD 9600 <nl>
Sets the baud rate to 9600 baud
SYST:COMM:SER:BAUD? <nl>
Queries the current baud setting
SYST:COMM:SER:BITS 8 <nl>
Sets character format to 8 data bits
Figure A-4 SCPI Command Examples
Multiple SCPI commands may be concatenated together as a compound
command using semi colons as command separators. The first command
is always referenced to the root node. Subsequent commands are referenced
to the same tree level as the previous command. Starting the subsequent
command with a colon puts it back at the root node. IEEE 488.2 common
commands and queries can be freely mixed with SCPI messages in the same
program message without affecting the above rules. Figure A-5 shows
some compound command examples.
SYST:COMM:SER:BAUD 9600; BAUD? <nl>
SYST:COMM:SER:BAUD 9600; :SYST:COMM:SER:
BITS 8 <nl>
SYST:COMM:SER:BAUD 9600; BAUD?; *ESR?; BIT 6; BIT?;
PACE XON; PACE?; *ESR? <nl>
Figure A-5 Compound Command Examples
A typical response would be:
9600; 0; 8; XON; 32 <nl>
The response includes five items because the command contains 5 queries.
The first item is
9600
which is the baud rate, the second item is
ESR=0
which means no errors (so far). The third item is
8
(bit/word) which is the
current setting. The BIT 6 command was not accepted because only 7 or 8
are valid for this command. The fourth item
XON
means that XON is