SCPI and IEEE Bus Descriptions
How does SCPI Work in the Instrument?
4B
4B-5
How does SCPI Work in the Instrument?
The functions inside an instrument that control the operation provide SCPI compatibility.
Figure 4B-3 shows a simplified logical model of the message flow inside a SCPI
instrument.
When the controller sends a message to a SCPI instrument, roughly the following
happens:
•
The GPIB controller addresses the instrument as listener.
•
The GPIB interface function places the message in the Input Buffer.
•
The Parser fetches the message from the Input Buffer, parses (decodes) the message,
and checks for the correct syntax. The instrument reports incorrect syntax by sending
command errors via the status system to the controller. Moreover, the parser will
detect if the controller requires a response. This is the case when the input message is
a query (command with a “?” appended).
The Parser will transfer the executable messages to the Execution Control block in token
form (internal codes). The Execution Control block will gather the information required
for a device action and will initiate the requested task at the appropriate time. The
instrument reports execution errors via the status system over the GPIB and places them
in the Error Queue.
When the controller addresses the instrument as talker, the instrument takes data from the
Output Queue and sends it over the GPIB to the controller.
Message Exchange Control Protocol
Another important function is the Message Exchange Control, defined by IEEE 488.2.
The Message Exchange Control protocol specifies the interactions between the several
functional elements that exist between the GPIB functions and the device-specific
functions.
The Message Exchange Control protocol specifies how the instrument and controller
should exchange messages. For example, it specifies exactly how an instrument shall
handle program and response messages that it receives from and returns to a controller.
This protocol introduces the idea of commands and queries; queries are program
messages that require the device to send a response. When the controller does not read
this response, the device will generate a Query Error. On the other hand, commands will
not cause the device to generate a response. When the controller tries to read a response
anyway, the device then generates a Query Error.
The Message Exchange Control protocol also deals with the order of execution of
program messages. It defines how to respond if Command Errors, Query Errors,
Execution Errors, and Device-Specific errors occur. The protocol demands that the
instrument report any violation of the IEEE-488.2 rules to the controller, even when it is
the controller that violates these rules.
Summary of Contents for 9640A Series
Page 8: ......
Page 16: ...9640A Instruction Manual viii...
Page 22: ...9640A Instruction Manual 1 2...
Page 40: ...9640A Instruction Manual 2 2...
Page 108: ...9640A Instruction Manual 4A 2...
Page 138: ...9640A Instruction Manual 4C 2...
Page 164: ...9640A Instruction Manual 4D 2...
Page 168: ...9640A Instruction Manual 4D 6...
Page 170: ...9640A Instruction Manual 4E 2...
Page 174: ...9640A Instruction Manual 4E 6...
Page 176: ...9640A Instruction Manual 4F 2...
Page 184: ...9640A Instruction Manual 4F 10...
Page 186: ...9640A Instruction Manual 4G 2...
Page 190: ...9640A Instruction Manual 4G 6...
Page 192: ...9640A Instruction Manual 5 2...
Page 272: ...9640A Instruction Manual 5 82...
Page 274: ...9640A Instruction Manual 6 2...
Page 284: ...9640A Instruction Manual 7 2...
Page 310: ...9640A Instruction Manual 8 2...
Page 316: ...9640A Instruction Manual 8 8...
Page 320: ...9640A Instruction Manual A 4...