CN109104303A - A kind of automatic configuration system and method for CAN bus ID - Google Patents

A kind of automatic configuration system and method for CAN bus ID Download PDF

Info

Publication number
CN109104303A
CN109104303A CN201810805073.6A CN201810805073A CN109104303A CN 109104303 A CN109104303 A CN 109104303A CN 201810805073 A CN201810805073 A CN 201810805073A CN 109104303 A CN109104303 A CN 109104303A
Authority
CN
China
Prior art keywords
bus
node
configuration
control unit
signal
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
CN201810805073.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.)
CETC 38 Research Institute
Original Assignee
CETC 38 Research Institute
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 CETC 38 Research Institute filed Critical CETC 38 Research Institute
Priority to CN201810805073.6A priority Critical patent/CN109104303A/en
Publication of CN109104303A publication Critical patent/CN109104303A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5038Address allocation for local use, e.g. in LAN or USB networks, or in a controller 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/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 invention discloses a kind of CAN bus ID automatic configuration systems, it include 1~N of bus control unit and node in CAN bus equipment, bus control unit and all nodes are hung in CAN bus, it is connected respectively with CAN bus signal of communication CAN_H and CAN_L, respectively increase the serial receiving and transmitting signal of a pair of RS422 on bus control unit and each node in CAN bus, nodes all in bus are connected in series by RS422 serial receiving and transmitting signal, connect into the topological structure of daisy chain type.The method that CAN bus ID is automatically configured is carried out using above-mentioned CAN bus ID automatic configuration system the present invention also provides a kind of.The present invention has the advantage that 1, CAN bus ID method of automatic configuration is simple and convenient compared with prior art, and the configuration of all node ID numbers is automatically performed by system, without being configured and manual intervention.2, system cable cabling is simple, and ID configures signal and is not necessarily to independent cable routing.

Description

