28
M-series RS232 Programmers Manual
M-series RS232 Programmers Manual
7.5 Byte Escape Sequence
If a byte in the length, data, or checksum fields falls within the range 240h through 255h inclusive, an
escape sequence is used to transmit the value, since those single byte values are reserved. The value is
translated by the sending device into two bytes: the RS232_ESCAPE byte (240) itself, followed by the
difference between the value and the RS232_ESCAPE byte.
value => RS232_ESCAPE, (value - RS232_ESCAPE)
These two bytes are transmitted instead of the single, large-value byte. The receiving device converts the
two bytes back into the original single byte value through simple addition. These operations do not affect
the values of the length or checksum fields.
Note:
The escape sequence feature can be disabled if necessary, by putting DIP switch #7 in the
down position.
This is recommended when using Crestron or AMX controllers, since it simplifies program-
ming. See section 7.6.
In the following example, the data field of a message is (2, 3, 3, 6, 255). The byte 255 must be escaped
into the RS232_ESCAPE byte (240) followed by the difference between 255 and RS232_ESCAPE (255
- 240 = 15 = 0Fh). The bytes actually transmitted are:
Since the second byte of an escape sequence must fall within the range 0 through 15 inclusive, any second
byte outside of that range indicates that a transmission error has occurred, and the message should be
acknowledged by the receiver with RS232_ERROR and ignored.
-
2
3
2
S
R
T
R
A
T
S
_
h
t
g
n
e
L
s
s
a
l
c
a
t
a
d
e
g
a
s
s
e
m
a
t
a
d
D
I
t
u
p
n
i
t
u
p
t
u
o
t
e
g
r
a
t
e
u
l
a
v
a
t
a
d
m
u
s
k
c
e
h
c
h
A
F
h
5
0
h
0
0
h
2
0
h
3
0
h
3
0
h
6
0
,
h
0
F
h
F
0
h
C
0
Содержание AVM RS232
Страница 1: ...AVM RS232 Master Manual ...