ESR and ESE

The event status register (ESR) indicates general instrument states. It is linked to the standard event status enable (ESE) register on a bit-by-bit basis.

  • The ESR corresponds to the CONDition part of a SCPI register indicating the current instrument state. However, reading the ESR deletes the contents.

  • The ESE corresponds to the ENABle part of a SCPI register. If a bit is set in the ESE and the associated bit in the ESR changes from 0 to 1, the ESB bit in the status byte is set.

Bits in ESR register

Bit

Weight

Meaning

0

1

Operation complete

This bit is set on receipt of the *OPC command after all previous commands have been executed.

1

2

Request control

This bit is set if the instrument requests the controller function. Example: The instrument sends a hardcopy to a printer or a plotter via the IEC-bus.

2

4

Query error

This bit is set if the controller wants to read data from the instrument without having sent a query. It is also set if the controller does not fetch requested data and sends new instructions to the instrument instead. The cause is often a query which is faulty and hence cannot be executed.

3

8

Device-dependent error

This bit is set if a device-dependent error occurs. An error message with a number between -300 and -399 or a positive error number, which describes the error in greater detail, is entered into the error queue.

4

16

Execution error

This bit is set if a received command is syntactically correct, but cannot be performed for other reasons. An error message with a number between -200 and -300, which describes the error in greater detail, is entered into the error queue.

5

32

Command error

This bit is set if a command which is undefined or syntactically incorrect is received. An error message with a number between -100 and -200, which describes the error in greater detail, is entered into the error queue.

6

64

User request

This bit is set when the LOCAL key is selected on the instrument, i. e. when the instrument is switched to manual control.

7

128

Power on (supply voltage on)

This bit is set when the instrument is switched on.

Related common commands

The event status register (ESR) can be queried using *ESR? command.

The standard event status enable (ESE) register can be set using the *ESE command and read using *ESE? command.