566
Outline of Communications
Section 9-3
9-2-2 Notes on Using Commands
The points that should be observed when using commands are given below.
S Method for Specifying Commands
When a personal computer or similar device is used as the host and ahigh--level
language such as BASIC or C is used for program writing, commands are speci-
fied as ASCII character strings.
Note that in the explanations in this section, parameters are denoted in lower
case characters. When specifying a command, write those parts denoted in up-
per case without modification, for those parts denoted in lower case, write the
numeric values (BCD or hexadecimal) or character string for parameters as
ASCII character strings. Parts in square brackets, such as [ESC] and [CR] each
indicate one control code (the [ESC] code, the [CR] code, etc.).
In the explanations of commands, expressions such as “4 BCD digits” and “2
hexadecimal digits” are used to mean (respectively) “the ASCII character string
for a numerical value expressed as four BCD digits” and “the ASCII character
string for a numerical value expressed as two hexadecimal digits”, etc. Do not
specify BCD and hexadecimal data without alteration: always convert it into an
ASCII character string before transmission.
Example:
The format for the numeral value memory table read command is shown below.
1B 52
[ESC]
[CR]
R
0D
4E
M mt1t2 t4
(l1) (l2) (s1) (s2)
t3
** ** ** ** **
** ** ** **
The following parameters are specified in this format.
m : 1 (1 BCD digit)
t
1
,t
2
,t
3
,t
4
: 0123 (4 BCD digits)
l
1
,l
2
: 99 (2 BCD digits)
s
1
,s
2
: 24 (2 hexadecimal digits)
The character string actually transmitted is as shown below.
1B 52
[ESC]
[CR]
R
3230 31
32 3439 0D
4E
N
31
101 3
9924
2
33
39
Reference:
In the “Format” sections in the explanations for commands/responses, paren-
theses are used to indicate parts that can under some circumstances be omitted,
and ** is used to indicate the ASCII code (two hexadecimal digits) of the specified
character.