A kind of universal CAN method for monitoring network of agreement Network BasedTechnical field
The present invention relates to a kind of electronic control method, refer in particular to a kind of electric automobile that relates to, the universal CAN method for monitoring network of agreement Network Based is mainly used in the universal monitoring of inner each time level controller of electric automobile.
Background technology
Electric automobile rises just gradually as a new industry, and the ECU (Electrical Control Unit) in the electric automobile is many, the inner space is little, environmental interference is big, and control system, communication system are had higher requirement.The electric automobile whole key components and parts: entire car controller, motor driven systems, DCDC power supply, accessory power supply, instrument etc., they form network by CAN.The CAN network is with its good operation characteristic, and high reliability and unique design are particularly suitable for the communication between each electronic control unit of electric automobile, is also produced based on the product of CAN network.The set procotol of setting up based on entire car controller can satisfy the general needs that car load is diagnosed.Along with the batch process and the popularization of electric automobile, the ipc monitor platform that the suitable exploitation of Development of Universal, the manufacturing and user use is just necessary.
By retrieval, the approaching technical scheme of discovery and the present invention has following two kinds:
(1) patent No. is 200720103299.9 " electric automobile information acquisition and radio transmitting device ", this device not only has common inter-vehicle information system positioning and communicating navigation function, and can gather electric automobile vehicle self information relevant with battery, and information wireless sent to long-range Surveillance center, for the reliable and stable operation of vehicle provides safeguard.Device mainly comprises: based on microcomputer motherboard, 512M CF card, 128M memory bar, CAN communication board, gsm communication module, GPS receiver module, DC/DC module, I/O interface, SIM card, the keyboard of PC104 bus.Main application comprises: the information such as voltage, electric current of gathering every battery by the CAN bus; Obtain the locating information of vehicle ' in real time; Periodically locating information and battery information are kept in the database; The user is by USB flash disk data in the data download storehouse automatically; Carry out radio communication with GSM short message or GPRS mode and Surveillance center; Electronic chart shows.
(2) patent No. is 200410003472.9 " based on the mixed power electric car controller calibrating platform of CCP agreement ", it is characterized in that, it be the following level controller of mixed power electric car and with upper main frame that described down level controller is connected with the CAN bus between, according to the realization of CCP agreement by the platform of upper main frame to initialization setting, parameter calibration and the parameter supervision of level controller under the target.This platform overcomes controller calibration tool and controller communication poor reliability under the prior art, communication speed is slow and the deficiency of calibration tool versatility difference, on the basis of the general utility functions of realizing original calibrating platform, improve reliability, convenience and the versatility of staking-out work.
There is following shortcoming in present monitor supervision platform: monitor supervision platform function imperfection all is based on set procotol.In exploitation, safeguarding, different products has different procotols, needs the watch-dog of configure dedicated.Kai Fa watch-dog causes functions such as may not possessing relevant fault trigger mode, data storage because of cost or technical reason simultaneously.Bring big difficulty to complete vehicle fault diagnosis or maintenance.
Summary of the invention
The objective of the invention is to, in order to overcome under the prior art, the electric automobile supervisory system all can only be based on the deficiency of set single network agreement, a kind of universal CAN method for monitoring network of agreement Network Based is provided, by disposing and calling the different network protocol configuration file, satisfy the monitoring demand of different network protocol equipment, to realize the demonstration and the storage of customizing messages, make equipment have more versatility, make things convenient for designer and after sale service personnel field adjustable.
The technical scheme that the present invention solves its technical matters employing is: this monitor supervision platform has the host computer (main equipment) of CAN bus interface by one and one or more following level controller that has the CAN bus port of electric automobile is formed, connected by a CAN bus between them, each time level controller is connected on the node of CAN bus.Be applied in a kind of universal CAN method for monitoring network on the above-mentioned monitor supervision platform, it is characterized in that,, set up monitoring interface, show or the preservation device-dependent message, may further comprise the steps by calling the relevant configuration file of different network protocol:
The first step, give one of each node configuration independently with the corresponding configuration file of its procotol;
In second step, upper computer software adopts the mode invocation target configuration file of reading file, sets up the monitoring interface to level controller under the target, and the related command in the configuration file is sent to level controller under the target by node;
The 3rd step, level controller receives the parameter command from configuration file under the target, finish relevant treatment according to order, and reply to upper computer software repayment, the information that level controller sent up under host computer was resolved according to configuration file, show or store, realize monitoring thus level controller under the target.
The unique file of described configuration file for writing by established rule can directly call after searching selection.
Described upper computer software can be the monitoring software of PC, also can be based on the monitoring software of embedded system development.
Beneficial effect of the present invention is: 1, adopt the configuration file control technology, by revising configuration file, can realize the monitoring to different network protocol equipment, strengthen versatility; 2, this method can be finished its function on original hardware platform, needn't increase other hardware.
Description of drawings
Fig. 1 is the process flow diagram of method for supervising of the present invention.
Embodiment
Further set forth the present invention below in conjunction with the drawings and specific embodiments.
The method of the invention is applied on the monitor supervision platform, this monitor supervision platform has the host computer (main equipment) of CAN bus interface by one and one or more following level controller that has the CAN bus port of electric automobile is formed, connected by a CAN bus between them, each time level controller is connected on the node of CAN bus.
As shown in Figure 1, the universal CAN method for monitoring network of a kind of agreement Network Based of the present invention, its concrete workflow is as follows:
1, carries out the CAN device initialize, give one of each node configuration independently with parameter informations such as the corresponding configuration file of its procotol, whether whether configuration file comprise information frame ID number of level controller under this node, variable name, position definition, ratio, skew, show, preserve, triggering;
2, upper computer software calls configuration file in the mode of reading file, foundation is to the monitoring interface of level controller under the target, relevant parameter information in the configuration file is handled, drawing the variables corresponding name is shown on the monitoring interface, deposit information such as ID number, variable scale, skew in variable simultaneously, and this variable is sent to level controller under the target;
3, after the next target controller is received variable information, mate with the ID that has stored number voluntarily, when the match is successful, promptly handle in information such as ratio set in the variable, skews, according to whether showing (preservation), the value that calculates is shown to correspondence position (or preservation), realizes monitoring level controller under the target.
Whether whether described configuration file is file independently, and it is write by set rule and is undertaken, comprise ID number of information frame, variable name, position definition, ratio, skew, show, preserve, content such as triggering, can directly call after searching selection.Function on the upper computer software interface and information all refresh according to the change of configuration file, can satisfy new device requirement as long as revise configuration file like this, realize its versatility.
Method for supervising of the present invention both can be used for the monitoring software that the PC monitoring software also can be used for embedded system development.