CN101505203B - Detection method and apparatus for CAN bus element communication state - Google Patents

Detection method and apparatus for CAN bus element communication state Download PDF

Info

Publication number
CN101505203B
CN101505203B CN2009101272290A CN200910127229A CN101505203B CN 101505203 B CN101505203 B CN 101505203B CN 2009101272290 A CN2009101272290 A CN 2009101272290A CN 200910127229 A CN200910127229 A CN 200910127229A CN 101505203 B CN101505203 B CN 101505203B
Authority
CN
China
Prior art keywords
data
components
destination address
parts
communication state
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.)
Active
Application number
CN2009101272290A
Other languages
Chinese (zh)
Other versions
CN101505203A (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.)
Sany Heavy Industry Co Ltd
Original Assignee
Sany Heavy Industry 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 Sany Heavy Industry Co Ltd filed Critical Sany Heavy Industry Co Ltd
Priority to CN2009101272290A priority Critical patent/CN101505203B/en
Publication of CN101505203A publication Critical patent/CN101505203A/en
Application granted granted Critical
Publication of CN101505203B publication Critical patent/CN101505203B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Alarm Systems (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention discloses a method for detecting the communication state of a CAN bus component, which comprises the steps of: refreshing data in a target address when current frame component data is received; writing a specific value into the target address when current data in the target address is a non-specific value, and beginning the timing; judging whether the preset time arrives when the current data in the target address is the specific value; sending an alarm signal if the preset time arrives; and receiving next frame component data if the preset time does not arrive. The method can alarm when the component has abnormal communication; and the writing and refreshing of the specific value in the target address are easy to realize and do not depend on specific components, which enlarges the selection range of the components and ensures that the design of the system and the model selection of the components are more flexible. On this basis, the invention also discloses a device for detecting the communication state of the CAN bus component.

Description

The detection method of CAN bus element communication state and checkout gear
Technical field
The present invention relates to the field tests of measuring equipment or device, is the detection method and the checkout gear of CAN bus element communication state specifically.
Background technology
In intelligent plant equipment, the quality of each actuator's coordinated movement of various economic factors quality directly influences the quality of product.For example, intelligent concrete mixer is when pouring into a mould, if it is inharmonious respectively to save the motion of jib, with making that the motion of jib distal point can not be according to predetermined route motion; This certainly will influence the quality of cast, and and then influence project quality, cause potential safety hazard.Therefore, in the process of carrying out intelligent concrete mixer research, accurately control the position of jib distal point; And the basis of control is accurately to obtain and respectively saves the residing position of jib, and this need save the transducer (for example rotary encoder, obliquity sensor etc. below are referred to as transducer) that installs and measures angle on the jib at each.Likewise, for other smart machines or machine, also need sensor installation, so that control accurately.
Obviously, the certainty of measurement of transducer and reliability will greatly influence the effect of control: if sensor accuracy is not high, influence control precision; If the data of transducer are made mistakes, will cause false judgment to mechanical arm or mechanical hand position, make control output not conform to the actual situation; In this case, the action of control mechanical arm or mechanical hand will bring unpredictable consequence.This shows,, must guarantee that transducer can detect reliably, dateout for controlling effectively.
At present; In the control system in each field; CAN (Controller Area Network, the controller local area network) bus communications that adopt between controller and each testing agency, the actuator, this is because the CAN bus has the cause of outstanding reliability, real-time and flexibility more.For simplicity, be CAN bus element (abbreviation components and parts) with the scales under this CAN bus communication below.
In this control system, the communication reliability of components and parts is very crucial.If communication abnormality faults such as components and parts are damaged, broken strings, control system is with cisco unity malfunction; At this moment, as continuing the control executing mechanism action, may produce serious consequence.Therefore, be necessary the communication conditions of CAN bus element is monitored, when communication abnormality occurring, report to the police, so that in time take emergency measures.
In the prior art, often use a kind of communication conditions of monitoring the CAN bus element with the components and parts of heartbeat signal.Said heartbeat signal is that components and parts send specific byte position in the data, saltus step in turn between 0 and 1 when sending data.Through detecting having or not of this heartbeat signal, can judge whether communications status is unusual; If communication abnormality takes place, then reports to the police; And after further detecting, the components and parts that damage, break are changed or keeped in repair, to guarantee the normal operation of control system.
Problem is: some components and parts does not have the function that produces heartbeat signal, and at this moment, said method will lose efficacy; Simultaneously, the components and parts price of band heartbeat signal is higher, and a large amount of uses certainly will increase the production use cost.Because above-mentioned detection method requires to use the components and parts of band heartbeat signal, this has limited the range of choice of components and parts, and versatility is relatively poor.
Summary of the invention
In view of this, the present invention provides a kind of detection method of CAN bus element communication state, can when the components and parts communication abnormality, report to the police, and is applicable to various components and parts, and versatility is better.On this basis, the present invention also provides a kind of checkout gear of CAN bus element communication state.
For solving above technical problem, the detection method of CAN bus element communication state provided by the invention may further comprise the steps:
When receiving the current frame component data, adopt the data in the current frame component Refresh Data destination address;
When the current data behind the refreshing in said destination address is nonspecific value, in said destination address, writes particular value, and pick up counting, receive next frame components and parts data;
When the current data in said destination address is particular value, judge whether to arrive preset timing time; If send alarm signal; If not, receive next frame components and parts data.
Preferably, said destination address is the pairing memory address of slack byte in the said components and parts data.
Preferably, said particular value obviously is different from said components and parts data.
Preferably, the primary data in the said destination address is a particular value.
Preferably, before picking up counting, the timing zero clearing.
Preferably, said alarm signal is sound, light, electricity, vibration signal or combination in any.
The checkout gear of CAN bus element communication state provided by the invention comprises:
Timer is used to detect timing;
Memory is used for storing relevant data;
Controller is used to control the timing action of said timer, receives the components and parts data that said CAN bus element detects and exports, and carries out data interaction with said memory; And, according to the expectant control strategy, the output alarm control signal;
Alarm is used for sending alarm signal according to said alarm control signal;
When this checkout gear started, said controller was controlled according to following strategy: when receiving the current frame component data, adopt the data in the current frame component Refresh Data memory target address; When the current data behind the refreshing in said destination address is nonspecific value, in said destination address, write particular value, and control said timer and pick up counting, receive next frame components and parts data; When the current data in said destination address is particular value, judge whether said timer arrives preset timing time; If send said alarm control signal; If not, receive next frame components and parts data.
Preferably, said timer before picking up counting, the timing zero clearing.
Preferably, said alarm signal is sound, light, electricity, vibration signal or combination in any
Compared with prior art, the present invention can report to the police when the components and parts communication abnormality through in destination address, writing the method for particular value, is applicable to various components and parts, and versatility is better, particularly:
Before receiving the data element device, in destination address, write particular value, so that detect the communications status of next frame components and parts data; Passing through just often, can receive the data that components and parts send, and refresh the particular value in the destination address; Under current situation of interrupting, can't receive the data that components and parts send, thereby can not refresh the particular value in the destination address; Under the situation that the particular value in the destination address was not refreshed in the duration, show that components and parts send data exception, thereby in time report to the police, so that gather the emergency processing measure.Among the present invention, the particular value in the destination address write, upgrade easy realization, do not rely on specific components and parts; Therefore, need not select tape heartbeat signal components and parts, the components and parts versatility is good; This has enlarged the components and parts range of choice, makes that also system design and components and parts type selecting are more flexible.
Description of drawings
Fig. 1 is the flow chart of detection method one preferred embodiment of CAN bus element communication state of the present invention;
Fig. 2 is the block diagram of the checkout gear of CAN bus element communication state of the present invention.
Embodiment
Basic design of the present invention is before receiving data, in destination address, to fill particular value; When receiving the components and parts data, the particular value in the destination address is refreshed; This particular value is not refreshed within a certain period of time, judges communication abnormality and warning.
For ease of present invention is described, principle of the present invention is carried out brief description at present.
In every frame data that the CAN bus element sends out, the data of some byte are not to be valid data, but can take the byte location in the bus data frame equally, so this byte location of definable is broken string or fault detect position.
Before receiving data, will write destination address (be without loss of generality, be assumed to the burn out detection variable) with broken string or the diverse data of fault detect bit data; When receiving new data, give above-mentioned burn out detection variable with this data assignment; If components and parts are in proper working order, new data will be the data modification of burn out detection variable; Otherwise the data of burn out detection variable are the particular value that is write.
Therefore, whether refreshed through this burn out detection variable and judged whether the components and parts work at present is normal; If components and parts are in proper working order, otherwise, judge components and parts broken string or fault.So constantly carry out, make the data of burn out detection variable constantly pass between the data come and padding data and constantly beat at components and parts.When components and parts did not have transfer of data to come, the data of filling can not get refreshing, behind certain hour, with regard to decidable bus element communication abnormality.
Below in conjunction with accompanying drawing and embodiment the present invention is specified.
See also Fig. 1, this figure is the flow chart of detection method one preferred embodiment of CAN bus element communication state of the present invention.May further comprise the steps:
S110, timing zero clearing.
The timing zero clearing begins to get into testing process.
S120, in destination address, write particular value.
Before receiving next frame components and parts data, in destination address, write particular value.If the data communication of next frame components and parts is normal, then this particular value is refreshed; Otherwise, will preserve this particular value in the destination address.Usually, this particular value obviously is different from the components and parts data, in order to avoid produce wrong report.Preferably, the primary data in the said destination address is a particular value, so that under the situation that destination address is never refreshed, can report to the police.
What need explanation is that step S110, step S120 also can carry out or carry out simultaneously by reverse order, repeat no more at this.
S130, pick up counting.
The timing purpose is to prevent wrong report, and only data just are judged as the components and parts communication abnormality not by after the brush certain time in destination address.
S140, reception components and parts data, and refresh the data in the destination address.
In communication just often, can receive the current frame component data, thereby constantly with the Refresh Data in the destination address; Otherwise, not receiving the current frame component data, the data in the destination address can not get refreshing; At this moment, the particular value for before having write in the destination address.
Wherein, said destination address can be the physical address in register, internal memory or other external memory storage.Preferably, this destination address is the pairing memory address of slack byte in the components and parts data, so that save memory space, improves storage speed.Preferably, with the data in the current frame component Refresh Data destination address, refresh efficient so that improve.
S150, judge whether the current data in the destination address is particular value,
If get into step S160;
If not, return step S110.
Current data in destination address is under the situation of particular value, shows not by the components and parts Refresh Data, and the situation of communication disruption has taken place; Otherwise the current data in destination address is non-to be under the situation of particular value, shows that communication disruption does not take place previous frame components and parts data, and data refresh, and therefore gets into to detect circulation next time.
In fact; The communication disruption of several frame components and parts data can not cause too big influence to control system; Therefore need further to judge the duration of communication disruption: only under the situation that continues preset timing time of communication disruption, just can be judged as communication abnormality; Otherwise, possibly report by mistake, false-alarm.
S160, judge whether to arrive preset timing time.
If get into step S170;
If not, return step S130;
Particular value data in destination address do not show communication abnormality after being refreshed certain time, and faults such as components and parts damage, broken string take place, and need report to the police; Otherwise, might be temporary transient communication disruption, can not damage control system, can continue to receive the components and parts data.
S170, send alarm signal.
When communication abnormality, send alarm signal, so that take measures.At this moment, generally need to end the control system operation, during faults such as the damage of generation components and parts, broken string, answer on-call maintenance, change relevant components and parts.Wherein, said alarm signal can be sound, light, electricity, vibration signal or combination in any, is as the criterion to guarantee reliable the warning.
The detection method of this CAN bus element communication state through in destination address, writing the method for particular value, can be reported to the police when the components and parts communication abnormality, is applicable to various components and parts, and versatility is better, particularly:
Before receiving data, in destination address, write particular value, so that detect the communications status of next frame components and parts data; Passing through just often, can receive the data that components and parts send, and refresh the particular value in the destination address; Under current situation of interrupting, can't receive the data that components and parts send, thereby can not refresh the particular value in the destination address; Under the situation that the particular value in the destination address was not refreshed in the duration, show the components and parts data exception, thereby in time report to the police, so that gather the emergency processing measure.Among the present invention, the particular value in the destination address write, upgrade easy realization, do not rely on specific components and parts; Therefore, need not select tape heartbeat signal components and parts, the components and parts versatility is good; This has enlarged the components and parts range of choice, makes that also system design and components and parts type selecting are more flexible.
On the basis of above-mentioned detection method, below the checkout gear of CAN bus element communication state of the present invention is described.
See also Fig. 2, this figure is the block diagram of the checkout gear of CAN bus element communication state of the present invention.This checkout gear comprises:
Timer 4 is used to detect timing; Usually, before timing began, timer 4 should the timing zero clearing;
Memory 5 is used for storing relevant data;
Controller 3 is used to control the timing action of said timer 4, receives the components and parts data that said CAN bus element 2 detects and exports, and carries out data interaction with said memory; And, according to the expectant control strategy, the output alarm control signal;
Alarm 1 is used for sending alarm signal according to said alarm control signal; Usually, said alarm signal is sound, light, electricity, vibration signal or combination in any;
When this checkout gear started, said controller 3 was controlled according to following strategy: when receiving the current frame component data, and the data in refresh memory 5 destination addresses; When the current data in said destination address is nonspecific value, in said destination address, write particular value, and control said timer 4 and pick up counting; When the current data in said destination address is particular value, judge whether said timer 4 arrives preset timing time; If send alarm control signal; If not, receive next frame components and parts data.
Under current situation of interrupting, can't receive the data that CAN bus element 2 sends, thereby can not refresh the particular value in the destination address; Under the situation that the particular value in the destination address was not refreshed in the duration, show the components and parts data exception, thereby in time report to the police, so that gather the emergency processing measure.Among the present invention, the particular value in the destination address write, upgrade easy realization, do not rely on specific components and parts; Therefore, need not select tape heartbeat signal components and parts, the components and parts versatility is good; This has enlarged the components and parts range of choice, makes that also system design and components and parts type selecting are more flexible.
The above only is a preferred implementation of the present invention, should be pointed out that above-mentioned preferred implementation should not be regarded as limitation of the present invention, and protection scope of the present invention should be as the criterion with claim institute restricted portion.For those skilled in the art, do not breaking away from the spirit and scope of the present invention, can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.

Claims (9)

1. the detection method of a CAN bus element communication state is characterized in that, may further comprise the steps:
When receiving the current frame component data, adopt the data in the current frame component Refresh Data destination address;
When the current data behind the refreshing in said destination address is nonspecific value, in said destination address, writes particular value, and pick up counting, receive next frame components and parts data;
When the current data in said destination address is particular value, judge whether to arrive preset timing time; If send alarm signal; If not, receive next frame components and parts data.
2. the detection method of CAN bus element communication state as claimed in claim 1 is characterized in that, said destination address is the pairing memory address of slack byte in the said components and parts data.
3. the detection method of CAN bus element communication state as claimed in claim 2 is characterized in that, said particular value obviously is different from said components and parts data.
4. the detection method of CAN bus element communication state as claimed in claim 1 is characterized in that, the primary data in the said destination address is a particular value.
5. the detection method of CAN bus element communication state as claimed in claim 1 is characterized in that, before picking up counting, and the timing zero clearing.
6. like the detection method of each described CAN bus element communication state of claim 1-5, it is characterized in that said alarm signal is sound, light, electricity, vibration signal or combination in any.
7. the checkout gear of a CAN bus element communication state is characterized in that, comprising:
Timer is used to detect timing;
Memory is used for storing relevant data;
Controller is used to control the timing action of said timer, receives the components and parts data that said CAN bus element detects and exports, and carries out data interaction with said memory; And, according to the expectant control strategy, the output alarm control signal;
Alarm is used for sending alarm signal according to said alarm control signal;
When this checkout gear started, said controller was controlled according to following strategy: when receiving the current frame component data, adopt the data in the current frame component Refresh Data memory target address; When the current data behind the refreshing in said destination address is nonspecific value, in said destination address, write particular value, and control said timer and pick up counting, receive next frame components and parts data; When the current data in said destination address is particular value, judge whether said timer arrives preset timing time; If send said alarm control signal; If not, receive next frame components and parts data.
8. the checkout gear of CAN bus element communication state as claimed in claim 7 is characterized in that, said timer before picking up counting, the timing zero clearing.
9. like the checkout gear of claim 7 or 8 described CAN bus element communication states, it is characterized in that said alarm signal is sound, light, electricity, vibration signal or combination in any.
CN2009101272290A 2009-03-09 2009-03-09 Detection method and apparatus for CAN bus element communication state Active CN101505203B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009101272290A CN101505203B (en) 2009-03-09 2009-03-09 Detection method and apparatus for CAN bus element communication state

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009101272290A CN101505203B (en) 2009-03-09 2009-03-09 Detection method and apparatus for CAN bus element communication state

Publications (2)

Publication Number Publication Date
CN101505203A CN101505203A (en) 2009-08-12
CN101505203B true CN101505203B (en) 2012-04-18

Family

ID=40977294

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009101272290A Active CN101505203B (en) 2009-03-09 2009-03-09 Detection method and apparatus for CAN bus element communication state

Country Status (1)

Country Link
CN (1) CN101505203B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102013943A (en) * 2010-07-26 2011-04-13 浙江吉利汽车研究院有限公司 Network frame loss processing method of CAN (Controller Area Network) bus
CN103163863B (en) * 2013-02-04 2015-05-27 北京汽车股份有限公司 Transmission control method and system of CAN information
CN106130815B (en) * 2016-06-15 2020-01-17 乐融致新电子科技(天津)有限公司 Board level testing method and device
CN110647135B (en) * 2019-09-25 2021-03-12 一汽解放青岛汽车有限公司 Detection method for CAN node heartbeat of hybrid electric vehicle
CN112180828B (en) * 2020-10-10 2023-03-24 湖南天桥嘉成智能科技有限公司 Method for detecting communication state of PLC and third-party equipment
CN113238491B (en) * 2021-04-12 2023-05-05 湖南三一智能控制设备有限公司 Simulation test method and device of execution mechanism, intelligent arm support and engineering vehicle

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064856A (en) * 2006-04-28 2007-10-31 鸿富锦精密工业(深圳)有限公司 Access network node and method for startup of V5 interface connection
CN101145986A (en) * 2007-06-18 2008-03-19 中兴通讯股份有限公司 A communication status detection method for boards in communication system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064856A (en) * 2006-04-28 2007-10-31 鸿富锦精密工业(深圳)有限公司 Access network node and method for startup of V5 interface connection
CN101145986A (en) * 2007-06-18 2008-03-19 中兴通讯股份有限公司 A communication status detection method for boards in communication system

Also Published As

Publication number Publication date
CN101505203A (en) 2009-08-12

Similar Documents

Publication Publication Date Title
CN101505203B (en) Detection method and apparatus for CAN bus element communication state
CN102853871B (en) Oil level monitoring method and system
AU2011247439B2 (en) Device and method for transmitting measurement signals in spatially extensive supply networks
CN100492232C (en) Built-in rotating machinery operation monitoring protecting equipment and setting method thereof
CN104468176A (en) Method and apparatus for fault detection in a controller area network
CN103955188A (en) Control system and method supporting redundancy switching function
CN101809520A (en) The field apparatus that is used for digital process control loop diagnostics
CN107505883B (en) High-reliability dual-redundancy integrated control module based on microcontroller
CN103010257A (en) Bearing temperature monitoring system for high speed electric multiple units
CN102435246A (en) Excavator self-detection system and method
CN102607630A (en) Fault detection method, device and system of encoder
CN101742540A (en) Method and device for online self-diagnosis
CN103530969A (en) Fire alarm controller loop unit and control method thereof
CN100492992C (en) Alarm processing method and its device
CN102129239A (en) Engineering machine monitoring system
CN1972113A (en) Fault diagnosis and fault-tolerant control method for brushless motor position signal
CN115552168A (en) Variable rate monitoring in flow-based metering systems
CN103931205A (en) Fault detection method and substation terminal used for said method
CN112697260A (en) Vibration monitoring device and control method of wind turbine generator
US10209099B2 (en) Device and method for checking a clock signal of a position measuring device
CN102290864B (en) Method and device for implementing virtual load management terminal
JP2003285700A (en) Failure-diagnosing device for vehicle
CN101511100A (en) Link detection method, device and system
CN205581227U (en) Equipment running state on -line monitoring device
CN208953929U (en) A kind of remote on-line monitoring device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent for invention or patent application
CB03 Change of inventor or designer information

Inventor after: Yi Xiaogang

Inventor after: Zhou Xiang

Inventor after: Shi Peike

Inventor after: Huang Gang

Inventor before: Zhou Xiang

Inventor before: Shi Peike

Inventor before: Huang Gang

COR Change of bibliographic data

Free format text: CORRECT: INVENTOR; FROM: ZHOU XIANG SHI PEIKE HUANG GANG TO: YI XIAOGANG ZHOU XIANG SHI PEIKE HUANGGANG

C14 Grant of patent or utility model
GR01 Patent grant