Getting started with SCPI

The Spektralwerk Core can be controlled using Standard Commands for Programmable Instruments (SCPI) via TCP/IP. In addition to the standard SCPI paths defined by SCPI 1999 and IEEE 488.2 (see SCPI 1999 and IEEE 488.2), commands are provided to change device specific settings, gather spectral data and adjust interplay with environment and other devices.

For the SCPI-TCP/IP communication scpi-raw port 5025 is used, the default IP address is located on the back plate of the Spektralwerk Core.

General remarks

SCPI requests always begin with a path, which can optionally be followed by parameters. If the path ends with a question mark, it signifies a query; otherwise, it represents a command.

In general, queries will return the current value and status or some information, while commands will call an event or change a setting. Both queries and commands may be separated from their parameters by white space.

Not all paths can be used both as query or command, some only provide the option to be used either as a query or a command. The documentation below provides details about their respective usage.

For each SCPI path an abbreviated version is accepted. The abbreviated path is indicated by UPPERCASE letters in the documentation and is represented by the first 3 to 4 letters of the command string, e.g., MEASure:SPECtrum:EXPosure:TIME is equal to MEAS:SPEC:EXP:TIME.

SCPI paths are case-insensitive, e.g. MEASure:SPECtrum:EXPosure:TIME has the same effect as measure:spectrum:exposure:time or meas:spec:exp:time.

Multiple SCPI commands can be concatenated by adding a semicolon ; between the commands, e.g., *IDN?;*ESR? will query the device identity and the current value of the event status enable register.

No responses are generated for commands. The response of a query ends with a line break. The absence or presence of a line break does not provide any information about success and failure of a query or command (see Error handling below for more details).

The accepted input values are specified together with a detailed description of the commands and examples of the usage.

For some numerical values (e.g. exposure time, average number, ... ) additional subqueries are available to provide information about default values (...:DEFault?), value limitations (...:MINimum? and ...:MAXimum?) and in some cases also the unit (...:UNIT?). The availability of these subqueries is mentioned for the respective values.

Boolean values are set by using 0 for false and 1 for true.

Multiple values (in parameters or in responses) are separated by commas (e.g. wavelength values, the reference spectra, ...).

The expected input types for all commands and queries paths is provided in angled brackets (<>). Optional input values are framed by square brackets ([]). Some commands and queries accept only specific keywords (mnemonics). These keywords are listed for the respective paths and described in the appendix.

Error handling

A response or the lack of a response does not reveal the success or failure of an operation. To obtain information about occurring errors, the error status enable register *ESR? can be queried. The *ESR? query returns an integer. A non-null response indicates an error status.

To obtain detailed information about the error, the error queue can be queried using SYSTem:ERRor:NEXT?. The last appeared error is returned (error code and a brief error message) and removed from the error queue. Successive calls of the error queue will provide additional errors if more than one error occurred. An empty error queue will return 0,"No error", while -350,"Queue overflow indicates that there is no space left for additional error messages in the queue.

It might be good practice to append the event status register query to each command, e.g., *IDN?;*ESR?.