CN115622832A - CAN communication time-sharing multiplexing control method, device, terminal and storage medium - Google Patents

CAN communication time-sharing multiplexing control method, device, terminal and storage medium Download PDF

Info

Publication number
CN115622832A
CN115622832A CN202211183472.6A CN202211183472A CN115622832A CN 115622832 A CN115622832 A CN 115622832A CN 202211183472 A CN202211183472 A CN 202211183472A CN 115622832 A CN115622832 A CN 115622832A
Authority
CN
China
Prior art keywords
path
bus network
network
time
service
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.)
Pending
Application number
CN202211183472.6A
Other languages
Chinese (zh)
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.)
Suzhou Hager Electric Control Co ltd
Original Assignee
Suzhou Hager Electric Control 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 Suzhou Hager Electric Control Co ltd filed Critical Suzhou Hager Electric Control Co ltd
Priority to CN202211183472.6A priority Critical patent/CN115622832A/en
Publication of CN115622832A publication Critical patent/CN115622832A/en
Pending legal-status Critical Current

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/40006Architecture of a communication node
    • 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)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application relates to a CAN communication time-sharing multiplexing control method, a device, a terminal and a storage medium, which belong to the technical field of communication, wherein the method comprises the following steps: respectively calculating to obtain the minimum service time slice of each path of bus network, and summarizing to obtain the total service duration; collecting and updating the network load of each path of CAN bus network, and summarizing to obtain a total network load; respectively calculating the service proportion of each path of CAN bus network; and respectively calculating the service time of each path of CAN bus network and realizing the time-sharing multiplexing of the CAN bus. The CAN communication module realizes time-sharing multiplexing of the CAN communication module, utilizes chip resources to the maximum extent, enables the control chip with low specification to meet the requirement that a plurality of devices are simultaneously accessed into CAN bus communication, and effectively controls hardware cost.

Description

