CN101572690A - 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
CN101572690A
CN101572690A CNA2008100670332A CN200810067033A CN101572690A CN 101572690 A CN101572690 A CN 101572690A CN A2008100670332 A CNA2008100670332 A CN A2008100670332A CN 200810067033 A CN200810067033 A CN 200810067033A CN 101572690 A CN101572690 A CN 101572690A
Authority
CN
China
Prior art keywords
lin
response
frame
data
node
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.)
Granted
Application number
CNA2008100670332A
Other languages
Chinese (zh)
Other versions
CN101572690B (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 (Electrical Control Unit) make that the automobile operation of a new generation is easier, control more accurately, drive safer.
Yet increasing of ECU (Electrical Control Unit) 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 these networks four big classes, 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 (comprises the control such as but not limited to car light, vehicle window, car door as the application that improves convenience, the adjustment of driven rearview mirrors etc.) volume of transmitted data is little, and real-time requires also not high, therefore can realize by 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 jointly by how tame automaker and semiconductor company, 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 structure, comprises LIN bus 112, and be connected a host node 102 and a plurality of from node 104 on the LIN bus 112 that each node all is connected with load 106.The LIN standard is a main task 108 and from 110 liang of classes of task 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 schematic diagram of existing LIN frame 200.As shown in Figure 2, a complete LIN frame comprises frame head 202 and 204 two parts of 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, do not need through host node, and host node can be given information broadcast all nodes in the network 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 schematic diagram of the communication process 300 in the prior art LIN.As shown in Figure 3, main task 302 sends 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 by 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.By last figure as can be seen, do not need bus arbitration in the LIN, which the visit by main task is come control bus promptly send response from task by the main task decision by.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 schematic diagram 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 to be solved in the present invention is, at 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 described transmission adapter comprises:
Memory module is used for the storage frame structural table;
Parsing module is used to read the state information of described 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 described reception adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for extracting respond style in described LIN response, reads the frame structure table of this respond style correspondence, resolves described 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 described network adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for:
Read the state information of described 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 frame structure table of this respond style correspondence, resolve described LIN response according to this frame structure table.
In network adapter of the present invention, described LIN node is a host node or from node.
In network adapter of the present invention, described LIN response comprises data head and data volume; Described data head comprises the MsgID field, is used for the recording responses type; Described data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects that sends 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 described method comprises the steps:
S1, main task send 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 described step S2:
S21, described appointment write respond style from task described response, and according to self frame structure table described state information are write described response.
In method of the present invention, described response comprises data volume, and this data volume comprises the state information that writes according to described frame structure table.
In method of the present invention, described response comprises data head, and this data head comprises described respond style.
The present invention also provides a kind of LIN frame method of reseptance, and this LIN frame comprises response, and described method comprises the steps:
S1, a plurality of reception from task respond;
S2, describedly a plurality ofly from described response, extract respond style, and search the frame structure table of this respond style correspondence from task;
S3, described a plurality of frame structure table that find from the task foundation are extracted the state information from load that task connects that sends this response from described response.
In method of the present invention, described response comprises data head and data volume, records described respond style in the described data head, records described state information in the described data volume.
Implement technical scheme of the present invention, have following beneficial effect: carry out detailed definition by concrete structure, can unify the analytic method of each manufacturer's product, make that the product of each manufacturer can be compatible response to data division in the response.
Description of drawings
The invention will be further described below in conjunction with drawings and Examples, in the accompanying drawing:
Fig. 1 is the structural representation of an existing LIN network;
Fig. 2 is the logical construction schematic diagram of existing LIN frame;
Fig. 3 is the schematic diagram of the communication process in the prior art LIN;
Fig. 4 is the physical structure schematic diagram 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, carry out detailed definition by concrete structure to data in the response, can unify the analytic method of each manufacturer's product, make that the product of each manufacturer can be compatible response.Below just with specific embodiment technical scheme of the present invention is described in conjunction with the accompanying drawings.
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 be further 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 be in conjunction with hereinafter being 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 in conjunction with the accompanying drawings 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 and a plurality of from node 6044, host node 6042 and a plurality ofly all be connected with load 6046 from node 6044.In running, not only can be by host node 6042 but also can be by transmit the data on the CAN bus from node 6044.Below the structure of data field is just described when transmitting the data on the CAN bus from node in conjunction with Fig. 7.
Fig. 7 is the structural representation according to the data field 700 of the CAN transmitted frame of one embodiment of the invention.By LIN when node is transmitted the CAN frame, need could transmit whole C AN frame by twice forwarding.Therefore, the CAN frame can be divided into high 4Byte part and low 4Byte part.As shown in Figure 7, CAN transmitted frame 700 comprises 8 bytes, can be further 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 is identical with CONTI field 3022, CAN field 3024, R field 3026 among Fig. 3 respectively, repeats no more herein.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 and a plurality of from node 806.Host node 804 and a plurality ofly all be connected with load 808 from node 806.Especially, host node 804 all comprises network adapter 810 and control module 812 with each from node 806.
Introduce the effect that sends 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 the current state that reads is converted to 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, according to the frame structure table generation data volume of this node correspondence.In this case, send adapter and can further comprise parsing module and memory module, store the frame structure table (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 each data subfield in the state information generation data volume of receiving 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 data head and the data volume that generates 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 extracts data head and data volume from this data field.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 data field of MsgID correspondence 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,, generate data head, wherein comprise respond style, then data head and data volume combination are generated data field from task at next step 912, and calculation check and, at last data field and verification and combination are generated response concurrent and send.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 above been described in detail, repeats no more herein.
At last, method 900 ends at step 914.
In some cases, the overabundance of data from task need send can't send fully by a response, at this moment, can send response continuously by 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.As 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 frame structure table of this MsgID correspondence 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 that sends 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 by LIN.Load generally comprises a plurality of ECU (Electrical Control Unit), therefore data subfield can be divided into a plurality of mode fields, and each mode field is corresponding with an ECU (Electrical Control Unit) in the load, is used to write down the state information of this ECU (Electrical Control Unit).As 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 (Electrical Control Unit).The position of relevant mode field in data subfield and the implication of being explained thereof (being the state of the ECU (Electrical Control Unit) explained) define in frame structure table, for example the implication of some bit representative in a certain byte of data subfield.
Some ECU (Electrical Control Unit) only comprise open and close, three kinds of states of fault, and therefore, the mode field of this type of ECU (Electrical Control Unit) only needs 2 bits can describe the state information of this type of ECU (Electrical Control Unit), and for example, its content can be defined as follows:
00: disconnect
01: connect
10: fault
11: undefined
If the ECU (Electrical Control Unit) that some load comprises is too much, cause in a secondary response, sending the state information of all these ECU (Electrical Control Unit), then can the CONTI field be made as 1 by method mentioned above, the method that adopts gradation to send then sends these state informations.In theory, can continue to send data by 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 by the PID field) continuation from the breakpoint transmission of last time once more from node data.
If the state information that sends shows that some ECU (Electrical Control Unit) breaks down, then the CONTI field can 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.The structure of failure diagnosis response as described in Figure 12.
Figure 12 is the structural representation according to the failure diagnosis response data son field 1200 of one embodiment of the invention.As 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 (Electrical Control Unit) 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 content can be defined as follows:
0000: disconnect
0001: connect 1 (or the running of motor forward)
0010: connect 2 (or motor antiports)
0011: open circuit
0100: short circuit (to whose short circuit the unknown)
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 ECU (Electrical Control Unit) is described by analog quantity, and its content can adopt such as but not limited to following definition:
For the 8bits analog quantity, be defined 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, be defined 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 needs to comprise CONTI field in the response of analog quantity this moment 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 sent the LIN frame head that comprises PID=0X08, all checked all that from node self ID is whether identical with PID the LIN frame head.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 enter accepting state.
Subsequently, left front door node sends following data:
0X82,0X31,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,CheckSum
Wherein CheckSum is not as calculated.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 shut);
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 frame structure table of this MsgID correspondence, 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 shut.At this moment, the ceiling node reads contingency table, finds as left front Men Weiguan or when not shutting, 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 should be lighted by the instrument fault lamp of self controlling when left-hand mirror Y electrical fault, 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 is not as calculated.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 search 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 by 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 the specific implementation process, consider from the computing and the memory property of node chip limited, therefore can only store a few frames structural table (the frame structure table from node send response the closest) therein with its relation, perhaps only store the frame structure table of response that host node sends, so not only can reduce computational burden, also can reduce the storage burden from node.And, therefore can store all frame structure table therein from response that node sends because the host node chip performance is higher relatively.In this case, when first response that sends from node may be 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.Store the frame structure table of response that host node sends owing to second from node, so 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 that sends from node be transmitted to above-mentioned another from node.

