Operating instructions

Communication protocol Data format
KNF Flodos CP_SIMDOS02_EN_01_166851 7
6 Data format
Each transmission packet consists of the following bytes:
Name STX Address Cmd str ETX LRC
Size 1 Byte 2 Bytes 3 – 10 Bytes 1 Byte 1 Byte
Example 2 0 0 ? S I 3 36
STX (02h) Start of Text
Address Pump address ‘00’ ‘99’ ASCII, can be set on
the pump
command string
(cmd str)
Order of ASCII symbol according to command
description
ETX (03h) End of Text
LRC Checksum
Each receiver packet consists of the following bytes:
Name STX Cmd str ETX LRC
Size 1 Byte 1 9 Bytes 1 Byte 1 Byte
Example 2 0 0 3 36
STX (02h) Start of Text
Answer All data are in ASCII format
ETX (03h) End of Text
LRC Checksum
The checksum is the last byte in a command string. All bytes
(except the checksum (LRC)) are linked by an XOR operation. The
receiver of a message compares the received checksum with the
calculated checksum from the received data; if the values are
identical, the transmission is considered to be error-free.
Instead of a calculated LRC the ASCII Code of the letter ‘U’ (deci-
mal 85) can be transmitted. In this case, the pump does not com-
pute the checksum of the received data and takes the checksum
as valid.
Pseudo code for LRC computation:
LRC = 0
CharacterIndex = 0
Repeat
LRC = LRC xor CommandString[CharacterIndex]
CharakterIndex = CharakterIndex + 1
Until CharakterIndex = LENGTH(CommandString) - 1
….
Compare LRC with the received LRC-byte (first byte after ETX)
….
Where LENGTH() is a function that returns the number of bytes that
CommandString contains.
Assuming that the first character in the CommandString array is accessed
by index value 0.
Transmit
Receive :