CAN communication time-sharing multiplexing control method, device, terminal and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, a terminal, and a storage medium for controlling time division multiplexing of CAN communications.
Background
A CAN (Controller Area Network) bus is a serial communication Network that effectively supports distributed control and real-time control, CAN use twisted pair wires to transmit signals, and is one of the most widely used field buses internationally at present. The CAN bus is a multi-master serial communication bus, generally comprises a CAN communication module, a CAN transceiver and a CAN bus network, and has the advantages of simple structure, high bit rate, gao Kangdian sub-interference, low implementation cost and the like.
During the use of the CAN bus, the load factor is an important parameter for evaluating the operating state thereof. In particular, the load factor is characterized by the ratio of the "bit stream" on the CAN bus per unit time to the bus bandwidth, i.e. the ratio of the actual data transmission rate of the CAN bus to the theoretically achievable data transmission rate. However, after a long-term practical summary, technicians find that the CAN bus is not suitable for long-term load operation in practical application, and if the CAN bus is required to be stably used for a long time, the load rate of the CAN bus needs to be controlled to be not more than 60%.
With various control systems becoming more complicated, more and more devices support CAN bus communication, which may cause problems such as too high load rate on a single CAN bus, generation of error frames, and data interruption. In order to avoid the above problems, at least two CAN buses are commonly provided in various control systems at the present stage, which means that at least two CAN communication modules need to be provided in corresponding control chips. Therefore, a system user is required to purchase a control chip with higher specification and more CAN communication modules, and the hardware cost is undoubtedly greatly increased by combining the current situation that chips at home and abroad are in short supply.
Therefore, how to provide a communication technical scheme capable of fully utilizing chip resources and realizing time-sharing multiplexing of the CAN communication module in the control chip becomes a problem to be solved urgently by technical personnel in the field.
Disclosure of Invention
In order to fully utilize chip resources and realize the time-sharing multiplexing of a CAN communication module in a control chip, the application provides a CAN communication time-sharing multiplexing control method, a device, a terminal and a storage medium.
In a first aspect, the present application provides a CAN communication time-sharing multiplexing control method, which adopts the following technical scheme:
a CAN communication time-sharing multiplexing control method is suitable for a one-to-many CAN communication architecture, the one-to-many communication architecture comprises a CAN communication module and a plurality of CAN transceivers matched with the CAN communication module, the CAN communication module is selectively and electrically connected with the plurality of CAN transceivers through a controlled switch unit, signal transmission CAN be realized with any CAN transceiver by means of the controlled switch unit and the CAN communication module, and each CAN transceiver is electrically connected with a CAN bus network, the method comprises the following steps:
respectively calculating to obtain the minimum service time slice of each path of the CAN bus network, and summarizing and summing to obtain the total service time length;
acquiring and updating the network load of each path of the CAN bus network according to a preset load sampling frequency, and summarizing and summing to obtain a total network load;
respectively calculating the service proportion of each path of the CAN bus network according to the total network load and the network load of each path of the CAN bus network;
respectively calculating the service time of each corresponding path of CAN bus network according to the total service time and the service proportion of each path of CAN bus network;
and adjusting the on-time between the controlled switch unit and each corresponding path of CAN transceiver according to the service time of each path of CAN bus network.
By adopting the technical scheme, the single CAN communication module in the control chip CAN be selectively and electrically connected with the plurality of CAN transceivers according to actual use requirements, time-sharing multiplexing of the CAN communication module is realized, chip resources are utilized to the maximum extent, the control chip with low specification CAN meet the requirement that a plurality of devices are simultaneously connected into CAN bus communication, and hardware cost is effectively controlled.
Preferably, the step of calculating respectively to obtain the minimum service time slice of each path of the CAN bus network, and summing up to obtain the total service duration specifically includes the following steps:
acquiring all transmission periods in any one path of CAN bus network, taking the greatest common divisor of all the transmission periods as the minimum service time slice of the path of CAN bus network, and repeating the step until the minimum service time slice of each path of CAN bus network is obtained;
summarizing the obtained minimum service time slices of each path of CAN bus network, and calculating to obtain the total service time, wherein the calculation formula is
T=∑ti,
Wherein, T represents a total service duration, ti represents a minimum service time slice of the ith CAN bus network, i =1,2,3.
Preferably, the network load of each path of the CAN bus network is acquired and updated according to a preset load sampling period, and the total network load is obtained through summation, which specifically includes the following steps:
setting load sampling frequency, acquiring and updating the network load of each path of the CAN bus network according to the load sampling frequency, recording the time spent on the current load sampling, and performing cumulative calculation to obtain the total time spent on the load sampling at the current moment;
when the total time spent on load sampling at the current moment exceeds the total service time, acquiring and recording the network load of each path of the CAN bus network at the current moment;
summarizing the acquired network load of each path of the CAN bus network, and calculating to obtain a total network load, wherein the calculation formula is
K=∑ki,
Wherein K represents a total network load, ki represents a network load of the ith path of the CAN bus network, i =1,2,3.
Preferably, the service proportion of each path of the CAN bus network is obtained by calculating according to the total network load and the network load of each path of the CAN bus network, and the calculation formula is as follows:
Ri=ki/K,
ri represents the service proportion of the ith CAN bus network, i =1,2,3.
Preferably, the service time of each path of the CAN bus network is obtained by calculating according to the total service duration and the service proportion of each path of the CAN bus network, and the calculation formula is as follows:
Ti=T*Ri,
wherein Ti represents a service time of the i-th CAN bus network, i =1,2,3.
Preferably, the adjusting of the on-time between the controlled switch unit and each corresponding path of the CAN transceiver according to the service time of each path of the CAN bus network specifically includes the following steps:
determining the corresponding connection time of the CAN bus network according to the service time of each path of the CAN bus network, wherein the service time is consistent with the connection time in the same path of the CAN bus network;
and controlling the on-off action of the controlled switch unit to enable the CAN transceiver corresponding to each CAN bus network and the CAN communication module to be kept on according to the on-time, and disconnecting after the on-time is exceeded.
By adopting the technical scheme, the specific steps of the CAN communication time-sharing multiplexing control method are further defined, so that the service time of each path of CAN bus network is specifically defined, and an accurate basis is provided for the subsequent time-sharing multiplexing control.
In a second aspect, the present application provides a CAN communication time-sharing multiplexing control device, which adopts the following technical scheme: a CAN communication time-sharing multiplexing control device is suitable for a one-to-many CAN communication architecture, the one-to-many communication architecture comprises a CAN communication module and a plurality of CAN transceivers matched with the CAN communication module, the CAN communication module is selectively and electrically connected with the CAN transceivers through a controlled switch unit, signal transmission CAN be realized between the CAN communication module and any CAN transceiver by means of the controlled switch unit, and each CAN transceiver is electrically connected with a CAN bus network, the device comprises the following modules:
the service duration acquisition module is configured to respectively calculate and obtain the minimum service time slice of each path of the CAN bus network, and sum the minimum service time slices to obtain the total service duration;
the network load acquisition module is configured to acquire and update the network load of each path of the CAN bus network according to a preset load sampling frequency, and sum the network loads to obtain a total network load;
the service proportion determining module is configured to respectively calculate the service proportion of each path of the CAN bus network according to the total network load and the network load of each path of the CAN bus network;
the service time determining module is configured to respectively calculate the service time of each path of the CAN bus network according to the total service time and the service proportion of each path of the CAN bus network;
and the switch control execution module is configured to adjust the on-time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network.
By adopting the technical scheme, the CAN communication module is matched with a one-to-many CAN communication framework, a set of complete communication control system is set up together, and necessary software and hardware technical support is provided for time division multiplexing of the CAN communication module.
In a third aspect, the present application provides an intelligent terminal, which adopts the following technical scheme:
an intelligent terminal comprises a memory and a processor, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the memory, and the at least one instruction, at least one program, the code set or the instruction set is loaded and executed by the processor to realize the CAN communication time division multiplexing control method.
In a fourth aspect, the present application provides a computer-readable storage medium, which adopts the following technical solutions:
a computer readable storage medium having stored therein at least one instruction, at least one program, set of codes, or set of instructions, which is loaded and executed by a processor to implement the CAN communication time division multiplexing control method as described above.
In summary, the present application at least includes the following beneficial effects:
the CAN communication module is combined with a one-to-many CAN communication architecture, a set of complete communication control system is utilized to enable a single CAN communication module in a control chip to be selectively and electrically connected with a plurality of CAN transceivers according to actual use requirements, time-sharing multiplexing of the CAN communication module is realized, and on-chip resources of the control chip are utilized to the maximum extent; the method and the device have the advantages that the simultaneous access of multiple devices to the CAN bus for communication is guaranteed, the respective functions of the devices are realized, and meanwhile the hardware cost of a system user is reduced as much as possible.
Meanwhile, the technical support is provided for the expansion of CAN communication resources, reference is provided for the function expansion on the premise of limited chip resources, and technicians in the industry CAN adjust the number of CAN transceivers corresponding to a single CAN communication module and apply a low-specification control chip to a complex function scene by combining actual use requirements on the basis of the technical idea of the application, thereby further expanding the possibility of realizing the scheme.
Drawings
Fig. 1 is a schematic diagram of a virtual network switch circuit applying a one-to-many CAN communication architecture.
Fig. 2 is a schematic flow chart of a CAN communication time division multiplexing control method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a CAN communication time division multiplexing control device according to an embodiment of the present application.
Detailed Description
The present application provides a method, an apparatus, a terminal and a storage medium for controlling time division multiplexing of CAN communication, and in order to make the objects, technical solutions and advantages of the present application clearer, embodiments of the present application will be further described in detail below.
A specific embodiment of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application discloses a CAN communication time-sharing multiplexing control method, which is suitable for a one-to-many CAN communication architecture. The one-to-many communication architecture comprises a CAN communication module and a plurality of CAN transceivers matched with the CAN communication module, wherein the CAN communication module is selectively and electrically connected with the plurality of CAN transceivers through a controlled switch unit, signal transmission CAN be realized between the controlled switch unit and any CAN transceiver through the CAN communication module, and each CAN transceiver is also electrically connected with a CAN bus network.
Fig. 1 is a schematic structural diagram of a virtual network switch circuit in a specific example to which the one-to-many CAN communication architecture is applied, as shown in the figure, a second CAN communication module in the figure is integrated in a control chip, two corresponding CAN transceivers are provided, and the two CAN transceivers are a second CAN transceiver and a third CAN transceiver respectively, a controlled switch unit is composed of a first controlled switch and a second controlled switch, a signal sending port of the second CAN communication module is electrically connected with a fixed end of the first controlled switch, a signal receiving port of the second CAN communication module is electrically connected with a fixed end of the second controlled switch, two movable ends of the first controlled switch are electrically connected to signal sending ports of the second CAN transceiver and the third CAN transceiver respectively, a high-speed/low-speed CAN signal interface of the second CAN transceiver is electrically connected to a second bus network respectively, and two movable ends of the second controlled switch are electrically connected to signal receiving ports of the second CAN transceiver and the third CAN transceiver respectively, and a high-speed/low-speed CAN signal interface of the third CAN transceiver is electrically connected to a third bus network respectively.
The flow of the CAN communication time-sharing multiplexing control method is shown in figure 2, and the method comprises the following steps:
s1, respectively calculating to obtain the minimum service time slice of each path of CAN bus network, and summarizing and summing to obtain the total service time length; this step specifically includes the following flow.
S11, acquiring all sending periods in any one path of CAN bus network, and taking the greatest common divisor of all the sending periods as the minimum service time slice of the path of CAN bus network;
and repeating the step S11 until the minimum service time slice of each path of the CAN bus network is obtained.
S12, summarizing the obtained minimum service time slices of each path of the CAN bus network, and calculating to obtain the total service time length by the following calculation formula,
T=∑ti,
wherein T represents a total service duration, ti represents a minimum service time slice of the ith path of the CAN bus network, i =1,2,3.
In connection with the embodiment of fig. 1, the calculation formula of the total service duration in the embodiment can be expressed as,
T S =t 2 +t 3
wherein, T S Indicates the total service duration, t, in this particular example 2 Representing a minimum service time slice, t, of the second CAN bus network 3 Represents a minimum time-slot of service of the third CAN bus network.
S2, acquiring and updating the network load of each path of CAN bus network according to a preset load sampling frequency, and summarizing and summing to obtain a total network load; this step specifically includes the following flow.
S21, setting a load sampling frequency, collecting and updating the network load of each path of the CAN bus network according to the load sampling frequency, recording the time spent on the current load sampling, and performing accumulative calculation to obtain the total time spent on the current load sampling.
And S22, when the total time spent on the load sampling at the current moment exceeds the total service time, acquiring and recording the network load of each path of the CAN bus network at the current moment.
More specifically, this step is to compare the total duration spent on sampling the load at the current time with the total service duration;
if the total duration of the load sampling cost at the current moment does not exceed the total service duration, acquiring and updating the network load of each path of the CAN bus network again according to the load sampling frequency, recording the duration of the current load sampling cost, performing accumulative calculation again to obtain the total duration of the load sampling cost at the current moment after the accumulative calculation again, and then comparing the total duration of the load sampling cost at the current moment after the accumulative calculation again with the total service duration;
and if the total time spent on the load sampling at the current moment exceeds the total service time, acquiring and recording the network load of each path of the CAN bus network at the current moment according to the method.
The purpose of this step is to ensure the accuracy and effectiveness of the acquired network load of each path of the CAN bus network, and reduce the error in the subsequent calculation and derivation process as much as possible.
S23, summarizing the acquired network load of each path of CAN bus network, and calculating to obtain the total network load, wherein the calculation formula is
K=∑ki,
Wherein K represents a total network load, ki represents a network load of the ith path of the CAN bus network, i =1,2,3.
In connection with the embodiment of fig. 1, the calculation formula of the total service duration in this embodiment can be expressed as,
K S =k 2 +k 3
wherein, K S Represents the total network load, k, in this particular example 2 Representing the network load, k, of the second CAN bus network 3 Representing a network load of the third CAN bus network.
S3, respectively calculating the service proportion of each corresponding path of CAN bus network according to the total network load and the network load of each path of CAN bus network; the calculation formula in this step is as follows, ri = ki/K,
ri represents the service proportion of the ith CAN bus network, i =1,2,3.
In connection with the embodiment of fig. 1, the calculation formula of the service proportion of the second CAN bus network in this embodiment CAN be expressed as,
R 2 =k 2 /Ks,
wherein R is 2 Representing a service proportion of the second CAN bus network;
the calculation formula for the service proportion of the third CAN bus network in this particular example CAN be expressed as,
R 3 =k 3 /Ks,
wherein R is 3 Representing a service proportion of the third CAN bus network.
S4, respectively calculating the corresponding service time of each path of CAN bus network according to the total service time and the service proportion of each path of CAN bus network; the formula of calculation in this step is as follows, ti = T x Ri,
wherein Ti represents a service time of the i-th CAN bus network, i =1,2,3.
In connection with the embodiment of fig. 1, the formula for calculating the service time of the second CAN bus network in this embodiment CAN be expressed as,
T 2 =T S *R 2
wherein, T 2 Representing a service time of the second CAN bus network;
the formula for calculating the service time of the third CAN bus network in this particular example CAN be expressed as,
T 3 =T S *R 3
wherein, T 3 Representing a service time of the third CAN bus network.
S5, adjusting the turn-on time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network; this step specifically includes the following flow.
S51, determining the corresponding connection time of the CAN bus network according to the service time of each path of the CAN bus network, wherein the service time is consistent with the connection time in the same path of the CAN bus network;
and S52, controlling the on-off action of the controlled switch unit to enable the CAN transceiver corresponding to each CAN bus network and the CAN communication module to be kept on according to the on-time, and disconnecting after the on-time is exceeded.
In terms of extension, in the specific example shown in fig. 1, the first CAN communication module integrated in the control chip may also correspond to two CAN transceivers, and similarly, the second CAN communication module may also correspond to three or four CAN transceivers, and the structure of the entire virtual network switch circuit may be adjusted according to actual use requirements. However, in order to ensure the practical application effect, the number of the CAN communication modules using the one-to-many CAN communication architecture in the control chip and the number of the CAN transceivers corresponding to a single CAN communication module should not be excessively increased. The number of the CAN communication modules utilizing the one-to-many CAN communication architecture in the control chip is preferably 1-2, and the number of the CAN transceivers corresponding to a single CAN communication module is preferably 2-4.
By combining the above method flows, it CAN be seen that the CAN communication time-sharing multiplexing control method in the embodiment of the present application CAN enable a single CAN communication module in the control chip to be selectively electrically connected with a plurality of CAN transceivers according to actual use requirements, thereby implementing time-sharing multiplexing of the CAN communication module and maximally utilizing chip resources.
Based on the same inventive concept, the embodiment of the present application further discloses a CAN communication time-sharing multiplexing control device, which is suitable for the one-to-many CAN communication architecture, the architecture of the CAN communication time-sharing multiplexing control device is shown in fig. 3, and the device includes the following modules:
the service duration acquisition module is configured to respectively calculate and obtain the minimum service time slice of each path of the CAN bus network, and sum the minimum service time slices to obtain the total service duration;
the network load acquisition module is configured to acquire and update the network load of each path of the CAN bus network according to a preset load sampling frequency, and sum the network loads to obtain a total network load;
the service proportion determining module is configured to respectively calculate the service proportion of each path of the CAN bus network according to the total network load and the network load of each path of the CAN bus network;
the service time determining module is configured to respectively calculate the service time of each path of the CAN bus network according to the total service time and the service proportion of each path of the CAN bus network;
a switch control execution module configured to adjust the on-time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network
In a specific implementation, the service duration obtaining module includes the following units:
a service duration obtaining first unit, configured to obtain all transmission cycles in any one path of the CAN bus network, take a greatest common divisor of all the transmission cycles as a minimum service time slice of the path of the CAN bus network, and repeat the operation until obtaining the minimum service time slice of each path of the CAN bus network;
and the service duration acquisition second unit is configured to collect the obtained minimum service time slices of each path of the CAN bus network and calculate to obtain the total service duration.
In a specific possible implementation, the network load obtaining module includes the following units:
the network load acquisition first unit is configured to set load sampling frequency, acquire and update the network load of each path of the CAN bus network according to the load sampling frequency, record the time spent on the current load sampling, and perform cumulative calculation to obtain the total time spent on the load sampling at the current moment;
the network load acquisition second unit is configured to acquire and record the network load of each path of the CAN bus network at the current moment when the total length of the load sampling at the current moment exceeds the total service length;
and the network load acquisition third unit is configured to collect the acquired network load of each path of the CAN bus network and calculate to obtain a total network load.
In a specific possible implementation, the switch control execution module includes the following units:
a switch control execution first unit configured to determine an on time of the corresponding CAN bus network according to a service time of each path of the CAN bus network, the service time being consistent with the on time in the same path of the CAN bus network;
and the switch control execution second unit is configured to control the on-off action of the controlled switch unit, so that the CAN transceiver corresponding to each path of CAN bus network and the CAN communication module are kept on according to the on-time, and the connection is disconnected after the on-time is exceeded.
By integrating the device architecture, the CAN communication time-sharing multiplexing control device in the embodiment of the application is matched with a one-to-many CAN communication architecture, a set of complete communication control system is built together, necessary software and hardware technical support is provided for time-sharing multiplexing of a CAN communication module, the intelligent and automatic levels of the communication control technology are obviously improved, and the requirement of technical progress is met.
Based on the same inventive concept, an embodiment of the present application further discloses a computer-readable storage medium, where at least one instruction, at least one program, a code set, or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set CAN be loaded and executed by a processor to implement the CAN communication time division multiplexing control method provided in the foregoing method embodiment.
It should be understood that reference herein to "a plurality" means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Also based on the same inventive concept, an embodiment of the present application further discloses a computer-readable storage medium, where at least one instruction, at least one program, a code set, or an instruction set is stored in the computer-readable storage medium, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the CAN communication time division multiplexing control method as described above.
Those skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by hardware related to instructions of a program, where the program may be stored in the computer-readable storage medium, and the computer-readable storage medium includes, for example: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (9)

