*ESR?

From Keysight 34970A/34972A

*ESR?

Syntax

*ESR?

Description

This command queries the event register for the Standard Event Register group. This is a read-destructive register, and the bits are cleared when you read the register.

For more information on the Status System for the instrument, see Status System Introduction.

Remarks

  • The following table lists the bit definitions for the Standard Event Register.
Bit # Bit Name Decimal Value Definition
0 Operation Complete 1 All commands prior to and including *OPC have been executed.
1 Not Used Not Used 0 is returned.
2 Query Error 4 The instrument tried to read the output buffer but it was empty. Or, a new command line was received before a previous query has been read. Or, both the input and output buffers are full.
3 Device Error 8 A device-specific error has been generated. For a complete listing of the error messages, see Error Messages.
4 Execution Error 16 An execution error occurred. These error codes are in the range -100 to -199.
5 Command Error 32 An command error occurred. These error codes are in the range -200 to -299.
6 Not Used Not Used 0 is returned.
7 Power On 128 Power has been turned off and on since the last time the event register was read or cleared.
  • In order to be reported to the Status Register, the corresponding bits in the event register must be enabled using the *ESE command.
  • Once a bit is set, it remains set until cleared by reading the event register or execution of the *CLS (clear status) command.

Return Format

The query reads the event register and returns a decimal value which corresponds to the binary-weighted sum of all bits set in the register (see table above). For example, if bit 2 (decimal value = 4) and bit 4 (decimal value = 16) are set (and the corresponding bits are enabled), this command will return +20.

Example

The following query reads the event register (bits 3 and 4 are set).

*ESR?

Typical Response: +24

See Also

IEEE-488 Common Commands Introduction

*ESE

*CLS