CN1913476A - CAN message priority generation and detection system and its method - Google Patents

CAN message priority generation and detection system and its method Download PDF

Info

Publication number
CN1913476A
CN1913476A CN 200610010367 CN200610010367A CN1913476A CN 1913476 A CN1913476 A CN 1913476A CN 200610010367 CN200610010367 CN 200610010367 CN 200610010367 A CN200610010367 A CN 200610010367A CN 1913476 A CN1913476 A CN 1913476A
Authority
CN
China
Prior art keywords
node
bus
processor
connects
resistance
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
CN 200610010367
Other languages
Chinese (zh)
Other versions
CN100454877C (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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of Technology
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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CNB2006100103677A priority Critical patent/CN100454877C/en
Publication of CN1913476A publication Critical patent/CN1913476A/en
Application granted granted Critical
Publication of CN100454877C publication Critical patent/CN100454877C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

This invention relates to a system for generating and detecting CAN message priority and its method, in which, the system is composed of three nodes and CAN bus, its detection method includes: starting up the detection system, initializing the nodes, setting message priority of each node, configuring control field and data field of each node, pressing the 'start and transmission' button of node 1, 2 and 3 orderly, pressing the' stop transmitting' button of node 1, collecting MAC frame to be displayed by a display unit, which not only finishes generation of the CAN message priority, but also realizes detection of the priority and monitor to MAC frame.

Description

Generation of CAN message priority and detection system and method thereof
Technical field
The present invention relates to generation of a kind of CAN message priority and detection system and method thereof.
Background technology
Field bus technique has been applied to industry spot more and more.The CAN bus is especially with distinct advantages such as its high efficiency, low price, high reliability and obtained application more and more widely.Message priority is a big distinguishing feature of CAN bus.Yet present domestic shortage is at the further investigation and the analysis of CAN message priority, and also neither one effective method or means produce priority with detection messages all the time.This has hindered the further research and the application of CAN bus to a great extent.
Summary of the invention
In order to solve the problem that can't detect the CAN message priority at present, the invention provides generation of a kind of CAN message priority and detection system and method thereof.
CAN message priority of the present invention produces with detection system to be made up of CAN bus, first node, Section Point and the 3rd node, is mounted with first node, Section Point and the 3rd node on the CAN bus; Described first node by first processor, detecting unit, first communication unit, first display unit, first keyboard, stop to send button A and start to send button B and form; The bus communication end of first processor connects the node communication end of first communication unit, and the bus communication end of first communication unit links to each other with the CAN bus by CAN bus driver controller; Detecting unit is gathered the digital signal on the CAN bus, the data output end of detecting unit connects the data input pin of first processor, the data output end of first keyboard connects the control input end of first processor, the state shows signal output of first processor connects the input of first display unit, the control signal output ends that stops to send button A connects the stop signal receiving terminal of first processor, starts the enabling signal receiving terminal that the control signal output ends that sends button B connects first processor; Described Section Point is identical with the structure of the 3rd node; Described Section Point is by second processor, second display unit, the second communication unit, second keyboard and startup send button C and form, the data output end of second keyboard connects second processor, the bus communication end of second processor connects the node communication end of second communication unit, the bus communication end of second communication unit links to each other with the CAN bus by CAN bus driver controller, the node state shows signal output of second processor connects the input of second display unit, starts the enabling signal receiving terminal that the control signal output ends that sends button C connects second processor.Detecting unit is gathered the digital signal on the CAN bus, obtain " 0 " or " 1 " signal on the CAN bus by comparison circuit and given reference voltage, be used for the CAN bus level is detected, also can detect CAN bus MAC (media interviews control) frame.
Based on the detection method of above-mentioned CAN message priority generation, carry out according to the following steps successively with detection system: 101, start detection system, preparation powers on; 102, initialization first node, Section Point and the 3rd node; 103, the message priority of configuration first node, Section Point and the 3rd node, be transmission message ID difference called after SENT_ID_1, SENT_ID_2, the SENT_ID_3 of first node, Section Point, the 3rd node, priority of messages is in proper order: SENT_ID_1>SENT_ID_2>SENT_ID_3; 104, the controlling filed and the data fields of configuration first node, Section Point and the 3rd node; 105, press the startup transmission button B of first node, make first node send the message that ID is SENT_ID_1 continuously by software; 106, press the startup transmission button C of Section Point, make Section Point begin to send the message that ID is SENT_ID_2 by software; 107, press the startup transmission button C of the 3rd node, make the 3rd node begin to send the message that ID is SENT_ID_3 by software; 108, press first node stop to send button A and make first node stop to send continuously message, and begin to make detecting unit monitoring bus level when after stopping to send continuously, sending a frame message again, catch mac frame; 109, first node shows detected mac frame by first display unit.The detection of above-mentioned first node can stop when first node is detecting continuous 8 " 1 " for the third time, promptly stops during the 3rd frame ENMES detecting.
Operation principle: at first, first node sends the message of high priority continuously on the CAN bus, make bus be in the state of " doing " always; Then, Section Point, the 3rd node send different and all low than the first node priority message of priority; After first node stops to send, Section Point and the 3rd node be competition bus simultaneously, at this moment the higher Section Point of priority will win arbitration, can intuitively show the situation of Section Point and the competition of the 3rd node by the level signal on the first node testbus.The present invention has only adopted three nodes, when it detects a plurality of node race problem really, as long as according to the method described above, articulates a plurality of nodes on Bus Wire, and sets gradually the priority of a plurality of nodes, and commence operation gets final product then.
The invention effect: the present invention can show the race condition of information priority level on the CAN bus intuitively, has made things convenient for the further investigation to CAN bus mechanism and essence, has established theoretical foundation for using the CAN bus better.In industry spot, can articulate a plurality of nodes on the general bus, there is a large amount of messages on bus, to transmit, therefore can set different priority along order according to the urgency level of incident, this brings a solution just for industrial event handling, so brought benefit according to the priority of method understanding incident of the present invention to commercial Application.
Description of drawings
Fig. 1 is a system construction drawing of the present invention.Fig. 2 is the internal structure schematic diagram of first node 1.Fig. 3 is the structural representation of Section Point 2.Fig. 4 is the flow chart of detection method of the present invention.Fig. 5 is the structural representation of the detecting unit 1-1 of first node 1 of the present invention.
Embodiment
Embodiment one: specify present embodiment below in conjunction with Fig. 1 to Fig. 3.
The CAN message priority generation of present embodiment and detection system are based on the CAN bus application system, it is made up of CAN bus 4, first node 1, Section Point 2 and the 3rd node 3, is mounted with first node 1, Section Point 2 and the 3rd node 3 on CAN bus 4; Described first node 1 by first processor 1-6, detecting unit 1-1, the first communication unit 1-3, the first display unit 1-4, the first keyboard 1-2, stop to send button A 1-7 and start to send button B 1-5 and form; The bus communication end of first processor 1-6 connects the node communication end of the first communication unit 1-3, and the bus communication end of the first communication unit 1-3 links to each other with CAN bus 4 by CAN bus driver controller; Detecting unit 1-1 gathers the digital signal on the CAN bus 4, the data output end of detecting unit 1-1 connects the data input pin of first processor 1-6, the data output end of the first keyboard 1-2 connects the control input end of first processor 1-6, the state shows signal output of first processor 1-6 connects the input of the first display unit 1-4, the control signal output ends that stops to send button A 1-7 connects the stop signal receiving terminal of first processor 1-6, starts the enabling signal receiving terminal that the control signal output ends that sends button B 1-5 connects first processor 1-6; Described Section Point 2 is identical with the structure of the 3rd node 3; Described Section Point 2 is by the second processor 2-4, the second display unit 2-3, second communication unit 2-2, the second keyboard 2-1 and startup send button C 2-5 and form, the data output end of the second keyboard 2-1 connects the second processor 2-4, the bus communication end of the second processor 2-4 connects the node communication end of second communication unit 2-2, the bus communication end of second communication unit 2-2 links to each other with CAN bus 4 by CAN bus driver controller, the node state shows signal output of the second processor 2-4 connects the input of the second display unit 2-3, starts the enabling signal receiving terminal that the control signal output ends that sends button C 2-5 connects the second processor 2-4.
As shown in Figure 5, detecting unit 1-1 is by first resistance R 1, second resistance R 2, the 3rd resistance R 3, the 4th resistance R 4, DC power supply V1 forms, one end ground connection of second resistance R 2, the other end of second resistance R 2 connects the inverting input CP-of the inside comparing unit of end of first resistance R 1 and first processor 1-6, the other end of first resistance R 1 connects the output of DC power supply V1, one end of the 3rd resistance R 3 connects CAN bus 4, the other end of the 3rd resistance R 3 connects the in-phase input end CP+ of the inside comparing unit of end of the one or four resistance R 4 and first processor 1-6, the other end ground connection of the one or four resistance R 4.Detecting unit 1-1 gathers the digital signal on the CAN bus, obtain " 0 " or " 1 " signal on the CAN bus by comparison circuit and given reference voltage, be used for the CAN bus level is detected, also can detect CAN bus MAC (media interviews control) frame.First processor 1-6 adopts element: C8051F023; The first display unit 1-1:12864-2W; The first keyboard 1-2:OMRON; Stop to send button A 1-7:OMRON; Start and send button B 1-5:OMRON; The first communication unit 1-3:SJA1000,82C250,6N137 etc.The correlation unit of other nodes is identical with it.
Embodiment two: referring to Fig. 4, this embodiment is based on the detection method of embodiment one described CAN message priority generation and detection system, and it carries out successively according to the following steps: 101, start detection system, and preparation powers on; 102, initialization first node 1, Section Point 2 and the 3rd node 3; 103, the message priority of configuration first node 1, Section Point 2 and the 3rd node 3, be transmission message ID difference called after SENT_ID_1, SENT_ID_2, the SENT_ID_3 of first node 1, Section Point 2, the 3rd node 3, priority of messages is in proper order: SENT_ID_1>SENT_ID_2>SENT_ID_3; 104, configuration controlling filed of first node 1, Section Point 2 and the 3rd node 3 and data fields (for example: the DLC of controlling filed (data length sign indicating number)=0010 (binary system), then data fields can be configured to two bytes arbitrarily: 01110111,11101110); 105, press the startup transmission button B of first node 1, making first node 1 send ID continuously by software is the message of SENT_ID_1; 106, press the startup transmission button C of Section Point 2, make Section Point begin to send the message that ID is SENT_ID_2 by software; 107, press the startup transmission button C of the 3rd node 3, make the 3rd node begin to send the message that ID is SENT_ID_3 by software; 108, press first node 1 stop to send button A and make first node 1 stop to send continuously message, and begin to make detecting unit 1-1 monitoring bus level when after stopping to send continuously, sending a frame message again, catch mac frame; 109, first node 1 shows detected mac frame by the first display unit 1-4.In this embodiment, when first node 1 detects continuous 8 " 1 " for the third time, stop to detect, promptly stop to detect during the 3rd frame ENMES.It is by detected mac frame that the order of priority embodies, and in the logic level mode detected mac frame is shown by display unit and can judge its priority.
First node 1 sequentially shows each place value of detected mac frame by the first display unit 1-4, and compare with the mac frame that first node 1, Section Point 2, the 3rd node 3 send, can determine the message priority of first node 1, Section Point 2, the 3rd node 3.The initialization of step 102 is meant the information according to each node display unit, by each node of button initialization, comprises each initialization of register of CAN controller and display unit initialization.Step 105 makes first node 1 send ID continuously by software and is the message of SENT_ID_1, its objective is in order to have created the condition of the message competition bus that makes different priorities after pressing the startup transmission button B of first node 1.

Claims (3)

1.CAN message priority produces and detection system, it is characterized in that described system is made up of CAN bus (4), first node (1), Section Point (2) and the 3rd node (3), is mounted with first node (1), Section Point (2) and the 3rd node (3) on CAN bus (4); Described first node (1) by first processor (1-6), detecting unit (1-1), first communication unit (1-3), first display unit (1-4), first keyboard (1-2), stop to send button A (1-7) and start to send button B (1-5) and form; The bus communication end of first processor (1-6) connects the node communication end of first communication unit (1-3), and the bus communication end of first communication unit (1-3) links to each other with CAN bus (4) by CAN bus driver controller; Detecting unit (1-1) is gathered the digital signal on the CAN bus (4), the data output end of detecting unit (1-1) connects the data input pin of first processor (1-6), the data output end of first keyboard (1-2) connects the control input end of first processor (1-6), the state shows signal output of first processor (1-6) connects the input of first display unit (1-4), the control signal output ends that stops to send button A (1-7) connects the stop signal receiving terminal of first processor (1-6), starts the enabling signal receiving terminal that the control signal output ends that sends button B (1-5) connects first processor (1-6); Described Section Point (2) is identical with the structure of the 3rd node (3); Described Section Point (2) is by second processor (2-4), second display unit (2-3), second communication unit (2-2), second keyboard (2-1) and startup send button C (2-5) and form, the data output end of second keyboard (2-1) connects second processor (2-4), the bus communication end of second processor (2-4) connects the node communication end of second communication unit (2-2), the bus communication end of second communication unit (2-2) links to each other with CAN bus (4) by CAN bus driver controller, the node state shows signal output of second processor (2-4) connects the input of second display unit (2-3), starts the enabling signal receiving terminal that the control signal output ends that sends button C (2-5) connects second processor (2-4).
2. CAN message priority according to claim 1 produces and detection system, it is characterized in that described detecting unit (1-1) is by first resistance (R1), second resistance (R2), the 3rd resistance (R3), the 4th resistance (R4), DC power supply (V1) is formed, one end ground connection of second resistance (R2), the other end of second resistance (R2) connects the inverting input (CP-) of the inside comparing unit of end of first resistance (R1) and first processor (1-6), the other end of first resistance (R1) connects the output of DC power supply (V1), one end of the 3rd resistance (R3) connects CAN bus (4), the other end of the 3rd resistance (R3) connects the in-phase input end (CP+) of the inside comparing unit of end of the one or four resistance (R4) and first processor (1-6), the other end ground connection of the one or four resistance (R4).
3, produce detection method with detection system based on the described CAN message priority of claim 1, it is characterized in that described detection method carries out successively according to the following steps:
(101), the start detection system, preparation powers on;
(102), initialization first node (1), Section Point (2) and the 3rd node (3);
(103), the message priority of configuration first node (1), Section Point (2) and the 3rd node (3), be transmission message ID difference called after SENT_ID_1, SENT_ID_2, the SENT_ID_3 of first node (1), Section Point (2), the 3rd node (3), priority of messages is in proper order: SENT_ID_1>SENT_ID_2>SENT_ID_3;
(104), the controlling filed and the data fields of configuration first node (1), Section Point (2) and the 3rd node (3);
(105), the startup of pressing first node (1) sends button B, makes first node (1) send the message that ID is SENT_ID_1 continuously by software;
(106), the startup of pressing Section Point (2) sends button C, makes Section Point begin to send the message that ID is SENT_ID_2 by software;
(107), the startup of pressing the 3rd node (3) sends button C, makes the 3rd node begin to send the message that ID is SENT_ID_3 by software;
(108), press first node (1) stop to send button A and make first node (1) stop to send continuously message, and begin to make detecting unit (1-1) monitoring bus level when after stopping to send continuously, sending a frame message again, catch mac frame;
(109), first node (1) shows detected mac frame by first display unit (1-4).
CNB2006100103677A 2006-08-04 2006-08-04 CAN message priority generation and detection system and its method Expired - Fee Related CN100454877C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2006100103677A CN100454877C (en) 2006-08-04 2006-08-04 CAN message priority generation and detection system and its method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2006100103677A CN100454877C (en) 2006-08-04 2006-08-04 CAN message priority generation and detection system and its method

Publications (2)

Publication Number Publication Date
CN1913476A true CN1913476A (en) 2007-02-14
CN100454877C CN100454877C (en) 2009-01-21

Family

ID=37722254

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2006100103677A Expired - Fee Related CN100454877C (en) 2006-08-04 2006-08-04 CAN message priority generation and detection system and its method

Country Status (1)

Country Link
CN (1) CN100454877C (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222510B (en) * 2008-01-25 2010-11-03 北京工业大学 Method for implementing CANopen main station
CN103368786A (en) * 2012-04-10 2013-10-23 珠海格力电器股份有限公司 Method and device for testing controller local area network bus data
CN110650053A (en) * 2019-09-27 2020-01-03 苏州浪潮智能科技有限公司 Cabinet and method and device for managing cabinet

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7933249B2 (en) * 2000-02-08 2011-04-26 Ipr Licensing, Inc. Grade of service and fairness policy for bandwidth reservation system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222510B (en) * 2008-01-25 2010-11-03 北京工业大学 Method for implementing CANopen main station
CN103368786A (en) * 2012-04-10 2013-10-23 珠海格力电器股份有限公司 Method and device for testing controller local area network bus data
CN103368786B (en) * 2012-04-10 2016-03-30 珠海格力电器股份有限公司 Method and device for testing controller local area network bus data
CN110650053A (en) * 2019-09-27 2020-01-03 苏州浪潮智能科技有限公司 Cabinet and method and device for managing cabinet

Also Published As

Publication number Publication date
CN100454877C (en) 2009-01-21

Similar Documents

Publication Publication Date Title
CN109581122A (en) Method, device and system for detecting abnormal awakening of vehicle
CN100454877C (en) CAN message priority generation and detection system and its method
CN102055238A (en) Method and apparatus for monitoring a power system
CN100420228C (en) Transmitting and receiving display system for CAN message of different priorities and its detecting method
CN104601574B (en) A kind of copy reading method that data for electric energy meter acquire
CN101924667A (en) Modem anomaly detecting and power-off restarting control method based on serial port
CN101309236A (en) Multi-protocol data integration control communication gateway and working method thereof
CN103401837A (en) Real-time data pushing method for SCADA (supervisory control and data acquisition) system
CN100428701C (en) CAN wrong frame generating and detecting system and its method
CN201069551Y (en) Wireless mouse with energy-saving display
CN201311461Y (en) Grid-connection photovoltaic data detecting system
CN111413902A (en) Bridge monitoring communication method and acquisition system based on Can bus
CN201226531Y (en) Multi-protocol data integration control telecommunication gateway
CN202837981U (en) Smart home monitoring system
CN103443736B (en) The starter gear of electronic equipment, method and user's recognition system
CN1913458A (en) Display and detection system and method of MAC frame and LLC frame of CAN
CN112525912A (en) Detect tab folding device through CCD
CN106872846A (en) Pressing plate status checkout system
CN100407680C (en) System and method for confirming CAN node message transmission waiting condition and waiting time
CN201509206U (en) Infiniband exchanger intelligent monitoring device
CN202433111U (en) Wireless multi-path temperature acquisition system
CN2754298Y (en) Base station power and environmental monitor
CN1913459A (en) Device and method of detection and display of CAN error frame
CN216697044U (en) Power consumption monitoring and management system
CN202421861U (en) Communication device of wind turbine generator unit

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

Granted publication date: 20090121

Termination date: 20100804