本發(fā)明屬于汽車控制器局域網(wǎng)(ControllerAreaNetwork,簡(jiǎn)稱CAN)網(wǎng)絡(luò)通信
技術(shù)領(lǐng)域:
,具體涉及一種CAN報(bào)文丟失的監(jiān)測(cè)方法。
背景技術(shù):
:如果節(jié)點(diǎn)1從節(jié)點(diǎn)2接收一條或一條以上報(bào)文,則節(jié)點(diǎn)2稱為節(jié)點(diǎn)1的伙伴節(jié)點(diǎn)。為提高車輛CAN網(wǎng)絡(luò)可維護(hù)性,網(wǎng)絡(luò)中所有電子控制單元(ElectronicControlUnit,簡(jiǎn)稱ECU)都應(yīng)包含其所有伙伴節(jié)點(diǎn)發(fā)送的周期性報(bào)文的報(bào)文丟失監(jiān)測(cè)機(jī)制,并根據(jù)監(jiān)測(cè)結(jié)果存儲(chǔ)相應(yīng)的CAN報(bào)文丟失故障碼。專利文獻(xiàn)1(公開(kāi)號(hào):CN102404170A;公開(kāi)日:2012年4月4日)公開(kāi)了一種報(bào)文丟失檢測(cè)方法、裝置、及系統(tǒng),該專利通過(guò)單位時(shí)間內(nèi)接收?qǐng)?bào)文數(shù)量過(guò)多、收發(fā)報(bào)文數(shù)量不相等等網(wǎng)絡(luò)通信整體情況判斷收發(fā)雙方之間是否丟失數(shù)據(jù)。專利文獻(xiàn)2(公開(kāi)號(hào):CN102185740A;公開(kāi)日:2011年9月14日)公開(kāi)了一種心跳檢測(cè)方法及網(wǎng)絡(luò)設(shè)備,該專利通過(guò)專用的心跳請(qǐng)求報(bào)文和心跳應(yīng)答報(bào)文判斷被檢測(cè)設(shè)備是否死機(jī)。然而,這兩個(gè)專利均只能檢測(cè)到設(shè)備級(jí)的數(shù)據(jù)丟失,而不能檢測(cè)到報(bào)文級(jí)的數(shù)據(jù)丟失,故障定位不夠準(zhǔn)確。此外,二者均需要增加專用報(bào)文以監(jiān)測(cè)數(shù)據(jù)丟失,額外占用了網(wǎng)絡(luò)負(fù)載,不適用于網(wǎng)絡(luò)負(fù)載比較緊張的CAN通信網(wǎng)絡(luò)。專利文獻(xiàn)3(公開(kāi)號(hào):CN103546306A;公開(kāi)日:2014-01-29)公開(kāi)了一種周期性CAN報(bào)文丟失故障的判定系統(tǒng)和方法,所述方法采用兩個(gè)定時(shí)器模塊判定是否產(chǎn)生報(bào)文丟失故障,能夠檢測(cè)出報(bào)文級(jí)的數(shù)據(jù)丟失,但沒(méi)有涉及到CAN報(bào)文丟失故障的判定方法與發(fā)送該報(bào)文的網(wǎng)絡(luò)節(jié)點(diǎn)的供電方式之間的關(guān)系。當(dāng)車輛網(wǎng)絡(luò)中各ECU供電方式不同時(shí),各ECU開(kāi)始發(fā)送報(bào)文的時(shí)間也不同,而傳統(tǒng)的CAN報(bào)文丟失的監(jiān)測(cè)方法通常采用一種CAN報(bào)文丟失監(jiān)測(cè)模式,易產(chǎn)生誤報(bào)或漏報(bào)CAN報(bào)文丟失故障的問(wèn)題。例如:ECU1為附件檔(Accesory,簡(jiǎn)稱ACC)供電,上電后周期性發(fā)送報(bào)文M1;ECU2為接通檔(ON)供電,上電后周期性發(fā)送報(bào)文M2;ECU3周期性接收?qǐng)?bào)文M1和M2。在現(xiàn)有技術(shù)中,ECU3通常采用一種CAN報(bào)文丟失監(jiān)測(cè)模式。有的廠家在ACC檔即開(kāi)始監(jiān)測(cè)CAN報(bào)文丟失,此時(shí)ECU2因沒(méi)有上電而不能發(fā)送報(bào)文M2,從而導(dǎo)致ECU3誤報(bào)報(bào)文M2丟失故障;有的廠家延后至ON檔才開(kāi)始監(jiān)測(cè)CAN報(bào)文丟失,則當(dāng)點(diǎn)火開(kāi)關(guān)處于ACC檔時(shí)ECU3接收周期性報(bào)文M1而并不監(jiān)測(cè)該報(bào)文是否丟失,從而易導(dǎo)致ECU3漏報(bào)報(bào)文M1丟失故障。技術(shù)實(shí)現(xiàn)要素:針對(duì)上述技術(shù)問(wèn)題,本發(fā)明提供一種CAN報(bào)文丟失的監(jiān)測(cè)方法,該方法不增加各ECU的單件成本,適用于車輛CAN網(wǎng)絡(luò)中各ECU采用不同供電方式的復(fù)雜CAN網(wǎng)絡(luò),用于解決現(xiàn)有技術(shù)存在的診斷故障碼(diagnostictroublecode,簡(jiǎn)稱DTC)誤報(bào)和DTC漏報(bào)的問(wèn)題。本發(fā)明采用的技術(shù)方案為:本發(fā)明實(shí)施例提供的一種CAN報(bào)文丟失的監(jiān)測(cè)方法,包括:S100:網(wǎng)絡(luò)節(jié)點(diǎn)采集CAN報(bào)文;S200:判斷采集的CAN報(bào)文是否是該網(wǎng)絡(luò)節(jié)點(diǎn)應(yīng)接收的報(bào)文,如果是,進(jìn)入步驟S300,如果不是,結(jié)束報(bào)文處理;S300:判斷該應(yīng)接收的CAN報(bào)文是否是周期性報(bào)文,如果是,進(jìn)入步驟S400,如果不是,結(jié)束報(bào)文處理;S400:判斷該應(yīng)接收的CAN報(bào)文的發(fā)送節(jié)點(diǎn)的供電方式,基于發(fā)送節(jié)點(diǎn)的不同供電方式采取不同的CAN報(bào)文丟失監(jiān)測(cè)模式。可選地,步驟S400具體包括:如果發(fā)送節(jié)點(diǎn)的供電方式為常電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式1;如果發(fā)送節(jié)點(diǎn)的供電方式為ACC供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式2;如果發(fā)送節(jié)點(diǎn)的供電方式為ON供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式3;如果發(fā)送節(jié)點(diǎn)的供電方式為EMS主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式4;如果發(fā)送節(jié)點(diǎn)的供電方式為HCU主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式5;如果發(fā)送節(jié)點(diǎn)的供電方式為MCU主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式6??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式1的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式1的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為CAN網(wǎng)絡(luò)由睡眠狀態(tài)轉(zhuǎn)為工作狀態(tài);(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式1的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為網(wǎng)絡(luò)由工作狀態(tài)轉(zhuǎn)為睡眠狀態(tài);(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式2的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式2的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為點(diǎn)火開(kāi)關(guān)由LOCK檔轉(zhuǎn)為ACC檔;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式2的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為點(diǎn)火開(kāi)關(guān)由ACC檔轉(zhuǎn)為L(zhǎng)OCK檔;(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式3的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式3的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為點(diǎn)火開(kāi)關(guān)由LOCK檔或ACC檔轉(zhuǎn)為ON檔;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式3的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為點(diǎn)火開(kāi)關(guān)由ON檔轉(zhuǎn)為L(zhǎng)OCK檔或ACC檔;(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式4的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式4的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為EMS主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式4的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為EMS主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式5的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式5的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為HCU主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式5的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為HCU主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼??蛇x地,所述CAN報(bào)文丟失監(jiān)測(cè)模式6的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式6的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為MCU主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式6的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為MCU主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到將應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。與現(xiàn)有技術(shù)相比,本發(fā)明具有以下技術(shù)效果:傳統(tǒng)的CAN報(bào)文丟失的監(jiān)測(cè)方法通常采用一種CAN報(bào)文丟失監(jiān)測(cè)模式,易產(chǎn)生誤報(bào)或漏報(bào)CAN報(bào)文丟失故障的問(wèn)題。本發(fā)明一共的CAN報(bào)文丟失的監(jiān)測(cè)方法適用于車輛CAN網(wǎng)絡(luò)中各ECU采用不同供電方式的復(fù)雜CAN網(wǎng)絡(luò),解決了現(xiàn)有技術(shù)存在的DTC誤報(bào)和DTC漏報(bào)的問(wèn)題。經(jīng)過(guò)實(shí)車驗(yàn)證,該CAN報(bào)文丟失的監(jiān)測(cè)方法能夠準(zhǔn)確地監(jiān)測(cè)CAN報(bào)文丟失的故障,實(shí)用效果顯著,有效地提高了整車CAN網(wǎng)絡(luò)的可維護(hù)性。附圖說(shuō)明圖1為本發(fā)明的CAN報(bào)文丟失監(jiān)測(cè)方法的流程示意圖。圖2為本發(fā)明的一實(shí)施例的各網(wǎng)絡(luò)節(jié)點(diǎn)上電時(shí)序示意圖。圖3為本發(fā)明的一實(shí)施例的CAN報(bào)文丟失監(jiān)測(cè)模式的控制邏輯示意圖。具體實(shí)施方式為使本發(fā)明要解決的技術(shù)問(wèn)題、技術(shù)方案和優(yōu)點(diǎn)更加清楚,下面將結(jié)合附圖及具體實(shí)施例進(jìn)行詳細(xì)描述。本發(fā)明提供的CAN報(bào)文丟失監(jiān)測(cè)方法用于對(duì)CAN網(wǎng)絡(luò)中的所有網(wǎng)段上的節(jié)點(diǎn)發(fā)送的CAN報(bào)文丟失情況進(jìn)行監(jiān)測(cè)。每個(gè)網(wǎng)段上具有多個(gè)節(jié)點(diǎn),每個(gè)節(jié)點(diǎn)可向其他多個(gè)節(jié)點(diǎn)發(fā)送多個(gè)CAN報(bào)文,也可以從其他節(jié)點(diǎn)接收CAN報(bào)文,在從其他節(jié)點(diǎn)接收?qǐng)?bào)文時(shí),可通過(guò)設(shè)置在該節(jié)點(diǎn)上的計(jì)數(shù)器對(duì)所接收的CAN報(bào)文丟失情況進(jìn)行監(jiān)測(cè)。圖1為本發(fā)明的對(duì)CAN網(wǎng)絡(luò)中的某個(gè)網(wǎng)段中的某個(gè)節(jié)點(diǎn)接收的1條CAN報(bào)文的丟失進(jìn)行監(jiān)測(cè)的流程示意圖。CAN網(wǎng)絡(luò)中的其他所有節(jié)點(diǎn)的CAN報(bào)文接收情況可按圖1所示的監(jiān)測(cè)流程進(jìn)行監(jiān)測(cè),以達(dá)到對(duì)整個(gè)網(wǎng)絡(luò)上的所有網(wǎng)段上的所有節(jié)點(diǎn)對(duì)應(yīng)接收的CAN報(bào)文的丟失情況進(jìn)行監(jiān)測(cè),即對(duì)每個(gè)節(jié)點(diǎn)的應(yīng)接收的CAN報(bào)文的丟失情況進(jìn)行監(jiān)測(cè)。如圖1所示,本發(fā)明的對(duì)CAN網(wǎng)絡(luò)中的某個(gè)網(wǎng)段中的某個(gè)節(jié)點(diǎn)接收的1條CAN報(bào)文的丟失進(jìn)行監(jiān)測(cè)包括以下步驟:S100:該網(wǎng)段上的某節(jié)點(diǎn)從其他節(jié)點(diǎn)采集CAN報(bào)文;S200:判斷采集的報(bào)文是否是該網(wǎng)絡(luò)節(jié)點(diǎn)應(yīng)接收的報(bào)文,如果是,執(zhí)行分支A1進(jìn)入步驟S300,如果不是,執(zhí)行分支A2結(jié)束報(bào)文處理;S300:判斷該應(yīng)接收的報(bào)文是否是周期性報(bào)文,如果是,執(zhí)行分支B1進(jìn)入步驟S400,如果不是,執(zhí)行分支B2結(jié)束報(bào)文處理;S400:判斷該應(yīng)接收的報(bào)文的發(fā)送節(jié)點(diǎn)的供電方式,基于發(fā)送節(jié)點(diǎn)的不同供電方式采取不同的CAN報(bào)文丟失監(jiān)測(cè)模式。一般,CAN報(bào)文發(fā)送節(jié)點(diǎn)的供電方式按照上電時(shí)間的先后順序可包括6種:常電;ACC供電;ON供電;EMS主繼電器供電;HCU主繼電器供電;MCU主繼電器供電。具體地,步驟S400可包括:S401:判斷發(fā)送節(jié)點(diǎn)的供電方式是否為常電供電,如果是,則執(zhí)行分支C1,采取CAN報(bào)文丟失監(jiān)測(cè)模式1,如果不是,執(zhí)行分支C2,進(jìn)入步驟S402;S402:判斷發(fā)送節(jié)點(diǎn)的供電方式是否為ACC供電,如果是,則執(zhí)行分支D1,采取CAN報(bào)文丟失監(jiān)測(cè)模式2,如果不是,執(zhí)行分支D2,進(jìn)入步驟S403;S403:判斷發(fā)送節(jié)點(diǎn)的供電方式是否為ON供電,如果是,則執(zhí)行分支E1,采取CAN報(bào)文丟失監(jiān)測(cè)模式3,如果不是,執(zhí)行分支E2,進(jìn)入步驟S404;S404:判斷發(fā)送節(jié)點(diǎn)的供電方式是否為EMS主繼電器供電,如果是,則執(zhí)行分支F1,采取CAN報(bào)文丟失監(jiān)測(cè)模式4,如果不是,執(zhí)行分支E2,進(jìn)入步驟S405;S405:判斷發(fā)送節(jié)點(diǎn)的供電方式是否為HCU主繼電器供電,如果是,則執(zhí)行分支G1,采取CAN報(bào)文丟失監(jiān)測(cè)模式5,如果不是,則執(zhí)行分支G2,采取CAN報(bào)文丟失監(jiān)測(cè)模式6。需要注意的是,在本實(shí)施例中判斷發(fā)送節(jié)點(diǎn)的供電方式的順序?yàn)槌k?、ACC供電、ON供電、EMS主繼電器供電、HCU主繼電器供電、MCU主繼電器供電,但是并不局限于此,可根據(jù)需要設(shè)置不同的順序進(jìn)行判斷。也就是說(shuō),在本發(fā)明的CAN報(bào)文丟失的監(jiān)測(cè)方法中,如果發(fā)送節(jié)點(diǎn)的供電方式為常電供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式1;如果發(fā)送節(jié)點(diǎn)的供電方式為ACC供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式2;如果發(fā)送節(jié)點(diǎn)的供電方式為ON供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式3;如果發(fā)送節(jié)點(diǎn)的供電方式為EMS主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式4;如果發(fā)送節(jié)點(diǎn)的供電方式為HCU主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式5;如果發(fā)送節(jié)點(diǎn)的供電方式為MCU主繼電器供電,則采取CAN報(bào)文丟失監(jiān)測(cè)模式6。報(bào)文發(fā)送節(jié)點(diǎn)供電方式與CAN報(bào)文丟失監(jiān)測(cè)模式的對(duì)應(yīng)關(guān)系可如表1所示。表1報(bào)文發(fā)送節(jié)點(diǎn)供電方式與CAN報(bào)文丟失監(jiān)測(cè)模式的對(duì)應(yīng)關(guān)系報(bào)文發(fā)送節(jié)點(diǎn)供電方式CAN報(bào)文丟失監(jiān)測(cè)模式常電CAN報(bào)文丟失監(jiān)測(cè)模式1ACC供電CAN報(bào)文丟失監(jiān)測(cè)模式2ON供電CAN報(bào)文丟失監(jiān)測(cè)模式3EMS主繼電器供電CAN報(bào)文丟失監(jiān)測(cè)模式4HCU主繼電器供電CAN報(bào)文丟失監(jiān)測(cè)模式5MCU主繼電器供電CAN報(bào)文丟失監(jiān)測(cè)模式6CAN報(bào)文丟失監(jiān)測(cè)模式1、CAN報(bào)文丟失監(jiān)測(cè)模式2、CAN報(bào)文丟失監(jiān)測(cè)模式3、CAN報(bào)文丟失監(jiān)測(cè)模式4、CAN報(bào)文丟失監(jiān)測(cè)模式5和CAN報(bào)文丟失監(jiān)測(cè)模式6的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯均相同,其不同僅在于CAN報(bào)文丟失監(jiān)測(cè)控制邏輯的起止條件定義不同。這6種CAN報(bào)文丟失監(jiān)測(cè)模式的CAN報(bào)文丟失監(jiān)測(cè)的共同的控制邏輯定義如下:(1)將應(yīng)接收的每條報(bào)文都通過(guò)一個(gè)專用的超時(shí)計(jì)數(shù)器來(lái)監(jiān)測(cè)該CAN報(bào)文是否丟失,該計(jì)數(shù)器初始值為0。即,在CAN網(wǎng)絡(luò)的節(jié)點(diǎn)中,每條應(yīng)接收的CAN報(bào)文都對(duì)應(yīng)一個(gè)超時(shí)計(jì)數(shù)器。(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器。(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0。(4)當(dāng)接收到應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器。(5)當(dāng)超時(shí)計(jì)數(shù)器大于CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)相應(yīng)的CAN報(bào)文丟失故障碼。在本發(fā)明中,CAN報(bào)文丟失監(jiān)測(cè)的限值與所應(yīng)接收的CAN報(bào)文的發(fā)送周期相關(guān),一般設(shè)置為所應(yīng)接收的CAN報(bào)文的發(fā)送周期的10倍,每條CAN報(bào)文都對(duì)應(yīng)一個(gè)CAN報(bào)文丟失故障碼,當(dāng)在CAN報(bào)文丟失監(jiān)測(cè)的限值內(nèi),沒(méi)有收到某條應(yīng)接收的CAN報(bào)文時(shí),則將該應(yīng)接收的CAN報(bào)文相應(yīng)的CAN報(bào)文丟失故障碼進(jìn)行存儲(chǔ)。這6種CAN報(bào)文丟失監(jiān)測(cè)模式的起動(dòng)條件和停止條件如下表2所示。表2各CAN報(bào)文丟失監(jiān)測(cè)模式的起止條件結(jié)合表2對(duì)各個(gè)CAN報(bào)文丟失監(jiān)測(cè)模式的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯進(jìn)行具體描述。1.CAN報(bào)文丟失監(jiān)測(cè)模式1的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式1的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式1的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為CAN網(wǎng)絡(luò)由睡眠狀態(tài)轉(zhuǎn)為工作狀態(tài);(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式1的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為網(wǎng)絡(luò)由工作狀態(tài)轉(zhuǎn)為睡眠狀態(tài);(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。2.CAN報(bào)文丟失監(jiān)測(cè)模式2的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式2的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式2的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為點(diǎn)火開(kāi)關(guān)由LOCK檔轉(zhuǎn)為ACC檔;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式2的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為點(diǎn)火開(kāi)關(guān)由ACC檔轉(zhuǎn)為L(zhǎng)OCK檔;(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。3.CAN報(bào)文丟失監(jiān)測(cè)模式3的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式3的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式3的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為點(diǎn)火開(kāi)關(guān)由LOCK檔或ACC檔轉(zhuǎn)為ON檔;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式3的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為點(diǎn)火開(kāi)關(guān)由ON檔轉(zhuǎn)為L(zhǎng)OCK檔或ACC檔;(4)當(dāng)接收到應(yīng)接收的的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。4.CAN報(bào)文丟失監(jiān)測(cè)模式4的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式4的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式4的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為EMS主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式4的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為EMS主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。5.CAN報(bào)文丟失監(jiān)測(cè)模式5的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式5的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式5的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為HCU主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式5的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為HCU主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼。6.CAN報(bào)文丟失監(jiān)測(cè)模式6的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯所述CAN報(bào)文丟失監(jiān)測(cè)模式6的CAN報(bào)文丟失監(jiān)測(cè)控制邏輯具體包括:(1)將應(yīng)接收的每個(gè)CAN報(bào)文的丟失情況通過(guò)相對(duì)應(yīng)的超時(shí)計(jì)時(shí)器來(lái)進(jìn)行監(jiān)測(cè),所述超時(shí)計(jì)時(shí)器的初始值設(shè)置為0;(2)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式6的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器,所述起動(dòng)條件為MCU主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合;(3)當(dāng)滿足CAN報(bào)文丟失監(jiān)測(cè)模式6的停止條件時(shí),停止超時(shí)計(jì)數(shù)器,并重置超時(shí)計(jì)數(shù)器為0,所述停止條件為MCU主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi);(4)當(dāng)接收到將應(yīng)接收的CAN報(bào)文時(shí),重置超時(shí)計(jì)數(shù)器為0,并啟動(dòng)超時(shí)計(jì)數(shù)器;(5)當(dāng)在應(yīng)接收的CAN報(bào)文的發(fā)送周期內(nèi)沒(méi)有收到該應(yīng)接收的CAN報(bào)文時(shí),將超時(shí)計(jì)數(shù)器的值加1;當(dāng)超時(shí)計(jì)數(shù)器的值大于應(yīng)接收的CAN報(bào)文丟失監(jiān)測(cè)的限值時(shí),存儲(chǔ)該應(yīng)接收的CAN報(bào)文的相應(yīng)的CAN報(bào)文丟失故障碼?!緦?shí)施例】在本實(shí)施例中,CAN網(wǎng)絡(luò)中各ECU之間的通信矩陣如下表3所示,其中“S”表示發(fā)送,“R”表示接收。表3CAN通信矩陣由表3可知:(1)網(wǎng)絡(luò)中有7個(gè)節(jié)點(diǎn),分別為ECU1、ECU2、ECU3、ECU4、ECU5、ECU6和ECU7。(2)ECU1發(fā)送周期性報(bào)文M1;ECU2發(fā)送周期性報(bào)文M2;ECU3發(fā)送周期性報(bào)文M3;ECU4發(fā)送周期性報(bào)文M4;ECU5發(fā)送周期性報(bào)文M5;ECU6發(fā)送周期性報(bào)文M6;(3)ECU7周期性接收?qǐng)?bào)文M1、M2、M3、M4、M5和M6。本實(shí)施例中各網(wǎng)絡(luò)節(jié)點(diǎn)供電方式如下表4所示,實(shí)施例中各網(wǎng)絡(luò)節(jié)點(diǎn)上電時(shí)序示意圖如圖2所示。表4各網(wǎng)絡(luò)節(jié)點(diǎn)供電方式節(jié)點(diǎn)名稱節(jié)點(diǎn)供電方式網(wǎng)絡(luò)節(jié)點(diǎn)供電方式編號(hào)ECU1常電S1ECU2ACC供電S2ECU3ON供電S3ECU4EMS主繼電器供S4ECU5HCU主繼電器供S5ECU6MCU主繼電器供S6ECU7常電S1以網(wǎng)絡(luò)節(jié)點(diǎn)ECU7為例,ECU7需要針對(duì)其應(yīng)接收的且報(bào)文發(fā)送類型為周期型的報(bào)文M1、M2、M3、M4、M5和M6,實(shí)行CAN報(bào)文丟失監(jiān)測(cè)。例如:當(dāng)ECU7采集到CAN報(bào)文M4時(shí),參考圖1,其關(guān)于CAN報(bào)文丟失的監(jiān)測(cè)方法的處理過(guò)程為:(1)經(jīng)判斷報(bào)文M4是ECU7應(yīng)接收的報(bào)文,故執(zhí)行分支A1;(2)經(jīng)判斷報(bào)文M4是周期性報(bào)文,故執(zhí)行分支B1;(3)報(bào)文M4的發(fā)送節(jié)點(diǎn)是ECU4,ECU4不是常電,故執(zhí)行分支C2;(4)ECU4不是ACC供電,故執(zhí)行分支D2;(5)ECU4不是ON供電,故執(zhí)行分支E2;(6)ECU4是EMS主繼電器供電,故執(zhí)行分支F1;(7)采取CAN報(bào)文丟失監(jiān)測(cè)模式4監(jiān)測(cè)報(bào)文M4丟失。當(dāng)ECU7決定采取CAN報(bào)文丟失監(jiān)測(cè)模式4后,采用的CAN報(bào)文丟失監(jiān)測(cè)的控制邏輯示意圖如圖3所示,實(shí)施例中各事件定義如表5所示。表5各事件定義事件編號(hào)事件描述E1整車重新上常電E2EMS主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合E3、E5ECU7開(kāi)始能夠從CAN上采集到報(bào)文M4E4、E6ECU7開(kāi)始不能從CAN上采集到報(bào)文M4E7超時(shí)計(jì)數(shù)器C4值大于報(bào)文M4丟失監(jiān)測(cè)的限值E8EMS主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi)以下結(jié)合圖3對(duì)表5中所定義的事件進(jìn)行詳細(xì)介紹。ECU7通過(guò)專用的超時(shí)計(jì)數(shù)器C4來(lái)監(jiān)測(cè)報(bào)文M4是否丟失,如果ECU7在報(bào)文M4發(fā)送周期20ms內(nèi)未能接收到報(bào)文M4,則其取值加1。(1)E1:當(dāng)整車重新上常電時(shí),超時(shí)計(jì)數(shù)器C4設(shè)置為初始值0。(2)E2-E3:當(dāng)EMS主繼電器開(kāi)關(guān)由斷開(kāi)轉(zhuǎn)為閉合時(shí),滿足了報(bào)文M4丟失監(jiān)測(cè)模式的起動(dòng)條件時(shí),重置超時(shí)計(jì)數(shù)器C4為0,并啟動(dòng)超時(shí)計(jì)數(shù)器C4。因?yàn)榇藭r(shí)ECU4還處于初始化階段,不能向CAN線發(fā)送報(bào)文M4,所以超時(shí)計(jì)數(shù)器C4的值隨時(shí)間推移而增加。(3)E3-E4:ECU4完成初始化后開(kāi)始以20ms為周期發(fā)送報(bào)文M4,當(dāng)ECU7從CAN上采集到報(bào)文M4時(shí),重置超時(shí)計(jì)數(shù)器C4為0,并啟動(dòng)超時(shí)計(jì)數(shù)器。因?yàn)镋CU7能夠周期性采集到報(bào)文M4,不斷重置超時(shí)計(jì)數(shù)器C4為0,所以超時(shí)計(jì)數(shù)器C4始終為0。(4)E4-E5:因?yàn)橄到y(tǒng)中存在網(wǎng)絡(luò)節(jié)點(diǎn)和網(wǎng)絡(luò)線束等故障,導(dǎo)致ECU7不能從CAN上采集到報(bào)文M4,所以超時(shí)計(jì)數(shù)器C4的值隨時(shí)間推移而增加。(5)E5-E6:系統(tǒng)故障治愈后,ECU7再次能夠周期性采集到報(bào)文M4,不斷重置超時(shí)計(jì)數(shù)器C4為0,所以超時(shí)計(jì)數(shù)器C4始終為0。(6)E6-E7:因?yàn)橄到y(tǒng)中再次存在網(wǎng)絡(luò)節(jié)點(diǎn)和網(wǎng)絡(luò)線束等故障,導(dǎo)致ECU7不能從CAN上采集到報(bào)文M4,所以超時(shí)計(jì)數(shù)器C4的值隨時(shí)間推移而增加。當(dāng)超時(shí)計(jì)數(shù)器C4值大于報(bào)文M4丟失監(jiān)測(cè)的限值MAX4時(shí),ECU7存儲(chǔ)報(bào)文M4丟失的故障碼。(7)E8:當(dāng)EMS主繼電器開(kāi)關(guān)由閉合轉(zhuǎn)為斷開(kāi)時(shí),滿足了報(bào)文M4丟失監(jiān)測(cè)模式的停止條件時(shí),ECU7停止超時(shí)計(jì)數(shù)器C4,并重置超時(shí)計(jì)數(shù)器C4為0。同理,可得到網(wǎng)絡(luò)節(jié)點(diǎn)ECU7從其他節(jié)點(diǎn)ECU1、ECU2、ECU3、ECU5和ECU6采集報(bào)文M1、M2、M3、M5和M6時(shí),分別采用CAN報(bào)文丟失監(jiān)測(cè)模式1、CAN報(bào)文丟失監(jiān)測(cè)模式2、CAN報(bào)文丟失監(jiān)測(cè)模式3、CAN報(bào)文丟失監(jiān)測(cè)模式5和CAN報(bào)文丟失監(jiān)測(cè)模式6進(jìn)行監(jiān)測(cè),每種CAN報(bào)文丟失監(jiān)測(cè)模式中的事件定義與上述表5所定義的事件相類似,控制邏輯與上述步驟(1)至(7)所描述的控制邏輯也類似,不同的是控制邏輯的起始條件E2和結(jié)束條件E8,為避免累贅,在此省略對(duì)本實(shí)施例中的其他CAN報(bào)文丟失監(jiān)測(cè)模式進(jìn)行詳細(xì)描述。綜上,本發(fā)明對(duì)CAN網(wǎng)絡(luò)中采用不同供電方式的各ECU采取不同的CAN報(bào)文丟失監(jiān)測(cè)模式,從而避免了誤報(bào)或漏報(bào)CAN報(bào)文的丟失故障問(wèn)題。以上所述是本發(fā)明的優(yōu)選實(shí)施方式,應(yīng)當(dāng)指出,對(duì)于本
技術(shù)領(lǐng)域:
的普通技術(shù)人員來(lái)說(shuō),在不脫離本發(fā)明所述原理的前提下,還可以做出若干改進(jìn)和潤(rùn)飾,這些改進(jìn)和潤(rùn)飾也應(yīng)視為本發(fā)明的保護(hù)范圍。當(dāng)前第1頁(yè)1 2 3