Program messages can be divided into command messages and query messages.
A command for controlling the unit such as an instruction to configure a setting or reset the settings of the device.
A command for finding out the results of operations, results of measurements, or the current configuration state of the device.
A response message is created after the syntax of a received query message has been checked.
The "HEADer" command can be used to select whether there is a header.
Header ON :FREQUENCY 1000
Header OFF 1000
(The current frequency is 1 kHz.)
Command names are selected for functions to be executed in a language that is as easy as possible to understand, and command names can also be shortened.
The unshortened form of a command name is known as the "long form" and the shortened form of a command name is know as the "short form."
In this manual, uppercase characters are used for the short form part and lowercase characters are used for the remaining part. However, either uppercase or lowercase characters are acceptable.
FREQUENCY | OK (long form) |
FREQ | OK (long form) |
FREQu | Error |
FRE | Error |
For response messages returned from the unit, uppercase characters and the long form are used.
The header indicates what is to be controlled. Program messages must have a header.
There are three types of headers: simple command, compound command, and common command.
This is used for finding out the results of operations performed in response to device commands, the results of measurements, or the current configuration state of the device.
A program header is identified as a query if a question mark "?" is added at the end as shown in the example below.
:FREQuency?
A message terminator indicates the end of a command.
The unit accepts the following as message terminators.
The Model IM3523 unit analyzes a message after it has confirmed the message terminator.
Depending on the interface setting, the following can be selected as terminators of response messages.
Semicolons are used as separators when executing compound messages.
Linking multiple messages by semicolons ";" enables a single line to be used to describe a compound command.
If a command error occurs when messages are described in succession, the messages from the error to the terminator are not executed.
(Example) If :RAN:AUTO ON;:BEEPer:KEY ON;*IDN? is executed and :RAN:AUTO is a command error, :BEEPer:KEY ON;*IDN? following the error will also not be executed
A space is used as a separator to differentiate the header and data section. Add a space ( ) between the header and data section.
In a message containing multiple data items, commas are required to separate the data items from one another.
A data section indicates the content of a command.
In the unit, character data and decimal numeric data are used for data sections, and use differs depending on the command.
Character data begins with an alphanumeric character and consists of alphabetic characters and numbers. Both uppercase and lowercase characters are acceptable, but uppercase characters are always used for response messages from the unit.
:TRIGger INTernal
There are three numeric data formats: NR1, NR2, and NR3.
Both signed numeric and unsigned numeric values are acceptable for each of these formats.
Unsigned numeric values are treated as positive numeric values.
Furthermore, if the accuracy of numeric values exceeds that capable of being handled by the unit, the numeric values are rounded off.
NR1 | Integer data (Example: +12, -23, 34) |
NR2 | Fixed-point data (Example:+1.23, -23.45, 3.456) |
NR3 | Floating-point representation exponent data (Example:+1.0E-2, -2.3E+4) |
The format that includes all three of the above types is referred to as the NRf format.
The NRf format is accepted by the unit.
For response data, the format is specified separately for each command and the data is sent in that format.
:RANGe 6
:LEVel:VOLTage 0.5
For commands with data, make every effort to enter the data in the specified format.
When compound commands contain common initial parts (example::BEEPer:KEY, ,:BEEPer:JUDGment), the common initial part (example::BEEPer:) can be omitted just for subsequent commands.
The common initial part is known as the "current path," and until cleared, the current paths of subsequent commands are determined to have been omitted when analysis is performed.
The following shows an example of the procedure for using current paths.
The current path is cleared when the power is turned on, the interface type is changed, the device is cleared (only for GP-IB), or upon detection of a colon ":" at the beginning of a command or a message terminator.
Common command messages can be executed regardless of the current path. Furthermore, the current path is not affected.
A colon does not need to be added to the beginning of simple and compound command headers. However, Hioki recommends adding a colon to the beginning of these headers to prevent them from being mixed up with headers that have omissions and to prevent an incorrect operation from being performed.