CN115174307A - Communication method for supporting CAN bus to transmit data with more than 8 bytes - Google Patents

Communication method for supporting CAN bus to transmit data with more than 8 bytes Download PDF

Info

Publication number
CN115174307A
CN115174307A CN202210803933.9A CN202210803933A CN115174307A CN 115174307 A CN115174307 A CN 115174307A CN 202210803933 A CN202210803933 A CN 202210803933A CN 115174307 A CN115174307 A CN 115174307A
Authority
CN
China
Prior art keywords
frame
data
length
index
payload
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210803933.9A
Other languages
Chinese (zh)
Other versions
CN115174307B (en
Inventor
叶继超
高晓川
顾仓
姜波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Xiaojun Intelligent Equipment Co ltd
Original Assignee
Hefei Zhixingtong Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Zhixingtong Intelligent Technology Co ltd filed Critical Hefei Zhixingtong Intelligent Technology Co ltd
Priority to CN202210803933.9A priority Critical patent/CN115174307B/en
Publication of CN115174307A publication Critical patent/CN115174307A/en
Application granted granted Critical
Publication of CN115174307B publication Critical patent/CN115174307B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/4013Management of data rate on the bus
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a communication method for supporting CAN bus to transmit more than 8 bytes of data, and relates to the technical field of data transmission. The invention comprises a data sending method and a data receiving method; receiving frame data, and judging whether the received device _ id is equal to the device _ id of the node; judging whether the result of subtracting the frame _ index by 8 from the payload _ length is more than or equal to 8; if yes, the data frame is placed into an 8-byte length memory starting from the multiplication of the frame _ index of recv _ buf by 8; if not, the data frame is put into the (payload _ length minus frame _ index multiplied by 8) length memory from the first frame _ index multiplied by 8 of recv _ buf; and the content of the data segment is stored in the recv _ buf memory, and the receiving is finished. The invention intercepts the data to be transmitted through the CAN protocol, judges the integer frame and the remainder frame generated after interception, multiplies each segment identifier of the data frame by eight, and puts the data frame into the memory with the length of subtracting frame _ index from the first payload _ length of frame _ index multiplied by 8 of recv _ buf, thereby improving the data transmission efficiency.

Description

Communication method for supporting CAN bus to transmit data with more than 8 bytes
Technical Field
The invention belongs to the technical field of data transmission, and particularly relates to a communication method for supporting CAN bus transmission of more than 8 bytes of data.
Background
With the development of microcomputer control technology and industrial fieldbus technology, fieldbus-based communication is becoming more and more widely used in industrial control. The CAN bus is favored by many developers due to the characteristics of simple structure, low cost, good functional characteristics, extremely high reliability, strong field anti-interference capability and openness.
The CAN serial bus has the advantages of long transmission distance and high transmission speed, has a perfect error detection mechanism, and CAN ensure that information is not lost by adopting a frame transmission mode of a multiple access conflict arbitration mechanism; at most 8 bytes of data can be transmitted in each frame, providing high real-time performance, etc. The performance advantage ensures that the CAN CAN be applied to a plurality of fields, and the CAN CAN be applied to the automobile industry, the ship transportation, the mechanical control, the factory automation, the building automation and the like.
The CAN field bus system is composed of a physical layer, a data link layer and an application layer 3 layer. The basic protocol specification of CAN is only physical layer protocol and data link layer protocol, and one of the core tasks of a system using CAN bus as a transmission mechanism is to design application layer protocol can2.0a standard CAN protocol of CAN bus and can2.0b extended CAN communication protocol to support transmitting 8 bytes of data at most each time, when one node transmits a frame of data segment with size exceeding 8 bytes to another node, the data segment with the length cannot be transmitted once by using either can2.0a or can2.0b communication protocol. The current embedded system is often single in function, simple in structure, limited in resources, but requires high transmission speed, reliability and efficiency, so that a novel application layer protocol with a simple structure is needed.
A communication protocol applied to a large amount of data based on a connected CAN bus, which has been completed by Wu Chaohui of zhejiang university and the like at present, realizes a connection-based application layer protocol for transmitting messages with data greater than 8 bytes. Although the protocol realizes the packed sending of data larger than 8 bytes, the protocol lacks a response mechanism of transmission, so that the condition of transmission errors cannot be processed. Particularly, the protocol can only realize the maximum data transmission of 256 × 7 bytes, has no mass data transmission mechanism, and cannot ensure the accuracy of the data transmission. Meanwhile, the protocol is based on connection, and connection needs to be established first in each transmission, so that the transmission efficiency is low.
The nomenclature used throughout this application notes:
1. a CAN data buffer area: data field interval in the CAN data frame.
2. And (3) data segment: one segment of data, which is the payload _ length power in the size range of 1 to 2, in units of bytes, cannot be transmitted through the CAN bus at one time when the size is larger than 8 bytes.
3. And (3) data frame: one frame of data with the size range of 0-8 and the unit byte CAN be transmitted through the CAN bus at one time.
4. payload _ length: data segment length, unit byte.
5. Integer frame: and (4) intercepting one section of data, namely an integer frame, at the size of 8 bytes from the initial position of the data section.
6. And (4) remaining frames: and a section of data with the size less than or equal to 8 is intercepted from the data section, and the length of the section of data is equal to the remainder of dividing payload _ length by 8.
7. frame _ count: the number of integer frames.
8. Main _ frame _ length: the length of the remainder frame is equal to the remainder of the payload _ length divided by 8.
9. frame _ index: after the data segment is intercepted, the identification of each segment is uniquely represented relative to other segments.
10. Extended frame id: an identifier field in the CAN2.0B communication protocol.
11. Standard frame id: an identifier field in the CAN2.0A communication protocol.
12. Data frame id: the id of the CAN data frame is equal to the standard frame id when the CAN2.0a protocol is used, and is equal to the extension frame id when the CAN2.0b protocol is used.
13. device _ id: and the device id is different from the extended frame id/standard frame id and belongs to a part of the extended frame id/standard frame id.
14. extend _ id _ head: and the result of the left shift of the device _ id by 25 bits, the result of the left shift of the payload _ length by 11 bits and the frame _ index are subjected to bitwise OR operation to obtain the value.
15. extended _ id: synonymous with extension frame id, equal to extended _ id _ head, frame _ index bitwise or result.
16. recv _ buf: and the received data segment memory buffer is used for storing the content of the received data segment, and the length of the received data segment memory buffer is greater than or equal to the length of the data segment.
17. ID _ length: this value is 11 when the can2.0a communication protocol is selected, and is 29 when the can2.0b communication protocol is selected.
Disclosure of Invention
The invention aims to provide a communication method for supporting a CAN bus to transmit data with more than 8 bytes, which solves the problem of low transmission efficiency caused by the fact that the existing CAN bus cannot upload data with a plurality of 8 bytes by transmitting a data segment with more than 8 bytes between two nodes of the CAN bus and not using a CAN data buffer zone.
In order to solve the technical problems, the invention is realized by the following technical scheme:
the invention relates to a communication method supporting CAN bus transmission of more than 8 bytes of data, which comprises a data sending method and a data receiving method;
the data sending method comprises the following steps:
step S1: calculating frame _ count, domain _ frame _ length, initializing frame _ index to 0;
step S2: judging whether the frame _ index is smaller than the frame _ count;
and step S3: if the frame _ index is smaller than the frame _ count, acquiring an extended _ id _ head, and calculating the extended _ id = extended _ id _ head bitwise or frame _ index;
if the frame _ index is greater than or equal to the frame _ count, executing step S6;
and step S4: acquiring an 8-byte data frame starting from the frame _ index x 8 bytes as a data frame to be sent;
step S5: the current node sends the data frame to the CAN bus, then accumulates the frame _ index by 1, and returns to the step S2;
step S6: acquiring an extended _ id _ head, and calculating extended _ id = extended _ id _ head bitwise or frame _ index;
step S7: acquiring data with the length of a main _ frame _ length starting from the first frame _ index by 8 bytes of the data segment as a data frame to be sent;
step S8: the current node sends the data frame to the CAN bus, and the content of the data segment is sent;
the data receiving method comprises the following steps:
step F1: receiving a frame of data, and calculating device _ id, payload _ length and frame _ index values;
step F2: judging whether the received device _ id is equal to the device _ id of the node;
if yes, executing step F3;
if not, discarding the data frame and continuing to execute step F1;
step F3: judging whether the result of subtracting the frame _ index by 8 from the payload _ length is more than or equal to 8;
if yes, executing step F4;
if not, executing the step F5;
step F4: putting the data frame into an 8-byte length memory from the first frame _ index multiplied by 8 of recv _ buf;
step F5: putting the data frame into the (payload _ length minus frame _ index multiplied by 8) length memory from the first frame _ index multiplied by 8 of recv _ buf;
step F6: and the content of the data segment is stored in the recv _ buf memory, and the receiving is finished.
As a preferred technical solution, in step F1, payload _ length represents the length of a data segment, the data segment is truncated to generate an integer frame and a remainder frame, the length of the integer frame is 8 bytes, the number of the integer frame is defined as frame _ count, the length of the remainder frame is defined as remaining _ frame _ length, and the number of the remainder frame is 1, then the calculation formula between frame _ count, payload _ length, and remaining _ frame _ length is as follows:
frame_count=payload_length/8
remain_frame_length=payload_length%8。
as a preferred technical solution, the device _ ID, payload _ length, and frame _ index are fields of a data frame ID, and the size is defined as m bits, n bits, and k bits in sequence;
wherein m, n and k satisfy the following relationship:
Figure BDA0003735728480000061
as a preferred technical solution, the values of m, n and k are all customized by a user; after m is well defined, the following conditions are satisfied under the premise that n and k are removed:
Figure DA00037357284830392015
as a preferred technical solution, the CAN bus uses a CAN communication protocol for transmission; the CAN communication protocol comprises CAD2.0A communication protocol and CAD2.0B communication protocol.
As a preferred technical solution, the CAD2.0A communication protocol supports 11-bit extension frame id; in the expansion frame ID 11, bit10 to bit9 are used for identifying the device ID, are defined as device _ ID, have the size of 2 bits, have the value range of 0 to 3, and support at most 4 devices for passing; bit 8-bit 3 is used for storing payload _ length, the size is 6 bits, the value range is 0-63, and the size of the most supported transmission data segment is 64 bytes; bit 2-bit 0 is used for storing frame _ index, the size is 3 bits, the value range is 0-7, and the maximum support is for transmitting 8 sections of data frames.
As a preferred technical solution, the CAD2.0B communication protocol supports 29-bit extension frame id; in the 29-bit extended frame ID, bits 28 to 25 are used for identifying the equipment ID, are defined as device _ ID, have the size of 4 bits and the value range of 0 to 15, and most 16 equipment is supported for communication; bit 24-bit 11 are used for storing payload _ length, the size is 14 bits, the value range is 0-16383, and the size of the most supported transmission data segment is 16384 bytes; bit 10-bit 0 is used for storing frame _ index, the size is 11bit, the value range is 0-2047, and 2048 sections of data frames are supported to be transmitted maximally.
The invention has the following beneficial effects:
according to the invention, data to be transmitted is intercepted through a CAN protocol, an integer frame and a remainder frame generated after the interception are judged and processed, each segment of identification of the data frame is multiplied by eight, and the data frame is placed in a (payload _ length minus frame _ index multiplied by 8) length memory from the frame _ index multiplied by 8 of recv _ buf, so that the data transmission efficiency is improved.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of data transmission according to the present invention;
fig. 2 is a flow chart of data reception according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The method provides a communication method for supporting the CAN bus to transmit data with more than 8 bytes, CAN support the CAN bus to transmit data segments with more than 8 bytes between two nodes, does not use a CAN data buffer area, and improves the transmission efficiency.
During communication, the length of a data segment is defined as payload _ length, the data segment is intercepted, and an integer frame and a remainder frame are generated after the interception, the length of the integer frame is 8 bytes, the number of the integer frame is defined as frame _ count, the length of the remainder segment is defined as remaining _ frame _ length, and the number of the remainder frame is 1. The definition of each variable is calculated as follows,
frame_count=payload_length/8
remain_frame_length=payload_length%8
the data frame ID is decomposed as shown in table 1 below:
device_id payload_length frame_index
device _ id: the area stores a device _ id value, the size of which is defined as m bits.
payload _ length: this area stores a payload _ length value, the size of which is defined as n bits.
frame _ index: this field stores a frame _ index value, defined as k bits in size.
Wherein m, n, k satisfy the following relationship,
Figure BDA0003735728480000081
wherein, the values of m, k and n are set by a user, but generally, after m is determined, under the premise of ensuring the integer of n and k,
Figure BDA0003735728480000082
the invention mainly solves the problems that the traditional CAN2.0A standard CAN protocol and the CAN2.0B extended CAN communication protocol support to transmit 8 bytes of data at most each time, and when one node transmits a frame of data segment with the size of more than 8 bytes to another node, the CAN2.0A or CAN2.0B communication protocol cannot be used for transmitting the data segment with the length once.
Embodiment one (taking CAN2.0A communication protocol transmission as an example)
Can2.0a supports 11-bit extension frame ID, so ID _ length =11, assuming that m =2, n =6, k =3, as defined below,
(1) the bits 10 to 9 are used for identifying the equipment ID, are defined as device _ ID, have the size of 2 bits and the value range of 0 to 3, and support 4 pieces of equipment to carry out communication at most.
(2) bit 8-bit 3 is used for storing payload _ length, the size is 6 bits, the value range is 0-63, and the size of the most supported transmission data segment is 64 bytes.
(3) bit 2-bit 0 is used for storing frame _ index, the size is 3 bits, the value range is 0-7, and the maximum support is for transmitting 8 sections of data frames.
Assuming that the length of data to be transmitted is 64 bytes, bits 10 to 9 are other node device ids to be transmitted by the user, and are defined by the user, bits 8 to 3 are 0x3F, and bits 2 to 0 are 0x7.
As shown in fig. 1, the transmission flow is as follows:
step (1): frame _ count, remaining _ frame _ length, is calculated, initializing frame _ index to 0.
Step (2): determine if frame _ index is less than frame _ count?
And (3): if the frame _ index is smaller than the frame _ count, the extended _ id _ head is obtained, and the extended _ id is calculated. If frame _ index is greater than or equal to frame _ count, step (6) is performed.
And (4): and acquiring the first frame _ index data frame as a data frame to be sent, wherein the length of the data frame is 8 bytes.
And (5): the current node sends the data frame onto the CAN bus and then accumulates frame _ index by 1.
And (6): and acquiring an extended _ id _ head and calculating the extended _ id.
And (7): acquiring the first frame _ index data frame as the data frame to be transmitted, with the length of main _ frame _ length
And (8): and the current node sends the data frame to the CAN bus, and the content of the data segment is sent to the end.
As shown in fig. 2, the receiving process is as follows:
step (1): receiving a frame of data, calculating device _ id, payload _ length, and frame _ index values.
Step (2): determine whether the receiving device _ id is equal to the device _ id of the node? If equal, executing step (3), if not equal, discarding the data frame, and then executing step (1)
And (3): if the result of subtracting frame _ index by 8 from payload _ length is greater than or equal to 8, then step (4) is executed, otherwise step (5) is executed.
And (4): this data frame is placed in the 8-byte length memory starting from the frame _ index multiplied by 8 of recv _ buf.
And (5): this data frame is placed in the (payload _ length minus frame _ index by 8) length memory starting at the frame _ index by 8 of recv _ buf.
And (6): and the content of the data segment is stored in the recv _ buf memory, and the receiving is finished.
Example two (taking CAN2.0B communication protocol transmission as an example)
Since can2.0b supports 29-bit extension frame ID, ID _ length =29, assuming that m =4, n =14, k =11, as defined below,
(1) the bits 28 to 25 are used for identifying the device ID, are defined as device _ ID, have the size of 4 bits and the value range of 0 to 15, and support 16 devices to carry out communication.
(2) bit 24-bit 11 are used for storing payload _ length, the size is 14 bits, the value range is 0-16383, and the size of the most supported transmission data segment is 16384 bytes.
(3) The bit 10-bit 0 of San is used for storing frame _ index, the size is 11 bits, the value range is 0-2047, and 2048 data frames are maximally supported to be transmitted.
Assuming that the length of data to be transmitted is 16384 bytes, bits 28 to 25 are other node device ids to be transmitted by the user, and are defined by the user, bits 24 to 11 are 0x3FFF, and bits 10 to 0 are 0x7FF.
As shown in fig. 1, the transmission flow is as follows:
step (1): frame _ count, remaining _ frame _ length, is calculated, initializing frame _ index to 0.
Step (2): determine if frame _ index is less than frame _ count?
And (3): if the frame _ index is smaller than the frame _ count, the extended _ id _ head is obtained, and the extended _ id is calculated. If frame _ index is greater than or equal to frame _ count, step (6) is performed.
And (4): and acquiring the first frame _ index data frame as a data frame to be sent, wherein the length of the data frame is 8 bytes.
And (5): the current node sends the data frame onto the CAN bus and then increments frame _ index by 1.
And (6): and acquiring extended _ id _ head and calculating extended _ id.
And (7): acquiring the first frame _ index data frame as the data frame to be transmitted, with the length of main _ frame _ length
And (8): and the current node sends the data frame to the CAN bus, and the content of the data segment is sent.
As shown in fig. 2, the receiving process is as follows:
step (1): receiving a frame of data, calculating device _ id, payload _ length, and frame _ index values.
Step (2): determine whether the receiving device _ id is equal to the device _ id of the node? If equal, executing step (3), if not equal, discarding the data frame, and then executing step (1).
And (3): if the result of subtracting frame _ index by 8 from payload _ length is greater than or equal to 8, then step (4) is executed, otherwise step (5) is executed.
And (4): this data frame is placed in the 8-byte length memory starting from the frame _ index multiplied by 8 of recv _ buf.
And (5): this data frame is placed in the (payload _ length minus frame _ index by 8) length memory beginning at the frame _ index by 8 of recv _ buf.
And (6): and the content of the data segment is stored in the recv _ buf memory, and the receiving is finished.
It should be noted that, in the above system embodiment, each included unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it is understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing associated hardware, and the corresponding program may be stored in a computer-readable storage medium.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (7)

1. A communication method supporting CAN bus to transmit more than 8 bytes of data is characterized by comprising a data transmitting method and a data receiving method;
the data sending method comprises the following steps:
step S1: calculating frame _ count, domain _ frame _ length, initializing frame _ index to 0;
step S2: judging whether the frame _ index is smaller than the frame _ count;
and step S3: if the frame _ index is smaller than the frame _ count, acquiring an extended _ id _ head, and calculating the extended _ id = extended _ id _ head bitwise or frame _ index;
if the frame _ index is greater than or equal to the frame _ count, executing step S6;
and step S4: acquiring an 8-byte data frame starting from the first frame _ index by 8 bytes as a data frame to be sent;
step S5: the current node sends the data frame to the CAN bus, then accumulates the frame _ index by 1, and returns to the step S2;
step S6: acquiring an extended _ id _ head, and calculating extended _ id = extended _ id _ head bitwise or frame _ index;
step S7: acquiring data with the length of a main _ frame _ length starting from the first frame _ index by 8 bytes of the data segment as a data frame to be sent;
step S8: the current node sends the data frame to the CAN bus, and the content of the data segment is sent to the end;
the data receiving method comprises the following steps:
step F1: receiving a frame of data, and calculating device _ id, payload _ length and frame _ index values;
step F2: judging whether the received device _ id is equal to the device _ id of the node;
if yes, executing step F3;
if not, discarding the data frame and continuing to execute step F1;
step F3: judging whether the result of subtracting the frame _ index by 8 from the payload _ length is more than or equal to 8;
if yes, executing step F4;
if not, executing the step F5;
step F4: putting the data frame into an 8-byte length memory starting from the frame _ index multiplied by 8 of recv _ buf;
step F5: putting the data frame into the (payload _ length minus frame _ index multiplied by 8) length memory from the first frame _ index multiplied by 8 of recv _ buf;
step F6: and the content of the data segment is stored in the recv _ buf memory, and the receiving is finished.
2. The communication method according to claim 1, wherein in step F1, payload _ length represents a length of a data segment, the data segment is truncated to generate integer frames and remainder frames, the length of the integer frames is 8 bytes, the number of integer frames is defined as frame _ count, the length of the remainder segments is defined as remaining _ frame _ length, and the number of the remainder frames is 1, then the calculation formula between frame _ count, payload _ length, and remaining _ frame _ length is as follows:
frame_count=payload_length/8
remain_frame_length=payload_length%8。
3. the communication method of claim 2, wherein the device _ ID, payload _ length, and frame _ index are fields of data frame ID, and the size is defined as m bits, n bits, and k bits;
wherein m, n and k satisfy the following relationship:
Figure FDA0003735728470000031
4. the communication method supporting CAN bus transmission of more than 8 bytes of data according to claim 3, wherein the values of m, n and k are all customized by a user; after m is well defined, the following conditions are satisfied under the premise that n and k are removed:
Figure DA00037357284730411288
5. the communication method of claim 1, wherein the CAN bus transmits using CAN communication protocol; the CAN communication protocol comprises CAD2.0A communication protocol and CAD2.0B communication protocol.
6. The communication method supporting CAN bus transmission of more than 8 bytes of data according to claim 5, wherein the CAD2.0A communication protocol supports 11-bit extended frame id; in the 11 extended frame ID, bits 10 to 9 are used for identifying the device ID, are defined as device _ ID, have a size of 2 bits, have a value range of 0 to 3, and support at most 4 devices for passing; bit 8-bit 3 is used for storing payload _ length, the size is 6 bits, the value range is 0-63, and the size of the most supported transmission data segment is 64 bytes; bit 2-bit 0 is used for storing frame _ index, the size is 3 bits, the value range is 0-7, and the maximum support is for transmitting 8 sections of data frames.
7. The communication method supporting CAN bus transmission of more than 8 bytes of data according to claim 5, wherein the CAD2.0B communication protocol supports 29 bit extended frame id; in the 29-bit extended frame ID, bits 28 to 25 are used for identifying the equipment ID, are defined as device _ ID, have the size of 4 bits and the value range of 0 to 15, and most 16 equipment is supported for communication; bit 24-bit 11 are used for storing payload _ length, the size is 14 bits, the value range is 0-16383, and the size of the most supported transmission data segment is 16384 bytes; bit 10-bit 0 is used for storing frame _ index, the size is 11 bits, the value range is 0-2047, and 2048 data frames are supported to be transmitted at maximum.
CN202210803933.9A 2022-07-07 2022-07-07 Communication method supporting CAN bus to transmit data with more than 8 bytes Active CN115174307B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210803933.9A CN115174307B (en) 2022-07-07 2022-07-07 Communication method supporting CAN bus to transmit data with more than 8 bytes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210803933.9A CN115174307B (en) 2022-07-07 2022-07-07 Communication method supporting CAN bus to transmit data with more than 8 bytes

Publications (2)

Publication Number Publication Date
CN115174307A true CN115174307A (en) 2022-10-11
CN115174307B CN115174307B (en) 2024-10-15

Family

ID=83493405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210803933.9A Active CN115174307B (en) 2022-07-07 2022-07-07 Communication method supporting CAN bus to transmit data with more than 8 bytes

Country Status (1)

Country Link
CN (1) CN115174307B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560806A (en) * 2004-03-04 2005-01-05 深圳市泛海三江电子有限公司 Fire alarm application layer data transmission method based on CAN2.0B
US20100158045A1 (en) * 2008-12-23 2010-06-24 Electronics And Telecommunications Research Institute Method for transmitting/receiving data frame in can protocol
CN102664779A (en) * 2012-03-31 2012-09-12 航天东方红卫星有限公司 CAN bus data transmitting method
CN103620574A (en) * 2011-04-06 2014-03-05 罗伯特·博世有限公司 Method and device for increasing the data transmission capacity in a serial bus system
CN103649934A (en) * 2011-04-26 2014-03-19 罗伯特·博世有限公司 Method and device for serial data transmission which is adapted to memory sizes
CN107919947A (en) * 2017-11-28 2018-04-17 南瑞集团有限公司 A kind of coding method of CAN bus long message transmission

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1560806A (en) * 2004-03-04 2005-01-05 深圳市泛海三江电子有限公司 Fire alarm application layer data transmission method based on CAN2.0B
US20100158045A1 (en) * 2008-12-23 2010-06-24 Electronics And Telecommunications Research Institute Method for transmitting/receiving data frame in can protocol
CN103620574A (en) * 2011-04-06 2014-03-05 罗伯特·博世有限公司 Method and device for increasing the data transmission capacity in a serial bus system
CN103649934A (en) * 2011-04-26 2014-03-19 罗伯特·博世有限公司 Method and device for serial data transmission which is adapted to memory sizes
CN102664779A (en) * 2012-03-31 2012-09-12 航天东方红卫星有限公司 CAN bus data transmitting method
CN107919947A (en) * 2017-11-28 2018-04-17 南瑞集团有限公司 A kind of coding method of CAN bus long message transmission

Also Published As

Publication number Publication date
CN115174307B (en) 2024-10-15

Similar Documents

Publication Publication Date Title
US4332027A (en) Local area contention network data communication system
RU2596582C2 (en) Method and device for memory size adapted serial data transfer
US5132680A (en) Polling communication system with priority control
US9880956B2 (en) Method and apparatus for adapting the data transmission security in a serial bus system
RU2620989C2 (en) Method and apparatus for increasing throughput capacity in data transmission in serial bus system
CN104852825A (en) Bus communication test method and system
KR970009698B1 (en) Method of setting communication parameter of plc
Jang et al. Design framework for FlexRay network parameter optimization
CN104717257A (en) Method and device for transmitting data messages
US20080059671A1 (en) Data transfer method in a daisy chain arrangement
CN115174307A (en) Communication method for supporting CAN bus to transmit data with more than 8 bytes
CN106851814A (en) A kind of frame synchronization detection method and device
CN113220607A (en) Data processing method based on FIFO
US8320262B2 (en) Bus system and method and device for transmitting communications on a bus system
CN108347292A (en) A kind of the data decoding method and device of Physical Coding Sublayer
CN113079105B (en) Data transmission method, system, computer device and medium
CN113098667B (en) Data transmission method, system, computer device and medium
SU1521297A3 (en) System of asynchronous two-way communication between transmitting and receiving stations
JPH02100538A (en) Data communication method for local area network
EP2005665B1 (en) Method and device for data packet assembly
KR102683278B1 (en) Building automatic control system that communicates through a communication protocol structure that allows for precise control and expansion of input-output capacity
US20060031424A1 (en) Packet signal processing architecture
CN107229571B (en) Control method and system for FMMU in EtherCAT slave station
CN111742306B (en) Multiprocessor system and inter-processor communication method
CN110278177B (en) IP packet header detection method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20240626

Address after: No. 99 Zhenxing Road, Economic Development Zone, Hanshan County, Ma'anshan City, Anhui Province, 238101

Applicant after: Anhui Xiaojun Intelligent Equipment Co.,Ltd.

Country or region after: China

Address before: Room 1056, No. 19, Tianzhi Road, Hefei High-tech Development Zone, Hefei City, Anhui Province, 230000

Applicant before: Hefei Zhixingtong Intelligent Technology Co.,Ltd.

Country or region before: China

GR01 Patent grant