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
Buy: www.ValinOnline.com | Phone 844-385-3099 | Email: [email protected]
Show/Hide Bookmarks