CN101572690B - Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame - Google Patents

Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame Download PDF

Info

Publication number
CN101572690B
CN101572690B CN2008100670332A CN200810067033A CN101572690B CN 101572690 B CN101572690 B CN 101572690B CN 2008100670332 A CN2008100670332 A CN 2008100670332A CN 200810067033 A CN200810067033 A CN 200810067033A CN 101572690 B CN101572690 B CN 101572690B
Authority
CN
China
Prior art keywords
lin
response
data
node
state information
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.)
Expired - Fee Related
Application number
CN2008100670332A
Other languages
Chinese (zh)
Other versions
CN101572690A (en
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.)
SHIYAN KERNEL TRONIX CO Ltd
Original Assignee
SHIYAN KERNEL TRONIX CO Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHIYAN KERNEL TRONIX CO Ltd filed Critical SHIYAN KERNEL TRONIX CO Ltd
Priority to CN2008100670332A priority Critical patent/CN101572690B/en
Publication of CN101572690A publication Critical patent/CN101572690A/en
Application granted granted Critical
Publication of CN101572690B publication Critical patent/CN101572690B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a vehicle body control technique. Aiming at the problem that the LIN standard of the prior art does not define the concrete structures of data part in respond data resulting in products of different manufacturers adopts different analytic methods for response data to cause non-compatibility of the products, the invention provides a transmitting, receiving and network adapters and a method for transmitting and receiving LIN frame. The transmitting adapter is used for transmitting LIN response and is arranged in an LIN node which is connected with a load; and the transmitting adapter comprises a memory module used for storing a frame structure table and an analysis module used for reading the state information of the load and generating LIN response containing the state information and response type. Through defining the concrete structure of the data part in response in detail, analysis methods of products of different manufacturers can be uniformed for response, so that the products of different manufacturers are compatible with each other.

Description

