A-13
A1
be 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
SYST:COMM:SER:BAUD? <nl>
'Queries the current
'Queries the current
baud setting
SYST:COMM:SER:BITS 8 <nl>
'Sets character format
'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 fi rst 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 fi ve items because the command contains 5 queries.
The fi rst 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 active. The last item is
32
(ESR register bit 5) which means execution
error - caused by the BIT 6 command.
Содержание N4865A
Страница 20: ...1 16 1 This page left intentionally blank ...
Страница 32: ...2 12 2 This page left intentionally blank ...
Страница 40: ...3 8 3 This page left intentionally blank ...
Страница 44: ...4 4 4 This page purposely left blank ...
Страница 96: ...A 44 A2 This page purposely left blank ...
Страница 100: ...Index 4 I This page left intentionally blank ...