A kind of automatic configuration system and method for CAN bus ID
Technical field
The present invention relates to industry spot field, in particular to a kind of fieldbus-CAN (Controller Area Network) ID (Identification) automatic configuration system and method for bus.
Background technique
With the fast development of microelectronics, automatic control technology, computer technology and the communication technology, digitlization is generally answered Industrial field device is used, and penetrates into automation field as a kind of trend.Field bus technique also comes into being, and will have There are various field devices, the device of control function and information processing capability to connect into network system.
As the CAN bus of one of fieldbus, be by German Bosch company in 1981 formulate, have it is highly reliable, The features such as low cost, using flexible.It is not only generallyd use by automotive electronics, is also gradually widely used in automatic control, intelligence The fields such as observing and controlling, defence and military.
The signal transmission medium of CAN bus is twisted pair, and traffic rate reaches as high as 1Mbps, and communication distance is farthest reachable 10km, the node on same bus are up to 110.The signal transmission of CAN bus has strong anti-interference ability, and supports more Master mode work, supports point-to-point, point to multi--point and broadcast mode sending and receiving data, have reliability outstanding, real-time and Flexibility.
Since CAN bus node is hung on same bus, each node has unique ID number, and system passes through ID number Bus node is identified.There are mainly two types of traditional CAN bus ID configuration modes, and one is by the way of toggle switch ID number is configured.Although this mode can guarantee the consistency of system software program, need operator to system Carry out manual intervention.Another method is ID number to be cured in program, or ID number is solidified in memory device.It is this Method will lead to program version diversification, cause to need to be managed dimension to ID number using special equipment during later maintenance Shield.There is certain deficiency in use in the above both methods.
Summary of the invention
Technical problem to be solved by the present invention lies in provide a kind of simple and convenient CAN bus ID automatic configuration system And method, the configuration of all node ID numbers are automatically performed by system, without being configured and manual intervention.
The present invention is to solve a kind of above-mentioned technical problem: CAN bus ID automatic configuration system by the following technical programs, It include 1~N of bus control unit and node in CAN bus equipment, bus control unit and all nodes are hung in CAN bus, It is connected respectively with CAN bus signal of communication CAN_H and CAN_L, it is each on the bus control unit and each node in CAN bus Increase the serial receiving and transmitting signal of a pair of RS422, be connected in series nodes all in bus by the serial receiving and transmitting signal of RS422, connects At the topological structure of daisy chain type.
As the structure of optimization, ID setting signal and CAN bus signal of communication only need to increase in same root cable routing Add 2 core wires, without individually separately walking cable.
As specific scheme, " RS422_ receipts " signal of " RS422_ hair " signal end connecting node 1 of bus control unit End, " RS422_ receipts " signal end of " RS422_ hair " signal end connecting node 2 of node 1, and so on, present node " RS422_ receipts " signal end connects " RS422_ hair " signal end of a node;And " RS422_ hair " signal end of present node " RS422_ receipts " signal end of next node is connected, finally, the last one node-node N " RS422_ hair " believes in bus Number end is connected to " RS422_ receipts " signal end of bus control unit.
Carry out what CAN bus ID was automatically configured using above-mentioned CAN bus ID automatic configuration system the present invention also provides a kind of Method, after CAN bus device power, bus control unit starts to send ID configuration-direct and initial ID number that (initial ID number can be set For " ID+0 "), then initial ID number is added 1 after node 1 receives ID configuration-direct and initial ID number, then the ID number of node 1 is arranged For " ID+1 ", the ID number of ID configuration-direct and node 1 is then sent to node 2, and so on, when certain node in bus connects After the ID configuration-direct and the ID number that receive node transmission, the ID number received is added 1 as the ID number of present node and is carried out Setting, is then sent to next node for the ID number of ID configuration-direct and present node, until the last one node in bus After the completion of ID configuration, the ID number of ID configuration-direct He the node is sent to bus control unit, if bus control unit is limiting The ID number of ID configuration-direct and node is received in time, then ID automatically configures success.
As further embodiment, CAN bus ID method of automatic configuration further includes following step: the node connection in bus In, signal open circuit fault occurs between m-th node and the M+1 node, will cause the failure of system identifier configuration-direct, if bus Controller is not received by the ID number of ID configuration-direct and node within a limited period of time, will start bus signals testing for continuity stream Journey.
As further embodiment, the bus signals testing for continuity process includes the following steps:
When initialization, first initial ID number, initial ID number are set to " ID+0 ", and when detection, the ID number of node is added 1 as current Then the ID number of detection node sends inquiry instruction by CAN bus chain road direction present node by bus control unit, if limiting In fixing time, bus control unit can receive correct inquiry response information by CAN bus, then continue to next node Inquiry;If not receiving response message within a limited period of time, system report bus signals open circuit fault and to off position into Row positioning.
The present invention has the advantage that compared with prior art
1, CAN bus ID method of automatic configuration is simple and convenient, and the configuration of all node ID numbers is automatically performed by system, Without being configured and manual intervention.
2, system cable cabling is simple, and ID configures signal and is not necessarily to independent cable routing.ID configuration signal is communicated with CAN bus Signal can in same root cable cabling, it is only necessary in the cable increase by 2 core wires.
Detailed description of the invention
Fig. 1 is that CAN bus of embodiment of the present invention ID automatically configures signal connection schematic diagram;
Fig. 2 CAN bus of embodiment of the present invention ID automatically configures flow chart;
Fig. 3 is CAN bus signal open circuit fault schematic diagram of the embodiment of the present invention;
Fig. 4 is CAN bus signal open circuit overhaul flow chart of the embodiment of the present invention.
Specific embodiment
It elaborates below to the embodiment of the present invention, the present embodiment carries out under the premise of the technical scheme of the present invention Implement, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to following implementation Example.
Fig. 1 be CAN bus ID automatically configure signal connection schematic diagram, in CAN bus equipment include bus control unit and 1~N of node, bus control unit and all nodes are hung in CAN bus, respectively with CAN bus signal of communication CAN_H and CAN_ L is connected.To realize that CAN bus ID automatically configures function, respectively increase a pair of RS422 string on bus control unit and each node Row receiving and transmitting signal." RS422_ receipts " signal end of " RS422_ hair " signal end connecting node 1 of bus control unit, node 1 " RS422_ receipts " signal end of " RS422_ hair " signal end connecting node 2.The rest may be inferred, " RS422_ receipts " signal of present node End connects " RS422_ hair " signal end of a upper node;And " RS422_ hair " signal end of present node connects next node " RS422_ receipts " signal end.Finally, the last one node-node N " RS422_ hair " signal end is connected to bus in bus " RS422_ receipts " signal end of controller.In this way, bus control unit and institute by the serial receiving and transmitting signal of RS422, in CAN bus There is node to join end to end, has connected into the topological structure of daisy chain type.
Fig. 2 is that CAN bus ID automatically configures flow chart, and after CAN bus device power, bus control unit starts to send ID Configuration-direct and initial ID number (initial ID number can be set to " ID+0 ").When node 1 receive bus control unit ID configuration-direct and After initial ID number, initial ID number is added 1, then the ID number of node 1 is set as " ID+1 ", then by ID configuration-direct and node 1 ID number is sent to node 2.The rest may be inferred, when certain node in bus receives the ID configuration-direct and ID number that a upper node is sent Afterwards, the ID number received is added 1 as the ID number of present node to be configured, then by the ID of ID configuration-direct and present node Number it is sent to next node.After the completion of the last one node ID configuration in bus, by ID configuration-direct and the node ID number is sent to bus control unit, and bus control unit detects the ID for whether receiving ID configuration-direct and node within a limited period of time Number, if receiving the ID number of ID configuration-direct and node, ID automatically configures success;If not receiving the ID of ID configuration-direct and node Number, then start bus signals testing for continuity process.
Fig. 3 is CAN bus signal open circuit fault schematic diagram, CAN bus equipment in use, occur it is more be by In the bus signals connector poor contact of node, signal open circuit fault is caused.In node connection in Fig. 3 in bus, m-th Signal open circuit fault occurs between node and the M+1 node, will cause the failure of system identifier configuration-direct.If bus control unit exists It is not received by the ID number of ID configuration-direct and node in limiting time, will start bus signals testing for continuity process.
Fig. 4 is CAN bus signal open circuit overhaul flow chart.When initialization, first (initial ID number is set to " ID+ to initial ID number 0").When detection, the ID number of node is added into 1 ID number as current detection node, CAN bus is then passed through by bus control unit Chain road direction present node sends inquiry instruction.If within a limited period of time, bus control unit can be received correctly by CAN bus Inquiry response information, then next node is continued to inquire;If not receiving response message within a limited period of time, it is System report bus signals open circuit fault simultaneously positions off position.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.

