27
5.4.1. The basic packet structure of the UART communication protocol
3
UART communication consists of R/W byte, Data Length, Data address
bytes, Data bytes, Error check.
(1) LAD transmission frame (LAD to Controller/PC;Controller/PC to LAD)
(2) Definition description
R/W byte
Data Length
Data address bytes
Data bytes
Error check(CRC-8)
Note:Cyclic Recundancy Check (CRC) is a channel coding technology
that generates a short fixed-bit check code based on data such
as network packets or computer files, which is mainly used to
detect or verify errors that may occur after data transmission or
saving, and uses the principle of division and remainder to
detect errors.
LAD models currently use CRC-8 as a means of error detection, which is
based on the following polynomial:
X +X +X+1
8
2
Specific numerical calculations can be calculated using the checksum
calculation tool from MEANWELL, which can be consulted with local
business or technical service engineers.
Name
Narrate
Range
R/W byte
R/W decision bit
1. Read data (0x55)
2. Write data (0xAA)
Data Length
The
bit is determined
length of the data after the R/W
1 byte
Data address bytes
The address of the data to be transmitted
2 bytes
Data bytes
The content of the data to be transmitted
Calculated by actual bytes
CRC-8
Transmits a data
error code
CRC-8
(
R/W byte ~ Data bytes).
Contains
1 byte
5
28
5.4.1.4 Definition of data types
The data transmission patterns of this agreement are defined as follows:
5.4.1.5 Scratchpad Address Data Description
Controller/PC to LAD datasheet
Data type
Narrate
Bytes
Range
U1
Unsigned char
1
0 ~ 255
U2
unsigned integer
2
0 ~ 65535
S1
signed char
1
-128 ~ 127
S2
Signed integer
2
-32768 ~ 32767
R/W
byte
Data address
bytes
The data name
narrate
Numeric
range
Data
type
unit
0x55
0x0010
LAD status
LAD status flag read instruction
-
U1
-
0x0020
Principal electrical
voltage
Input voltage read instructions
0 ~ 65535
U2
-
0x0030
Load current
Load current read instruction
0 ~ 65535
U2
-
0x0040
Battery voltage
The total voltage of the battery
series reads the instruction
0 ~ 65535
U2
-
0x0050
Single cell battery
voltage
Single-cell battery voltage read
instruction
0 ~ 65535
U2
-
0x0060
Battery
undervoltage
protection point
Battery UDP point read
instructions
0 ~ 65535
U2
-
0xAA
0x0010
Standby excision
instructions
Backup removal control
-
U1
-
0x0020
Battery
undervoltage
protection point
Battery UTP point setting
0 ~ 65535
U2
0.01V
0x0030
Buzzer control
Buzzer off control
-
U1
-
0x0040
Standby enable
command
The main standby power is
normal when the
communication enables the
power backup control
command
U1
-
Note: (1) The 0x0020 instruction written is invalid when the force startup
state is forced
(2) The written 0x0050 instructions, if connected according to the
battery detection point connection, in order to detect the battery
voltage normally, otherwise FF will be reported
(3) Write command without memory function, restore factory
settings after shutdown
5
Summary of Contents for LAD Series
Page 26: ......