The sending, receiving method of transmission, reception, network adapter and LIN frame
Technical field
The present invention relates to the Body Control technology, more particularly, relate to the sending, receiving method of a kind of transmission, reception, network adapter and LIN frame.
Background technology
Control mode is digitized as auto industry and has defined new developing direction.A large amount of uses of ECU make that the automobile operation of a new generation is easier, control more accurately, drive safer.
Yet increasing of ECU causes the interior wire harness of car to roll up, and wiring becomes complicated more in the car, and the tie point potential safety hazard grows with each passing day.For addressing this problem, communication network arises at the historic moment in the car.The kind of communication network is a lot of in the car at present, U.S. automotive engineer association (Society of AutomotiveEngineers SAE) is divided into four big type with these networks, and concrete condition is as shown in the table:
Network type Speed Purposes
Category-A <10kbit/s Improve the application of convenience
Category-B 10-125kbit/s General information transmits
The C class 125kbit/s-1Mbit/s Control in real time
The D class >1Mbit/s Multimedia application, the hardware real-time function
Table 1
Wherein, the application examples of Body Control aspect is little like the volume of transmitted data of the application (comprising the control such as but not limited to car light, vehicle window, car door, the adjustment of driven rearview mirrors etc.) of raising convenience, and real-time requires also not high, therefore can realize through Class A Network.
LIN (Local Interconnect Network, local internet network) standard is a kind of in numerous Class A Network standards, and it is formulated by how tame automaker and semiconductor company jointly, the application of comfortableness and convenience aspect in being used to realize cut-offfing.
Fig. 1 is the structural representation of an existing LIN network 100.As shown in Figure 1, network 100 adopts bus type topological structures, comprises LIN bus 112, and is connected a host node 102 on the LIN bus 112 with a plurality of from node 104, and each node all is connected with load 106.The LIN standard is a main task 108 and from 110 two types of tasks with the division of operations of each node in the network 100.Main task 108 is used to send the LIN frame head, comes the data transmission timing and the priority of each node in the Control Network 100 with this, and the communication in the network 100 is initiated by main task 108 usually.Be used to receive the LIN frame head that main task 108 is sent from task 110, send the LIN response, and receive other LIN responses of sending in the network 100 from task 108.In the LIN standard, host node 102 both executive director is engaged in 108, carries out again from task 110; And only carry out from task 110 from node 104.Each node receives the LIN response, extracts control command wherein, controls the load 106 that is connected according to this.
Fig. 2 is the logical construction sketch map of existing LIN frame 200.As shown in Figure 2, a complete LIN frame comprises 204 two parts of frame head 202 and response, and wherein frame head 202 further comprises Break (at interval) field 202, Synch (synchronously) field 204 and PID (shielded identifier) field 206.The Break field is made up of 0 of continuous at least 10 bits, is the start-up portion of LIN frame 200.Synch field 204 is used for synchronous from task and master clock, and its content is 55H, can produce 5 low level pulses, uses these pulses to proofread and correct the baud rate of oneself from task.What PID field 206 was represented is the content of information, rather than the destination address of information.Definition can make a plurality of nodes receive same information like this, for example information can send to from host node one or more from node, also can be by sending to host node from node or other are from node.This shows, need not pass through host node, and host node can be given all nodes in the network with information broadcast from communication between the node.Receive and detect all LIN frame heads 202 from task, when discovery PID wherein is identical with self ID, just send response 204 on bus, promptly respond 204 by sending of PID field appointment from task.Response comprises Data (data) field 2042 and CheckSum (verification and) field 2044 in 204.Wherein the Data field comprises the data of 2,4 or 8 bytes.CheckSum field 2044 comprises the data of 1 byte.
Fig. 3 is the sketch map of the communication process 300 in the prior art LIN.As shown in Figure 3, main task 302 is sent frame head 308, owing to adopt the bus-type topology, so this frame head 308 will be received from task 304 or 306 by all.Comprise the PID field in the frame head 308, judge whether that through this field this transmits data by oneself, after responding time intervals, respond 310 or 312 then by for example sending of PID field appointment from task 304 or 306 from task from node.Owing to adopt the bus-type topology, so this response will be received from task by other all in the network.Can find out by last figure, not need bus arbitration in the LIN,, promptly which send response from task by by the main task decision by the visit that main task is come control bus.Rate of information throughout in the network can reach 20kbps.The physical structure of relevant LIN frame sees also Fig. 4.
Fig. 4 is the physical structure sketch map of existing LIN frame 400.As shown in Figure 4, in communication process, send the frame head 402 that comprises Break field 4022, Synch field 4024 and PID field 4026 by main task.After responding time intervals 404, send the response 406 comprise Data field 4062 and CheckSum field 4064 from task by the appointment of PID field.It should be noted that responding time intervals 404 is not the part of LIN frame 400.
The prior art of relevant LIN has been done complete description in the LIN agreement.
Although stipulated the length and the formation of response part in the frame; But the LIN standard does not define the concrete structure of data in the response part; This product that causes different vendor makes that to the different analytic method of LIN response employing different vendor's product each other can't be compatible.
Therefore, need a kind of scheme, the concrete structure that LIN is responded defines, each other can't compatible problem with the product that solves different vendor.
Summary of the invention
The technical problem that the present invention will solve is; To prior art LIN standard the concrete structure of data division in the response data is not done definition; Make each manufacturer's product adopt different analytic methods to response data; Thereby cause the problem that different vendor's product each other can't be compatible, the sending, receiving method of a kind of transmission, reception, network adapter and LIN frame is provided.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of transmission adapter is used to send the LIN response, and it is arranged on the LIN intranodal, and this LIN node is connected with load, and said transmission adapter comprises:
Memory module is used for the storage frame structural table;
Parsing module is used to read the state information of said load, generates the LIN response that comprises this state information and respond style according to frame structure table.
The present invention also provides a kind of reception adapter, is used to receive the LIN response, and it is arranged on the LIN intranodal, and this LIN node is connected with load, and said reception adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used in said LIN response, extracting respond style, reads the corresponding frame structure table of this respond style, resolves said LIN response according to this frame structure table.
The present invention also provides a kind of network adapter, is used for sending and receives LIN responding, and it is arranged on the LIN intranodal, and this LIN node is connected with load, and said network adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for:
Read the state information of said load, generate the LIN response that comprises this state information and respond style according to frame structure table; And,
From the LIN response of receiving, extract respond style, read the corresponding frame structure table of this respond style, resolve said LIN response according to this frame structure table.
In network adapter of the present invention, said LIN node is a host node or from node.
In network adapter of the present invention, said LIN response comprises data head and data volume; Said data head comprises the MsgID field, is used for the recording responses type; Said data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects of sending this LIN response.
The present invention also provides a kind of LIN frame sending method, and this LIN frame comprises frame head and response, and said method comprises the steps:
S1, main task are sent frame head;
S2, a plurality ofly receive this frame head from task, by this frame head appointment read the state information of its related load from task, send the response that comprises this state information;
Also comprise among the said step S2:
S21, said appointment write respond style from task said response, and according to self frame structure table said state information are write said response.
In method of the present invention, said response comprises data volume, and this data volume comprises the state information that writes according to said frame structure table.
In method of the present invention, said response comprises data head, and this data head comprises said respond style.
The present invention also provides a kind of LIN frame method of reseptance, and this LIN frame comprises response, and said method comprises the steps:
S1, a plurality of reception from task respond;
S2, saidly a plurality ofly from said response, extract respond style, and search the corresponding frame structure table of this respond style from task;
S3, said a plurality of frame structure table that find from the task foundation are extracted the state information from load that task connects of sending this response from said response.
In method of the present invention, said response comprises data head and data volume, records said respond style in the said data head, records said state information in the said data volume.
The technical scheme of embodiment of the present invention has following beneficial effect: the concrete structure through to data division in the response carries out detailed definition, can unify the analytic method of each manufacturer's product to response, makes that the product of each manufacturer can be compatible.
Description of drawings
To combine accompanying drawing and embodiment that the present invention is described further below, in the accompanying drawing:
Fig. 1 is the structural representation of an existing LIN network;
Fig. 2 is the logical construction sketch map of existing LIN frame;
Fig. 3 is the sketch map of the communication process in the prior art LIN;
Fig. 4 is the physical structure sketch map of existing LIN frame;
Fig. 5 is the structural representation according to data field in the LIN frame of one embodiment of the invention;
Fig. 6 is the structural representation according to the CAN-LIN hybrid network 600 of one embodiment of the invention;
Fig. 7 is the structural representation according to the data field 700 of the CAN transmitted frame of one embodiment of the invention;
Fig. 8 is according to the structural representation of one embodiment of the invention based on the network 800 of LIN;
Fig. 9 is the flow chart according to the response transmitting method 900 of one embodiment of the invention;
Figure 10 is the flow chart according to the LIN frame method of reseptance 1000 of one embodiment of the invention;
Figure 11 is the structural representation according to data subfield 1100 in the LIN response of one embodiment of the invention;
Figure 12 is the structural representation according to the failure diagnosis response data son field 1200 of one embodiment of the invention;
Figure 13 A~Figure 13 C is the structural representation according to three data subfields from the corresponding respectively LIN response of node of one embodiment of the invention.
Embodiment
The invention provides a kind of body control system and control method thereof based on the LIN bus; Concrete structure through to data in the response carries out detailed definition; Can unify the analytic method of each manufacturer's product, make that the product of each manufacturer can be compatible response.Just combine accompanying drawing and specific embodiment that technical scheme of the present invention is described below.
Fig. 5 is the structural representation according to data field 500 in the LIN frame of one embodiment of the invention.As shown in Figure 5, data field 500 comprises 8 bytes altogether, can further be divided into data head part 502 and data volume part 504.Data head part 502 occupies Byte7 and two bytes of Byte6 of data field 500, further comprises CONTI field 5022, CAN field 5024, R field 5026 and MsgID field 5028.The length of CONTI field 5022 is 1 bit, and the Bit7 bit that it occupies the Byte7 byte of data field 500 is used to show whether also have follow-up data to need to send, and wherein 0 expression is denied, and 1 expression is.The length of CAN field 5024 is 1 bit, and the Bit6 bit that it occupies the Byte7 byte of data field 500 is used to show whether data field 500 is CAN transmitted frames, and wherein 0 expression is denied, and 1 expression is.The content of relevant CAN transmitted frame will combine hereinafter to be described in detail.The length of R field 5026 is 1 bit, and it occupies the Bit5 bit of the Byte7 byte of data field 500, is reserved field.The length of MsgID field 5028 is 12 bits; It occupies the Bit4~Bit0 bit (being used to constitute 12~8 bits of MsgID) and the whole Byte6 byte (being used to constitute 7~0 bits of MsgID) of the Byte7 byte of data field 500, and it is used to write down the respond style of this LIN frame.
Data volume part 504 comprises the DATA son field, and its length is 48 bits, and it occupies the Byte5~Byte0 byte of data field 500.
The control operation of carrying out according to data field 500 will be described in detail hereinafter.
Because LIN is a kind of slow network, the extension that it can be used as CAN (Controler Area Network, controller local area network) promptly constitutes backbone network by CAN, constitutes terminal network by LIN.Hereinafter just combines accompanying drawing that this network configuration is described.
Fig. 6 is the structural representation according to the CAN-LIN hybrid network 600 of one embodiment of the invention.As shown in Figure 6, CAN-LIN hybrid network 600 comprises CAN bus 602 and is connected a plurality of LIN 604 on the CAN bus 602.LIN 604 comprises LIN bus 6048 and is connected host node 6042 on the LIN bus 6048 with a plurality of from node 6044 that host node 6042 all is connected with load 6046 with a plurality of from node 6044.In running, not only can be through host node 6042 but also can be through transmitting the data on the CAN bus from node 6044.Just combine Fig. 7 to describe when transmitting the data on the CAN bus from node the structure of data field below.
Fig. 7 is the structural representation according to the data field 700 of the CAN transmitted frame of one embodiment of the invention.Through LIN when node is transmitted the CAN frame, need could transmit whole C AN frame through twice forwarding.Therefore, can the CAN frame be divided into high 4Byte part and low 4Byte part.As shown in Figure 7, CAN transmitted frame 700 comprises 8 bytes, can further be divided into data head part 702 and data volume part 704.Data head part 702 occupies the Byte7 byte of CAN transmitted frame 700; Further comprise CONTI field 7022, CAN field 7024, R field 7026 and MsgID field 7028; The content of CONTI field 7022, CAN field 7024, R field 7026 respectively with Fig. 3 in CONTI field 3022, CAN field 3024, R field 3026 identical, repeat no more here.It should be noted that this moment, CAN field 7024 content was 1, and when transmitting the high 4Byte part of CAN frame, the content of CONTI field 7022 is 1, when transmitting the low 4Byte part of CAN data, the content of CONTI field 7022 is 0.MsgID field 7028 is basic identical with the MsgID field 3028 among Fig. 3, and only the length of MsgID field 7028 is 5 bits, and it occupies the Bit4~Bit0 bit of the Byte7 byte of CAN transmitted frame 700.
Data volume part 704 comprises CANID field 7042 and DATA son field 7044.The length of CANID field 7042 is 24 bits; It occupies the Byte6~Byte4 byte of CAN transmitted frame 700; Wherein Byte6 is used to constitute 23~16 bits of CANID, and Byte5 is used to constitute 15~8 bits of CANID, and Byte4 is used to constitute 7~0 bits of CANID.The length of DATA son field 7044 is 32 bits, and it occupies the Byte3~Byte0 byte of CAN transmitted frame 700.
The LIN data are sent to CAN need be defined a specific I D and be used to transmit the LIN application layer data in CAN.
Fig. 8 is according to the structural representation of one embodiment of the invention based on the network 800 of LIN.As shown in Figure 8, network 800 comprises LIN bus 802, and is connected to host node 804 on the LIN bus 802 with a plurality of from node 806.Host node 804 all is connected with load 808 with a plurality of from node 806.Special, host node 804 all comprises network adapter 810 and control module 812 with each from node 806.
Introduce the effect of sending and receive network adapter 810 and control module 812 in the LIN response process below.Clear for ease of describing, in process of transmitting, network adapter 810 is called the transmission adapter, in receiving course, network adapter 810 is called the reception adapter, promptly network adapter 810 comprises the transmission adapter and receives adapter.
Process of transmitting is at first described.
Control module 812 be used to read connect the current state of load, and convert the current state that reads into corresponding numeral form, generate state information, then this state information is mail to the transmission adapter.The numeral form of relevant current state will be described in detail hereinafter.
Send adapter and be used to receive the state information that control module 812 is sent, the frame structure table corresponding according to this node generates data volume.In this case, send adapter and can further comprise parsing module and memory module, store the frame structure table (the for example pairing frame structure table of MsgID of the LIN response of this node transmission) of this node in the memory module.Parsing module is used to read the frame structure table of this node, uses the state information of receiving to generate each data subfield in the data volume according to this frame structure table.Record the structure of data subfield in the frame structure table, i.e. each bar information position in data subfield in the state information.Frame structure table will be described hereinafter for example.Subsequently, send adapter and generate data head, wherein comprise CONTI field, CAN field, R field 5026 and MsgID field, wherein MsgID is used to describe the type of LIN response.After this, send adapter the data head and the data volume that generate be combined into data field, and calculation check and.At last, send adapter with data field and verification be combined into response concurrent and send.
Next receiving course is described.
Receive adapter and comprise parsing module and memory module.Parsing module is used for extracting data field from the LIN response of receiving, and from this data field, extracts data head and data volume.Subsequently, parsing module extracts the MsgID field from data head, as indicated above, and MsgID is used to describe the type of LIN response.Store many frame structure table in the memory module, every corresponding MsgID of frame structure table.Parsing module is searched the pairing frame structure table of being extracted of MsgID field, and the data subfield in the data volume that extracts is resolved, and obtains state information, mails to control module 812.It should be noted that what write down in this state information is the state of load that the node that sends this LIN response (for example host node or from node) connects.The node of this LIN response of transmission as indicated above can be identified by the PID field, and the content of relevant extraction PID field etc. is described in the LIN agreement, and this paper repeats no more.
Control module 812 is used for sending control command according to the state information of receiving to the load that affiliated node connects.Store contingency table in the control module 812; Wherein record the relation between the load (hereinafter referred is other loads) that load (hereinafter referred is this load) that the place node connects is connected with other nodes, for example other load on the state that different conditions this load of following time should be located.Control module 812 is sent control command according to the state information of receiving to this load then, to control the state of this load.
It should be noted that if the corresponding data field of MsgID only some data subfield define, the data subfield of then not doing definition need be labeled as undefined, otherwise parsing module can't be resolved.
Fig. 9 is the flow chart according to the response transmitting method 900 of one embodiment of the invention.As shown in Figure 9, method 900 starts from step 902.
Subsequently, at next step 904, main task is sent the LIN frame head, and is as indicated above, wherein comprises the PID field.
Subsequently, at next step 906, all receive this LIN frame head from node from task, extract PID field wherein, determine whether and should send response by oneself.
Subsequently, at next step 908, the appointment of PID field read the current state of self load from task, generate state information.
Subsequently,, should generate the data subfield that comprises this state information according to current state information according to self frame structure table, form data volume by this data subfield from task at next step 910.
Subsequently, at next step 912, generate data head from task, wherein comprise respond style, combination generates data field with data volume with data head then, and calculation check with, at last with data field and verification with make up the generation response concurrent and give.It should be noted that other guides such as also comprising the CONTI field in the response, the content and structure of this response has been described in detail at preceding text, repeats no more here.
At last, method 900 ends at step 914.
In some cases, the overabundance of data from task need be sent can't send through a response fully, at this moment, can come to send continuously response through the CONTI field that is provided with the data head from task.As indicated above, the CONTI field is used to show whether also have follow-up data to need to send, and wherein 0 expression is denied, and 1 expression is.
Figure 10 is the flow chart according to the LIN frame method of reseptance 1000 of one embodiment of the invention.Shown in figure 10, method 1000 starts from step 1002.
Subsequently, at next step 1004, receive the LIN response from task.
Subsequently,, extract data head and the data volume that comprises the LIN response from task, and from data head, extract MsgID, search the corresponding frame structure table of this MsgID at next step 1006.
Subsequently,, resolve this data volume, obtain state information and send, record the state that sends this LIN response in this state information from load that task connects according to the frame structure table that finds at next step 1008.
Subsequently, at next step 1010, from task according to this state information retrieval self contingency table, search with the basis that is associated from load that task is connected of sending this LIN response from the task load should state.
Subsequently, at next step 1012, the state that should locate according to this load sends control command.
At last, method 1000 ends at step 1014.
If the CONTI field in the LIN that the is received response is 1; Host node from the operation of task except that carrying out Figure 10 then; The LIN frame head that also can notify main task to send the PID field that comprises last frame head once more notifies corresponding sending from the task continuation to respond with this.
Figure 11 is the structural representation according to data subfield 1100 in the LIN response of one embodiment of the invention.As indicated above, each LIN node all is connected with load, and the LIN node responds the state information that transmits load through LIN.Load generally comprises a plurality of ECUs, therefore can data subfield be divided into a plurality of mode fields, and each mode field is corresponding with an ECU in the load, is used to write down the state information of this ECU.Shown in figure 11, the data subfield 1100 of 8 bytes is divided into 16 mode fields 1102, and each mode field is used to describe the state of an ECU.The position of relevant mode field in data subfield and the implication of being explained thereof (being the state of the ECU of being explained) define in frame structure table, for example the implication of some bit representative in a certain byte of data subfield.
Some ECUs only comprise open and close, three kinds of states of fault, and therefore, the mode field of this type of ECU only needs 2 bits can describe the state information of this type of ECU, and for example, its content definable is following:
00: break off
01: connect
10: fault
11: undefined
If the ECU that some load comprises is too much, the state information that causes in a secondary response, sending all these ECUs then can be made as 1 with the CONTI field by method mentioned above, and the method that adopts gradation to send is then sent these state informations.In theory, can continue to send data through constantly the CONTI field being made as 1 from node, yet, from node " dying of hunger " phenomenon appears for avoiding other, can make restriction to sending number of times continuously, for example 4 times from node.Do not finish if this restriction in, send yet, can wait until that main task notifies it to send when responding (for example notifying through the PID field) continuation from the breakpoint transmission of last time once more from node data.
If the state information of sending shows that some ECU breaks down, then can the CONTI field be made as 1, continuation transmission failure diagnosis responds and describes concrete failure code then.The failure diagnosis response is a kind of response of particular form, and it is identified by specific MsgID, for example 0x1FF0.Structure such as Figure 12 of failure diagnosis response are said.
Figure 12 is the structural representation according to the failure diagnosis response data son field 1200 of one embodiment of the invention.Shown in figure 12; Failure diagnosis response data son field 1200 comprises three failure-description fields 1202; Each failure-description field 1202 occupies 2 bytes, and further comprises DeviceID (device identification) field 12022 and ErrorCode (failure code) field 12024.The length of DeviceID field 1202 is 12 bits, and its preceding 4 bits that occupy first byte and second byte of failure-description field 1202 (are Bit7~Bit4), be used to write down the sign of the ECU that breaks down.The length of ErrorCode field 12024 is that 4 bits (are that Bit3~Bit0), back 4 bits that it occupies second byte of failure-description field 1202 are used for the record trouble type.For example, fault type can the content definable following:
0000: break off
0001: connect 1 (or the running of motor forward)
0010: connect 2 (or motor antiports)
0011: open circuit
0100: short circuit (unknown) to whose short circuit
0101: shorted to earth
0110: to power supply short circuit
0111: overcurrent
1000: overvoltage
1001: under-voltage
1010: overheated
1111: undefined
The state of some ECUs is described through analog quantity, and its content can adopt such as but not limited to following definition:
For the 8bits analog quantity, the concrete definition as follows:
00H~FAH: analog quantity normal value
FBH: signal open circuit
FCH: signal shorted to earth
FDH: signal is to power supply short circuit
FEH: other fault
FFH: undefined
For the 16bits analog quantity, the concrete definition as follows:
0000H~FFFAH: analog quantity normal value
FFFBH: signal open circuit
FFFCH: signal shorted to earth
FFFDH: signal is to power supply short circuit
FFFEH: other faults
FFFFH: undefined
When producing " other faults ", also can be by transmission failure diagnosis response mentioned above, the content that this moment, needs comprise CONTI field in the response of analog quantity is set to 1.
With instantiation technical scheme of the present invention is described below.
Suppose that the LIN network comprises: host node, ID=0XC1; Comprise from node: ceiling node, ID=0XC4, MsgID=0x239; Left front door node, ID=0X08, MsgID=0x231; Right front door node: ID=0X49, MsgID=0x232.The structure of data subfield is respectively shown in Figure 13 A, Figure 13 B and Figure 13 C in ceiling node, left front door node and the pairing LIN response of right front door node.
When host node sends the LIN frame head that comprises PID=0X08, all from node all check self ID whether with the LIN frame head PID identical.Left front door node finds that self ID is identical with PID in the LIN frame head, therefore begins to send LIN and responds, and other nodes then get into accepting state.
Subsequently, left front door node sends following data:
0X82,0X31,0XF 1,0XFF, 0XFF, 0XFF, 0XFF, 0XFF, CheckSum wherein CheckSum without calculating.Theing contents are as follows of this data representation:
1, this node also has follow-up data to need to send (CONTI=1);
2, this response is not CAN transmitted frame (CONTI=0);
3、MsgID=0231(0X02,0X31);
4, door courtesy SW front LH is connected (Men Weiguan or do not close);
5, left-hand mirror Y electrical fault;
6, remainder data is unknown or undefined.
As indicated above, the LIN response that left front door node sends will be received by all nodes in the LIN network.After the ceiling node receives this LIN response; Extract MsgID, search the corresponding frame structure table of this MsgID, use this frame structure table that this LIN response is resolved; Bit7~the Bit4 that learns the Byte7 of data subfield is the door courtesy SW front LH state; Its numerical value equals 0001B, and ON state is just indicated left front Men Weiguan or do not closed.At this moment, the ceiling node reads contingency table, finds as left front Men Weiguan or when not closed, should be opened by the gate light of self controlling, and then the ceiling node is lighted gate light automatically.
After host node receives this LIN response, extract the CONTI field and learn that left front door node also has follow-up data to need to send, then send the LIN frame head that comprises PID=0X08 once more, notify left front door node to continue to send response.Simultaneously, host node is learnt left-hand mirror Y electrical fault, reads contingency table, finds when left-hand mirror Y electrical fault, should be lighted by the instrument fault lamp of self controlling, and then host node is lighted the instrument fault lamp.
Subsequently, left front door node sends following data once more:
0X1F, 0XF0,0X12,0X33,0XFF, 0XFF, 0XFF, 0XFF, CheckSum wherein CheckSum without calculating.Theing contents are as follows of this data representation:
1, this node does not have follow-up data needs to send (CONTI=0);
2, this response is not CAN transmitted frame (CONTI=0);
3、MsgID=1FF0(0X1F,0XF0);
4, the source of trouble is a left-hand mirror Y motor, DeviceID=0x123;
5, fault type is open circuit;
6, remainder data is unknown or undefined.
After host node receives this LIN response; Extract MsgID, learn that it is the failure diagnosis response, then searches its corresponding frame structure table; Use this frame structure table that this failure diagnosis response is resolved; Learn that the source of trouble is a left-hand mirror Y electrical fault, fault type is open circuit, then through shown left-hand mirror Y motor open circuit by the failure screen of self controlling.
It should be noted that the TBD field among the last figure belongs to undefined field, can define wherein content voluntarily.In addition; In concrete implementation procedure; Consider from the computing and the memory property of node chip limited, therefore only storing therein few frames structural table (with its relation the closest sends the frame structure table that responds from node), perhaps only store host node and send the frame structure table that responds; So not only can reduce computational burden, also can reduce the storage burden from node.And because the host node chip performance is higher relatively, but therefore storing therein all send the frame structure table that responds from node.In this case; When first response of sending from node possibly resolved from node (promptly first state from load that node is connected influences second state from load that node connects) with second of its close association; This response but necessarily can be resolved by host node, because host node stores all send response from node frame structure table.Subsequently, host node extracts first the state information from the response that node sent, and sends the LIN frame head that PID be himself ID, sends the LIN that comprises above-mentioned state information by host node subsequently and responds.Send the frame structure table that responds because second stores host node from node, therefore can resolve this LIN response, extract state information wherein, and then realize control self load.So, can regard as host node with the above-mentioned one LIN response of sending from node be transmitted to above-mentioned another from node.

