CN104320320A - Automatic configuration method for CAN bus slave node identifiers in automatic testing device - Google Patents

Automatic configuration method for CAN bus slave node identifiers in automatic testing device Download PDF

Info

Publication number
CN104320320A
CN104320320A CN201410653553.7A CN201410653553A CN104320320A CN 104320320 A CN104320320 A CN 104320320A CN 201410653553 A CN201410653553 A CN 201410653553A CN 104320320 A CN104320320 A CN 104320320A
Authority
CN
China
Prior art keywords
node
address
message
automatic
network
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
CN201410653553.7A
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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN201410653553.7A priority Critical patent/CN104320320A/en
Publication of CN104320320A publication Critical patent/CN104320320A/en
Pending legal-status Critical Current

Links

Abstract

The invention belongs to the related field of distributed type communication control technologies, and discloses a method for achieving automatic function identifying and automatic network address distribution of CAN bus slave nodes in an automatic testing device. In order to automatically build a CAN bus network, an automatic configuration method for CAN bus system slave node network identifiers based on a client/server mode is provided. The method includes two stages including the node function identifying stage and the node address automatic distribution stage; fixed function codes are programmed in the slave nodes to conduct node function identification, a network state machine is adopted for conducting automatic distribution of slave network addresses, message transmitting conflicts of the slave nodes with the same function when address distribution is requested are avoided through asynchronous electrification, and automatic configuration of the CAN bus system node identifiers is accordingly achieved. The technology can be applied to the distributed automatic testing device based on a CAN bus, and node modules in a CAN bus system have the good interchangeability and the good expansibility.

Description

