12-7
IM 2560A-01EN
Programming Overview
3
2
1
4
5
6
7
8
9
10
11
12
13
14
15
16
App
Index
• A response message is always enclosed in double
quotation marks (
"
).
• <String data> is any character string. Therefore, the
instrument assumes that the remaining program
message units are part of the character string if no
closing single (
'
) or double quotation mark (
"
) is
encountered. As a result, no error is detected if a
quotation mark is omitted.
<Block Data>
<Block data> contains 8-bit values. It is only used in
response messages on the 2560A. The syntax is as
follows:
Syntax
Example
#N<N-digit decimal number><Data
byte sequence>
#800000010ABCDEFGHIJ
• #N
Indicates that the data is <Block data>. N indicates
the number of succeeding data bytes (digits) in
ASCII code.
• <N-digit decimal number>
Indicates the number of bytes of data (example:
00000010
=
10
bytes).
• <Data byte sequence>
Expresses the actual data (example:
ABCDEFGHIJ
).
• Data is comprised of 8-bit values (0 to 255). This
means that the ASCII code “0AH,” which stands for
“NL,” can also be included in the data. Hence, care
must be taken when programming the controller.
<Register>
<Register> indicates an integer, and can be expressed
in hexadecimal, octal, or binary as well as a decimal
number. This is used when each bit of the value has a
particular meaning. Use one of the following syntaxes.
Syntax
Example
<NRf>
1
#H<Hexadecimal value made up of the digits 0 to 9
and A to F>
#H0F
#Q<Octal value made up of the digits 0 to 7>
#Q777
#B<Binary value made up of the digits 0 and 1>
#B001100
• <Register> is not case sensitive.
• Response messages are always expressed in the
<NR1> form.
<Character Data>
<Character Data> is a specified string of character
data (a mnemonic). It is mainly used to indicate options
and is chosen from the character strings given in
{}
.
The data interpretation rules are the same as those
described in “Header Interpretation Rules” in section
12.2.
Syntax
Example
{VOLTage|CURRent}
VOLTage
• As with the header, the
COMMunicate:VERBose
command can be used to select whether to return
the response in the full form or in the abbreviated
form.
• The
COMMunicate:HEADer
setting does not affect
<Character data>.
<Boolean>
<Boolean> is data that indicates ON or OFF. Use one
of the following syntaxes.
Syntax
Example
{ON|OFF|<NRf>}
ON OFF 1 0
• When <NRf> is expressed in the form, OFF is
selected if the rounded integer value is “
0
” and ON
is selected for all other cases.
• A response message is always returned with a “
1
” if
the value is ON and with a “
0
” if the value is OFF.
<String Data>
<String data> is not a specified character string like
<Character data>. It is an arbitrary character string.
The character string must be enclosed in single
quotation marks (
'
) or double quotation marks (
"
).
Syntax
Example
<String Data>
'ABC' "IEEE488.2-1992"
• If a character string contains a double quotation
mark (
"
), the double quotation mark is expressed as
two consecutive quotation marks (
""
). This rule also
applies to single quotation marks.
12.4 Data