Claims (7)

1. a kind of CAN bus ID automatic configuration system, which is characterized in that include bus control unit and section in CAN bus equipment 1~N of point, bus control unit and all nodes hang in CAN bus, respectively with CAN bus signal of communication CAN_H and CAN_L It is connected, respectively increases the serial receiving and transmitting signal of a pair of RS422 on the bus control unit and each node in CAN bus, pass through The serial receiving and transmitting signal of RS422 is connected in series nodes all in bus, connects into the topological structure of daisy chain type.
2. CAN bus ID automatic configuration system according to claim 1, which is characterized in that CAN bus signal of communication and ID Setting signal cabling in same root cable.
3. CAN bus ID automatic configuration system according to claim 1, which is characterized in that " the RS422_ of bus control unit " RS422_ receipts " signal end of hair " signal end connecting node 1, " RS422_ hair " signal end connecting node 2 of node 1 " RS422_ receipts " signal end, and so on, " RS422_ receipts " signal end of present node connects the " RS422_ of a node Hair " signal end;And " RS422_ receipts " signal end of " RS422_ hair " the signal end connection next node of present node, finally, The last one node-node N " RS422_ hair " signal end is connected to " RS422_ receipts " signal of bus control unit in bus End.
4. a kind of carry out CAN bus ID certainly using the described in any item CAN bus ID automatic configuration systems of the claims 1-3 The method of dynamic configuration, which is characterized in that after CAN bus device power, bus control unit starts to send ID configuration-direct and just Beginning ID number, then initial ID number is added 1 after node 1 receives ID configuration-direct and initial ID number, then by ID configuration-direct and section The ID number of point 1 is sent to node 2, and so on, when certain node in bus receives the ID configuration-direct that a upper node is sent After ID number, the ID number received is added 1 as the ID number of present node and is configured, then by ID configuration-direct and works as prosthomere The ID number of point is sent to next node, after the completion of the last one node ID configuration in bus, by ID configuration-direct and is somebody's turn to do The ID number of node is sent to bus control unit, if bus control unit receives the ID of ID configuration-direct and node within a limited period of time Number, then ID automatically configures success.
5. CAN bus ID method of automatic configuration according to claim 4, which is characterized in that initial ID number is set as " ID+ 0”。
6. CAN bus ID method of automatic configuration according to claim 4, which is characterized in that further include following step: bus On node connection in, between m-th node and the M+1 node occur signal open circuit fault, will cause system identifier configure refer to Failure is enabled, if bus control unit is not received by the ID number of ID configuration-direct and node within a limited period of time, will start bus letter Number testing for continuity process.
7. CAN bus ID method of automatic configuration according to claim 6, which is characterized in that the bus signals open circuit inspection Process is looked into include the following steps:
When initialization, first initial ID number, initial ID number are set to " ID+0 ", and when detection, the ID number of node is added 1 as current detection Then the ID number of node sends inquiry instruction by CAN bus chain road direction present node by bus control unit, if when limiting In, bus control unit can receive correct inquiry response information by CAN bus, then continue to ask to next node It asks;If not receiving response message within a limited period of time, system report bus signals open circuit fault simultaneously carries out off position Positioning.
CN201810805073.6A 2018-07-20 2018-07-20 A kind of automatic configuration system and method for CAN bus ID Pending CN109104303A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810805073.6A CN109104303A (en) 2018-07-20 2018-07-20 A kind of automatic configuration system and method for CAN bus ID

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810805073.6A CN109104303A (en) 2018-07-20 2018-07-20 A kind of automatic configuration system and method for CAN bus ID