In ATE, CAN is from the method for automatic configuration of node identifier
Technical field
The invention belongs to distributed communication control technology association area, be specifically related to a kind of method of CAN in ATE being carried out to automatic Identification and the network address automatically distribute from nodal function.
Background technology
Along with the fast development of the communication technology, electronic technology and computer technology, the fields such as aircraft, automobile and robot can be widely used in the ATE (Automatic Testing Equipment, ATE) that properties of product carry out integration test.Along with the comprising modules of ATE gets more and more, bussing technique becomes the inevitable choice improving ATE testing efficiency.In various bussing technique, the CAN(Controller Area Network based on asynchronous serial transmission communication protocol) bussing technique is with its multiple host pattern, the repeating transmission of message active filtering, the extremely low error rate, high traffic rate, extensibility and opening is good and chip cost is cheap etc. that characteristic is widely applied in ATE field.
CAN system only just can carry out proper communication under satisfied " message has unique object identity (Communication OBject Identifier, COB-ID) " condition.The introducing of COB-ID makes CAN be achieved the communication structure of Client/Server pattern, and relative source address/destination address structure is more flexible.In the CAN of reality, more communication structure is compatible source address/destination address, namely in COB-ID, comprises node network identities, and the predefine as CANopen connects the identifier definition of collection and DeviceNet.In compatible source address/destination address situation, the uniqueness of COB-ID can be equivalent to the uniqueness of node network identities, therefore can replace COB-ID with node network identities.
And based in the ATE of CAN, node network identities generally adopts DIP switch, rotary switch, connector pin, internal storage to store and the non-automatic configuration mode such as connector storage.Configuration mode as switch contact pin and so on not only easily occurs arranging mistake; and under bad working environments; need additional specific protective device; and memory stores and connector storage all needs to be arranged successively by outside programming tool before system cloud gray model; these all result in, and the operating process of ATE is complicated, the interchangeability of the poor expandability of test module, test module is poor, and above problem can be solved by the automatic configuration of node network identities.But, CAN protocol itself does not comprise the application layer protocol be closely related with hardware system, therefore, need ATE developers to meet the application layer protocol of testing requirement according to the feature self-developing of tested object, and then realize the automatic configuration of CAN node network identities.
Application number be 201010232879.4 patent of invention " a kind of distribution method of vehicle-mounted CAN bus standard format identifier " disclose a kind of vehicle-mounted CAN bus identifier allocation strategy, be divided into message to send four parts such as message index ECU Frame Index of classification Class ID, the in-vehicle electronic system ECU (Electrical Control Unit) address ECU Address in cycle, the signal Route Distinguisher position Routing Indicator of message and in-vehicle electronic system ECU (Electrical Control Unit) by the allocation strategy of sectional management the reference format identifier of CAN.By carrying out sectional management to the reference format identifier of CAN, making vehicle-mounted CAN bus system have better versatility and autgmentability, enhancing productivity, reduce production cost.But this patent does not relate to the method for automatic configuration of CAN node network identities symbol.
Summary of the invention
For the problems referred to above, to the invention discloses in a kind of ATE CAN from the method for automatic configuration of node identifier, the method effectively can solve the problem of ATE operating process complexity based on CAN, the poor expandability of test module, the interchangeability difference of test module.
The object of the present invention is achieved like this:
In ATE, CAN is from the method for automatic configuration of node identifier, comprises following two steps:
Step a, employing fixed function code Type-ID carry out the identification from nodal function,
Step b, employing network state machine carry out the automatic distribution from node identifier.
In above-mentioned ATE, CAN is from the method for automatic configuration of node identifier, and in described step a, fixed function code Type-ID programming is being arranged in the microprocessor from node, for identifying the concrete test function from node.
In above-mentioned ATE, CAN is from the method for automatic configuration of node identifier, in described step a, have the multiple of identical Type-ID and carry out message transmission from node module simultaneously, power on only to one of them from node module, other powers on from node module time delay.
In above-mentioned ATE, CAN is from the method for automatic configuration of node identifier, in stepb, 29 bit identifiers of CAN application layer Extended Protocol is divided quinquepartite, is specially:
ID28 ~ ID25 is the meshed network N state S(Network State of transmitting-receiving message);
ID24 is the request position R(Request of message the need of response message of transmission);
ID23 ~ ID16 is the COS ST(Service Type of main and subordinate node running node equipment under heterogeneous networks state);
ID15 ~ ID8 is the destination address DA(Destination Address of the node network identities Node-ID receiving message);
ID7 ~ ID0 is the source address SA(Source Address of the node network identities sending message).
In above-mentioned ATE, CAN is from the method for automatic configuration of node identifier, the network state machine described in step b be specially with from node for client computer, take main control device as the network schemer of server.
The concrete grammar of the automatic distribution described in step b is:
Step b1, client computer, after power-up initializing, utilize Type-ID as initial address and send Address requests message ID Request to server;
Step b2, server are after address acquisition request message ID Request, and entering address assignment process and sending address provides message ID Offer to client computer;
Step b3, client computer, after obtaining the address of server-assignment, send Address Confirmation message ID ACK to server;
Step b4, server, after the Address Confirmation ID ACK message obtaining client computer, send address and reply message ID Reply to client computer.
The priority that Address requests message ID Request, address provide message ID Offer, Address Confirmation message ID ACK and address to reply message ID Reply increases progressively successively.
Beneficial effect of the present invention: by each programming function code Type-ID separately from the microprocessor of node in the ate, again 29 Bits Expanding identifiers in CAN2.0B agreement are divided into 5 sections, based on client/server communication pattern and achieve the automatic distribution from node address according to node auto-allocation method, simplify the operating process of ATE, improve the autgmentability of ATE, and when being no more than 255 from number of nodes can arbitrarily increasing and decreasing and exchange, be conducive to the standardization of ATE, and effectively can shorten the development time of ATE tandem product, thus greatly reduce the development cost of ATE.
Accompanying drawing explanation
Fig. 1 is the logical construction schematic diagram of ATE hardware.
Fig. 2 is that the bit field of 29 Bits Expanding identifiers in CAN2.0B agreement distributes schematic diagram.
Fig. 3 is the message sequential chart of node method of automatic configuration.
Fig. 4 is network configuration message coding schematic diagram.
Embodiment
Below in conjunction with accompanying drawing, the specific embodiment of the invention is described in further detail.
The present embodiment is based on helicopter-mounted subsystem combined test stand, the method of automatic configuration that CAN of the present invention accords with from node network identities is described, that is: the method for automatic configuration that in helicopter-mounted subsystem combined test stand, CAN accords with from node network identities.
The On-Board Subsystem that helicopter is conventional generally comprises: more than 20 subsystem such as aircraft control, hydraulic control, fuel oil, AC power, DC power supply, engine control, lubricating oil, anti-icing, undercarriage, instrument.Helicopter-mounted subsystem combined test stand (hereinafter referred to as " testboard ") designs corresponding test module (from node) for different On-Board Subsystems, as fuel oil test module, engine parameter test module, undercarriage test module etc., and all test modules are arranged in same physical subnets, a master-slave mode CAN network based on Client/Server pattern is jointly formed by main control device with from node, the hardware logic structure of testboard is as shown in Figure 1: PC(industrial computer) be network host (Host), the protocol converter of CAN-232(CAN bus and RS232) be host node (Node0), both form server, from node Node i( i=1,2 ... N) be client computer.PC by CAN-232 management and control be connected in CAN from node Node i, treatment and analysis each from node Node ithe message returned or data.From node Node iin have independently microprocessor (in the present embodiment, to adopt the digital signal processor TMS320F2812 of TI company, hereinafter referred to as " F2812 "), communicated with the host PC of CAN network with host node Node0 by transceiver SN65HVD230 wherein, perform the order from PC and receive the test data oneself gathered.
The present embodiment is all from node Node at testboard imicroprocessor F2812 in store the program of different test function, and programming has the function type code Type-ID(of this node to set span: 0x00 ~ 0xFF), for identifying the concrete test function from node, as 0x81 represents engine parameter test module one, 0x82 represents engine parameter test module two, 0x83 representative flight frame test module etc.Type-ID is simultaneously as the initial address be connected to after power-up initializing from node in CAN.When containing same test functional module in testboard, must adopt during difference and powering on, avoiding the identical module of same time function to cause the generation of node self identification collision problem when request address distributes.In CAN system, each node must have unique node network identities symbol (Node-ID): the Node-ID of host node Node0 is set as 0x00, from node Node ithe span of Node-ID be set to 0x01 ~ 0xFF.Like this, the maximum of the CAN network in testboard can reach 255 from number of nodes.General test platform only has tens test modules, therefore can meet the extensibility requirement of testboard completely.
Distribution due to CAN application layer identifier directly affects the priority of message transmissions, message transmissions postpones, the foundation of connected mode and traffic model, the Extended Superframe Format in CAN application layer protocol CAN2.0B is adopted in the present embodiment, concrete bit field in 29 bit identifiers distributes as shown in Figure 2, wherein:
NS(Network State) network state: for representing the meshed network state of receiving and dispatching message, take ID28 ~ ID25, and specify that 0010 is the configuration status that node obtains node identification; 0011 normally runs for node the communications status and system running state that carry out testing; 0001 is the Real-Time Monitoring state of node health state.
R(Request) position is asked: for representing that the message of transmission is the need of response message, takies ID24.If host node is to the command/response message sent from node, the request position in command message is wherein 1; The request/response message sent from node to host node, the request position in request message is wherein 1.
ST(Service Type) COS: for representing the concrete function of main and subordinate node running node equipment under heterogeneous networks state, take ID23 ~ ID16; Specifically comprise: Address requests (ID Request), address provide (ID Offer), Address Confirmation (ID ACK) and address to reply (ID Reply) four classes.
DA(Destination Address) destination address: for representing the node network identities Node-ID receiving message, take ID15 ~ ID8.
SA(Source Address) source address: for representing the node network identities Node-ID sending message, take ID7 ~ ID0.
In the present embodiment, testboard configures the message sequential chart of (Automatic Node Configuration, ANC) method as shown in Figure 3 automatically from node, and in CAN network, any one is as follows from the layoutprocedure of the network identifier of node:
(1) from node after power-up initializing, utilize the Type-ID of self as initial address, send Address requests message ID Request.
(2), after server address acquisition request message ID Request, enter address assignment process: PC select effective address as destination address and to just send Address requests message from node send address message ID Offer is provided.
(3) behind the address obtaining server-assignment from node, Address Confirmation message ID ACK will be sent.When sending Address Confirmation message ID ACK from node for one, another one may send Address requests message ID Request from node, network identifier Node-ID is obtained in time from node for what ensure to allow request address, take CAN priority arbitration, the priority of the four class messages (ID Request, ID Offer, ID ACK, ID Reply) namely in address configuration process increases progressively successively.
(4) server is after obtaining confirming ID ACK message from address of node, send address and reply message ID Reply, after obtaining this message, represent self from node and obtain network address identifiers, complete the automatic configuration of a network identifier from node.
After this server starts the process next one from address of node distribution, until all of testboard obtain effective address from node.Under testboard CAN system is in the state that network identifier configures automatically, PC takes shift register initial value to be 0 and the method increased progressively successively, guarantees as each client computer distributes unique address.
In the present embodiment, testboard is in the automatic layoutprocedure accorded with from node network identities, and the coding of the COS ST of four class messages is as shown in table 1, and between client-server, the message sequential chart of Successful transmissions address as shown in Figure 4.
COS coding under the different configuration status of table 1
Above embodiments of the invention are described; but the present invention is not limited to the embodiment of above-mentioned helicopter-mounted subsystem combined test stand; above-mentioned embodiment is only schematic; instead of it is restrictive; those of ordinary skill in the related art are under enlightenment of the present invention; when not departing from the scope that present inventive concept and claim are protected, can also apply in other master-slave mode ATE, these all belong within protection scope of the present invention.The all available prior art of each part not clear and definite in the present embodiment is realized.

