3 lecom-a/b protocol, 1 general, General – Lenze EMF2102IB User Manual
Page 48: Appendix, 3 lecom -a/ b protocol

Appendix
8-16
L
_^ONMObk
8.3
LECOM -A/ B protocol
The LECOM-A/B protocol is used to exchange data between Lenze controllers and a host. The
LECOM-A/B protocol is based on DIN 66019, ISO 1745 and ANSI X3.28 (category 2.5 and A2, A4).
These standards are similar to each other and describe the control mode of a transmission section
of a transmission system.
The host, which is the master, can communicate with a slave (Lenze controller) in three modes:
•
RECEIVE (see page 8-21)
•
SEND (see page 8-23)
•
BROADCAST/MULTICAST (see page 8-24)
8.3.1
General
The controllers communicate by means of the ASCII code:
0
1
2
3
4
5
6
7
8
9
O
B
C
D
I
F
0
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
jFF
CR
SO
SI
1
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
2
Ъ Ы
Ъ>Ы
ЪТЫ
Ъ@Ы
ЪAЫ
ЪBЫ
ЪCЫ
ЪЫЫ
ЪEЫ
ЪFЫ
ЪGЫ
ЪHЫ
ЪIЫ
ЪJЫ
ЪKЫ
ЪLЫ
3
ЪMЫ
ЪNЫ
ЪOЫ
ЪPЫ
ЪQЫ
ЪRЫ
ЪSЫ
ЪTЫ
ЪUЫ
ЪVЫ
ЪWЫ
ЪXЫ
ЪYЫ
ЪZЫ
Ъ[Ы
Ъ\Ы
4
Ъ]Ы
Ъ^Ы
Ъ_Ы
Ъ`Ы
ЪaЫ
ЪbЫ
ЪcЫ
ЪdЫ
ЪeЫ
ЪfЫ
ЪgЫ
ЪhЫ
ЪiЫ
ЪjЫ
ЪkЫ
ЪlЫ
5
ЪmЫ
ЪnЫ
ЪoЫ
ЪpЫ
ЪqЫ
ЪrЫ
ЪsЫ
ЪtЫ
ЪuЫ
ЪvЫ
ЪwЫ
ЪxЫ
ЪyЫ
ЪzЫ
Ъ{Ы
Ъ|Ы
6
ЪЪЫ
Ъ~Ы
ЪДЫ
ЪЕЫ
ЪЗЫ
ЪЙЫ
ЪСЫ
ЪЦЫ
ЪЬЫ
ЪбЫ
ЪаЫ
ЪвЫ
ЪдЫ
ЪгЫ
ЪеЫ
ЪзЫ
7
ЪйЫ
ЪиЫ
ЪкЫ
ЪлЫ
ЪнЫ
ЪмЫ
ЪоЫ
ЪпЫ
ЪсЫ
ЪуЫ
ЪтЫ
ЪфЫ
ЪцЫ
ЪхЫ
ЪъЫ
Example:
” EOT”
= 02
hex
= 2
dec
Character ” 1”
= 31
hex
= 49
dec
Code number (C1, C2)
Standard addressing
The meaning of the code numbers and the assigned parameters can be obtained from the code
table (see chapter 8.2). When transmitting data, the code number are coded as follows:
The following calculation determines the two ASCII digits from the code number (value range: 0
¼
6229) (value range: 48
dec
¼ 127
dec
):
C1 =
INTEGER((REMAINDER(code number/790))/10)+48
dec
C2 =
REMAINDER(REMAINDER(code number/790)/10) +
INTEGER(code number/790) x 10 + 48
dec
The INTEGER is the digit before the decimal point, the REMAINDER is an integer.
Example:
13/5 = 2 remainder 3
INTEGER(13/5) = 2
REMAINDER(13/5) = 3
Example:
Convert code number 1002 in ASCII code C1 and C2:
C1
ASCII
=
INTEGER((REMAINDER(1002/790))/10) + 48 =
INTEGER(212/10) + 48 =
21 + 48 = 69 = 45
hex
= ” E”
ASCII
C2
ASCII
=
REMAINDER(REMAINDER(1002/790)/10) +
INTEGER(1002/790) x 10 + 48 =
REMAINDER(212/10) + 1 x 10 + 48 =
2 + 10 + 48 = 60 = 3C
hex
= ” <”
ASCII
Show/Hide Bookmarks