R3131 Spectrum Analyzer Operation Manual
4.1 GPIB Remote Programming
4-5
Apr 10/98
4.1.5
Message Exchange Protocol
The spectrum analyzer receives program messages from controllers or other devices through the GPIB bus
and generates response data. Program messages include commands, queries (commands used to query
response data) and data. The procedure used to exchange these commands, queries and data is explained
in this section.
(1)
GPIB Buffers
The spectrum analyzer is equipped with the following two buffers:
(a)
Input Buffer
The input buffer is used to store data temporarily for command analysis (it has a length of 1024
bytes so an input larger than this is ignored.)
Use either of the following two methods to clear this buffer:
•
Turn the spectrum analyzer power on.
•
Execute DCL or SDC.
(b)
Output Buffer
The output buffer is used to store data which is going to be read from the controller (1024 bytes).
Use either of the following two methods to clear this buffer:
•
Turn the spectrum analyzer power on.
•
Execute DCL or SDC.
(2)
Message Exchange
GPIB control between a controller and a device consists of two main elements ; command message
analysis (by the parser) and response data generation. These are explained below.
(a)
Parser
The parser receives command messages in the order of reception from the input buffer, analyzes
the syntax, and determines what the received command is.
(b)
Response Data Generation
When the parser determines what the query is, the spectrum analyzer generates data in the output
buffer in response (that is, to output data a query must be sent immediately before the data).