Claims (7)

1. in ATE, CAN, from the method for automatic configuration of node identifier, is characterized in that, comprises following two steps:
Step a, employing fixed function code Type-ID carry out the identification from nodal function,
Step b, employing network state machine carry out the automatic distribution from node identifier.
2. in ATE according to claim 1 CAN from the method for automatic configuration of node identifier, it is characterized in that, in described step a, fixed function code Type-ID programming is being arranged in the microprocessor from node, for identifying the concrete test function from node.
3. in ATE according to claim 1 CAN from the method for automatic configuration of node identifier, it is characterized in that, in described step a, there are the multiple of identical Type-ID and carry out message transmission from node module simultaneously, power on only to one of them from node module, other powers on from node module time delay.
4. in ATE according to claim 1, CAN, from the method for automatic configuration of node identifier, is characterized in that, in stepb, 29 bit identifiers of CAN application layer Extended Protocol is divided quinquepartite, is specially:
ID28 ~ ID25 is the meshed network N state S(Network State of transmitting-receiving message);
ID24 is the request position R(Request of message the need of response message of transmission);
ID23 ~ ID16 is the COS ST(Service Type of main and subordinate node running node equipment under heterogeneous networks state);
ID15 ~ ID8 is the destination address DA(Destination Address of the node network identities Node-ID receiving message);
ID7 ~ ID0 is the source address SA(Source Address of the node network identities sending message).
5. in ATE according to claim 1, CAN, from the method for automatic configuration of node identifier, is characterized in that, the network state machine described in step b be specially with from node for client computer, take main control device as the network schemer of server.
6. in ATE according to claim 5, CAN, from the method for automatic configuration of node identifier, is characterized in that, the concrete grammar of the automatic distribution described in step b is:
Step b1, client computer, after power-up initializing, utilize Type-ID as initial address and send Address requests message ID Request to server;
Step b2, server are after address acquisition request message ID Request, and entering address assignment process and sending address provides message ID Offer to client computer;
Step b3, client computer, after obtaining the address of server-assignment, send Address Confirmation message ID ACK to server;
Step b4, server, after the Address Confirmation ID ACK message obtaining client computer, send address and reply message ID Reply to client computer.
7. in ATE according to claim 6 CAN from the method for automatic configuration of node identifier, it is characterized in that, the priority that Address requests message ID Request, address provide message ID Offer, Address Confirmation message ID ACK and address to reply message ID Reply increases progressively successively.
CN201410653553.7A 2014-11-18 2014-11-18 Automatic configuration method for CAN bus slave node identifiers in automatic testing device Pending CN104320320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410653553.7A CN104320320A (en) 2014-11-18 2014-11-18 Automatic configuration method for CAN bus slave node identifiers in automatic testing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410653553.7A CN104320320A (en) 2014-11-18 2014-11-18 Automatic configuration method for CAN bus slave node identifiers in automatic testing device