Claims (10)

1, 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, it is characterized in that, described transmission adapter comprises:
Memory module is used for the storage frame structural table;
Parsing module is used to read the state information of described load, generates the LIN response that comprises this state information and respond style according to frame structure table.
2, 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, it is characterized in that, described reception adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for extracting respond style in described LIN response, reads the frame structure table of this respond style correspondence, resolves described LIN response according to this frame structure table.
3, a kind of network adapter is used for sending and reception LIN response, and it is arranged on the LLN intranodal, and this LIN node is connected with load, it is characterized in that, described network adapter comprises:
Memory module is used to store many frame structure table;
Parsing module is used for:
Read the state information of described 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 frame structure table of this respond style correspondence, resolve described LIN response according to this frame structure table.
4, network adapter according to claim 3 is characterized in that, described LIN node is a host node or from node.
5, network adapter according to claim 4 is characterized in that, described LIN response comprises data head and data volume; Described data head comprises the MsgID field, is used for the recording responses type; Described data volume comprises a plurality of data subfields, is used to write down the state information of the LIN load that node connects that sends this LIN response.
6, a kind of LIN frame sending method, this LIN frame comprises frame head and response, described method comprises the steps:
S1, main task send 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 described step S2:
S21, described appointment write respond style from task described response, and according to self frame structure table described state information are write described response.
7, method according to claim 6 is characterized in that, described response comprises data volume, and this data volume comprises the state information that writes according to described frame structure table.
8, method according to claim 6 is characterized in that, described response comprises data head, and this data head comprises described respond style.
9, a kind of LIN frame method of reseptance, this LIN frame comprises response, it is characterized in that, described method comprises the steps:
S1, a plurality of reception from task respond;
S2, describedly a plurality ofly from described response, extract respond style, and search the frame structure table of this respond style correspondence from task;
S3, described a plurality of frame structure table that find from the task foundation are extracted the state information from load that task connects that sends this response from described response.
10, method according to claim 9 is characterized in that, described response comprises data head and data volume, records described respond style in the described data head, records described state information in the described 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 true CN101572690A (en) 2009-11-04
CN101572690B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014012347A1 (en) * 2012-07-19 2014-01-23 杭州三花研究院有限公司 Lin network slave node control system, lin network slave node and method
CN103970110A (en) * 2014-05-27 2014-08-06 盛瑞传动股份有限公司 CAN (Controller Area Network) analytical method, device and system
CN105897453A (en) * 2014-07-18 2016-08-24 现代自动车株式会社 Method for diagnosing network and apparatus for the same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020062415A1 (en) * 2000-09-29 2002-05-23 Zarlink Semiconductor N.V. Inc. Slotted memory access method
WO2004109999A2 (en) * 2003-06-11 2004-12-16 Philips Intellectual Property & Standards Gmbh Master node for a lin network
CN101094165B (en) * 2006-06-19 2010-12-08 大唐移动通信设备有限公司 Method, system, and device for controlling implementation of data transmission in local area network

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014012347A1 (en) * 2012-07-19 2014-01-23 杭州三花研究院有限公司 Lin network slave node control system, lin network slave node and method
US9628289B2 (en) 2012-07-19 2017-04-18 Hangzhou Sanhua Research Institute Co., Ltd. LIN network slave node control system, LIN network slave node and method
CN103970110A (en) * 2014-05-27 2014-08-06 盛瑞传动股份有限公司 CAN (Controller Area Network) analytical method, device and system
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

