A kind of parallel vehicle diagnosis method of multi-path and automotive diagnostic installation realized
Technical field
The present invention relates to vehicle diagnosis technical field, relate in particular to a kind of parallel vehicle diagnosis method of multi-path and automotive diagnostic installation realized.
Background technology
Along with the develop rapidly of Hyundai Motor technology, the frequent appearance of hybrid power and electric automobile, the structure of automobile electric control system becomes increasingly complex.New and high technology particularly electronic technology, computer technology has obtained application more and more widely on automobile, the pooled applications of these new and high technologies on automobile, when improving to greatest extent vehicle safety and comfortableness, also for the detection of vehicle failure in the future, maintenance have brought very large challenge.In today of competition, industry competition pressure constantly increases, and automobile maintenance industry exists such problem equally, constantly the increasing of recruitment cost, and vehicle maintenance price unstable, the time becomes especially precious.
Various fault detection system for automobile develop rapidlys.Existing fault detection system for automobile major part is with system autoscan function, a system connects the scanning of a system, on the fewer vehicle of computer system, distinguish smaller, yet, up to a hundred of some vehicle computer system as many as, having scanned so all systems may need several hours, the maintenance cost height very that becomes.Because the vehicle of each automobile manufacturing company Suo Sheng factory mostly comprises a plurality of computer systems, such as: automotive electronic control system system, gearbox control system, anti-lock braking system, air bag system, central control system etc.May there is different communication modes in each computer system.Conventional communication mode is as CAN, ISO15765, and ISO9141, ISO14230, TP2.0, TP1.6, upper ten kinds of communication modes such as SW-CAN, every kind of mode all needs to get through different hardware paths and vehicle diagnosis seat and sets up electrical electricity and connect.Existing diagnostic techniques is normally in each system of scanning, first with original CAN agreement and vehicle, set up and link, SW-CAN, use again ISO15765 agreement, and then be ISO9141, ISO14230 etc. timesharing and vehicle are set up and are linked, and whether inquiry vehicle supports this agreement, and then with the system interaction of supporting this agreement, obtain a series of information of vehicles such as failure code.Implementation procedure is roughly such: if automobile has four conventional computer systems respectively: engine electric-controlled system, gearbox control system, anti-lock braking system, air bag system.First, detect engine electric-controlled system and whether have failure code, just need to by different communication protocol (as CAN, ISO15765, ISO14230 etc.), go the computer system of attempting with automobile to link respectively, if linked successfully, then the read failure code that says the word; And then be gearbox control system, anti-lock braking system, air bag system.If diagnosed existing on the automobile of up to a hundred computer systems, the time that need to expend well imagines, and in the system diagnostics of part automobile computer, sometimes need dual system to link just simultaneously and can complete diagnosis, main implementation is to link in advance a path, enters automobile computer system, sends link and keeps data, and then be switched to an other protocol pass and enter system, obtain automobile computer information.In first automobile computer system information of needs, switch again in the past reading information.Ceaselessly switch like this, complete the diagnostic work of whole automobile computer system.Existing vehicle diagnosis technology has following shortcoming: 1, speed is slow, and unipath is scanned one by one, has tens so that need to spend the time of several hours in the vehicle of up to a hundred computing systems; 2, auto repair cost is high; 3, the time spending is long, no doubt can increase the maintenance cost of vehicle; 4, reaction velocity, unipath scanning, reacts slow to user's use sense exactly; 5, stability is low, in the diagnosis of the automobile computer system that needs dual system simultaneously to link, due to switched path ceaselessly, easily causes the broken string of link, need to again reenter.
Summary of the invention
The object of the invention is to propose a kind of parallel vehicle diagnosis method of multi-path of realizing, can realize multi-path parallel communications and link, the parallel data message that reads automobile computer system completes relevant diagnostic function.
For reaching this object, the present invention by the following technical solutions:
Realize the parallel vehicle diagnosis method of multi-path, comprising:
The diagnosis end of step 1, automotive diagnostic installation issues a plurality of paths and links protocol instructions to auto communication interfacing equipment;
Step 2, auto communication interfacing equipment check that described a plurality of path links communication protocol class object corresponding to protocol instructions and whether builds; If not, perform step 3; If so, perform step 4;
Step 3, according to described path, link protocol instructions and build respectively communication protocol class object, and record the path ID of the automobile computer system that described communication protocol class object is corresponding, and perform step 4;
Step 4, according to the path ID of automobile computer system corresponding to communication protocol class object, each automobile computer system is given in described diagnosis end distribution diagnostic scan instruction, with realize automobile computer system that automotive diagnostic installation is corresponding with described path ID alternately;
Wherein, described communication protocol class object is the communication protocol that corresponding path ID is used.
Wherein, described step 4 is specially:
According to the path ID of automobile computer system corresponding to communication protocol class object, each automobile computer system is given in described diagnosis end distribution diagnostic scan instruction, if corresponding communication protocol class object is destroyed in the nonreply of automobile computer system; Otherwise, realize the mutual of automobile computer system that automotive diagnostic installation is corresponding with described path ID.
Wherein, described structure communication protocol class object comprises:
The diagnostic software application program of the diagnosis end of step 31, automotive diagnostic installation links path the diagnostic dynamic API library that protocol instructions passes to diagnosis end;
The diagnostic device driver that step 32, described diagnostic dynamic API library are held by diagnosis links protocol instructions by path and is sent to the Communication driver in auto communication interfacing equipment; Communication driver links after protocol instructions is resolved and is distributed to the path management program in auto communication interfacing equipment path;
Step 33, path management program are constructed communication protocol class object according to path hardware resource service condition, and communication protocol class object are joined to the communication protocol management device in auto communication interfacing equipment.
Wherein, the number that issues a plurality of paths link protocol instructions described in is at most 3.
Wherein, the communication protocol management device in described auto communication interfacing equipment is for managing the communication protocol class object having built, and the getting through and closing of path corresponding to described communication protocol class object.
Wherein, described automobile computer system comprises automotive electronic control system system, gearbox control system, anti-lock braking system, air bag system, burglary-resisting system and central control system.
Wherein, before described step 1, also comprise: open the burglary-resisting system in automobile computer system and keep Real-Time Monitoring, the diagnostic software application program of the diagnosis end of automotive diagnostic installation issues a plurality of paths link protocol instructions and authenticates to burglary-resisting system; If authentication is passed through, perform step 1.
Wherein, comprising alternately of the automobile computer system that described automotive diagnostic installation is corresponding with described path ID: automotive diagnostic installation obtains the failure code of automobile computer system.
Realize an automotive diagnostic installation for the parallel vehicle diagnosis of multi-path, comprise diagnosis end and the auto communication interfacing equipment being connected with described diagnosis end communication;
Described diagnosis end, be used for issuing a plurality of paths and link protocol instructions to auto communication interfacing equipment, the described a plurality of paths of correspondence that built according to auto communication interfacing equipment link the communication protocol class object of protocol instructions, determine the path ID of the automobile computer system that communication protocol class object is corresponding, according to described path ID, each automobile computer system is given in distribution diagnostic scan instruction, with realize automobile computer system that automotive diagnostic installation is corresponding with described path ID alternately;
Described auto communication interfacing equipment, for checking whether communication protocol class object corresponding to a plurality of paths link protocol instructions that described diagnosis end is sent builds, and according to described path link protocol instructions, build respectively communication protocol class object when corresponding communication protocol class object does not build, and record the path ID of the automobile computer system that described communication protocol class object is corresponding;
Wherein, described communication protocol class object is the communication protocol that corresponding path ID is used.
Beneficial effect:
Compared with prior art, the diagnosis end that the present invention includes step 1, automotive diagnostic installation issues a plurality of paths and links protocol instructions to auto communication interfacing equipment; Step 2, auto communication interfacing equipment check that described a plurality of path links communication protocol class object corresponding to protocol instructions and whether builds; If not, perform step 3; If so, perform step 4; Step 3, according to described path, link protocol instructions and build respectively communication protocol class object, and record the path ID of the automobile computer system that described communication protocol class object is corresponding, and perform step 4; Step 4, according to the path ID of automobile computer system corresponding to communication protocol class object, each automobile computer system is given in described diagnosis end distribution diagnostic scan instruction, with realize automobile computer system that automotive diagnostic installation is corresponding with described path ID alternately; Wherein, described communication protocol class object is the communication protocol that corresponding path ID is used.The present invention can realize multi-path parallel communications, with a plurality of automobile computer system made communication link, the parallel data message that reads automobile computer system completes relevant diagnostic function, can complete faster the fault diagnosis of automobile computer system, when improving diagnosis speed, shorten servicing time, reduced maintenance cost; In needs double flow car computer system, link just can complete vehicle diagnosis time simultaneously, need not switching back and forth link path, only need be when which automobile computer system information of needs, just to these automobile computer system direct interaction data and order, need not carry out path switching.For upper layer application, just change the path ID opening just passable, by automotive diagnostic installation, according to the link in path ID use protocol manager, carried out alternately, and can walk abreast and transmit and receive data to these two paths.
Accompanying drawing explanation
Fig. 1 is the structural representation that a kind of automotive diagnostic installation of providing of the specific embodiment of the invention and automobile computer system link.
Fig. 2 is a kind of process flow diagram of realizing the parallel vehicle diagnosis method of multi-path that the specific embodiment of the invention provides.
Fig. 3 is the mutual structural representation of the diagnosis end of the automotive diagnostic installation that provides of the specific embodiment of the invention and auto communication interfacing equipment.
Fig. 4 is a kind of process flow diagram that builds communication protocol class object that the specific embodiment of the invention provides.
Embodiment
Below in conjunction with accompanying drawing and by embodiment, further illustrate technical scheme of the present invention.The realization of the parallel vehicle diagnosis method of a kind of multi-path of the present invention needs the electric connection that can simultaneously set up a plurality of paths with vehicle diagnosis seated connection mouth.Fig. 1 is the structural representation that a kind of automotive diagnostic installation of providing of the specific embodiment of the invention and automobile computer system link.As shown in Figure 1,1 is VPW agreement single line mode of connection; 2 is CAN, IOS15765 agreement mode of connection; 3 is the mode of connection of the agreements such as K, L circuit ISO9141, ISO1281.In CAN BUS bus, be connected with three paths, so long as not the conflict of PIN pin, except 16PIN is power supply, 4PIN, 5PIN can link outside ground, need realize according to the definition of vehicle diagnosis seated connection mouth simultaneously.Compare with traditional unipath vehicle diagnosis method, the present invention can realize multi-path parallel communications and link, the parallel data message that reads automobile computer system completes relevant diagnostic function, has the advantages that efficiency is high, speed is fast, cost is low and stability is high.
In automobile, have up to a hundred computer systems, each automobile computer system is used different communication protocol, and at present, the conventional communication protocol of automobile computer system has upper ten kinds, for example, CAN, ISO15765, ISO9141, ISO14230, TP2.0, TP1.6, the agreements such as SW-CAN.Automotive diagnostic installation, when diagnosis automobile, first, need to be attempted and automobile computer system made communication link by different communication protocol, until find the agreement that this automobile computer system is used really to set up and to link; Then send diagnostic scan instruction and carry out diagnostic scan to automobile computer system then.The present invention can realize the parallel communication protocol of going judgement searching automobile computer system to use of multi-path simultaneously, can diagnose automobile with a plurality of automobile computer system made multi-path parallel communicationss simultaneously.Fig. 2 is a kind of process flow diagram of realizing the parallel vehicle diagnosis method of multi-path that the specific embodiment of the invention provides.As shown in Figure 2, a kind of parallel vehicle diagnosis method of multi-path of realizing, comprising:
The diagnosis end of step 1, automotive diagnostic installation issues a plurality of paths and links protocol instructions to auto communication interfacing equipment;
Described automotive diagnostic installation comprises diagnosis end and the auto communication interfacing equipment communicating to connect with described diagnosis end.
Step 2, auto communication interfacing equipment check that described a plurality of path links communication protocol class object corresponding to protocol instructions and whether builds; If not, perform step 3; If so, perform step 4;
Wherein, described communication protocol class object is the communication protocol that corresponding path ID is used.
Step 3, according to described path, link protocol instructions and build respectively communication protocol class object, and record the path ID of the automobile computer system that described communication protocol class object is corresponding, and perform step 4;
Step 4, according to the path ID of automobile computer system corresponding to communication protocol class object, each automobile computer system is given in described diagnosis end distribution diagnostic scan instruction, with realize automobile computer system that automotive diagnostic installation is corresponding with described path ID alternately;
It is parallel current that the present invention can realize multi-path, with a plurality of automobile computer system made communication link, the parallel data message that reads automobile computer system completes relevant diagnostic function, can scan various communications protocols simultaneously, the speed that adds short scan, completes the fault diagnosis of automobile computer system faster, when improving diagnosis speed, shortened servicing time, reduced maintenance cost, in needs double flow car computer system, link simultaneously and just can complete when diagnosis, need not stop back and forth to switch link path, only need be when the information of which automobile computer system of needs, just to these automobile computer system direct interaction data and order and need not carry out path switching, for upper layer application, just change the path ID opening just passable, by automotive diagnostic installation, according to path ID, use the link in protocol manager to carry out alternately, and can walk abreast and transmit and receive data to these two paths, avoided easily causing when unipath communication is switched in prior art the broken string of link, the problem that need to again reenter, therefore, it is high that the present invention has efficiency, cost is low, the advantage that stability is high.
Described step 4 is specially: according to the path ID of automobile computer system corresponding to communication protocol class object, each automobile computer system is given in described diagnosis end distribution diagnostic scan instruction, if the nonreply of automobile computer system, destroys corresponding communication protocol class object; Otherwise, realize the mutual of automobile computer system that automotive diagnostic installation is corresponding with described path ID.If automobile computer system is not replied the diagnostic scan instruction of diagnosis end distribution, illustrate and do not find the path of coupling to link agreement, need to return to step 1 re-issues other one group of path and links protocol instructions and continues to judge, until find corresponding path to link agreement, set up path link, the diagnostic scan instruction that automobile computer system could issue diagnosis end respond.
Fig. 3 is the mutual structural representation of the diagnosis end of the automotive diagnostic installation that provides of the specific embodiment of the invention and auto communication interfacing equipment, as shown in Figure 3, the diagnosis end that in Fig. 3, the left side is automotive diagnostic installation, in Fig. 3, the right is auto communication interfacing equipment.Described A is the diagnostic software application program of the diagnosis end of automotive diagnostic installation, the diagnostic device driver of the diagnosis end that B is automotive diagnostic installation, the diagnostic dynamic API library of the diagnosis end that C is automotive diagnostic installation; A is the Communication driver of auto communication interfacing equipment, and b is the path management program of auto communication interfacing equipment, and c is that the communication protocol of auto communication interfacing equipment realizes modular program.Wherein, the diagnostic software application program that realizes diagnostic function that the diagnosis end of automotive diagnostic installation is installed comprises a series of functional modules such as vehicle selection, VIN code scanning automatically, Vehicular system autoscan, Vehicular system single system enter, diagnostic trouble code read-write, failure message inquiry, diagnostic trouble code removing, dynamic test, the demonstration of data stream picture and text.
Entity structure based in Fig. 3, Fig. 4 is a kind of process flow diagram that builds communication protocol class object that the specific embodiment of the invention provides.As shown in Figure 4, in said method, described structure communication protocol class object comprises: the diagnostic software application program of the diagnosis end of step 31, automotive diagnostic installation links path the diagnostic dynamic API library that protocol instructions passes to the diagnosis end of automotive diagnostic installation;
Step 32, the described diagnostic dynamic API library diagnostic device driver by the diagnosis end of automotive diagnostic installation links protocol instructions by path and is sent to the Communication driver in auto communication interfacing equipment; Communication driver in auto communication interfacing equipment links after protocol instructions is resolved and is distributed to the path management program in auto communication interfacing equipment path;
Path management program in step 33, auto communication interfacing equipment is constructed communication protocol class object according to path hardware resource service condition, and communication protocol class object is joined to the communication protocol management device in auto communication interfacing equipment.
In conjunction with Fig. 3, Fig. 4, introduce in detail the mutual specific implementation of the diagnosis end of automotive diagnostic installation and auto communication interfacing equipment below: when automotive diagnostic installation enters automobile computer system autoscan, first link communication agreement VPW, instruction will be passed to C by A and be delivered to again B, then instruction is sent to a of Communications Interface Unit end, a resolves instruction, and carry out instruction distribution, path link protocol instructions just sends b if, b is according to a communication protocol class object 1 of service condition structure of hardware path resource, by 1, add link manager, and it is corresponding with it for the path of the diagnosis end diagnostic software of the automotive diagnostic installation on upper strata to be configured to a path ID, it should be noted that, the communication protocol management device of the corresponding lower floor of link manager on the upper strata here, then A is through same instruction transmittance process link communication agreement CAN, and b constructs second communication protocol class object 2, then adds link manager by 2, last A notifies b to set up new communication protocol class object 3 more in the same way, then adds link manager by 3, links that in manager, oneself has comprised three kinds of communication protocol class objects, has namely opened three soft and hardware paths.The diagnostic software of A end has also set up the diagnosis thread of three communication protocols simultaneously, A is by again the autoscan instruction of each computer system of automobile, be distributed to this three threads, each thread is delivered to corresponding diagnostic scan instruction three protocol class objects of the communication protocol management device of auto communication interfacing equipment end again, and these three objects are inquired diagnostic scan instruction is delivered to each automobile computer system according to different hardware send modes: there is such computer system? which type of communication mode is does such computer system again to use? if there is an object to obtain the response of automobile computer system in three objects, with regard to proof system, enter successfully, disconnect the link of other two systems, and further by the path becoming, obtain more detailed system information, reach the object of diagnosis, it is more than the process that autoscan enters system.
It should be noted that, the automobile computer system also having, when entering specific a certain automobile computer system, need to first enter burglary-resisting system authentication, and the link that the keeps burglary-resisting system automobile computer system that just can enter other, at this moment also need to link two or more IEEE Std parallel highways.Therefore, in this case, need to before described step 1, also comprise: open the burglary-resisting system in automobile computer system and keep Real-Time Monitoring, the diagnosis end diagnostic software application program of automotive diagnostic installation issues a plurality of paths link protocol instructions and authenticates to burglary-resisting system; If authentication is passed through, perform step 1.
The described number that issues a plurality of paths link protocol instructions is at most 3.
Communication protocol management device in described auto communication interfacing equipment is for managing the communication protocol class object having built, and the getting through and closing of path corresponding to described communication protocol class object.
Described automobile computer system comprises automotive electronic control system system, gearbox control system, anti-lock braking system, air bag system, burglary-resisting system and central control system.Certainly, in addition, also comprise other automobile computer system.
Described communication protocol comprises VPW agreement, CAN agreement, ISO15765 agreement, ISO9141 agreement and ISO14230 agreement.The communication protocol of other that in addition, also comprise that auto communication field is conventional.
Comprising alternately of the automobile computer system that described automotive diagnostic installation is corresponding with described path ID: automotive diagnostic installation obtains the failure code of automobile computer system.
A kind of automotive diagnostic installation of realizing the parallel vehicle diagnosis of multi-path comprises diagnosis end and the auto communication interfacing equipment being connected with described diagnosis end communication;
Described diagnosis end, be used for issuing a plurality of paths and link protocol instructions to auto communication interfacing equipment, the described a plurality of paths of correspondence that built according to auto communication interfacing equipment link the communication protocol class object of protocol instructions, determine the path ID of the automobile computer system that communication protocol class object is corresponding, according to described path ID, each automobile computer system is given in distribution diagnostic scan instruction, with realize automobile computer system that automotive diagnostic installation is corresponding with described path ID alternately;
Described auto communication interfacing equipment, for checking whether communication protocol class object corresponding to a plurality of paths link protocol instructions that described diagnosis end is sent builds, and according to described path link protocol instructions, build respectively communication protocol class object when corresponding communication protocol class object does not build, and record the path ID of the automobile computer system that described communication protocol class object is corresponding;
Wherein, described communication protocol class object is the communication protocol that corresponding path ID is used.
The above; it is only preferably embodiment of the present invention; but protection scope of the present invention is not limited to this; anyly be familiar with those skilled in the art in the technical scope that the present invention discloses; according to technical scheme of the present invention and inventive concept thereof, be equal to replacement or changed, within all should being encompassed in protection scope of the present invention.