What's Command?

Command Messages

Commands, queries and responses sent and received through the interface are called messages.
Message types are as follows:

Program messages | This term refers to both command messages and query messages.
Response messages | These are returned from the instrument to the PC in response to query messages. The instrument produces a response message as soon as it receives a query message and checks its syntax.
Command program messages | These are instrument control instructions sent from the PC, such as to make or reset settings.
Query program messages | These are sent from the PC to the instrument to interrogate the state of a particular setting or the result of an operation. The instrument produces a response message as soon as it receives a query message and checks its syntax.

In the following descriptions the word "command" refers to both command and query program messages, except where an ambiguity may result.
(Control commands: HIOKI unique SCPI)

Command Syntax

Commands sent to the instrument are not case sensitive. Command names are intended to be mnemonic, and all have a long form and an abbreviated short form. In the command descriptions in this manual, the short form appears in upper-case letters, and is continued in lower-case letters to show the long form as well. While either form is valid during operation, intermediate forms are invalid. Both lower- and upper-case letters are accepted without distinction during operation. The instrument generates response messages in the long form (when headers are enabled), in all upper-case letters.
(Example)

Command descriptions in this manual | Short form | Long form
DISPlay | DISP | DISPLAY

For "DISPlay" commands, either "DISPLAY" (the long form) or "DISP" (the short form) is accepted. However, all of "DISPLA", "DISPL" and "DIS" are invalid and will generate an error.

Command headers

All commands must include a header for identification.
There are three kinds of headers (command types): simple, compound, and standard.

Command Type (Header) | Description
Simple | The first word constitutes the header. (Example)
Compound | A header composed of multiple simple command type headers separated by colons. (Example)
Standard | A command beginning with an asterisk and stipulated by IEEE 488.2. (Example) *RST

Query headers

Queries interrogate the instrument regarding a setting state or the result of an operation.
Query headers are distinguished by a question mark at the end of the header.
The structure of a query header is identical to that of its corresponding command header, with "?" always appended as the last character.

Command Type | Description
Simple | The first word constitutes the header. (Example)
Compound | A header composed of multiple simple command type headers separated by colons. (Example)
Standard | A command beginning with an asterisk and stipulated by IEEE 488.2. (Example) *IDN?

Response Messages

Response messages returned by the instrument to the PC in response to received queries are composed of a header portion (omitted when headers are disabled) and a data portion identical to the data portion defined for the command message that corresponds to the received query. As a general rule, the format of returned data is the same as that of the command message.
(Example)

Query | :CONFIGURE:TDIV? |
Response | :CONFIGURE:TDIV 1.0E-03 1.0E-03 | (when headers are enabled) (when headers are disabled)

Terminators and Separators

(1) Message terminators
The terminator character signifies the end of a message (including compound messages to be sent as one line), and is not considered part of the message itself.

Setting on the instrument and PC | ANSI code (hexadecimal) | Meaning | Description
LF | 0Ah | Line feed | LF is the message delimiter
CR+LF | 0Dh 0Ah |  | CR+LF is the message delimiter

(2) Message separator
When a compound message is to be sent to the instrument as one line, a semicolon ";" serves as the separator for individual messages.

(3) Header separator
Messages having both a header and data include a space character (" ") to separate the header from the data.
The space is not part of the actual command.

(4) Data separator
Messages containing multiple data items include commas to separate the data items from one another.

The Command Tree

When writing multiple messages in compound command form on the same line, as a rule, the header from one message is considered to carry forward to immediately following messages that do not begin with a colon (following the semicolon message separator). This construction corresponds to the general concept of the current directory in the directory structure of UNIX or MS-DOS, and the header that is carried forward is called the "current path".
(Example 1)

:SYSTem:DATE 2017,1,1;:SYSTem:TIME 12,34,56

(Example 2)

:SYSTem:DATE 2017,1,1;TIME 12,34,56

(Example 3)

:SYSTem:DATE 2017,1,1
..After sending the above data, send the following data..
TIME 12,34,56

Examples 1, 2 and 3 are commands to set time.
In Example 1, because there is a colon directly after the semicolon, the current position is the "root". The subsequent command is therefore referenced relative to the root. On the other hand, Examples 2 and 3 take advantage of the fact that the first command (":SYSTem:DATE 2017,1,1;") sets the current path to ":SYSTEM", so that the ":SYSTem:" before "TIME" in the second command is omitted.
To reiterate, the colon at the beginning of a command forces command parsing to begin from the root.

Data formats

The instrument recognizes the following data formats:
character data, decimal numeric data and character string data.

[Character data]

1. The first character must be alphabetic.

2. Subsequent characters may only be alphabetic characters, numerals or underline characters (_).

3. The instrument accepts both upper- and lower-case character data, but returns only upper-case characters.

(Example)

:HEADER ON

[Decimal data]

1. Decimal data values are represented in what is termed NR formats.

2. The three types of NRf formats are called NR1, NR2 and NR3, each of which may be signed or unsigned numbers.

3. Unsigned numbers are considered positive.

4. Numerical values with accuracy exceeding the range with which the instrument can deal are rounded (digits 5 and above are rounded up, and 4 and below are rounded down).

5. The term "NRf format" includes all three formats. Though the instrument can accept any NRf format, it only returns data in the format (NR1 to NR3) defined for the corresponding command.

NRf format | Data Type | Example
NR1 | Integer data | +15,-20, 25
NR2 | Fixed-point numbers | +1.23,-4.57, 7.89
NR3 | Floating-point numbers | +10.0E-3,-2.3E+3, 5E3

(Example 1) NR1 format

:TRIGger:PRETrig 10

(Example 2) NR2 format

:TRIGger:FILTer CH1_1,0.1

(Example 3) NR3 format

:TRIGger:UPPEr CH1_1,+1.0E-3

[Character string data]

1. Character string data is enclosed within quotation marks.

2. The data consists of 8-bit ASCII characters.

3. Characters which cannot be handled by the instrument are replaced by underscores.

4. Although the instrument sends only double quotation marks (") to the PC, it accepts both double and single quotation marks (').

(Example)

:COMMent:TITLe 'HIOKI'
:COMMent:TITLe "HIOKI"