![ZLG CANDTU-400EWGR User Manual Download Page 21](http://html1.mh-extra.com/html/zlg/candtu-400ewgr/candtu-400ewgr_user-manual_3884196021.webp)
CANDTU-400EWGR
CAN Bus Message Records and Wireless Data Transmission Equipment Series Products
©2021 Guangzhou ZLG Microelectronics Technology Corp.,Ltd.
18
User Manual
Calculation method of the absolute time of the CAN message:
Absolute timestamp of CAN messages T
=
(Absolute timestamp T
base
+ Relative timestamp of CAN messages T
can
∗ 0.1)
1000
− 8 ∗ 3600
The absolute time can be converted by calling the system function localtime.
5.2 CAN Data Frame Format
Table 5 CAN message packet format definition
Parameter
Parameter Size
(Byte)
Description
Time stamp
4
Current message received (time unit:
100 us)
Message ID
4
CAN frame ID
[bit28:0]: Frame ID
[bit31:29]: Packet type:
0: CAN frame
3: Error frame
Message flag
2
CAN message flag:
[bit7]: 1: Error message 0: Normal
message
[bit6]: 1: Extended frame, 0: Standard
frame
[bit5]: 1: Remote frame, 0: Data frame
[bit4]: Reserved
[bit3:0]: Send type:
0: normal send
1: single send
2: Self-send and self-receive
3: One-time self-send and self-receive
Message
channel
1
CAN channel
Data length
1
CAN message data length
Data
8
CAN message data
When [bit7] in the message flag is an error message or the value of [bit31:29] in the
message ID is 3, the message is an error frame.
The data length of the error frame is 5 bytes. Its data format is as follows.