Publications (1)

Publication Number Publication Date
CN109104303A true CN109104303A (en) 2018-12-28

Family

ID=64847039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810805073.6A Pending CN109104303A (en) 2018-07-20 2018-07-20 A kind of automatic configuration system and method for CAN bus ID

Country Status (1)

Country Link
CN (1) CN109104303A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109799758A (en) * 2019-01-29 2019-05-24 上海度普新能源科技有限公司 A kind of CAN bus application system and the method for numbering serial for handling node
CN109800205A (en) * 2019-01-25 2019-05-24 北京鼎汉技术股份有限公司 The system and method that subway platform door ID number is arranged automatically
CN110086887A (en) * 2019-05-14 2019-08-02 上海泽远信息科技有限公司 A kind of multifunctional monitoring system for aerial suspension ohject displacement
CN110647127A (en) * 2019-10-17 2020-01-03 厦门高瑞特电气自动化有限公司 Module combined power process control device and initialization configuration method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2434687A1 (en) * 2009-07-29 2012-03-28 Huawei Technologies Co., Ltd. Data communication method, communication equipment and communication system
CN101494936B (en) * 2008-12-19 2012-07-25 上海广茂达光艺科技股份有限公司 LED light control bus and control method
CN104954216A (en) * 2014-03-31 2015-09-30 奇点新源国际技术开发(北京)有限公司 485 bus fault self-processing method and device
CN105151936A (en) * 2015-09-10 2015-12-16 广州日滨科技发展有限公司 Method for distributing identity document (ID) for elevator control local area network controller area network (CAN) bus device
CN105573174A (en) * 2016-02-03 2016-05-11 惠州市蓝微新源技术有限公司 Battery management system slave control unit identification information automatic distribution method
CN107515600A (en) * 2017-08-01 2017-12-26 安徽欧鹏巴赫新能源科技有限公司 A kind of ID online distribution systems and its control method based on CAN network
CN107786405A (en) * 2017-10-17 2018-03-09 南京博兰得电子科技有限公司 Multinode automatic network-building method based on CAN
CN108123860A (en) * 2017-01-19 2018-06-05 山西智舒智能科技有限公司 The ID of intelligent domestic system node device based on CAN bus is distributed automatically and management method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101494936B (en) * 2008-12-19 2012-07-25 上海广茂达光艺科技股份有限公司 LED light control bus and control method
EP2434687A1 (en) * 2009-07-29 2012-03-28 Huawei Technologies Co., Ltd. Data communication method, communication equipment and communication system
CN104954216A (en) * 2014-03-31 2015-09-30 奇点新源国际技术开发(北京)有限公司 485 bus fault self-processing method and device
CN105151936A (en) * 2015-09-10 2015-12-16 广州日滨科技发展有限公司 Method for distributing identity document (ID) for elevator control local area network controller area network (CAN) bus device
CN105573174A (en) * 2016-02-03 2016-05-11 惠州市蓝微新源技术有限公司 Battery management system slave control unit identification information automatic distribution method
CN108123860A (en) * 2017-01-19 2018-06-05 山西智舒智能科技有限公司 The ID of intelligent domestic system node device based on CAN bus is distributed automatically and management method
CN107515600A (en) * 2017-08-01 2017-12-26 安徽欧鹏巴赫新能源科技有限公司 A kind of ID online distribution systems and its control method based on CAN network
CN107786405A (en) * 2017-10-17 2018-03-09 南京博兰得电子科技有限公司 Multinode automatic network-building method based on CAN

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800205A (en) * 2019-01-25 2019-05-24 北京鼎汉技术股份有限公司 The system and method that subway platform door ID number is arranged automatically
CN109800205B (en) * 2019-01-25 2023-02-03 北京鼎汉技术集团股份有限公司 System and method for automatically setting ID number of subway platform door
CN109799758A (en) * 2019-01-29 2019-05-24 上海度普新能源科技有限公司 A kind of CAN bus application system and the method for numbering serial for handling node
CN109799758B (en) * 2019-01-29 2024-03-22 上海度普新能源科技有限公司 CAN bus application system and numbering method of processing nodes
CN110086887A (en) * 2019-05-14 2019-08-02 上海泽远信息科技有限公司 A kind of multifunctional monitoring system for aerial suspension ohject displacement
CN110647127A (en) * 2019-10-17 2020-01-03 厦门高瑞特电气自动化有限公司 Module combined power process control device and initialization configuration method thereof

