KR101748268B1 - Synchronization method of can communication and computer-readable medium storing program for executing the same - Google Patents

Synchronization method of can communication and computer-readable medium storing program for executing the same Download PDF

Info

Publication number
KR101748268B1
KR101748268B1 KR1020150156662A KR20150156662A KR101748268B1 KR 101748268 B1 KR101748268 B1 KR 101748268B1 KR 1020150156662 A KR1020150156662 A KR 1020150156662A KR 20150156662 A KR20150156662 A KR 20150156662A KR 101748268 B1 KR101748268 B1 KR 101748268B1
Authority
KR
South Korea
Prior art keywords
controller
local counter
value
synchronization
period
Prior art date
Application number
KR1020150156662A
Other languages
Korean (ko)
Other versions
KR20170054013A (en
Inventor
정기병
오상환
조현규
Original Assignee
현대자동차주식회사
기아자동차주식회사
주식회사 유라코퍼레이션
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 현대자동차주식회사, 기아자동차주식회사, 주식회사 유라코퍼레이션 filed Critical 현대자동차주식회사
Priority to KR1020150156662A priority Critical patent/KR101748268B1/en
Publication of KR20170054013A publication Critical patent/KR20170054013A/en
Application granted granted Critical
Publication of KR101748268B1 publication Critical patent/KR101748268B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors
    • H04L7/0033Correction by delay
    • 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/40006Architecture of a communication node
    • H04L12/40026Details regarding a bus guardian
    • 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
    • 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/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

A synchronization method of CAN communication capable of operating simultaneously in a controller that performs CAN communication, and a computer-readable medium having recorded thereon a program for executing the same.
To this end, the present embodiment provides a mechanism for establishing time synchronization through two control period time delays and time correction, and provides a mechanism for achieving operation synchronization based on time synchronization.

Description

BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of synchronizing a CAN communication and a computer readable medium having recorded thereon a program for executing the method.

The present invention relates to a synchronization method of CAN communication and a computer readable medium having recorded thereon a program for executing the same, and more particularly to a synchronization method of CAN communication capable of operating simultaneously in a controller for CAN communication, Readable medium having recorded thereon a program.

Recent automotive design trends tend to be designed to minimize harnesses. As a representative example, a control period synchronization design for CAN communication can be mentioned. Control period synchronization has been discussed in two respects.

That is, first, two controllers of the existing system need to connect hardwires in order to operate simultaneously. In order to operate the second controller on the same CAN communication at the same time, a high priority message or event message Two control periods were synchronized with each other.

However, the above-mentioned first is that the physical connection is increased due to the additional physical connection, and additional air traffic is required at the time of production, especially when a function requiring synchronization is added.

The second is that the high priority messages or event messages are limited in use, and when the functions of synchronization are increased, overload due to the bus load occurs.

It is an object of the present invention to provide a synchronization method of CAN communication capable of realizing synchronization of any two control period local counters that make CAN communication, and a computer readable medium having recorded thereon a program for executing the same.

It is another object of the present invention to provide a synchronization method of CAN communication capable of realizing synchronization of two control period operation signals for AN communication and a computer readable medium having recorded thereon a program for executing the same.

According to one embodiment, there is provided a method for synchronizing a local counter in a controller for at least one CAN communication having different local counters, comprising the steps of: providing a first local counter value (T1) Message to a second controller that is a synchronization reference of the local counter; And transmits a second local counter value (T2) generated at the reception time of the second controller and a third local counter value (T3) generated at the time of transmission to the first controller in a response message to the first controller step; A local counter synchronization (T3) of the second controller using the fourth local counter value (T4) generated at the time of receiving the third local counter value (T3) and the obtained first, second, Calculating a correction value required for the first controller; And synchronizing the first controller and the second control period local counter through the calculated correction value.

The synchronization method further includes calculating the delay value generated between the first controller and the second controller in the first controller using the first, second, third and fourth local counter values can do.

The delay value D can be calculated by the following equation (1).

D = [(T4 - T1) - (T3 - T2)

The correction value may be used to synchronize to the local counter of the second controller by adding an offset calculated by the following equation (2) to the local counter of the first controller.

offset = [(T2 - T1) + (T3 - T4)] /

The synchronizing step may include synchronizing the first local counter value T1 with the fourth local counter value T4 by one period X and when the period is maintained for N times, If the delay value is large, the delay value and the offset generated in each of the N times of the corresponding times can be excluded.

The synchronizing step may exclude a local counter value having a delay value of 1.5 times or more by calculating an average of the N delay values when the period is maintained for N times.

The first controller may be a slave controller, and the second controller may be a master controller.

According to one embodiment, the first controller transmits a first periodic message including an Oxff value to a second controller; Transmitting a second periodic message including a periodic synchronization value (S) to the second controller after transmitting the first periodic message; Operating the control object in the first controller according to a period set when the local counter value of the first controller and the Oxff is the second periodic message; And operating the control object in the second controller according to the period when the second periodic message received from the first controller is not Oxff and the local counter value & Oxff is a second periodic message Provides a synchronization method of CAN communication.

The period synchronization value S can be calculated by the following equation (3).

S = ((Local counter value% Oxff of the first controller) + (predetermined message period value * 1.5)) (3)

The predetermined message period value may be 100 ms.

The first periodic message and the second periodic message may be 8-bit messages.

The first controller may be a slave controller, and the second controller may be a master controller.

According to one embodiment, there is provided a method comprising: maintaining an event message including an Off value in a third controller; Transmitting the event message including an event variable (TxTime) having a local counter value of the third controller to the fourth controller when the event message is ON; Operating the control object according to a predetermined period in the first controller when the delay value (D) as the delay time of the third controller and the fourth control period + TxTime is the local counter value; And operating the control object according to the appointed period immediately after receiving the event message from the fourth controller.

The delay value D can be calculated by the following equation (4).

D = [(T4 - T1) - (T3 - T2)

Wherein T1 is a first local counter value of the third controller generated upon transmission from the third controller to the fourth controller and T2 is a second local counter value of the second controller of the fourth controller generated upon reception of the first local counter value, T3 is a third local counter value of the fourth controller generated at the time of transmitting to the third controller and T4 is a local counter value of the third controller generated at the time of receiving the third local counter value, May be a fourth local counter value.

The event message may be a 2-bit message.

The third controller may be a slave controller, and the fourth controller may be a master controller.

As described above, the present embodiment does not need to add and / or change hardware when any two control period time synchronization and / or operation synchronization are performed.

In addition, this embodiment enables high-precision time synchronization. For example, it is possible to synchronize clocks within the error range of several tens of milliseconds in the Internet environment.

In addition, the present embodiment can implement time synchronization without greatly modifying the structure of existing periodic messages.

In addition, this embodiment can reduce the cost of using hardwires for operation synchronization when the front / back distance is long, such as truck / bus.

The effects described above are not limited to the effects mentioned above, and other effects not mentioned can be clearly understood by those skilled in the art from the following description.

BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention. However, the technical features of the present embodiment are not limited to the specific drawings, and the features disclosed in the drawings may be combined with each other to constitute a new embodiment.
1 is a flowchart showing an example of a synchronization method of CAN communication according to the first embodiment.
FIG. 2 is a diagram illustrating a flow of a control period synchronization signal for performing the synchronization method of the CAN communication of FIG.
3 is a diagram illustrating an example of a synchronization method of CAN communication according to the second embodiment.
4 is a diagram illustrating a flow of a control period synchronization signal for performing the synchronization method of the CAN communication of FIG.
5 is a diagram illustrating an example of a synchronization method of CAN communication according to the third embodiment.
6 is a diagram illustrating a flow of a control period synchronization signal for performing the synchronization method of CAN communication of FIG.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout.

It is to be understood that the terms used in the following examples are used only to illustrate specific embodiments, and are not intended to be limiting.

For example, although the terms including ordinals such as 'first' and 'second' described in the following embodiments can be used to describe various elements, the elements are not limited by the terms . The terms are used to distinguish one component from another.

It is also to be understood that the singular forms "a" and "an" used in the description of the various embodiments described and in the claims are intended to include the plural forms as well, unless the context clearly dictates otherwise.

It is also to be understood that the term " and / or " disclosed in the following embodiments includes any and all possible combinations of one or more of the listed related items.

Furthermore, terms such as " comprising "or" having ", such as those disclosed in the following embodiments, mean that a component can be implanted unless specifically stated otherwise, But should be understood to include additional elements.

Based on this, the local counters disclosed in the following embodiments refer to linearly increasing counters (having different initial values of different local counters) in each controller. For example, the Tick Timer or OsTimer of each controller need not be the same.

Hereinafter, the synchronization method of the CAN communication performed in the controller in the vehicle having the initial values of the different local counters will be described in detail.

≪ Embodiment 1 >

FIG. 1 is a flowchart illustrating an example of a synchronization method of a CAN communication according to the first embodiment, and FIG. 2 is a diagram illustrating a flow of a control period synchronization signal for performing the synchronization method of the CAN communication of FIG.

Fig. 2 will be referred to as supplementary when describing Fig.

Referring to FIG. 1, the method for synchronizing CAN communication according to the first embodiment may include steps 110 to 150 for synchronizing a local counter in at least one controller having different local counters.

The controller may be configured as at least one controller 200 in a vehicle that carries out CAN communication with each other as shown in FIG. It is assumed that at least one controller 200 is composed of one second controller 220 and the remaining plurality of first controllers 210.

First, in step 110, the first controller 210 transmits a first local counter value T1 generated at a transmission time to the second controller 220 before transmitting the period message 201 to the second controller 220, To the second controller 220 through the CAN communication by loading it in the periodic message 201.

For example, as in FIG. 2, the period message 201 of the MSG A may be transmitted to the second controller 220 with a first local counter value of 100 ms.

The first controller 210 may store the generated first local counter value T1 in a memory.

The first controller 210 may be a slave controller, and the second controller 220 may be a master controller.

It is therefore aimed to adjust and synchronize the local counters of the slave controllers to the local counter of the master controller. That is, the second controller 220 may be a synchronization reference for the local counter of the first controller 210.

In step 120, the second controller 220 receives the periodic message 201 including the first local counter value T1 from the first controller 210 via the CAN communication, and transmits the second local counter value T2 .

This second controller 220 may store a periodic message 201 containing a first local counter value (T1) in the memory.

In operation 120, the second controller 220 may transmit a response message 202 to the first controller 210 in response to the periodic message 201 received from the first controller 210. The first controller 210 To the first controller 210 via the CAN communication, the response message 202 including the third local counter value T3 generated at the time of transmitting the first local counter value T3.

At this time, the response message 202 may be transmitted to the first controller 210 including the third local counter value T3 as well as the second local counter value T2 stored in the memory.

For example, as shown in FIG. 2, the MSG B response message 202 is transmitted to the first controller 210 with a second local counter value T2 of 350 ms and a third local counter value T3 of 353 ms .

Accordingly, the first controller 210 receives the response message 202 including the second local counter value T2 and the third local counter value T3 from the second controller 220.

Meanwhile, the third local counter value T3 generated in the second controller 220 may be stored in the memory.

The memory may be a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory), a RAM Random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read- , And an optical disc.

However, it is not so limited, and for example, the memory may be a buffer or a virtual memory.

In addition, the above-described memory may be present in the second controller 220 or may be an external memory electrically connected to the second controller.

In operation 130, the first controller 210 may generate a fourth local counter value T4 at the time of receiving the third local counter value T3. The generated fourth local counter value T4 may be stored in the memory.

For example, as in FIG. 2, a fourth local counter value of 125 ms may be stored in the memory.

The first controller 210 uses the first local counter value stored in the memory and the fourth local counter value T4 and the second local counter value and the third local counter value received from the second controller 220 The correction value necessary for synchronization of the local counter of the second controller 220 can be calculated.

The correction value may mean a result obtained by adding the offset calculated by the following equation (1) to the value of the local counter of the first controller 210. [ This correction value calculation makes it possible to have the same local counter as that of the second controller 220.

offset = [(T2 - T1) + (T3 - T4)] /

For example, as shown in Fig. 2, the offset may be a value of [(125 ms - 100 ms) + (353 ms - 125 ms)] = 239 ms.

Similarly, other first controllers 210 connected to the same CAN communication node may have the same local counter value as the second controller through the above-described correction value calculation.

Accordingly, in step 140, the first controllers 210 may all be time synchronized (clock synchronized) in accordance with the local counter of the second controller 220, which is a synchronization reference, through the aforementioned correction value.

In step 150, the first controller 210 calculates a delay time between the first controller 210 and the second controller 220 using the first local counter, the second local counter, the third local counter, The delay value D can be calculated.

Here, the delay value D can be calculated by the following equation (2).

D = [(T4-T1) - (T3-T2)] (2)

For example, as shown in FIG. 2, the delay value D may be [(125 ms-100 ms) - (353 ms-350 ms) = 22 ms.

In this case, in step 140, the first controller 210 has one period X between the first local counter value T1 and the fourth local counter value T4, and the period X is N times If it is determined that the delay value already calculated is larger than the period X, the delay value and the offset generated at each corresponding N times of the delay can be excluded.

The reason for excluding the delay value and the offset is to prevent the local counter synchronization between the first controller 210 and the second controller 220 from being performed.

Further, in step 140, when the period X is maintained for N times as described above, the first controller 210 calculates the average of the delay values for N times and determines that the delay value is 1.5 times or more A local counter value having a delay value of 1.5 times or more can be excluded to prevent asynchronism.

As such, the present embodiment can synchronize the local counter of the first controller 210 with respect to the local counter of the second controller 220, for example, so that at least one control period time synchronization can be performed. The time synchronization of these controllers can be applied to various objects.

For example, the time synchronization of the controllers can be applied to objects in the vehicle such as turn signal lamps, LED lamps.

However, although the object can be controlled through the time synchronization of the controllers described above, operation synchronization with respect to the object is not practically performed.

Therefore, in the following, operation synchronization based on some or all of the above-described time synchronization will be described in more detail.

≪ Embodiment 2 >

FIG. 3 is a diagram illustrating an example of a synchronization method of CAN communication according to the second embodiment, and FIG. 4 is a diagram illustrating a flow of a control period synchronization signal for performing the CAN communication synchronization method of FIG.

As shown in the figure, the CAN communication synchronization method 300 according to the second exemplary embodiment may include steps 210 to 240 for controlling the control object 403 through synchronization during the control period operation.

The controller may be configured as at least one controller 400 in the vehicle that carries out CAN communication with each other as shown in FIG. It is assumed that at least one controller 400 is composed of one second controller 420 and the remaining plurality of first controllers 410.

First, in step 310, the first controller 410 may transmit a first period message 401 including a normal Oxff value to the second controller 420. For example, the first period message 401 may be transmitted to the second controller 420 at a period of 100 ms.

The first controller 410 may be a slave controller, and the second controller 420 may be one master controller.

Accordingly, it is an object of the present invention to provide an operation synchronization for a periodic message exchanged between slave controllers according to a local counter of a master controller. The second controller 420 may be set as a synchronization reference for the periodic message of the first controller 410. [

In step 320, the first controller 410 periodically transmits the first period message 401 to the second controller 420, and then performs a second period message 402 including the period synchronization value S To the second controller 420 when there is a job.

The period synchronization value S may be calculated by the following equation (3).

S = ((Local counter value% Oxff of the first controller) + (predetermined message period value * 1.5)) (3)

At this time, the predetermined message period value is preferably 100 ms.

The first periodic message 401 and the second periodic message 402 received by the second controller 420 may be stored in a memory. The first periodic message and the second periodic message stored in the memory may be 8-bit messages.

The memory may be a flash memory type, a hard disk type, a multimedia card micro type, a card type memory (e.g., SD or XD memory), a RAM Random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read- , And an optical disc.

However, it is not so limited, and for example, the memory may be a buffer or a virtual memory.

In addition, the above-described memory may be present in the second controller 420 and may be an external memory in the vehicle electrically connected to the second controller.

Accordingly, in step 330, the first controller 410 determines whether the local counter value & Oxff of the first controller is the period synchronization value of the second period message (C_Hazard, 402) 403, e.g., a turn signal lamp.

For example, when the [(local counter value) & Oxff) == C_Hazard, the first controller 410 can operate the turn signal lamp according to the predetermined period.

That is, when C_Hazard has a period of 100 ms, the first controller 410 can operate the turn signal lamp at a time of 100 ms * 1.5 that will occur later.

The local counter value of the first controller 410 may be a value generated for the time synchronization described in Figures 1 and 2. [

In step 340, the second controller 420 determines that the second periodic message (C_Hazard, 402) received from the first controller 410 is not the Oxff stored in the memory and the local counter value & Oxff is the second periodic message 402 The control object 403 can be operated in accordance with a predetermined period (an appointed period).

For example, when the C_Hazard is received from the first controller 410, the second controller 420 determines whether C_Hazard is not 0xff stored in the memory ([local counter value] & 0xff) == C_Hazard You can operate the Hazard lamp accordingly.

 That is, when C_Hazard has a period of 100 ms, the second controller 410 can operate the turn signal lamp according to the predetermined period at 100 ms * 1.5.

The local counter value of the second controller 420 may be a value generated for the time synchronization described in Figures 1 and 2. [

However, when the above-mentioned determination condition is not satisfied, it can be considered that the operation synchronization between the first controller 410 and the second controller 420 is not performed.

As described above, in this embodiment, after the time synchronization between the first controller 410 and the second controller 420 is partially or completely performed, a periodic message transmitted between the first controller 410 and the second controller 420 So that the control object can be stably operated.

≪ Third Embodiment >

FIG. 5 is a diagram illustrating an example of a synchronization method of the CAN communication according to the third embodiment, and FIG. 6 is a diagram illustrating a flow of a control period synchronization signal for performing the CAN communication synchronization method of FIG.

As shown, the method 500 for synchronizing the CAN communication according to the third exemplary embodiment may include steps 510 through 540 for synchronizing operation of the event message transmitted during the control period.

The controller may be configured as at least one controller 600 in a vehicle that carries CAN communication with each other as shown in FIG. It is assumed that at least one controller 600 is composed of one second controller 620 and the remaining plurality of first controllers 610.

First, in step 510, the third controller 610 may maintain an event message 501 including an Off value, for example, a value of '0'.

The event message 501 may include an event variable TxTime having a local counter value of the third controller 610. [ The event message 501 may have a 2-bit size.

In step 520, the third controller 610 transmits an event message (C_Hazard, 501) including an event variable (TxTime) having a local counter value of the third controller 510 when the held event message 501 is turned on ) To the fourth controller 520. [

In other words, the third controller 610 can transmit the event message 501 to the fourth controller 620 while storing the local counter value of the third controller 610 in the event variable TxTime.

For example, upon receipt of the C_Hazard input, the third controller 610 may transmit to the fourth controller 620 if C_Hazard = 1 (ON).

The mentioned third controller 610 may be slave controllers and the fourth controller 620 may be one master controller.

Thus, it is intended to synchronize the operation of the event message 501 of the slave controllers to the local counter of the master controller. That is, the fourth controller 620 may be a synchronization reference for the event message 501 of the third controller 610.

In step 530, when the delay value D (sync_delay_time) + TxTime, which is the delay time between the third controller 610 and the fourth controller 620, is a local counter value, the third controller 610 controls the control object 601 It can be operated according to the cycle.

The delay value may be a delay time for synchronization of operations between the third controller 610 and the fourth controller 620. [

When the control object 601 is a turn signal lamp, the operation of the turn signal lamp may be an operation related to flashing.

For example, the third controller 610 may blink the Hazard lamp at a predetermined cycle from when TxTime + (sync_delay_time / 2) == [local counter].

Here, the delay value D (sync_delay_time) can be calculated by the following equation (4).

D = [(T4 - T1) - (T3 - T2)

T1 is a first local counter value of the third controller 610 generated upon transmission from the third controller 610 to the fourth controller 620 and T2 is a fourth local counter value of the fourth local counter value May be the second local counter value of the controller 620. [

T3 is a third local counter value of the fourth controller 620 generated at the time of transmission to the third controller 610, and T4 is a third local counter value of the third controller 610 ) ≪ / RTI >

Since this example has been described in detail in Figs. 1 and 2, a more detailed description will be omitted. However, it goes without saying that the present invention is also applied to this embodiment.

As described above, it is preferable that the present embodiment performs the operation synchronization between the third controller 610 and the fourth controller 620 based on the time synchronization described with reference to FIG. 1 and FIG.

In operation 540, the fourth controller 620 may operate the control object 601 in accordance with a predetermined period immediately after receiving the event message 501 in operation 520.

The mentioned event message 501 is preferably a 2-bit message for more accurate operation synchronization.

In this way, it is possible to achieve an operation synchronization between the third controller 610 and the fourth controller 620 through synchronization of the delay value of the third controller 610.

The CAN communication synchronization method described above can be implemented in the form of program instructions that can be executed through various computer components and recorded in a computer-readable medium.

The computer readable medium may be any medium accessible by the processor. Such media can include both volatile and nonvolatile media, removable and non-removable media, storage media, and computer storage media.

delete

The storage medium may be any type of storage medium such as RAM, flash memory, ROM, EPROM, electrically erasable read only memory ("EEPROM"), registers, hard disk, removable disk, compact disk read only memory Or any other type of storage medium.

Computer storage media includes removable and non-removable, nonvolatile, and nonvolatile storage media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data, Volatile media.

Such computer storage media may be embodied as program instructions, such as RAM, ROM, EPROM, EEPROM, flash memory, other solid state memory technology, CDROMs, digital versatile disks (DVDs) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage, Lt; RTI ID = 0.0 > and / or < / RTI >

Examples of program instructions may include machine language code such as those produced by a compiler, as well as high-level language code that may be executed by a computer using an interpreter or the like.

While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the exemplary embodiments or constructions. You can understand that you can do it. The embodiments described above are therefore to be considered in all respects as illustrative and not restrictive.

0, 400, 600: controller 210, 410: first controller
220, 420: second controller 610: third controller
620: fourth controller 403, 601:
201: Periodic message 202: Response message
401: first period message 402: second period message
501: Event message

Claims (17)

CLAIMS 1. A method for synchronizing a local counter in at least one CAN communication controller having a different local counter,
Transmitting a first local counter value (T1) generated at a transmission time point of a first controller to a second controller, which is a synchronization reference of the local counter, in a periodic message;
And transmits a second local counter value (T2) generated at the reception time of the second controller and a third local counter value (T3) generated at the time of transmission to the first controller in a response message to the first controller step;
A local counter synchronization (T3) of the second controller using the fourth local counter value (T4) generated at the time of receiving the third local counter value (T3) and the obtained first, second, Calculating a correction value required for the first controller;
Computing in the first controller a delay value generated between the first controller and the second controller using the first, second, third and fourth local counter values; And
Synchronizing the first controller and the second control period local counter through the calculated correction value and the delay value
/ RTI >
Wherein synchronizing the first controller and the second control period local counter comprises:
Wherein the first controller has a second reference time point by adding the delay value to a predetermined first reference time point and the second controller uses the correction value to have the second reference time point have a synchronization point;
/ RTI >
The delay value D is calculated by the following equation (1)
D = [(T4 - T1) - (T3 - T2)
Wherein the correction value is used to synchronize to the local counter of the second controller by adding an offset calculated by the following equation (2) to the local counter of the first controller:
offset = [(T2 - T1) + (T3 - T4)] /
Synchronization method of CAN communication.
delete delete delete The method according to claim 1,
Wherein the synchronizing comprises:
When the period between the first local counter value T1 and the fourth local counter value T4 is one period X and the period is maintained for N times and the delay value is larger than the period X And eliminating the delay value and the offset generated in each of the N times of the corresponding times.
6. The method of claim 5,
Wherein the synchronizing comprises:
And if the period is maintained for N times, calculating an average of the N times of delay values to exclude a local counter value having a delay value of 1.5 times or more.
The method according to claim 1,
Wherein the first controller is a slave controller and the second controller is a master controller.
A computer-readable medium having recorded thereon a program for executing the synchronization method of CAN communication according to any one of claims 1, 5,
delete delete delete delete delete delete delete delete delete
KR1020150156662A 2015-11-09 2015-11-09 Synchronization method of can communication and computer-readable medium storing program for executing the same KR101748268B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150156662A KR101748268B1 (en) 2015-11-09 2015-11-09 Synchronization method of can communication and computer-readable medium storing program for executing the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150156662A KR101748268B1 (en) 2015-11-09 2015-11-09 Synchronization method of can communication and computer-readable medium storing program for executing the same

Publications (2)

Publication Number Publication Date
KR20170054013A KR20170054013A (en) 2017-05-17
KR101748268B1 true KR101748268B1 (en) 2017-06-16

Family

ID=59048734

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150156662A KR101748268B1 (en) 2015-11-09 2015-11-09 Synchronization method of can communication and computer-readable medium storing program for executing the same

Country Status (1)

Country Link
KR (1) KR101748268B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102103292B1 (en) 2019-09-04 2020-04-22 콘티넨탈 오토모티브 시스템 주식회사 Electric control unit commnication apparatus for vehicle
CN111106987A (en) * 2019-11-27 2020-05-05 珠海广通汽车有限公司 CAN message sending method, device, storage medium and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004266599A (en) * 2003-03-03 2004-09-24 Mitsubishi Electric Corp Transmitting side terminal and receiving side terminal
KR100900067B1 (en) * 2007-12-13 2009-06-01 한국전자통신연구원 Apparatus and method for clock synchronization
JP5391964B2 (en) * 2009-09-28 2014-01-15 沖電気工業株式会社 Clock synchronization method and packet communication system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004266599A (en) * 2003-03-03 2004-09-24 Mitsubishi Electric Corp Transmitting side terminal and receiving side terminal
KR100900067B1 (en) * 2007-12-13 2009-06-01 한국전자통신연구원 Apparatus and method for clock synchronization
JP5391964B2 (en) * 2009-09-28 2014-01-15 沖電気工業株式会社 Clock synchronization method and packet communication system

Also Published As

Publication number Publication date
KR20170054013A (en) 2017-05-17

Similar Documents

Publication Publication Date Title
US10327215B2 (en) Synchronization control method within wireless network, wireless network and smart home device
US8321612B2 (en) Method and device for synchronizing two bus systems by transmission of a time associated trigger signal from one system to another
US10284692B2 (en) Control device and communication device
US20180287688A1 (en) Communication system, time synchronization method, and radio relay device
KR102291573B1 (en) Synchronization method and system among multiple MCUs in EtherCAT-based slave system
US20180302461A1 (en) Method and system for synchronizing robot with server
US8935511B2 (en) Determining processor offsets to synchronize processor time values
US20160313782A1 (en) Method and system of sharing a pin of a chip
US20160147568A1 (en) Method and apparatus for data transfer to the cyclic tasks in a distributed real-time system at the correct time
KR101748268B1 (en) Synchronization method of can communication and computer-readable medium storing program for executing the same
US20190253497A1 (en) Control device, control system, control method, and non-transitory computer-readable storage medium
KR101466501B1 (en) Apparatus for controlling network traffic
US20160308663A1 (en) Method for time synchronization
CN113014352B (en) Equipment time synchronization method and device based on fiber channel protocol
CN109660310B (en) Clock synchronization method and device, computing equipment and computer storage medium
KR20170135384A (en) Apparatus for distributed clock synchronization based on EtherCAT, method thereof and computer recordable medium storing the method
CN103986601A (en) Message transmission delay obtaining method and device
CN111726185A (en) Method for synchronizing system clocks of external device and local computing device
JP6400553B2 (en) Numerical control system with synchronous control function between units
CN111010339A (en) Enterprise-level high-performance API service gateway design method
CN108398151B (en) Sensor control device and sensor system
CN111726186B (en) Synchronous configuration method of embedded chip and external equipment and embedded chip
KR101498561B1 (en) System and method for can communication based tdma digital technology for global synchronization
WO2012093874A3 (en) Network system
CN110442475B (en) Method and device for realizing distributed consistency group and DRM (digital rights management) equipment

Legal Events

Date Code Title Description
A201 Request for examination
GRNT Written decision to grant