Fm210_01b_oi_e.docx / Nov-20
Page 30 / 40
Lecom Write
To write data to the unit the following string must be sent:
EOT AD1 AD2 STX C1 C2 x x x x x x x ETX BCC
EOT = control character (Hex 04)
AD1 = unit address, High Byte
AD2 = unit address, Low Byte
STX = control character (Hex 02)
C1 = code, High Byte
C2 = code, Low Byte
xxxxx = written data
ETX = control character (Hex 03)
BCC = block check character
The Block Check Character (BCC) is formed by an EXCLUSIVE-OR function of all characters from
C1 to ETX (each inclusive). If the reception is correct, the unit responds with the control character
ACK, otherwise with NAK or no message. A newly sent parameter is first stored temporarily in the unit
without influencing the function. Thus, it is possible to prepare several new parameters in the
background while the unit is running.
If the transferred parameters are to be activated, the value "1" must be sent to the "Activate Data"
register. This will activate all changed parameters simultaneously.
If the new parameters are to remain permanently stored even after the power supply has been
switched off, additionally the value "1" must be sent to the "Store EEProm" register. Thus, all new
data are also stored in the unit. Otherwise, the unit will return to the original parameter set after power
up.
Function
Code
Command Activate Data
67
Command Store EEProm
68
Both commands react dynamically, i.e. it is sufficient to send the value "1" to the corresponding code.
After execution, the command is automatically reset.
Activate Data on unit 11:
ASCII
EOT
1
1
STX
6
7
1
ETX BCC
Hex
04
31
31
02
36
37
31
03
33
Store EEProm on unit 11:
ASCII
EOT
1
1
STX
6
7
1
ETX BCC
Hex
04
31
31
02
36
38
31
03
3C