Similar Documents

Publication Publication Date Title
CN109104303A (en) A kind of automatic configuration system and method for CAN bus ID
EP1402684B1 (en) Network documentation system with electronic modules
CN103490959B (en) A kind of dual-redundant CAN bus fault detection method
CN112764410B (en) Vehicle-mounted controller testing device, system and method
CN105323080B (en) A kind of link backup, power supply backup method, apparatus and system
CN113612654B (en) Vehicle-mounted gateway function test method based on database
CN104780064A (en) Fault detection method of dual-redundancy-channel hot-switching CAN bus
CN106254199A (en) Unidirectional ring network fault point positioning method, concentrator, terminal unit and system
CN105551222A (en) Embedded bridge health monitoring system
CN105553885A (en) FC switch priority testing method
WO2023065620A1 (en) Ethercat bus-based wiring harness test method and apparatus
CN104965478A (en) High-voltage direct-current transmission converter valve control device and converter valve
CN110809002A (en) Method for protocol conversion between robot and welding equipment and protocol conversion module
CN110768880A (en) Ethernet network node, fault processing method, computer device and storage medium
US9959231B2 (en) Data bus coupler and method of operation
CN108462537A (en) A kind of implementation method of one master and multiple slaves communication
CN114553630B (en) Bus terminal resistor automatic loading and ID self-distributing method and system, equipment, medium and product
CN113589743B (en) On-site bus system
CN109885420A (en) A kind of analysis method, BMC and the storage medium of PCIe link failure
CN211296735U (en) Controller internal delay testing device
CN114157350A (en) Optical fiber misconnection detection method and system
CN107071076A (en) Device address collocation method in communication system, device and system
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
JPH11252148A (en) Feeding system to telephone terminal corresponding to lan
CN107086930B (en) Vehicle configuration method and device and automobile

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181228