Publications (1)

Publication Number Publication Date
CN104320320A true CN104320320A (en) 2015-01-28

Family

ID=52375495

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410653553.7A Pending CN104320320A (en) 2014-11-18 2014-11-18 Automatic configuration method for CAN bus slave node identifiers in automatic testing device

Country Status (1)

Country Link
CN (1) CN104320320A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007340A (en) * 2015-06-30 2015-10-28 苏州汇川技术有限公司 Distributed CAN (Controller Area Network) network supporting plug and play and automatic node address allocation method thereof
CN105573174A (en) * 2016-02-03 2016-05-11 惠州市蓝微新源技术有限公司 Battery management system slave control unit identification information automatic distribution method
CN106657263A (en) * 2016-11-11 2017-05-10 宁波柯力传感科技股份有限公司 Weighing sensor CAN network node number automatic distribution method
CN106878128A (en) * 2017-02-22 2017-06-20 北京经纬恒润科技有限公司 A kind of collocation method and device of identifier receiving filter
CN107493216A (en) * 2017-08-11 2017-12-19 辽宁瑞华实业集团高新科技有限公司 Controller area network bus data processing method and processing device
CN109120735A (en) * 2018-08-06 2019-01-01 拓卡奔马机电科技有限公司 CAN bus based node message ID distribution method, device and equipment
CN110166317A (en) * 2019-05-14 2019-08-23 晶晨半导体(上海)股份有限公司 A kind of test method influencing Wi-Fi handling capacity
CN110417927A (en) * 2018-04-28 2019-11-05 比亚迪股份有限公司 The distribution method and system of compartment network communication address
CN111555941A (en) * 2020-04-30 2020-08-18 中国科学院长春光学精密机械与物理研究所 Automatic generation method of communication protocol test driving data
CN112532495A (en) * 2020-11-16 2021-03-19 中国汽车技术研究中心有限公司 Vehicle-mounted CAN bus delay optimization method
WO2022061760A1 (en) * 2020-09-25 2022-03-31 Elekta Limited Can address assignment
CN115442172A (en) * 2021-08-23 2022-12-06 北京车和家信息技术有限公司 Test message sending method, device, medium, equipment and test system
TWI831372B (en) 2022-09-14 2024-02-01 英業達股份有限公司 One-to-many communication circuit

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090138191A1 (en) * 2007-11-27 2009-05-28 Elektrobit Automotive Gmbh Technique for detecting shifted cargo

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090138191A1 (en) * 2007-11-27 2009-05-28 Elektrobit Automotive Gmbh Technique for detecting shifted cargo

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
梁兆东: ""基于CAN总线的直升机测试系统软件平台开发"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105007340A (en) * 2015-06-30 2015-10-28 苏州汇川技术有限公司 Distributed CAN (Controller Area Network) network supporting plug and play and automatic node address allocation method thereof
CN105007340B (en) * 2015-06-30 2019-06-14 苏州汇川技术有限公司 Support the Distributed C AN network and its node address auto-allocation method of plug and play
CN105573174A (en) * 2016-02-03 2016-05-11 惠州市蓝微新源技术有限公司 Battery management system slave control unit identification information automatic distribution method
CN106657263A (en) * 2016-11-11 2017-05-10 宁波柯力传感科技股份有限公司 Weighing sensor CAN network node number automatic distribution method
CN106878128A (en) * 2017-02-22 2017-06-20 北京经纬恒润科技有限公司 A kind of collocation method and device of identifier receiving filter
CN107493216A (en) * 2017-08-11 2017-12-19 辽宁瑞华实业集团高新科技有限公司 Controller area network bus data processing method and processing device
CN107493216B (en) * 2017-08-11 2020-05-12 北京瑞华高科技术有限责任公司 Controller area network CAN bus data processing method and device
CN110417927A (en) * 2018-04-28 2019-11-05 比亚迪股份有限公司 The distribution method and system of compartment network communication address
CN109120735A (en) * 2018-08-06 2019-01-01 拓卡奔马机电科技有限公司 CAN bus based node message ID distribution method, device and equipment
CN110166317A (en) * 2019-05-14 2019-08-23 晶晨半导体(上海)股份有限公司 A kind of test method influencing Wi-Fi handling capacity
CN110166317B (en) * 2019-05-14 2022-06-28 晶晨半导体(上海)股份有限公司 Test method for influencing Wi-Fi throughput
CN111555941A (en) * 2020-04-30 2020-08-18 中国科学院长春光学精密机械与物理研究所 Automatic generation method of communication protocol test driving data
WO2022061760A1 (en) * 2020-09-25 2022-03-31 Elekta Limited Can address assignment
CN112532495A (en) * 2020-11-16 2021-03-19 中国汽车技术研究中心有限公司 Vehicle-mounted CAN bus delay optimization method
CN115442172A (en) * 2021-08-23 2022-12-06 北京车和家信息技术有限公司 Test message sending method, device, medium, equipment and test system
TWI831372B (en) 2022-09-14 2024-02-01 英業達股份有限公司 One-to-many communication circuit

