ELC500 Control unit
165
Communication
Chapter 8
MEWTOCOL communication
8.1
◆
Command and response functions
ELC sends commands (instructions) to the connected devices, and receives responses in return.
This enables ELC and the connected devices to converse with each other, so that various kinds of
information can be obtained and provided.
①
Commands
ELC
Connected device
②
Responses
◆
Command and response formats
Command message
(ELC)
Header
Des-
tination
Text
Check
code
Termi-
nator
(To next command)
(Connected device)
Header
Source
Text
Check
code
Termi-
nator
Normal response message
◇
Control codes
Name
Character
ASCII code
Explanation
Header
%
or <
25H or 3CH
Indicates the beginning of a message.
Command
#
23H
Indicates that the data comprises a command
message.
Normal
response
$
24H
Indicates that the data comprises a normal response
message.
Error
response
!
21H
Indicates that the data comprises a response message
when an error occurs.
Terminator
CR
0DH
Indicates the end of a message.
◇
According to header character, max message length is limited.
% (header): 118-letter < (expansion header): 2048-letter
◇
Destination and source AD (H), (L)
Two-digit decimal 01 to 99 (ASCII codes)
Command messages contain a station number for connected device that receives the message.
When FF (ASCII code table) is used, however, the transmission is a global transmission (sent to all
stations at once).
Note) When a global transmission is sent, no response to the command message is returned.
◇
Block check code Bcc (H), (L)
Two- digit hexadecimal 00 to FF (ASCII codes)
These are codes (horizontal parity) that are used to detect errors in the transmitted data.
If ‘
**
’ is entered instead of ‘Bcc’, however, messages can be transmitted without the Bcc. In this case,
the Bcc is included with the response
◇
Error code Err (H), (L)
Two- digit hexadecimal 00 to FF (ASCII codes). These indicate the content if an error occurs.
◆
Bcc (Block Check Code)
-The Bcc is a code that carries out an error check using horizontal parity, to improve the reliability of the
data being sent.
-The Bcc uses an exclusive OR from the header (%) to the final character of the text, and converts the
8- bit data into a 2-character ASCII code.
Example)
%
0 1
#
R T
0 1
CR
↑
↑
↑
↑
↑
Header
Station No.1
Command
RT
Command
2-character
Bcc
%
0
1
#
R
T
0 1
25H
30H
31H
23H
52H
54H
Bcc(H)=0(30H)
Bcc(L)=1(31H)
(1) Takes exclusive OR
(2) Converts to ASCII format