Using status registers, Standard event status register (esr) – Teledyne LeCroy WaveAce 1000_2000 Remote Control User Manual
Page 12
![background image](/manuals/353438/12/background.png)
WaveAce Remote Control
The oscilloscope might respond with:
TIME_DIV 50 NS;C1:COUPLING D50
Note the response message refers only to the two queries that were sent in the original message.
Whenever you expect a response from the oscilloscope, add the query form of the command to the
control program following the command to specify that a read response is desired. If the controller
sends another command without reading the response to the previous one, the response message in
the output buffer of the oscilloscope will be discarded.
The oscilloscope follows stricter rules for response messages than for program messages:
• Program messages may be in upper- or lower-case characters, but response messages will
always be upper-case.
• Program messages may contain extraneous spaces or tabs, but response messages will not.
• Program messages can contain a mix of short and long form command/query headers, but
response messages will always contain the short form unless you use the COMM_HEADER
command to specify the long form or no header at all.
Using Status Registers
Status registers allow you to quickly determine the instrument's internal processing status at any time.
These registers and the oscilloscope's status reporting system, which group related functions together,
are designed to comply with IEEE 488.2 recommendations.
Registers such as the Standard Event Status Register (ESR) are required by the IEEE 488.2 Standard.
Others are device specific. Commands associated with IEEE 488.2 mandatory status registers are
preceded with an asterisk
*
in the Command Reference section.
• Enable registers such as the Standard Event Status Enable Register (ESE) are used to generate a bit-wise
AND with their associated status registers.
• The ESR primarily summarizes errors, whereas INR summarizes the instrument’s internal working state.
Additional details of errors reported by ESR can be obtained with the queries CMR?, DDR?, and EXR?.
If you were to send the erroneous command TRIG_MAKE SINGLE to your instrument, the oscilloscope
would reject it and set the Command Error Register (CMR) to the value 1 (unrecognized
command/query header). The non-zero value of CMR would be reported to Bit 5 of the Standard Event
Status Register (ESR), which is then set.
You can read the value of CMR and simultaneously reset to zero at any time using the CMR? command.
The occurrence of a command error can also be detected by analyzing the response to *ESR?.
Standard Event Status Register (ESR)
ESR is a 16-bit register reflecting the occurrence of events. ESR bit assignments have been
standardized by IEEE 488.2. Only the lower eight bits are currently in use.
10
920836 Rev B