IEEE 488.2 Common Commands

These commands and queries are associated with the IEEE 488.2 standard.

Command Summary

*CLS

*ESE

*ESR?

*IDN?

*LRN?

*OPC

*OPC?

*OPT?

*PSC

*RCL

*RST

*SAV

*SRE

*STB?

*TRG

*TST?

*WAI

Standard Event Register

The following table describes the Standard Event Register.

Bit Number

Bit Name

Decimal Value

Definition

0

Operation Complete

1

All commands prior to and including *OPC have been executed.

1

Not Used

2

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-Specific Error

8

A device-specific error, including a self-test error or calibration error, occurred (an error in the -300 range or any positive error has been generated). See SCPI Error Messages for the complete SCPI error message list.

4

Execution Error

16

An execution error occurred (an error in the -200 range has been generated).

5

Command Error

32

A command syntax error occurred (an error in the -100 range has been generated).

6

Not Used

64

0 is returned.

7

Power On

128

Power has been cycled since the last time the event register was read or cleared.

Status Byte Register

The following table describes the Status Byte Register.

Bit Number

Bit Name

Decimal Value

Definition

0

Not Used

1

(Reserved for future use)

1

Not Used

2

(Reserved for future use)

2

Error Queue

4

One or more errors have been stored in the Error Queue. Use SYSTem:ERRor? to read and delete errors.

3

Questionable Data Summary

8

One or more bits are set in the Questionable Data Register (bits must be enabled, see STATus:QUEStionable:ENABle).

4

Message Available

16

Data is available in the instrument's output buffer.

5

Standard Event Summary

32

One or more bits are set in the Standard Event Register (bits must be enabled, see *ESE).

6

Master Summary

64

One or more bits are set in the Status Byte Register and may generate a Request for Service (RQS). Bits must be enabled using *SRE.

7

Standard Operation Summary

128

One or more bits are set in the Standard Operation Register (bits must be enabled, see STATus:OPERation:ENABle).

*CLS

Clear Status Command. Clears the event registers in all register groups. Also clears the error queue.

Parameter Typical Return
(none) (none)
Clear event register bits and error queue:
*CLS

*ESE <enable_value>
*ESE?

Event Status Enable Command and Query. Enables bits in the enable register for the Standard Event Register group. The selected bits are then reported to bit 5 of the Status Byte Register. An enable register defines which bits in the event register will be reported to the Status Byte register group. You can write to or read from an enable register.

Note

For more information on the SCPI Status System, see Status Subsystem Introduction.

Parameter Typical Return

Decimal sum of the bits in the register, default 0. For example, to enable bit 2 (value 4), bit 3 (value 8), and bit 7 (value 128), the decimal sum would be 140 (4 + 8 + 128). Default 0.

+48
Configure 100 DC voltage measurements and enable the generation of an SRQ when the measurements complete:

*CLS
*ESE 1
*SRE 32
CONF:VOLT:DC
SAMP:COUN 100
INIT
*OPC

*ESR?

Standard Event Status Register Query. Queries the event register for the Standard Event Register group.

An event register is a read-only register that latches events from the condition register. While an event bit is set, subsequent events corresponding to that bit are ignored.

Parameter Typical Return
(none) +24

Read the event register (bits 3 and 4 are set).
*ESR?

*IDN?

Identification Query. Returns the instrument’s identification string.

Parameter Typical Return
(none) (see below)
Return the instrument's identification string:
*IDN?

*LRN?

Returns an ASCII string of all of the commands required to put the instrument into its current state.

Parameter Typical Return
(none) An ASCII string of SCPI commands, delimited with semicolons (";") between commands.
Return the learn string:
*LRN?

*OPC

Sets "Operation Complete" (bit 0) in the Standard Event register at the completion of the current operation.

Parameter Typical Return
(none) (none)

Configure 100 DC voltage measurements and enable the generation of an SRQ when the measurements complete:

*CLS
*ESE 1
*SRE 32
CONF:VOLT:DC
SAMP:COUN 100
INIT
*OPC

*OPC?

Returns 1 to the output buffer after all pending commands complete. Other commands cannot be executed until this command completes.

Parameter Typical Return
(none) 1

Configure 100 DC voltage measurements and return "1" when the measurements complete:

CONF:VOLT:DC
SAMP:COUN 100
INIT
*OPC?

*OPT?

Returns a string identifying any installed options.

Parameter Typical Return
(none) (see below)

Return the installed options:
*OPT?

*PSC {0|1}
*PSC?

Power-On Status Clear. Enables (1) or disables (0) the clearing of certain enable registers at power on:

Note

The *PSC command does not affect the clearing of the condition or event registers, just the enable registers. For more information on the SCPI Status System, see Status Subsystem Introduction.

Parameter Typical Return
{0|1}, default 1 0 or 1

Disable power-on clearing of affected registers:
*PSC 0

*RCL {0|1|2|3|4}
*SAV {0|1|2|3|4}

Stores the current instrument state to, or recalls the instrument state from, the state file STATE_<n>.sta in the root folder of the internal flash file system, where <n> is the number specified.

Parameter Typical Return
{0|1|2|3|4} (none)
Store the instrument state to the state file STATE_1.sta in the root folder of the internal flash file system.
*SAV 1

*RST

Resets instrument to factory default state, independent of MMEMory:STATe:RECall:AUTO setting. This is similar to SYSTem:PRESet. The difference is that *RST resets the instrument for SCPI operation, and SYSTem:PRESet resets the instrument for front-panel operation. As a result, *RST turns the histogram and statistics off, and SYSTem:PRESet turns them on (CALC:TRAN:HIST:STAT ON).

Parameter Typical Return
(none) (none)
Reset the instrument:
*RST

*SRE<enable_value>
*SRE?

Service Request Enable. Enables bits in the enable register for the Status Byte Register group. An enable register defines which bits in the event register will be reported to the Status Byte register group. You can write to or read from an enable register.

Parameter Typical Return
Decimal sum of the bits in the register, default 0. For example, to enable bit 2 (value 4), bit 3 (value 8), and bit 7 (value 128), the decimal sum would be 140 (4 + 8 + 128). Default 0. +24
Enable bits 3 and 4 in the enable register:
*SRE 24

*STB?

Read Status Byte Query. Queries the condition register for the Status Byte Register group and returns a decimal value equal to the binary-weighted sum of all bits set in the register.

A condition register continuously monitors the state of the instrument. Condition register bits are updated in real time; they are neither latched nor buffered.

Parameter Typical Return
(none) +40
Read condition register (with bits 3 and 5 set):
*STB?

*TRG

Triggers the instrument if TRIGger:SOURce BUS is selected.

Parameter Typical Return
(none) (none)

Return five DC voltage measurements, using a software trigger to start the measurements:

CONF:VOLT:DC
SAMP:COUN 5
TRIG:SOUR BUS
INIT
*TRG
FETCH?

Typical Response:+1.00520000E+01, … (5 measurements)

*TST?

Performs a basic self-test of the instrument and returns a pass/fail indication. The TEST:ALL? self-test is more comprehensive than the *TST? self-test.

Parameter Typical Return
(none) +0 (pass) or +1 (one or more tests failed)

Perform self-test:
*TST?

*WAI

Configures the instrument's output buffer to wait for all pending operations to complete before executing any additional commands over the interface.

Parameter Typical Return
(none) (none)

Wait until all pending operations complete:
*WAI