12-2
IM 2560A-01EN
Response Message Unit Syntax
The response message unit syntax is as follows:
,
<Response header>
<Response data>
Space
<Response Header>
A response header sometimes precedes the response
data. Separate the data from the header with a space.
For details, see section 12.3.
<Response Data>
Response data contains the content of the response. If
there are multiple sets of response data, separate each
set with a comma. For details, see section 12.3.
Example
100.00E-03<RMT> :SOURCE:FUNCTION VOLTAGE<RMT>
Header
Data
Data
If there are multiple queries in a program message,
responses are returned in the same order that the
queries were received in. In most cases, a single query
returns a single response message unit, but there
are a few queries that return multiple units. The first
response message unit always corresponds to the first
query, but the nth response unit may not necessarily
correspond to the nth query. Therefore, if you want to
make sure that every response is retrieved, divide the
program messages into individual messages.
Notes on Sending and Receiving Messages
• If the controller sends a program message that does
not contain a query, the controller can send the next
program message at any time.
• If the controller sends a program message that
contains a query, the controller must finish receiving
the response message before it can send the next
program message. If the controller sends the next
program message before receiving the response
message in its entirety, an error will occur. A
response message that is not received in its entirety
will be discarded.
• If the controller tries to receive a response message
when there is none, an error will occur. If the
controller tries to receive a response message
before the transmission of the program message is
complete, an error will occur.
• If the controller sends a program message
containing multiple message units, but the message
contains incomplete units, the 2560A will try to
execute the ones that are believed to be complete.
However, these attempts may not always be
successful. In addition, if such a message contains
queries, the 2560A may not necessary return
responses.
Deadlock
The 2560A can store at least 1024 bytes of messages
in its transmit and receive buffers (the number of
available bytes varies depending on the operating
conditions). If both the transmit and receive buffers
become full at the same time, the 2560A will no
longer be able to operate. This condition is called a
deadlock. If this happens, you can resume operation
by discarding response messages.
Deadlock will not occur if the program message
(including the <PMT>) is kept below 1024 bytes.
Program messages that do not contain queries never
cause deadlocks.
12.1 Messages