3.3Device Message List ..........................................................3-3
3.3.1 IEEE 488.2 common commands and the commands
supported by the MT9810A ..................................3-5
3.3.2 Device Message List ............................................3-6
3-1
Section 3 Specifications
3.1GPIB Specifications
The GPIB Specifications of the MT9810A is summarized in the Table 3-1.
Table 3-1
ItemSpecifications value and description
Function
Interface functions
Conforms to IEEE 488.2.
MT9810A can be controlled from an external controller.
SH1:All of source handshake functions are supported.
Data send timing is controlled.
AH1: All of acceptor handshake functions are supported.
Data receive timing is controlled.
T6:Basic talker functions are supported. A serial port function is supported.
A talk-only function is not supported. The function of releasing the talker
with MLA is supported.
L4:Basic listener functions are supported. A listen-only function is not sup-
ported. The function of releasing the listener by MTA is supported.
SR1:All of service request/status byte functions are supported.
RL1:All of remote/local functions are supported.
A local lockout function is supported.
PP0:A parallel poll function is not supported.
DC1:All of device clear functions are supported.
DT0:A disk trigger function is not supported.
C0:A controller function is not supported.
A controller function is performed during external plot output.
3.2RS-232C Specifications
The RS-232C Specifications of the MT9810A is summarized in the Table 3-2.
Table 3-2
ItemSpecifications
Function
Communication method
Communication control method
Baud rate
Data bits
Parity
Start bits
Stop bits
Connector
Control from external controller
Asynchronous (start-stop), half-duplex
No flow control
1200, 2400, 4800, 9600, 14400, 19200 bps
7 bits, 8 bits
Odd parity (ODD), even parity (EVEN), non-parity (NON)
1 bit
1 bit, 2 bits
D-sub 9-pin connector, male
3-2
3.3 Device Message List
3.3Device Message List
Device messages are data messages which are transferred between a controller and the devices. These messages are
classified into program messages and response messages.
Program messages are ASCII messages transferred from a controller to the devices. Program messages are further
classified into program commands and program queries. These two types of commands are explained later in this
manual.
Program commands include device-dependent commands which are exclusively used for controlling the MT9810A
and IEEE 488.2 common commands. IEEE 488.2 common commands are program commands which are commonly
applicable to other IEEE 488.2-ready measuring instruments (including the MT9810A) on the GPIB interface bus.
Program queries are commands used to get response messages from devices. Program queries must be transferred
from a controller to a device in advance so that the controller can receive response messages from the device later.
Response messages are ASCII data messages which are transferred from a device to a controller. Among response
messages, status messages, and response messages corresponding to program queries are listed later in this manual.
• Program commandsSection 5
• Program queriesSection 5
• IEEE488.2 common commandsSection 7
Controller
Program message
Responce message
• Status messageSection 8
• Responce messageSection 6
In program and response messages, numeric data may end with a suffix (unit).
Device
3-3
Section 3 Specifications
The above messages are transferred through the device input/output buffer. The output buffer is also called an output
queue. A brief description of the output buffer is given below.
Input buffer
Input buffer is an FIFO (first in first out) type memory area, that stores DABs (program and query messages) tempo-
rarily before analysis of syntax and execution.
The input buffer size of the MT9810A is 256 bytes.
Output queue
Output queue is an FIFO-type queue memory area, that stores all DABs (response messages) output from a device to a
controller until those messages are read by the controller.
The output queue size of the MT9810A is 256 bytes.
3-4
3.3 Device Message List
3.3.1IEEE 488.2 common commands and the commands supported
by the MT9810A
The 39 common commands specified by IEEE 488.2 standard is shown in the Table 3-3. Among these commands, the
commands supported by the MT9810A are marked with the check marks (√).
Table 3-3
MnemonicFully spelled out command name
∗ADD
∗CAL
∗CLS
∗DDT
∗DDT?
∗DLF
∗DMC
∗EMC
∗EMC?
∗ESE
∗ESE?
∗ESR?
∗GMC?
∗IDN?
∗IST?
∗LMC?
∗LRN?
∗OPC
∗OPC?
∗OPT?
∗PCB
∗PMC
∗PRE
∗PRE?
∗PSC
∗PSC?
∗PUD
∗PUD?
∗RCL
∗RDT
∗RDT?
∗RST
∗SAV
∗SRE
∗SRE?
∗STB?
∗TRG
∗TST?
∗WA I
Accept Address Command
Calibration Query
Clear Status Command
Define Device Trigger Command
Define Device Trigger Query
Disable Listener Function Command
Define Macro Command
Enable Macro Command
Enable Macro Query
Standard Event Status Enable Command
Standard Event Status Enable Query
Standard Event Status Register Query
Get Macro contents Query
Identification Query
Individual Status Query
Learn Macro Query
Learn Device Setup Query
Operation Complete Command
Operation Complete Query
Option Identification Query
Pass Control Back Command
Purge Macro Command
Parallel Poll Register Enable Command
Parallel Poll Register Enable Query
Power On Status Clear Command
Power On Status Clear Query
Protected User Data Command
Protected User Data Query
Recall Command
Resource Description Transfer Command
Resource Description Transfer Query
Reset Command
Save Command
Service Request Enable Command
Service Request Enable Query
Read Status Byte Query
Trigger Command
Self Test Query
Wait to Continue Command
Standardized by IEEE 488.2
Optional
Optional
Required
Optional
Optional
Optional
Optional
Optional
Optional
Required
Required
Required
Optional
Required
Optional
Optional
Optional
Required
Required
Optional
Other than C0: Required
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Required
Optional
Required
Required
Required
DT1: Required
Required
Required
Supported by MT9810A
√
√
√
√
√
√
√
√
√
√
√
√
√
√
NOTE:
IEEE 488.2 commands always begin with an asterick (∗). Refer to the Section 7 "Common Commands" for more details.
3-5
Section 3 Specifications
3.3.2Device Message List
The device message list unique to the MT9810A is shown in the Table 3-4, 3-5 and 3-6. There are two types of
commands: HP commands and SCPI-compliant Anritsu original commands. The types of commands are also shown in
the table.
Table 3-4 Main frame
FunctionCommandHP
Brightness
Display ON/OFF
Calendar
Time
Buzzer
Header
Inserted unit
Error
DISPlay:BRIGhtness
DISPlay[:STATe]
SYSTem:DATE
SYSTem:TIME
SYSTem:BEEPer:STATe
SYSTem:COMMunicate:GPIB:HEAD
SYSTem:COMMunicate:SERial:HEAD
SYSTem:CHANnel:STATe
SYSTem:ERRor
SCPIReference
√
√
√
√
√
√
√
√
√
Section 9.1.1
Section 9.1.2
Section 9.1.7
Section 9.1.9
Section 9.1.3
Section 9.1.5
Section 9.1.6
Section 9.1.4
Section 9.1.8
3-6
Table 3-5 Optical sensor
3.3 Device Message List
FunctionCommandHP
Zero-set
Calibration factor
Auto range
Manual range
Reference value
Displays the reference value
Reference measurement
Reference selection
Unit
Wavelength
Unit of wavelength
Measurement data
The number of averaging
Auto bandwidth
Bandwidth
Modulation frequency
Measurement interval
The number of measurement
Logging
Statistical measurement
Measurement stop
Logging data
Logging data information
Maximum value
Minimum value
Difference between maximum
and minimum values
Measurement conditions
High-speed transfer mode start
High-speed transfer mode stop
SENSe[1|2]:CORRection:COLLect:ZERO
SENSe[1|2]:CORRection[:LOSS:[:INPut[:MAG
Nitude]]]
SENSe[1|2]:POWer:RANGe:AUTO
SENSe[1|2]:POWer:RANGe:[UPPer]
SENSe[1|2]:POWer:REFerence
SENSe[1|2]:POWer:REFerence:DISPlay
SENSe[1|2]:POWer:REFernce:STATe
SENSe[1|2]:POWer:REFernce:STATe:RATio
SENSe[1|2]:POWer:UNIT
SENSe[1|2]:POWer:WAVelength
SENSe[1|2]:POWer:WAVelength:UNI
FETCh[1|2][:SCALar]:POWer[:DC]
SENSe[1|2]:AVERage:COUNt
SENSe[1|2]:BANDwidth:AUTO
SENSe[1|2]:BANDwidth
SENSe[1|2]:FILTer:BPASs:FREQuency
SENSe[1|2]:POWer:INTerval
SENSe[1|2]:TRIGger:COUNt
SENSe[1|2]:INITiate[:IMMediate]
SENSe[1|2]:TRIGger[:SEQuence][:IMMediate]
ABORt[1|2]
SENSe[1|2]:MEMory:DATa
SENSe[1|2]:MEMory:DATa:INFO
SENSe[1|2]:FETCh[:SCALar]:POWer[:DC]:MAXimum
SENSe[1|2]:FETCh[:SCALar]:POWer[:DC]:MINimum
SENSe[1|2]:FETCh[:SCALar]:POWer[:DC]:PTPeak
SENSe[1|2]:MEMory:COPY[:NAME]
READ[1|2]
READ[1|2]:ABORt
SCPI
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
√
Reference
Section 9.2.6
Section 9.2.7
Section 9.2.17
Section 9.2.18
Section 9.2.19
Section 9.2.20
Section 9.2.21
Section 9.2.22
Section 9.2.23
Section 9.2.24
Section 9.2.25
Section 9.2.2
Section 9.2.3
Section 9.2.5
Section 9.2.4
Section 9.2.11
Section 9.2.16
Section 9.2.26
Section 9.2.12
Section 9.2.27
Section 9.2.1
Section 9.2.14
Section 9.2.15
Section 9.2.8
Section 9.2.9
Section 9.2.10
Section 9.2.13
Section 9.2.28
Section 9.2.29
3-7
Section 3 Specifications
Table 3-6 Light source
FunctionCommandHP
Modulation frequency
Attenuation
Optical output
Wavelength
Unit of wavelength
Measurement condition
In the portion described as [1|2], enter the channel number into which the target unit is inserted (1 or 2). The brackets
([ ]) are not required.
When you send the LIGHT SOURCE COMMAND to OPTICAL SENSOR, the command error occurs.
At the opposite case (send the OPTICAL SENSOR COMMAND to LIGHT SOURCE), the command error occures
too.
SOURce[1|2]:AM[:INTerval]:FREQuency
SOURce[1|2]:POWer:ATTenuation
SOURce[1|2]:POWer:STATe
SOURce[1|2]:POWer:WAVelength
SOURce[1|2]:POWer:WAVelength:UNIT
SOURce[1|2]:MEMory[1|2]:COPY[:NAME]
SCPI
√
√
√
√
√
√
Reference
Section9.3.1
Section9.3.3
Section9.3.4
Section9.3.5
Section9.3.6
Section9.3.2
3-8.
Section 4Initial Setting
Initialization of the GPIB interface system is devided into three levels. At level 1, "bus initialization" is performed to
place the system bus in the idle state. At level 2, "message exchange initialization" is performed to enable devices to
receive program messages. At level 3, "device initialization" is performed to initialize device-dependent functions.
At these three initialization levels, preparations are made for starting devices.
4.1Initialization of Bus by IFC Statement ................................4-3
4.2Initialization of Message Exchange by DCL and SDC Bus
<compound command program header> is a <COMMAND PROGRAM HEADER> that executes a compound func-
tion. <program mnemonic> is always preceded by a colon (:) to separate it from <compound command program
header>. When only one <compound command program header> is used, the succeeding colon (:) may be omitted.
Function:
On a complex device, a device command set is organized logically by providing a compound function instead
of limiting the number of unique headers. A hierarchical command structure can be handled effectively.
<common command program header>
An asterisk (∗) is always added before <program mnemonic> of <common command program header>. "Common"
means that this command is a program command which commonly used for other IEEE 488.2-ready measuring instru-
ments connected to the bus.
5-13
Section 5 Listener Input Formats
5.2.9<QUERY PROGRAM HEADER>
<QUERY PROGRAM HEADER> is defined as follows:
<white space> may be written before each header.
<white space>
Refer to 5.2.3
(1)<simple query program header> is defined as follows:
<program mnemonic>
Refer to (4) of 5.2.8
(2)<compound query program header> is defined as follows:
<simple query
program header>
Refer to (1)
<compound query
program header>
Refer to (2)
<common query
program header>
Refer to (3)
?
:
<program mnemonic>
Refer to (4) of 5.2.8
:
<program mnemonic>
Refer to (4) of 5.2.8
?
(3)<common query program header> is defined as follows:
∗?
<program mnemonic>
Refer to (4) of 5.2.8
<QUERY PROGRAM HEADER>
<QUERY PROGRAM HEADER> is a query command which is sent from a controller to a device in advance so that
the controller can receive response messages from the device. This header always ends with a query indicator, or a
question mark (?). It is explained below using examples of programs.
The format of <QUERY PROGRAM HEADER> is the same as that of <COMMAND PROGRAM HEADER> with
the exception that a query indicator, or a question mark (?), is added at the end. Refer to the Section 5.2.8 "<COM-
MAND PROGRAM HEADER>."
5-14
5.2 Program Message Functional Elements
5.2.10<PROGRAM HEADER SEPARATOR>
<PROGRAM HEADER SEPARATOR> is defined as follows:
<white space>
Refer to 5.2.3
<PROGRAM HEADER SEPARATOR> is used as the separator between <COMMAND PROGRAM HEADER> or
<QUERY PROGRAM HEADER> and <PROGRAM DATA>.
When there are two or more <white space character> elements between the <PROGRAM HEADER> and the <PRO-
GRAM DATA>, the first <white space character> is interpreted as a separator and the remaining <white space charac-
ter> is ignored, although <white space character> improves program readability.
At least one header separator must exist between the header and the data. One separator indicates the end of the
<PROGRAM HEADER> as well as the beginning of the <PROGRAM DATA>.
5.2.11<PROGRAM DATA SEPARATOR>
<PROGRAM DATA SEPARATOR> is defined as follows:
<white space>
Refer to 5.2.3
,
<white space>
Refer to 5.2.3
<PROGRAM DATA SEPARATOR> is used to separate the parameters, when <COMMAND PROGRAM HEADER>
or <QUERY PROGRAM HEADER> has many parameters.
When this data separator is used, a comma is mandatory but <white space character> can be omissible. The <white
space character> before a comma and the <white space character> after a comma are ignored, although <white space
character> improves program readability.
5-15
Section 5 Listener Input Formats
5.3Program Data Format
This section explains the format of the <PROGRAM DATA> shown in the functional syntactical charts in the Section
5.2.7 "<COMMAND MESSAGE UNIT>/<QUERY MESSAGE UNIT>", which is one of terminated program mes-
sage formats.
The functional element of the <PROGRAM DATA> is used to transfer various types of parameters related to the
<PROGRAM HEADER>. <PROGRAM DATA> types are shown below. The MT9810A accepts the program data
shown in the hollow squares surrounded by a shade. For the program data not supported by the MT9810A, read this
section just for reference.
<CHARACTER
PROGRAM DATA>
<DICIMAL NUMERIC
PROGRAM DATA>
Refer to 5.3.2
<NON-DECIMAL
NUMERIC
PROGRAM DATA>
<STRING
PROGRAM DATA>
<ARBITRARY
BLOCK
PROGRAM DATA>
<SUFFIX
PROGRAM DATA>
Refer to 5.3.3
5-16
<EXPRESSION
PROGRAM DATA>
5.3 Program Data Format
5.3.1<CHARACTER PROGRAM DATA>
The functional element of the <CHARACTER PROGRAM DATA> is used to perform remote control by transferring
short alphabetic or alphanumeric data. It is defined as follows:
<program mnemonic>
Details on character data are the same as those on <program mnemonics>. The numeric data has been focused as
control data, however, the program data can also be used to perform control. A coding syntactical chart is as follows:
<upper/lower
case alpha>
<upper/lower
case alpha>
_
<digit>
The data always begins with an uppercase or lowercase character, which is followed by an arbitrary combination of
characters such as uppercase characters (A to Z) or lowercase characters (a to z), underline (_), and numeric characters
(0 to 9). Since combinations of alphanumeric characters are used as mnemonic-like symbols, the maximum data length
is 12 characters.
<upper/lower case alpha>One of ASCII code bytes 41 to 5A and 61 to 7A (decimal values 65 to 90 and 97 to 122
= uppercase characters A to Z and lowercase characters a to z). The device can accept
a header irrespective of whether it is represented by uppercase or lowercase charac-
ters.
<digit>One of ASCII code bytes 30 to 39 (decimal values 48 to 57 = characters 0 to 9).
(_)A single ASCII code byte, i.e., ASCII code byte 5F (decimal value 95 = underline).
Therefore, <CHARACTER PROGRAM DATA> is <PROGRAM DATA> used to transfer relatively short mnemonic-
type alphanumeric codes.
5-17
Section 5 Listener Input Formats
5.3.2<DECIMAL NUMERIC PROGRAM DATA>
<DECIMAL NUMERIC PROGRAM DATA> is <PROGRAM DATA> used to transfer numeric constants repre-
sented in decimal notation. There are three types of decimal numeric representation: integer, fixed-point, and floating-
point.
These three types of numerics represent decimal numeric program data, which can contain spaces, flexibly (NRf:
flexible numeric representation). These numerics are defined as follows:
<exponent><white space><mantissa>
<mantissa> is defined as follows:
+
<optional
–.
<exponent> is defined as follows:
E/e
<white space> and <optional digits> are defined as follows:
<white
space>
digits>
<digit>
.
<digit>
<optional
digits>
+
<digit>
–
<white space
character>
<digit>
refer to the Section 5.2.3 "<white space>" for <white space>, and refer to the Section 5.3.1 "<CHARACTER PRO-
GRAM DATA>" for <digit>.
5-18
5.3 Program Data Format
The following pages describe coding syntactical charts of decimal numeric program data with respect to integer, fixed-
point, and floating-point notations respectively.
Note that the following processing is performed during transfer of any type of numeric representation:
Rounding of numeric element When a device receives a <DECIMAL NUMERIC PROGRAM DATA> element hav-
ing too many digits to handle, it ignores the sign of the element value and rounds it off.
Data outside the rangeIf the <DECIMAL NUMERIC PROGRAM DATA> element value is outside the
range permitted in relation to the program header, an execution error is reported.
(1)Integer NR1 transfer
A decimal value not including a decimal point and exponent, i.e., an integer (NR1) in a real number, is trans-
ferred.
+
<digit>
<white
space>
–
• 0 (s) may be added at the beginning→005, +000045
• A space (+ or –) must not be inserted between a sign and a numeric.→+5, +∆5 (×)
• Spaces may be added after a numeric.→+5∆∆∆
• The + sign may be omitted.→+5, 5
• Commas must not be used to indicate decimal places.→1,234,567 (×)
5-19
Section 5 Listener Input Formats
(2)Fixed-point NR2 transfer
A decimal number having digits below the decimal point, i.e., an integer and a real number (NR2) except an
exponent, is transferred.
The syntactical chart shows an integer part and a decimal point and a decimal part.
(Integer part)
+
–
<digit>
<digit>
Decimal point
.
.
(Decimal part)
<digit>
<white space
character>
<digit>
The decimal point
The numeric in the integer
part may be omitted.
cannot be omitted.
The numeric in the decimal
part may be omitted.
• An integer representation is applied to the integer part.
• A space must not be inserted between a numeric and a decimal point.→+753 ∆.123 (×)
• Spaces may be added after the numeric in the decimal part.→+753.123∆∆∆∆
• The decimal point need not follow a numeric.→.05
• A sign may be written before a decimal point.→+.05, –.05
• A numeric may end with a decimal point.→12.
5-20
5.3 Program Data Format
(3)Floating-point NR3 transfer
A decimal numeric valve having an exponent, i.e., a real number (NR3) represented in floating-point notation, is
transferred. The syntactical chart consists of a mantissa part and an exponent part. The exponent part is repre-
sented in integer and floating-point notation to indicate precision of the numeric. The exponent part begins with
E. On the right of E is a number to the power of 10.
(Mantissa part)
+
–
<digit>
<digit>
.
.
<digit>
<white space
character>
<digit>
(Exponent part)
+
♦
E/e
<white space
character>
<digit>
–
• E indicates power of 10. It indicates the beginning of the exponent part.
• E may be either an uppercase or lowercase character.→1.234E+12, 1.234e+12
• A space may be written before or after E/e.→1.234 ∆ E ∆ +12
• If the sign is +, it may be omitted in mantissa and exponent parts.→+1.234E+4, 1.234E4
• The numeric in the exponent part cannot be omitted.→–1E2, –E2 (×), –.E2 (×)
To ♦
5-21
Section 5 Listener Input Formats
5.3.3<SUFFIX PROGRAM DATA>
<SUFFIX PROGRAM DATA> follows <DECIMAL NUMERIC PROGRAM DATA> (integer NR1, fixed-point
NR2, or floating-point NR3) described in the Section 5.3.2 "<DECIMAL NUMERIC PROGRAM DATA>." The
NR1, NR2, and NR3 may be followed by a suffix.
NR1
<SUFFIX
NR2
NR3
NR field
A suffix is added at the end of decimal numeric program data only when the data requires a unit of measure. It is a
combination of a suffix unit and a suffix multiplier. The syntactical chart is shown below. Bold-line routes are used
frequently.
PROGRAM
DATA >
<white
space>
<suffix
mult>
/
<suffix
unit>
<suffix
unit>
–
–
<digit>
• A suffix multiplier is represented by an uppercase or lowercase character.
For example, 1E3 Hz is represented by 1 kHz assuming 1E3 = k.
/
.
<digit>
• A suffix unit is represented by an uppercase or lowercase character.
• Placing E at the beginning of <SUFFIX PROGRAM DATA> is prohibited because it may be confused with the E
used for floating-point decimal numerics.
5-22
Suffix multipliers and units are listed in the Table 5-1.
(1)Suffix multipliers
Table 5-1 Suffix multipliers
MultiplierMnemonicName
1E18
1E15
1E12
1E9
1E6
1E3
1E-3
1E-6
1E-9
1E-12
1E-15
1E-18
MA (NOTE)
EX
PE
T
G
K
M (NOTE)
U
N
P
F
A
5.3 Program Data Format
EXA
PETA
TERA
GIGA
MEGA
KILO
MILLI
MICRO
NANO
PICO
FEMTO
AT TO
NOTE:
According to convention, Hz to the sixth power of 106 is MHz (megahertz) and OHM to the six power of 106 is
MOHM (megaohm). These are not listed in the above table, but listed in the Table 5-2 "Suffix units."
(2)Relative units (dB)
Decibel relative to 1 µV ............... DBUV
Decibel relative to 1 µW .............. DBUW
Decibel relative to 1 mW .............. DBMW
For historical reasons, DBM is allowed as an alias for DBMW.
5-23
Section 5 Listener Input Formats
(3)Suffix units
Table 5-2 Suffix units
Item
Current
Atmospheric pressure
Charge
Luminance
Decibel
Power
Capacitance
Mass
Inductance
Frequency (hertz)
Mercury column
Joule
Temperature
Volume
Luminance
Luminance
Length (meter)
Frequency (1E3 Hz)
Resistance
Force
Resistance
Pressure
Ratio (percent)
Angle (radian)
Angle (degree)
Time (second)
Conductance
Automatic speed
Pressure
Voltage
Power (watt)
Speed/hour
Luminance
Recommended
mnemonic of unit
A
AT M
C
CD
DB
DBM
F
H
HZ
INHG
J
K
L
LM
LX
M
N
OHM
PA L
PCT
RAD
S
SIE
T
TORR
V
W
WB
LM
Quasi recommended
mnemonic of unit
G
CEL
FAR
FT
IN
MHZ
MOHM
DEG
MNT
SEC
Name
Ampere
Atmosphere
Coulomb
Candela
Decibel
Decibel milliwatt
Farad
Gram
Henry
Hertz
Inches of mercury
Joule
Degree Kelvin
Degree Celsius
Degree Fahrenheit
Liter
Lumen
Lux
Meter
Feet
Inch
Megahertz
Megaohm
Newton
Ohm
Pascal
Percent
Radian
Degree
Minute (of arc)
Second
Siemens
Tesla
Torr
Volt
Watt
Weber
Lumen
5-24
5.3 Program Data Format
5.3.4<NON-DECIMAL NUMERIC PROGRAM DATA>
<NON-DECIMAL NUMERIC PROGRAM DATA> is <PROGRAM DATA> used to transfer decimal, octal, and
binary numeric data as non-decimal numeric values. Non-decimal data always begins with a number code, or a sharp
(#). It is defined as shown in the coding syntactical chart below.
When an unspecified character string is sent, a command error occurs.
A/a
B/b
H/hC/c
D/d
E/e
F/f
<digit>
0
The character string following #H or #h is
accepted by the device as a hexadecimal
number.
The character strings in parentheses are
decimal numbers.
#Habc1230(11,256,099D)
#hAbC123
#H2DC3(11,715D)
#h2dc3
#H8301(33,537D)
#h8301
#Q/q
B/b
1
2
The character string following #Q or #q is
accepted by the device as an octal number.
3
#Q37(31D)
#q37
#Q26703(11,715D)
4
5
6
7
0
#q26703
The character string following #B or #b is
accepted by the device as a binary number.
#B101010111100000100100011
1
#b0010110111000011(11,715D)
(11,256,099D)
5-25
Section 5 Listener Input Formats
5.3.5<STRING PROGRAM DATA>
<STRING PROGRAM DATA> is <PROGRAM DATA> consisting of only character strings. All ASCII 7 bit codes
can be used. When a character string includes single quotation mark (') or a double quotation mark ("), two identical
quotation marks must be written in succession per quotation mark.
'
'
"
"
(1)A character string must be enclosed with single quotation (') or double quotation (") marks irrespective of
whether the character string contains any quotation mark. For example:
<inserted'>
'
<non-single
quote char>
<inserted">
"
<non-double
quote char>
It's a nice day.→"It's a nice day."
→'It' 's a nice day.'
(2)When a character string is enclosed with single quotation marks ('), each single quotation mark contained in the
character string must be doubled. Other characters, including double quotation marks ("), must be written as
thses are. For example:
"I shouted, 'Shame'." →' "I shouted,' 'Shame' '." '
(3)When a character string is enclosed with double quotation marks ("), these double quotation marks must be
doubled. Other characters, including single quotation marks ('), must be written as thses are. For example:
"I shouted, 'Shame'." →" " "I shouted, 'Shame'." " "
(4)<inserted '> is an single ASCII code set in ASCII code byte 27 (decimal 39 = symbol '). <inserted "> is a single
ASCII code set in ASCII code byte 22 (decimal 34 = symbol "). <non-single quote char> and <non-double quote
char> are single ASCII codes other than single and double quotation marks (").
5-26
5.3 Program Data Format
5.3.6<ARBITRARY BLOCK PROGRAM DATA>
<ARBITRARY BLOCK PROGRAM DATA> is non-decimal program data starting with a number code, or a sharp,
(#). Binary data is transferred directly in 1 byte (8 bit) blocks. Differences from the non-decimal numeric program
data (<NON-DECIMAL NUMERIC PROGRAM DATA>) additionally described in the Section 5.3.4 "<NON-DECI-
MAL NUMERIC PROGRAM DATA>" are as follows:
• Data is not limited to numeric data, but character string data and numeric data can be handled.
• The number of data bytes to be transferred can be written between a number code, or a sharp, (#) , and the first data.
The non-decimal data is program data that can specify the data bytes to be transferred.
<non-zero digit>
<digit><8-bit data byte>
#
0NL
<8-bit data byte>
<digit>One of ASCII code bytes 30 to 39 (decimal values 48 to 57 = characters 0 to 9).
<non-zero digit>One of ASCII code bytes 31 to 39 (decimal values 49 to 57 = characters 1 to 9).
<8-bit data byte>An 8 bit byte within the range from 00 to FF (decimal values 0 to 255).
(1)When the number of data bytes to be transferred is known
The upper-right route in the above syntactical chart is applied.
Specify the number of <8-bit data byte> bytes to be transferred at the <digit> position, i.e., just before writing
data. Write the number of digits of the specified number of bytes between a number cord, or sharp, (#) and <non-
zero digit>. For example, to send 4 data bytes (DABs), write <ARBITRARY BLOCK PROGRAM DATA> as
follows:
∧ END
To send 4 bytes, specify 4 at the <digit> position.
↓
#14<DAB><DAB><DAB><DAB>
↑
The number of digits of the value 4 at the <digit> position is 4. So specify 1 at the <non-zero digit> position.
To send 4 bytes, specify 4 at the <digit> position. Leading 0s may be specified.
↓
#3004<DAB><DAB><DAB><DAB>
↑
The number of digits of the value 4 at the <digit> position is 3. Specify 3 at the <non-zero digit> position.
(2)When the number of data bytes to be transferred is unknown
The lower-right route in the above syntactical chart is applied. Write #0 before the first data and write NL^END
after the last data, causing exitless termination.
#0<DAB><DAB><DAB><DAB><DAB>NL∧END
5-27
Section 5 Listener Input Formats
(3)Handling integer-precision binary data
Integer-precision binary data is used as <ARBITRARY BLOCK>-type transfer data, whether it is program data
or response data, and has the specifications summarized in the Table 5-3. Negative values are processed as two's
complements.
Table 5-3
Number of transfer bytes
Byte transfer order
Signed binary code
Unsigned binary code
Ranges of signed and unsigned 1 byte (8 bit) and 2 byte (16 bit) integer data are shown below.
Sends a query message unit of the setting wavelength and measurement range.
NOTE †2:
If the terminator NL is detected, the response message SENSE1:POWER:WAVELENGTH 1550E-9;
SENSE1:POWER:RANGE:UPPER -10 are read into buf1.
A response message is a sequence of functional elements, the minimum units that can represent functions, as is the case
with the program message. In the above figure, functional elements are indicated by uppercase characters enclosed in
the brackets (< >). Functional elements are further classified into coding elements which are indicated by lowercase
characters enclosed in the brackets (< >).
The following pages explain talker output formats focusing on the differences from listener input formats starting with
the Section 6.1 "Differences in Syntax between Listener Input Formats and Talker Output formats."
6-2
6.1 Differences in Syntax between Listener Input Formats and Talker Output formats
6.1Differences in Syntax between Listener Input For-
mats and Talker Output formats
Significant differences in syntax between the listener and the talker are as follows:
Listener format
Talker format
The summary of the differences in output format between the listener and the talker is shown in the Table 6-1. In this
table, "0/1 or more spaces" indicates <white space>.
ItemListener input program message syntax
Characteristic
Alphabetic characters
Character before and after
NR3 exponent part E
+ sign of NR3 exponent part
<white space>
Message unit
Unit separator
Space before header
Header separator
Data separator
Program can be written flexibly so that devices can accept program messages from the
controller. If a program message involves some description errors, it can execute its
function normally. For example, unlimited number of <white space> element can be
used in order to make an easy-to-read program.
Messages are output following strictly defined syntactical rules to allow the controller
to accept the response messages from the device. Therefore, the syntax of response
messages permits only one notation for a function.
Table 6-1
Talker output response
message syntax
(Flexible)
No difference between uppercase
0 or more spaces + E/e + 0 or more spaces
Omissible
Two or more white spaces can be written before/after a sep-
arator or before a terminator.
(a) Header with program data
(b) Header without program data
0 or more spaces + Semicolon
0 or more spaces + Header
Header + 1 or more spaces
0 or more spaces + Comma + 0 or more spaces
(Strict)
Uppercase characters only
Uppercase character E
only
Required
Not used
(a) Data with header
(b) Data without header
Semi-colon only
Header only
Header + One $20
Comma only
†1
Terminator
NOTE:
NL
0 or more spaces + One of
ASCII code byte 20 (decimal value 32 = ASCII character SP, space)
EOI
NL+EOI
NL+EOI
6-3
Section 6 Talker Output Format
6.2Response Message Functional Elements
Response messages output from a talker are terminated with an NL∧END signal, allowing the controller to accept
these messages. Functional elements of these response messages are explained here.
Rules for syntactical chart notation are the same as those for program messages. Refer to the Section 5 "Listener Input
Format" for the information. Also functional and coding elements, which are the same as those of program messages,
are not explained in this section. Refer to the Section 5 "Listener Input Format" as well.
6.2.1<TERMINATED RESPONSE MESSAGE>
<TERMINATED RESPONSE MESSAGE> is defined as follows:
<RESPONSE MESSAGE>
Refer to 6.2.3
<TERMINATED RESPONSE MESSAGE> is a data message having all the necessary functional elements to be sent
from a talker to a device.
To complete transfer of <RESPONSE MESSAGE>, <RESPONSE MESSAGE TERMINATOR> is added at the end of
<RESPONSE MESSAGE>.
<RESPONSE
MESSAGE TERMINATOR>
Refer to 6.2.2
6.2.2<RESPONSE MESSAGE TERMINATOR>
<RESPONSE MESSAGE TERMINATOR> is defined as follows:
NL
<RESPONSE MESSAGE TERMINATOR> is placed after the last <RESPONSE MESSAGE UNIT> to terminate the
sequence of one or more fixed-length <RESPONSE MESSAGE UNIT> elements.
∧ END
6-4
6.2 Response Message Functional Elements
6.2.3<RESPONSE MESSAGE>
<RESPONSE MESSAGE> is defined as follows:
<RESPONSE
MESSAGE UNIT
SEPARATOR>
Refer to 6.2.4
<RESPONSE MESSAGE UNIT>
Refer to 6.2.5
<RESPONSE MESSAGE> is a sequence of one or more <RESPONSE MESSAGE UNIT> elements.
The <RESPONSE MESSAGE UNIT> element is a single message sent from a device to a controller. A <RESPONSE
MESSAGE UNIT SEPARATOR> is used as a separator for separating multiple <RESPONSE MESSAGE UNIT>
elements.
6.2.4<RESPONSE MESSAGE UNIT SEPARATOR>
<RESPONSE MESSAGE UNIT SEPARATOR> is defined as follows:
;
<RESPONSE MESSAGE UNIT SEPARATOR> is used to separate <RESPONSE MESSAGE UNIT> elements with
a <UNIT SEPARATOR>, or a semi-colon (;), when outputting a sequence of multiple <RESPONSE MESSAGE
UNIT> elements as one <RESPONSE MESSAGE>.
6-5
Section 6 Talker Output Format
6.2.5<RESPONSE MESSAGE UNIT>
<RESPONSE MESSAGE UNIT> is defined as follows:
<RESPONSE
DATA SEPARATOR>
Refer to 6.2.7
<RESPONSE
HEADER>
Refer to 6.2.8
<RESPONSE
HEADER SEPARATOR>
Refer to 6.2.6
<RESPONSE
DATA SEPARATOR>
Refer to 6.2.7
<RESPONSE DATA>
Refer to 6.2.9
<RESPONSE DATA>
Refer to 6.2.9
There are two kinds of useage for <RESPONSE MESSAGE UNIT>. One is <RESPONSE MESSAGE UNIT> with
header, which returns the result of processing the program-message-set information accurately. The other is <RE-
SPONSE MESSAGE UNIT> without header, which returns only the measurement result.
6.2.6<RESPONSE HEADER SEPARATOR>
<RESPONSE HEADER SEPARATOR> is defined as follows:
SP
<RESPONSE HEADER SEPARATOR> is one space written after <RESPONSE HEADER> to be separated from
<RESPONSE DATA>.
The space SP corresponds to ASCII code byte 20 (decimal 32).
In a <RESPONSE MESSAGE> with header, a space must always exist between the header and the data as a <RE-
SPONSE HEADER SEPARATOR>. The separator indicates the end of the <RESPONSE HEADER> as well as the
beginning of <RESPONSE DATA> at the same time.
6-6
6.2 Response Message Functional Elements
6.2.7<RESPONSE DATA SEPARATOR>
<RESPONSE DATA SEPARATOR> is defined as follows:
,
When multiple <RESPONSE DATA> elements are output, <RESPONSE DATA SEPARATOR> must be placed be-
tween thses data elements.
6.2.8<RESPONSE HEADER>
The format of <RESPONSE HEADER> is the same as that of <COMMAND PROGRAM HEADER> described in the
Section 5.2.8 "<COMMAND PROGRAM HEADER>" with the exception of the following three points:
(1)Characters that can be used in <response mnemonic> are specified. For alphanumeric characters, only uppercase
characters must be used. Other points are the same as those of <program mnemonic>.
(2)A space cannot be written before a <RESPONSE HEADER>, while it can be written before a <PROGRAM
HEADER>.
(3)Only one space can be written before a <RESPONSE HEADER>, while two or more spaces can be written before
a <PROGRAM HEADER>.
Refer to the Table 6-2 for the response header up to <response mnemonic>.
It should be noted that only uppercase characters must be used in <response mnemonic>. Other points are the same as
those of <program mnemonic> described in the Section 5.2.8 "<COMMAND PROGRAM HEADER>."
6-7
Section 6 Talker Output Format
Table 6-2
ItemFunction
RESPONSE HEADERA header indicates a function of <RESPONSE DATA>. It explains the function
with a 12-character-long character-long character string or a <response mnemo-
nic> element that consists of uppercase characters, numeric characters, and/or
underline.
<simple response header>
Refer to (1)
<compound response header>
Refer to (2)
<common response header>
Refer to (3)
(1) <simple response header> is defined as follows.
<response mnemonic>
Refer to (4)
(2) <compound response header> is defined as follows.
<response
::
mnemonic>
Refer to (4)
(3) <common response header> is defined as follows.
∗
<response mnemonic>
Refer to (4)
(4) <response mnemonic> is defined as follows.
<upper-case
†1
alpha>
<upper-case
†1
alpha>
_
<response
mnemonic>
Refer to (4)
6-8
<digit>
Refer to (4) of 5.2.8
NOTE †1:
<upper-case alpha> ASCII code bytes 41 to 5A
(decimal values 65 to 90 = uppercase characters A to Z)
6.2 Response Message Functional Elements
6.2.9<RESPONSE DATA>
There are 11 types of <RESPONSE DATA> elements. Among these, the MT9810A transfers the <RESPONSE
DATA> shown in the hollow squares surrounded by a shade. The <RESPONSE DATA> to be returned depends on the
query message.
<CHARACTER
RESPONSE DATA>
<NR1 NUMERIC
RESPONSE DATA>
<NR2 NUMERIC
RESPONSE DATA>
<NR3 NUMERIC
RESPONSE DATA>
<HEXADECIMAL
NUMERIC RESPONSE DATA>
<OCTAL NUMERIC
RESPONSE DATA>
Refer to (1) of 6.2.9
Refer to (2) of 6.2.9
Refer to (3) of 6.2.9
Refer to (4) of 6.2.9
Refer to (5) of 6.2.9
Refer to (6) of 6.2.9
NOTE†1:
<INDEFINITE LENGTH ARBITRARY BLOCK RESPONSE DATA> and <ARBITRARY ASCII RESPONSE DATA> is terminated with NL∧END after the last byte has been transferred.
<BINARY NUMERIC
RESPONSE DATA>
<STRING
RESPONSE DATA>
<DEFINITE LENGTH
ARBITRARY BLOCK RESPONSE DATA>
<INDEFINITE LENGTH
ARBITRARY BLOCK RESPONSE DATA>
<ARBITRARY ASCII
RESPONSE DATA>
†1
Refer to (7) of 6.2.9
Refer to (8) of 6.2.9
Refer to (9) of 6.2.9
†1
Refer to (10) of 6.2.9
Refer to (11) of 6.2.9
6-9
Section 6 Talker Output Format
ItemFunction
(1) CHARACTER
RESPONSE DATA
Data consisting of the same character string as that of <response mnemonic>.
Accordingly, the character string always begins with an uppercase character and
its length is less than 12 characters. Numeric parameters must not be used.
Table 6-3
<response mnemonic>
Refer to (4) of 6.2.8
(2) NR1 NUMERIC
RESPONSE DATA
<Example>
123
+123
–1234
(3) NR2 NUMERIC
RESPONSE DATA
<Example>
12.3
+12.34
–12.345
Integer data, i.e., a decimal value of an integer that has neither decimal point nor
exponent.
+
<digit>
Refer to (4) of 5.2.8
–
Fixed-point data, i.e., a decimal value other than integers or a decimal value hav-
ing an exponent.
+
<digit>
Refer to (4)
of 5.2.8
.
<digit>
Refer to (4)
of 5.2.8
–
(4) NR3 NUMERIC
RESPONSE DATA
<Example>
1.23E+4
+12.34E–5
–12.345E+6
• Lowercase
characters cannot be
used for E.
• E must not be
preceded and
followed by a space.
• + in the exponent part
is mandatory.
• + in the mantissa part
is mandatory.
6-10
Fixed-point data, i.e., a decimal value having an exponent.
+
<digit>
Refer to (4)
of 5.2.8
.
–
+
E
–
<digit>
Refer to (4)
of 5.2.8
<digit>
Refer to (4)
of 5.2.8
ItemFunction
(5) HEXADECIMAL
NUMERIC RESPONSE
DATA
6.2 Response Message Functional Elements
Table 6-3 (continue)
Data represented in hexadecimal notation.
A
<Example>
#HABC123
#H2DC3
#H8301
(6) OCTAL NUMERIC
RESPONSE DATA
<Example>
#Q37
#Q26703
#Q30562
#
Data represented in octal notation.
B
HC
D
E
F
<digit>
0
1
2
(7) BINARY NUMERIC
RESPONSE DATA
<Example>
#B011101
#B1011
#B1011
#
Q
Data represented in binary notation.
#
B
3
4
5
6
7
0
1
6-11
Section 6 Talker Output Format
ItemFunction
(8) STRING RESPONSE
DATA
Any ASCII 7-bit code can be used.
The character string must be enclosed with double quotation marks (").
When a character string contains double quotation marks, two identical quotation
<Example>
"This is a text"
"Say,""Hello""."
marks must be written in succession per quotation mark.
Since a CR, LF, of space can be used, this element is suitable for outputting a text
to the printer or CRT.
Table 6-3 (continue)
(9) DEFINITE LENGTH
ARBITRARY BLOCK
RESPONSE DATA
<Example>
Transferring 11256099D
in a 4-byte blocks
↓
#1400ABC123
(10) INDEFINITE LENGTH
ARBITRARY BLOCK
RESPONSE DATA
"
"
<inserted">
"
<non-double
quote char>
Fixed-point 8-bit binary block data.
It is suitable for transferring large-volume data, 8-bit extended ASCII code, and
non-display data. Refer to the Section 5.3.6 "<ARBITRARY BLOCK PRO-
GRAM DATA>" for more details on individual elements.
<non-zero
#
digit>
Referto
5.3.6
<digit>
Referto
5.3.6
<8-bit
data byte>
Referto5.3.6
Indefinite-length 8-bit binary block data.
#0 must be written before the first data.
The last data must be followed by NL∧END for termination.
<Example>
Indefinite-length
–250, –50, 120, ...
are transferred