Similar Documents

Publication Publication Date Title
CN104320320A (en) Automatic configuration method for CAN bus slave node identifiers in automatic testing device
CN106878459B (en) Self-adaptive Internet of things intelligent gateway implementation method and equipment thereof
Gross et al. Power systems
CN103828305B (en) For parametrization automated system or the system and method for the field apparatus of control system
CN110138624A (en) Vehicle-mounted ethernet test equipment, system and test method
CN101947938B (en) Hybrid power CAN network communication system
CN103699074B (en) CAN communication control device in a kind of current transformer and communication method
WO2018196655A1 (en) Public network communication method for on-board electronic processing unit system
CN109189432A (en) A kind of automobile ECU data write with a brush dipped in Chinese ink method and relevant device
CN110401568A (en) A kind of method for discovering network topology and equipment
CN206237453U (en) CAN Bus in Electric node general purpose controller
CN112134792B (en) Remote train network communication interface testing gateway equipment and system
CN102438017A (en) Routing function-based conversion apparatus of Modbus protocol and BACnet Ethernet protocol and conversion method thereof
Zhou et al. Development method of simulation and test system for vehicle body CAN bus based on CANoe
CN101557328B (en) Method for generating substation detection message in automobile CAN-bus car body control system
CN104158714A (en) Master device of process field bus decentralized periphery
CN104639355B (en) A kind of LIN communication schedulings method to set up
CN105404271B (en) A kind of centralized body control system and its identity method for early warning
CN112333293A (en) Network component and addressing of network components of a charging park
CN201917907U (en) Equipment applied to simulated train MVB (Multifunction Vehicle Bus) network environment
CN109687985B (en) Automatic configuration method and system for process level network of transformer substation
CN201130955Y (en) MVB-CAN gateway equipment based on ARM7 nucleus micro-processor
WO2023039804A1 (en) Signal connection method, signal connection apparatus, and test system
CN108521416A (en) A kind of ECN boards
CN111674428B (en) Train brake control unit Ethernet joint debugging system and joint debugging method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150128