CN103825781B - System communication scheduling algorithm based on Canbus - Google Patents
System communication scheduling algorithm based on Canbus Download PDFInfo
- Publication number
- CN103825781B CN103825781B CN201410068441.5A CN201410068441A CN103825781B CN 103825781 B CN103825781 B CN 103825781B CN 201410068441 A CN201410068441 A CN 201410068441A CN 103825781 B CN103825781 B CN 103825781B
- Authority
- CN
- China
- Prior art keywords
- address
- equipment
- sub
- monitoring box
- monitoring
- 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
Links
Landscapes
- Small-Scale Networks (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention relates to the field of system communication scheduling algorithms, in particular to a system communication scheduling algorithm based on a Canbus. According to the specific scheme, the system communication scheduling algorithm is achieved through the following steps of firstly, sending address statements to a monitoring box when sub-devices are powered on, and sending address statement request commands to the sub-devices when the monitoring box is powered on; secondly, when receiving the address statement commands sent by the monitoring box, enabling the powered-on sub-devices to start the address statements which need to be responded to after random delay is conducted. By means of the steps, the system communication scheduling algorithm solves the address automatic distribution problem and the address conflict problem between the sub-devices and solves the problem that the operation control and the running state monitoring of all node devices can not be monitored in time; the Canbus can report device alarms in time when the number of online communication nodes is large, protection control can be conducted according to the alarms, the online state and the connection losing state of online devices can be effectively detected through the Canbus, and device display control over multiple nodes can be achieved through the Canbus.
Description
Technical field
The present invention relates to system scheduling algorithm field is and in particular to a kind of system communication based on Canbus bus is adjusted
Degree algorithm.
Background technology
The supervision of yacht power-supply device and auto-control degree be not high at present, electromotor, bank electricity, battery, burr pump, ship
The monitoring of the various electric equipment such as bottom leak all has respective control display floater respectively, is individually controlled respectively and shows
Show, read over or information transmission mainly adopts point-to-point form, that is, an estrade equipment connects a remotely control display floater, this
A little monitoring display panels are dispersed in the operating board of yacht, reduce the space availability ratio of bridge, mutually related equipment
Be unable to connecting move control, sub- equipment is excessive, yacht more than 60 feet in the case of, often cause to device resource and space money
Source inadequate, by Canbus communication bus, equipment each on yacht is coupled together, is intensively shown and control, greatly
Improve the automaticity of yacht, be also effectively improved the space availability ratio of yacht, but this mode, do not have a kind of excellent
Communication dispatch algorithm, the data traffic inevitably leading on Canbus is big, may result in communication blockage when serious, right
The operational control of sub- equipment and monitoring data renewal phenomenon not in time;Simultaneously as the son online hanging over Canbus bus sets
For excessively, the distribution to address and process also can have problems, and eventually result in the confusion of data.
Content of the invention
It is an object of the invention to overcoming disadvantages described above, provide a kind of solution many estrades equipment room address
Automatically distribution and address conflict, solve in the case that in Canbus bus, online equipment is more, to each node
The operational control of equipment and monitoring running state not in time, online communication node in Canbus bus can be made to report in time when more
Equipment alarm information, and carry out protecting control, realize Canbus bus online equipment and reach the standard grade and go offline effectively according to warning information
Detect, realize the communication dispatch algorithm of the Canbus bus of Canbus bus multiple node device display control.
For achieving the above object, the concrete scheme of the present invention is as follows:Based on the system scheduling algorithm of Canbus bus,
Comprise the following steps:
Step a:Send address claim to during sub- device power monitoring box, monitoring box sends address sound to sub- equipment during electricity
Bright request command;
Step b:The sub- equipment having gone up electricity, when receiving the address claim request command that monitoring box sends, starts and prolongs at random
When after need to reply its corresponding address claim.
Wherein, when producing address conflict between many sub- equipment,
Execution following steps:
Step one:When certain equipment detects address conflict, the name of the device name of oneself and other side is compared
Relatively;
Step 2:If the name of oneself is less than the name of other side, send primary address statement using raw address;If
More than the name of other side, then carry out address claim using standby address;When standby address has used, then can send and can not state
The message of address, waits box to be monitored to distribute address for oneself;As received the address that monitoring box is its distribution, then sent out using this address
Primary address is sent to state;As do not received as its allocated address always, then constantly send can not for certain interval of time circulation
The message of statement address.
Wherein, in monitoring box request data, during sub- equipment uploads data-message, monitoring box is taken turns with set time T1
Kind switching needs the sub- online equipment of request data, and the request required for being sent to the sub- equipment chosen with set time T3 is disappeared
Breath, described T3<T1;
If not receiving the information of devices selected return within the T1 time, judge that this equipment goes offline, and in online equipment
The exterior and the interior face deletes this sub- equipment;If receiving the information of devices selected return within the T1 time, judge this equipment on-line;
Wherein, when monitoring the monitoring interface that box enters a certain sub- equipment, monitoring box is with the time interval of set time T2
To this sub- equipment sending data request message, described T2<T3;
If now the corresponding sub- equipment of monitoring interface is consistent with the sub- equipment that monitoring box program is chosen, monitoring box then opens
With filter stop, only the request of data of this sub- equipment is transferred to be switched to next sub- equipment, monitoring box then continued with the set time
The time interval of T2 carries out request of data to this sub- equipment.
Wherein, after the monitoring interface entering a certain sub- equipment, user can be sent by the button on interface and control life
Order.
Wherein, when monitoring box access arrangement presence interface, can with the time interval of set time T5 by turns
Send corresponding address claim request command to being labeled as online equipment, be circulated with set time T6 for the cycle;As
Within the T5 time, a certain sub- equipment does not reply corresponding address claim to fruit, then marked the state of not going offline.
Beneficial effects of the present invention are:The present invention passes through above-mentioned steps, solves many estrades equipment room address and automatically distributes
With the problem of address conflict, solve in the case that in Canbus bus, online equipment is more, the operation control to each node device
System and monitoring running state problem not in time;Can make Canbus bus online communication node when more timely reporting equipment accuse
Alert, and carry out protecting control, realize Canbus bus online equipment and reach the standard grade and the effective detection that goes offline, realize Canbus according to alarm
Bus multiple node device display control.
Brief description
Fig. 1 is the schematic diagram with sub- equipment statement address for the monitoring box of the present invention;
Fig. 2 is that the present invention states the schematic diagram of address in monitoring box and upper electronic equipment;
Fig. 3 is that the many sub- equipment of the present invention produce treatment mechanism flow chart during address conflict;
Fig. 4 is that the many sub- equipment of the present invention produce schematic diagram during address conflict;
Fig. 5 is that the monitoring box request data of the present invention is illustrated with the scheduling mechanism during sub- equipment upload data-message
Figure;
Fig. 6 is that the monitoring box request data of the present invention is illustrated with the scheduling mechanism during sub- equipment upload data-message
Figure;
Fig. 7 is the scheduling mechanism schematic diagram behind the monitoring box access arrangement presence interface of the present invention;
Fig. 8 is that the monitoring box of the present invention thinks that sub- equipment goes offline, and sub- equipment reality do not go offline situation when dispatcher
Drawing.
Specific embodiment
The present invention is further detailed explanation with specific embodiment below in conjunction with the accompanying drawings, is not the reality the present invention
Apply scope and be confined to this;
As shown in Figure 1 to Figure 2, the system scheduling algorithm based on Canbus bus, comprises the following steps:Step a:Son
Send address claim to during device power monitoring box, monitoring box sends address claim request command to sub- equipment during electricity;Step
b:The sub- equipment having gone up electricity, when receiving the address claim request command that monitoring box sends, needs after starting random delay to reply
Its corresponding address claim;As the method can effectively allow each sub- equipment smoothly access communication network, convenient and practical.
As shown in Figure 3 to Figure 4, the system scheduling algorithm based on Canbus bus described in the present embodiment, when multiple
Between sub- equipment when producing address conflict,
Execution following steps:
Step one:When certain equipment detects address conflict, the name of the device name of oneself and other side is compared
Relatively;
Step 2:If the name of oneself is less than the name of other side, send primary address statement using raw address;If
More than the name of other side, then carry out address claim using standby address;When standby address has used, then can send and can not state
The message of address, waits box to be monitored to distribute address for oneself;As received the address that monitoring box is its distribution, then sent out using this address
Primary address is sent to state;As do not received as its allocated address always, then constantly send can not for certain interval of time circulation
The message of statement address.Make a mistake because of conflict as the method then can solve the problems, such as each sub- equipment room address, significantly
Improve the practicality of the present invention.
As shown in Figure 5 to Figure 6, the system scheduling algorithm based on Canbus bus described in the present embodiment, in monitoring
Box request data, during sub- equipment uploads data-message, monitoring box is switched by turns with set time T1 needs request data
Sub- online equipment, the request message required for being sent to the sub- equipment chosen with set time T3, described T3<T1;
If not receiving the information of devices selected return within the T1 time, judge that this equipment goes offline, and in online equipment
The exterior and the interior face deletes this sub- equipment;If receiving the information of devices selected return within the T1 time, judge this equipment on-line;
The system scheduling algorithm based on Canbus bus described in the present embodiment, when monitoring box enters a certain sub- equipment
Monitoring interface when, monitoring box is with the time interval of set time T2 to this sub- equipment sending data request message, described T2<
T3;
If now the corresponding sub- equipment of monitoring interface is consistent with the sub- equipment that monitoring box program is chosen, monitoring box then opens
With filter stop, only the request of data of this sub- equipment is transferred to be switched to next sub- equipment, monitoring box then continued with the set time
The time interval of T2 carries out request of data to this sub- equipment.
After the monitoring interface entering a certain sub- equipment, user can be by the button transmitting control commands on interface.
As shown in Fig. 7 to Fig. 8, the system scheduling algorithm based on Canbus bus described in the present embodiment, wherein, when
When monitoring box access arrangement presence interface, can be with the time interval of set time T5 by turns online to being labeled as
Equipment sends corresponding address claim request command, is circulated with set time T6 for the cycle;If within the T5 time, a certain
Sub- equipment does not reply corresponding address claim, then marked the state of not going offline.
When occur monitoring box think that equipment goes offline, and equipment reality do not go offline situation when, then adopt Fig. 8 shown in mechanism
Processed.In figure shows, group equipment through one section of regular time and also do not receive always to monitor box message when,
Then can actively send an address claim to allow monitoring box to respond.
The present invention passes through above-mentioned steps, solves the problems, such as many estrades equipment room address distribution and address conflict, solution automatically
In the case that certainly in Canbus bus, online equipment is more, operational control and monitoring running state to each node device are too late
When problem;Online communication node timely reporting equipment alarm when more in Canbus bus can be made, and protected according to alarm
Shield control, realize Canbus bus online equipment reach the standard grade and the effective detection that goes offline, realize the multiple node device of Canbus bus show
Show control.
Therefore, through the process of the above several mechanism, can effectively solve the problem that current CANBUS communication mode is run into
Many estrades equipment room because address conflict occur address error problem and due to above communication bus overabundance of data lead to
The problem that cannot communicate and monitoring box antithetical phrase equipment go offline state judge occur mistake problem.
The above is only a preferred embodiment of the present invention, therefore the structure described in all scopes according to present patent application
Make, equivalence changes that feature and principle are done or modification, be included in the protection domain of present patent application.
Claims (4)
1. a kind of system scheduling algorithm based on Canbus bus it is characterised in that:Comprise the following steps:
Step a:Send address claim to during sub- device power monitoring box, monitoring box sends address claim to sub- equipment during electricity please
Ask order;
Step b:Go up electric sub- equipment when receiving the address claim request command that monitoring box sends, after starting random delay
Need to reply its corresponding address claim;
Between many sub- equipment when producing address conflict,
Execution following steps:
Step one:When certain equipment detects address conflict, the name of the device name of oneself and other side is compared;
Step 2:If the name of oneself is less than the name of other side, send primary address statement using raw address;If greater than
The name of other side, then carry out address claim using standby address;When standby address has used, then can send and can not state address
Message, wait box to be monitored for oneself distribute address;As received the address that monitoring box is its distribution, then this address is adopted to send one
Secondary address claim;As do not received as its allocated address always, then certain interval of time circulation constantly sends and can not state
The message of address.
2. a kind of system scheduling algorithm based on Canbus bus according to claim 1 it is characterised in that:
In monitoring box request data, during sub- equipment uploads data-message, monitoring box is switched by turns with set time T1 to be needed
Want the sub- online equipment of request data, the request message required for being sent to the sub- equipment chosen with set time T3, described T3<
T1;
If not receiving the information of devices selected return within the T1 time, judge that this equipment goes offline, and in online equipment the exterior and the interior
Face deletes this sub- equipment;If receiving the information of devices selected return within the T1 time, judge this equipment on-line;
When monitoring the monitoring interface that box enters a certain sub- equipment, monitoring box is with the time interval of set time T2 to this sub- equipment
Send data request information, described T2<T3;
If now the corresponding sub- equipment of monitoring interface is consistent with the sub- equipment that monitoring box program is chosen, monitoring box then enabled
Filter stop only transfers to be switched to next sub- equipment to the request of data of this sub- equipment, and monitoring box then continues with set time T2's
Time interval carries out request of data to this sub- equipment.
3. a kind of system scheduling algorithm based on Canbus bus according to claim 2 it is characterised in that:Entering
After entering the monitoring interface of a certain sub- equipment, user can be by the button transmitting control commands on interface, and control command sends
Priority is apparently higher than normal commands, thus reaching quick response.
4. a kind of system scheduling algorithm based on Canbus bus according to claim 3 it is characterised in that:
When monitoring box access arrangement presence interface, can with the time interval of set time T5 by turns to being labeled as
Online equipment sends corresponding address claim request command, is circulated with set time T6 for the cycle;If in the T5 time
Interior, a certain sub- equipment does not reply corresponding address claim, then marked the state of not going offline.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410068441.5A CN103825781B (en) | 2014-02-27 | 2014-02-27 | System communication scheduling algorithm based on Canbus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410068441.5A CN103825781B (en) | 2014-02-27 | 2014-02-27 | System communication scheduling algorithm based on Canbus |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103825781A CN103825781A (en) | 2014-05-28 |
CN103825781B true CN103825781B (en) | 2017-02-22 |
Family
ID=50760626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410068441.5A Active CN103825781B (en) | 2014-02-27 | 2014-02-27 | System communication scheduling algorithm based on Canbus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103825781B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104954214B (en) * | 2015-06-24 | 2018-10-30 | 珠海格力电器股份有限公司 | Improve the method and system of RS485 communication autgmentabilities |
CN107835266B (en) * | 2017-09-22 | 2020-10-13 | 北京机械设备研究所 | Method for automatically allocating addresses to same nodes on communication bus |
CN114944967B (en) * | 2021-02-09 | 2024-02-13 | 奥动新能源汽车科技有限公司 | Encoding method, encoding system, electronic device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101167341A (en) * | 2005-04-27 | 2008-04-23 | 菲尼克斯电气公司 | Address assignment for safe users of a field bus |
CN103119916A (en) * | 2010-09-30 | 2013-05-22 | 罗伯特·博世有限公司 | Method for automatically assigning addresses to identical bus users |
CN103425590A (en) * | 2012-05-16 | 2013-12-04 | 英飞凌科技股份有限公司 | System and method to address devices connected to a bus system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU6702500A (en) * | 1999-08-23 | 2001-03-19 | Pilz Gmbh And Co. | Method of configuring a safe station and a safe control system using the same |
-
2014
- 2014-02-27 CN CN201410068441.5A patent/CN103825781B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101167341A (en) * | 2005-04-27 | 2008-04-23 | 菲尼克斯电气公司 | Address assignment for safe users of a field bus |
CN103119916A (en) * | 2010-09-30 | 2013-05-22 | 罗伯特·博世有限公司 | Method for automatically assigning addresses to identical bus users |
CN103425590A (en) * | 2012-05-16 | 2013-12-04 | 英飞凌科技股份有限公司 | System and method to address devices connected to a bus system |
Non-Patent Citations (1)
Title |
---|
矿井下CAN总线节点地址的设计;郭继坤,将家正;《黑龙江科技学院学报》;20040331;第14卷(第2期);第117-120页 * |
Also Published As
Publication number | Publication date |
---|---|
CN103825781A (en) | 2014-05-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104089371A (en) | Multi-split air conditioning system | |
CN103857072A (en) | Home gateway device based on zigbee and wifi networks | |
CN105379044A (en) | Power negotiation in daisy-chained systems | |
CN103825781B (en) | System communication scheduling algorithm based on Canbus | |
JP6708318B1 (en) | Storage battery monitoring device and storage battery monitoring method | |
CN106482080B (en) | Relay master-slave architecture system | |
CN106452921B (en) | Stacking system splitting detection method and device | |
CN204043128U (en) | Multi-online air-conditioning system | |
CN206671852U (en) | A kind of integrated monitoring platform for intelligent building construction | |
CN109743365B (en) | Method, device and system for monitoring power transmission line | |
CN105122736B (en) | Method and system for main arbitration | |
CN104360665A (en) | Internet of Things comprehensive monitoring system for switching station | |
CN104852815B (en) | network redundancy IPMI management system | |
CN104300681B (en) | A kind of station level device node state monitoring method of intelligent substation | |
CN107682906B (en) | Routing inspection data communication method and system in machine room | |
CN206696678U (en) | Building monitoring apparatus and system | |
WO2020174712A1 (en) | Storage battery monitoring device and storage battery monitoring method | |
CN203694490U (en) | Firefighting information management system based on Internet of Things | |
CN205812232U (en) | A kind of real-time network project monitor and control alarm device | |
CN105785899A (en) | Integrated monitoring system for intelligent station | |
CN205951998U (en) | A central control unit for railway signal equipment system | |
CN110691454A (en) | Fire-fighting lamp polling method and emergency lamp control system | |
CN105356592B (en) | A kind of intelligent power supply and method of uninterrupted power system | |
CN203951627U (en) | A kind of home gateway device based on zigbee and wifi network | |
CN203773670U (en) | Locomotive fire alarm control system |
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 |