1. A CAN communication time-sharing multiplexing control method is characterized by being suitable for a one-to-many CAN communication architecture, the one-to-many communication architecture comprises a CAN communication module and a plurality of CAN transceivers matched with the CAN communication module, the CAN communication module is selectively and electrically connected with the CAN transceivers through a controlled switch unit, signal transmission CAN be realized between the controlled switch unit and the CAN communication module and any CAN transceiver, and each CAN transceiver is electrically connected with a CAN bus network, and the method comprises the following steps:
respectively calculating to obtain the minimum service time slice of each path of the CAN bus network, and summarizing and summing to obtain the total service time length;
acquiring and updating the network load of each path of CAN bus network according to a preset load sampling frequency, and summarizing and summing to obtain a total network load;
respectively calculating the service proportion of each path of the CAN bus network according to the total network load and the network load of each path of the CAN bus network;
respectively calculating the service time of each corresponding path of CAN bus network according to the total service time and the service proportion of each path of CAN bus network;
and adjusting the turn-on time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network.
2. The CAN communication time division multiplexing control method according to claim 1, wherein the minimum service time slice of each path of the CAN bus network is obtained by calculation, and the total service time duration is obtained by summation, specifically comprising the following steps: acquiring all transmission periods in any one path of CAN bus network, taking the greatest common divisor of all the transmission periods as the minimum service time slice of the path of CAN bus network, and repeating the step until the minimum service time slice of each path of CAN bus network is obtained;
summarizing the obtained minimum service time slices of each path of CAN bus network, and calculating to obtain total service time length by the formula
T=∑ti,
Wherein T represents a total service duration, ti represents a minimum service time slice of the ith path of the CAN bus network, i =1,2,3.
3. The CAN communication time division multiplexing control method according to claim 2, wherein the network load of each path of the CAN bus network is obtained and updated according to a preset load sampling period, and a total network load is obtained by summing, specifically comprising the following steps:
setting load sampling frequency, acquiring and updating the network load of each path of the CAN bus network according to the load sampling frequency, recording the time spent on the current load sampling, and performing cumulative calculation to obtain the total time spent on the load sampling at the current moment;
when the total length of the load sampling at the current moment exceeds the total service length, acquiring and recording the network load of each path of the CAN bus network at the current moment;
summarizing the acquired network load of each path of CAN bus network, and calculating to obtain the total network load, wherein the calculation formula is
K=∑ki,
Wherein K represents a total network load, ki represents a network load of the i-th path of the CAN bus network, and i =1,2,3.
4. The CAN communication time division multiplexing control method of claim 3, wherein the service proportion of each path of the CAN bus network is calculated according to the total network load and the network load of each path of the CAN bus network, and the calculation formula is as follows:
Ri=ki/K,
ri represents the service proportion of the ith CAN bus network, i =1,2,3.
5. The CAN communication time division multiplexing control method of claim 4, wherein the service time of each path of the CAN bus network is obtained by calculating according to the total service duration and the service proportion of each path of the CAN bus network, and the calculation formula is as follows:
Ti=T*Ri,
wherein Ti represents a service time of the i-th CAN bus network, i =1,2,3.
6. The CAN communication time division multiplexing control method of claim 1, wherein the adjusting of the on-time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network comprises the following steps:
determining the corresponding connection time of the CAN bus network according to the service time of each path of the CAN bus network, wherein the service time is consistent with the connection time in the same path of the CAN bus network;
and controlling the on-off action of the controlled switch unit to enable the CAN transceiver corresponding to each CAN bus network and the CAN communication module to be kept on according to the on-time, and disconnecting after the on-time is exceeded.
7. A CAN communication time-sharing multiplexing control device is characterized by being suitable for a one-to-many CAN communication architecture, wherein the one-to-many communication architecture comprises a CAN communication module and a plurality of CAN transceivers matched with the CAN communication module, the CAN communication module is selectively electrically connected with the CAN transceivers through a controlled switch unit, signal transmission CAN be realized between the CAN communication module and any CAN transceiver by means of the controlled switch unit, and each CAN transceiver is electrically connected with a CAN bus network, and the device comprises the following modules:
the service duration acquisition module is configured to respectively calculate the minimum service time slice of each path of CAN bus network, and sum the minimum service time slices to obtain the total service duration;
the network load acquisition module is configured to acquire and update the network load of each path of the CAN bus network according to a preset load sampling frequency, and sum the network loads to obtain a total network load;
the service proportion determining module is configured to respectively calculate the service proportion of each path of the CAN bus network according to the total network load and the network load of each path of the CAN bus network;
the service time determining module is configured to respectively calculate the service time of each path of the CAN bus network according to the total service time and the service proportion of each path of the CAN bus network;
and the switch control execution module is configured to adjust the on-time between the controlled switch unit and each corresponding CAN transceiver according to the service time of each CAN bus network.
8. An intelligent terminal, comprising a memory and a processor, wherein the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, and the at least one instruction, at least one program, a set of codes, or a set of instructions is loaded and executed by the processor to implement the CAN communication time division multiplexing control method according to any one of claims 1 to 6.
9. A computer-readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, which is loaded and executed by a processor to implement the CAN communication time division multiplexing control method according to any one of claims 1 to 6.
CN202211183472.6A 2022-09-27 2022-09-27 CAN communication time-sharing multiplexing control method, device, terminal and storage medium Pending CN115622832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211183472.6A CN115622832A (en) 2022-09-27 2022-09-27 CAN communication time-sharing multiplexing control method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211183472.6A CN115622832A (en) 2022-09-27 2022-09-27 CAN communication time-sharing multiplexing control method, device, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN115622832A true CN115622832A (en) 2023-01-17

