78
About External Communication Functions
Packet
<Packet format>
The following shows the packet format.
Packet format
STX
0x02
Packet data (xml format)
(Arbitrary size)
CRC16
(4byte)
ETX
0x03
(Packet data and CRC16 use ASCII code.)
• STX
0x02
(Fixed)
• Packet data
Data division written in XML format (For details, see this page “Packet <Packet data>”.)
• CRC16
Error detection calculation for the packet data division. The polynomial to be used is CRC-16-CCITT.
• ETX
0x03
(Fixed)
• Measures for a packet error
If the pump receives data without STX and/or ETX, the data previously received become invalid.
If the pump receives data with the CRC error, the data previously received become invalid.
<Packet data>
For the XML declaration statement, only <?xml version="1.0"?> is allowed.
Do not use the DOCTYPE declaration.
A space, a tab, and any control code including a line break are not allowed.
XML entity reference notation is not supported.
•
Request packet data format
The following shows the request packet data format used when a network system makes a request to the pump.
Request packet data format
<?xml version="1.0"?>
<REQ>
<DEVID></DEVID>
<CMD></CMD>
</REQ>
• REQ tag:
This tag and its element are required.
This indicates a request packet from the network system to the pump.
The pump does not reply to a request without this tag.
• DEVID tag:
This tag is required.
This tag indicates the device ID of the pump.
The pump replies when the device ID of the element matches that of the pump.
When the network system obtains the device ID of the pump, the element is omitted. If element is omitted, the pump replies to
only the DEVID tag without conditions, and sends its own device ID as the reply data.
• CMD tag:
This tag indicates the command and data to the pump.
The pump replies to one CMD tag.
For details on the element commands and data, see page 79 “Command Format <Request>”.
The element is converted using Base64.