Also Published As

Publication number Publication date
CN101572690B (en) 2012-07-04

Similar Documents

Publication Publication Date Title
EP2728805B1 (en) Controller area network (can) transceiver and method for operating a can transceiver
US9026711B2 (en) Motor vehicle control system with simplified information exchange
CN201117091Y (en) Automobile light state feedback device based on CAN bus
US10999096B2 (en) Functional safety transceiver
US20170302462A1 (en) Method for supplying power in network and apparatus therefor
CN105425783A (en) Real vehicle data processing method and system, controller and upper computer
CN104699686A (en) Vehicle-mounted control module and matching method thereof
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
CN106254177A (en) A kind of diagnosis method for routing based on standalone gateway and system
CN209454773U (en) Train grade control unit and train network control system
CN107094109A (en) A kind of vehicle electronics processing unit system public network means of communication
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
Ng et al. Review of researches in controller area networks evolution and applications
CN102681526A (en) CAN (controller area network) bus system and fault diagnosis method thereof
CN101700758A (en) System and method for displaying automobile fault information
CN108819882B (en) New energy automobile CAN bus signal analysis method
US20130013127A1 (en) Network interface for use in vehicles
CN104639355A (en) LIN (local interconnect network) communication scheduling setting method
US20190305983A1 (en) Method and apparatus for configuring backup path in vehicle network
US7719133B2 (en) Digital wiring system for vehicles

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120704

Termination date: 20170430