Claims (6)

1. a transmission adapter is used to send the LIN response, and it is arranged on the LIN intranodal; This LIN node is connected with load, it is characterized in that, said LIN response comprises data head and data volume; Said data head comprises the MsgID field; Be used for the recording responses type, said data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects of sending this LIN response;
Said transmission adapter comprises:
Memory module is used for the storage frame structural table;
Parsing module is used to read the state information of said load, generates the LIN response that comprises this state information and respond style according to frame structure table.
2. a reception adapter is used to receive the LIN response, and it is arranged on the LIN intranodal; This LIN node is connected with load, it is characterized in that, said LIN response comprises data head and data volume; Said data head comprises the MsgID field; Be used for the recording responses type, said data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects of sending this LIN response;
Said reception adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used in said LIN response, extracting respond style, reads the corresponding frame structure table of this respond style, resolves said LIN response according to this frame structure table.
3. a network adapter is used for sending and reception LIN response, and it is arranged on the LIN intranodal; This LIN node is connected with load, it is characterized in that, said LIN response comprises data head and data volume; Said data head comprises the MsgID field; Be used for the recording responses type, said data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects of sending this LIN response;
Said network adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for:
Read the state information of said load, generate the LIN response that comprises this state information and respond style according to frame structure table; And,
From the LIN response of receiving, extract respond style, read the corresponding frame structure table of this respond style, resolve said LIN response according to this frame structure table.
4. network adapter according to claim 3 is characterized in that, said LIN node is a host node or from node.
5. LIN frame sending method, this LIN frame comprises frame head and response, said method comprises the steps:
S1, main task are sent frame head;
S2, a plurality ofly receive this frame head from task, by this frame head appointment read the state information of its related load from task, send the response that comprises this state information;
It is characterized in that, also comprise among the said step S2:
S21, said appointment write respond style from task said response, and according to self frame structure table said state information are write said response;
Said response comprises data volume, and this data volume comprises the state information that writes according to said frame structure table; Said response also comprises data head, and this data head comprises said respond style.
6. LIN frame method of reseptance, this LIN frame comprises response, it is characterized in that, said method comprises the steps:
S1, a plurality of reception from task respond;
S2, saidly a plurality ofly from said response, extract respond style, and search the corresponding frame structure table of this respond style from task;
S3, said a plurality of frame structure table that find from the task foundation are extracted the state information from load that task connects of sending this response from said response;
Said response comprises data head and data volume, records said respond style in the said data head, records said state information in the said data volume.
CN2008100670332A 2008-04-30 2008-04-30 Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame Expired - Fee Related CN101572690B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008100670332A CN101572690B (en) 2008-04-30 2008-04-30 Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008100670332A CN101572690B (en) 2008-04-30 2008-04-30 Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame

Publications (2)

Publication Number Publication Date
CN101572690A CN101572690A (en) 2009-11-04
CN101572690B true CN101572690B (en) 2012-07-04

Family

ID=41231927

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008100670332A Expired - Fee Related CN101572690B (en) 2008-04-30 2008-04-30 Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame

Country Status (1)

Country Link
CN (1) CN101572690B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580969B (en) * 2012-07-19 2018-08-31 杭州三花研究院有限公司 A kind of LIN networks are from node control system and method
CN103970110B (en) * 2014-05-27 2016-08-10 盛瑞传动股份有限公司 CAN analytic method, Apparatus and system
CN105897453A (en) * 2014-07-18 2016-08-24 现代自动车株式会社 Method for diagnosing network and apparatus for the same

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1348290A (en) * 2000-09-29 2002-05-08 扎尔林克半导体V.N.股份有限公司 Internal communication protocol using for data exchange apparatus
CN1802820A (en) * 2003-06-11 2006-07-12 皇家飞利浦电子股份有限公司 Master node for a LIN network
CN101094165A (en) * 2006-06-19 2007-12-26 大唐移动通信设备有限公司 Method, system, and device for controlling implementation of data transmission in local area network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1348290A (en) * 2000-09-29 2002-05-08 扎尔林克半导体V.N.股份有限公司 Internal communication protocol using for data exchange apparatus
CN1802820A (en) * 2003-06-11 2006-07-12 皇家飞利浦电子股份有限公司 Master node for a LIN network
CN101094165A (en) * 2006-06-19 2007-12-26 大唐移动通信设备有限公司 Method, system, and device for controlling implementation of data transmission in local area network

