IEEE-488 Reference
4-34
Response messages
A response message is the message sent by the instrument to the computer in response to a query
command program message.
1.
Sending a response message:
After sending a query command, the response message is
placed in the Output Queue. When the Model 2001 is then addressed to talk, the response
message is sent from the Output Queue to the computer. The following example in HP BA-
SIC 4.0 demonstrates this process:
10 OUTPUT 716; “:rout:scan?” ! Send query command.
20 ENTER 716; A$ ! Address Model 2001 to talk.
30 PRINT A$ ! Display response message on CRT.
40 END
There are two special query commands that are used to read the Error Queue. As error and
status messages occur they are stored in the Error Queue. This queue is a first-in first-out
(FIFO) register. Either of the following two SCPI commands can be used to read the Error
Queue:
:STATus:QUEue?
:SYSTem:ERRor?
After sending either of the above commands, the oldest message in the Error Queue will be
moved to the Output Queue. When the Model 2001 is then addressed to talk (as explained
above), the response message will be sent to the computer.
2.
Multiple response messages:
If you send more than one query command in the same pro-
gram message (see Multiple command messages), the multiple response message for all the
queries will be sent to the computer when the Model 2001 is addressed to talk. The respons-
es are sent in the order that the query commands were sent and will be separated by semi-
colons (;). Items within the same query are separated by commas (,). The following example
shows the response message for a program message that contains four single item query
commands:
0; 1; 1; 0
3.
Response Message Terminator (RMT):
Each response message is terminated with an LF
(line feed) and EOI (end or identify). The following example shows how a multiple re-
sponse message is terminated:
0; 1; 1; 0 <RMT>
Message exchange protocol
The message exchange protocol can be summarized by the two following rules:
Rule 1. You must always tell the Model 2001 what to send to the computer.
The following two steps must always be performed, in this order, to send information from the
instrument to the computer:
1. Send the appropriate query command(s) in a program message.
2. Address the Model 2001 to talk.
Rule 2. The complete response message must be received by the computer before another
program message can be sent to the Model 2001.