Family

ID=84861330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211183472.6A Pending CN115622832A (en) 2022-09-27 2022-09-27 CAN communication time-sharing multiplexing control method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN115622832A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368801A (en) * 2013-08-02 2013-10-23 常州市新科汽车电子有限公司 High-and-low speed CAN (controller area network) bus compatible device and working method thereof
CN113467938A (en) * 2021-06-18 2021-10-01 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method, device and related equipment
CN219124214U (en) * 2022-09-27 2023-06-02 苏州海格电控股份有限公司 CAN communication architecture based on time division multiplexing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103368801A (en) * 2013-08-02 2013-10-23 常州市新科汽车电子有限公司 High-and-low speed CAN (controller area network) bus compatible device and working method thereof
CN113467938A (en) * 2021-06-18 2021-10-01 山东云海国创云计算装备产业创新中心有限公司 Bus resource allocation method, device and related equipment
CN219124214U (en) * 2022-09-27 2023-06-02 苏州海格电控股份有限公司 CAN communication architecture based on time division multiplexing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
吴凯迪: "基于分布功能协同的无人机仿真技术研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, 15 March 2018 (2018-03-15), pages 81 - 84 *

Similar Documents

Publication Publication Date Title
CN104079445A (en) Distributed type pressure testing system and method
CN113688001B (en) Dynamic balancing method and device for power consumption of server hard disk, terminal and storage medium
CN106817314A (en) Big data acquisition method, device and system
CN111581043A (en) Server power consumption monitoring method and device and server
CN111030883A (en) Power information transmission delay analysis method, device, equipment and storage medium
CN111324503B (en) Machine frame management device, method and computer readable storage medium
CN110022246A (en) Distributed type assemblies equipment power dissipation monitoring method, device, system and associated component
CN104601376A (en) Heartbeat message sending method and device
CN115622832A (en) CAN communication time-sharing multiplexing control method, device, terminal and storage medium
CN107465629A (en) Method for limiting speed and device
CN108170091A (en) A kind of PLC controller, PLC controller group system
CN109857192A (en) A kind of signal processing method, device, system, equipment and readable storage medium storing program for executing
CN207882745U (en) A kind of PLC controller, PLC controller group system
CN207882728U (en) A kind of control system
CN106201520A (en) System reducing method and device
CN105846894B (en) Optical signal monitoring method and optical module in optical module
CN113014402B (en) Power management method, main controller and device
CN116582416B (en) Enhanced terminal communication module of Internet of things, network debugging method and management system thereof
CN116208564B (en) High-performance Internet of things scheduling method and system based on X86 platform
CN113645088B (en) Automatic regulation method, system, device and medium for network card NCSI signal
CN107708036A (en) The adjustment method and device of audio frequency apparatus power output
CN113778927B (en) Method, device and equipment for managing server network port chip based on substrate management controller
CN108449782A (en) The method of terminal and its Multi net voting transmission data, storage device
Reiman et al. Dynamic call admission control of an ATM multiplexer with on/off sources
CN108762747B (en) Data processing method and computer 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