Also Published As

Publication number Publication date
CN101572690A (en) 2009-11-04

Similar Documents

Publication Publication Date Title
US11246098B2 (en) Method and apparatus for wake-up of communication node in vehicle network
US9026711B2 (en) Motor vehicle control system with simplified information exchange
US20200136993A1 (en) Method and apparatus for allocating transmission opportunities in vehicle network
CN201117091Y (en) Automobile light state feedback device based on CAN bus
CN110535667A (en) Method and apparatus for the communication node in selective wake-up vehicle network
CN102325128B (en) Protocol conversion device and method for FlexRay bus and LIN bus
CN101572690B (en) Transmitting, receiving and network adapters and method for transmitting and receiving LIN frame
KR101450166B1 (en) Method and apparatus for updating routing information in in-vehicle communication network
CN104699686A (en) Vehicle-mounted control module and matching method thereof
WO2018196655A1 (en) Public network communication method for on-board electronic processing unit system
CN106254177A (en) A kind of diagnosis method for routing based on standalone gateway and system
CN110727264A (en) Automobile control system
CN105897453A (en) Method for diagnosing network and apparatus for the same
KR101958477B1 (en) Lin communication system for vehicle and method for driving slave module in the system
JP5976157B2 (en) Controller area network (CAN) device and CAN traffic control method
Lawrenz Worldwide Status of CAN–Present and Future
EP4073665A1 (en) Automotive data processing system with efficient generation and exporting of metadata
CN102681526A (en) CAN (controller area network) bus system and fault diagnosis method thereof
Ng et al. Review of researches in controller area networks evolution and applications
CN101700758A (en) System and method for displaying automobile fault information
CN108819882B (en) New energy automobile CAN bus signal analysis method
CN104678918A (en) CANOPEN main control equipment based on PC104 bus and control method of CANOPEN main control equipment
Marino et al. Electronics in automotive engineering: A top–down approach for implementing industrial fieldbus technologies in city buses and coaches
CN104639355A (en) LIN (local interconnect network) communication scheduling setting method
US20190305983A1 (en) Method and apparatus for configuring backup path in vehicle network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20170430

CF01 Termination of patent right due to non-payment of annual fee