DAEnetIP3
User Manual
-
64
-
17.
DAEnetIP3 data application protocol
DAEnetIP3 has several options for access (besides over Web browser). These
are TCP/IP protocol, UART (Serial) protocol, Telnet, Virtual Serial Port and HTTP
API. Each of these four ways uses
just one ASCII protocol
with small modifications.
This means the core of this protocol (the commands/answers/errors) are the same.
These PDU (protocol data units) are shown on figure 55.
Figure 55.
DAEnetIP3 data application protocol
The Command PDU is combination of function code (3 bytes), the char “=” and
data (N bytes). The answer PDU begins with function code (3 bytes), the char “=” and
the answer data (N bytes). The error PDU is the error code (2 bytes). The command,
answer and error finish with the char “;”. This is delimiter and it is forbidden char – it
is not used in the protocol.
DAEnetIP3 data application protocol is fully ASCII.
This means in the protocol
exchange data consists of only printable characters.
For example the command received/sent is 01ASG=1111EC86;. This command
sets the 16 bit digital output port in state 1111 (0001000100010001). DO 0,4,8,12 are
in logical 1, end the rest are in logical 0. Then:
01 is the address which consists of two chars
– „0‟ and „1‟. It is hex
number represented with chars. The maximum may be „F‟ and „E‟.
ASG=1111 is the command PDU. 1111 is hex number represented with
chars that is the states of the whole digital outputs. The number may be
from 0000 („0‟ „0‟ „0‟ „0‟) up to FFFF („F‟ „F‟ „F‟ „F‟).
EC86 is the CRC16 checksum. Its also hex number represented with
chars. It‟s the check sum of 01ASG=1111.
“;” is char that is the delimiter.
The reason for this is that the controller protocol is more understandable if it works
with simple ASCII protocol.
Bellow
char
also may be mentioned as
byte.