Alarm Command
One ASCII character.
Alarm ON is "A" (41 Hex). Alarm OFF is "C" (43 Hex).
Alarm Number
A 3-digit alarm number in ASCII format ("001" ~ "512").
Checksum
The XOR result of the previous 5 bytes.
Xon/Xoff Flowcontrol
The SAP protocol uses Xon/Xoff flowcontrol. The Xon character is DC1 (11 hex), and Xoff is
DC3 (13 hex).
The Xon/Xoff principle is as follows:
When the receiver buffer is 80% full, the receiver transmits an Xoff character to stop the
transmitter. When the buffer is only 20% full the receiver transmits an Xon to start the
transmitter again.
To be able to send both DC1 and DC3 as data, the protocol uses "the character stuffing
principle". Character stuffing means that the transmitter is transmitting an extra DC1
character if it wants to transmit DC1 as data. Then the receiver knows that two DC1
characters means "DC1-data" and one DC1 means "Xon".
Example
In order to set alarm number 45 ON, the following string must be transmitted:
53 41 30 34 35 23
53:
"S" - Header
41:
"A" - Alarm ON
30,34,35:
"045" Alarm number
23:
XOR checksum (53 xor 41 xor 30 xor 34 xor 35)
Extended Serial Alarm Protocol (xSAP)
The xSAP protocol is similar to the SAP protocol, but without the limitation of max. 512
alarms.
Data Format
v
Baud Rate: 1200 ~ 38400
v
Data Bits/Parity/Stop bits: 8/N/1
v
Flow control: Xon/Xoff
Frame format
1 byte
'n' byte(s)
1 byte
1 byte
1 byte
"N
1
" - "N
n
"
41 or 43 Hex
53 Hex
XOR sum
ASCII format
"A" or "C"
ASCII format
"S"
Checksum
Alarm number
Alarm Command
Number of bytes
Header
Header
Always ASCII "S" (53 Hex).
Number of Bytes
Total number of bytes including checksum, but excluding Header.
2853-00009
Page 5
S Y S E M