![background image](http://html1.mh-extra.com/html/omron/nt21-series/nt21-series_reference-manual_744543372.webp)
4-2
Section
Outline of Communications
363
Sometimes multiple responses may be received for one command.
•
Pattern when the operation at the PT is notified to the host.
[Operation at host]
Notification reception
Notify Command
Notify Command
Transmission
[Operation at PT]
4-2-2 Notes on Using Commands
The points that should be observed when using commands are given below.
Method for Specifying Commands
When a personal computer or similar device is used as the host and a high-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 hexa-
decimal 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 charac-
ter 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
m
t1
t2
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
32
30
31
32
34
39
0D
4E
N
31
1
0
1
3
9
9
2
4
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.
Processing Differences According to Command Length
•
If a command is too long because it has been incorrectly specified, an error
response for a command length error is returned.
•
If a command is short because it has been incorrectly specified, a communica-
tion error (time out) occurs.
electronic components distributor
Содержание NT21 Series
Страница 3: ...iv Downloaded from Elcodis com electronic components distributor...
Страница 5: ...vi Downloaded from Elcodis com electronic components distributor...
Страница 367: ...3 12 Section Enabling Disabling PT Operations 358 Downloaded from Elcodis com electronic components distributor...
Страница 399: ...4 4 Section Memory Link Online Transfer Function 390 Downloaded from Elcodis com electronic components distributor...
Страница 431: ...6 2 Section Responding to Displayed Error Messages 422 Downloaded from Elcodis com electronic components distributor...
Страница 463: ...Downloaded from Elcodis com electronic components distributor...
Страница 465: ...Downloaded from Elcodis com electronic components distributor...