Summary of the invention
The object of the present invention is to provide address conflict report method, system, equipment and the storage medium of a kind of wired in parallel,
To carry out reporting for address conflict when address conflict occurs for module in parallel.
In order to solve the above technical problems, the invention provides the following technical scheme:
A kind of address conflict report method of wired in parallel, applied to each module for being connected in parallel on data line road
In, the module's address of each module is made of physical address and conflict address, comprising:
It obtains the module's address of itself and monitors first duration of data transmission link;
When determining that the module's address, will be in the module's address there are when address conflict in first duration
It modifies according to preset rules the conflict address;
Second duration of data transmission link is monitored, judges that the modified module's address is rushed with the presence or absence of address
It is prominent;
If it is not, then sending the data of default frame number by the modified module's address, and after data are sent completely
The data for stopping itself being sent;
If so, continue to monitor the data transmission link, when determining that the modified module's address no longer conflicts
When, the data of the default frame number are sent by the modified module's address, and stop itself after data are sent completely
Data send.
Preferably, the data transmission link is the data/address bus on Modular UPS UPS.
Preferably, first duration and second duration are 3 seconds.
Preferably, the module's address is 1 bit swiping address and the address that 5 physical address bits are constituted, the conflict
Address is the highest order of the module's address.
Preferably, the conflict address by the module's address is modified according to preset rules, comprising:
According to preset rules, the conflict address is revised as 1 by 0.
Preferably, the digit of the conflict address in the module's address is more than or equal to the digit of the physical address;
The preset rules include: that the conflict address after each module modification is different.
Preferably, the data of the default frame number sent by the modified module's address are to carry preset alarm signal
The data of breath.
A kind of address conflict reporting system of wired in parallel, applied to each module for being connected in parallel on data line road
In, the module's address of each module is made of physical address and conflict address, comprising:
Module is monitored, for obtaining the module's address of itself and monitoring first duration of data transmission link;
Conflict address modified module, for when determining that the module's address has conflict in first duration,
The conflict address in the module's address is modified according to preset rules;
Judgment module judges that the modified module's address is for monitoring second duration of data transmission link
Otherwise no conflict triggers the second data transmission blocks if it is not, then triggering the first data transmission blocks;
First data transmission blocks, for sending the data of default frame number by the modified module's address,
And the data for stopping itself after data are sent completely are sent;
Second data transmission blocks monitor the data transmission link for continuing, when determining modified institute
When stating module's address and no longer conflicting, the data of the default frame number are sent by the modified module's address, and in data
The data for stopping itself after being sent completely are sent.
A kind of address conflict reporting equipment of wired in parallel, applied to each module for being connected in parallel on data line road
In, the module's address of each module is made of physical address and conflict address, comprising:
Memory reports program for storage address conflict;
Processor reports program for executing the address conflict to realize the ground of wired in parallel described in any of the above embodiments
The step of location conflict report method.
A kind of computer readable storage medium is stored with address conflict on the computer readable storage medium and reports journey
Sequence, the address conflict are realized when program being reported to be executed by processor on the address conflict of wired in parallel described in any of the above embodiments
The step of reporting method.
Using technical solution provided by the embodiment of the present invention, applied to each module for being connected in parallel on data line road
In, the module's address of modules is made of physical address and conflict address, comprising: obtains the module's address of itself and monitoring
The first duration of data transmission link;When determining that module's address, will be in module's address there are when address conflict in the first duration
Conflict address modify according to preset rules;The second duration of monitored data transmission line, judges modified module's address
With the presence or absence of address conflict;If it is not, then sending the data of default frame number by modified module's address, and sent in data
It is sent at the rear data for stopping itself;If so, continuing monitored data transmission line, when determining modified module's address not
When conflicting again, the data of default frame number are sent by modified module's address, and stop itself after data are sent completely
Data are sent.
In the scheme of the application, when any one module, which listens to module's address, there is conflict, by the module of itself
Address is modified, specifically, the conflict address in module's address is modified.Therefore, it is rushed in case of module's address
It is prominent that only there are two module, the module due to listening to module's address conflict has carried out the modification of module's address, can so that
Modified address no longer conflicts.I.e. after module monitored data second duration of transmission line, it can be determined that go out modified mould
Block address no longer conflicts, and the data of default frame number is sent by modified module's address, also allowing for Upper system can obtain
Know that conflict occurs in which module's address.In case of module's address conflict there are three or three or more modules, monitor
To module's address conflict module carried out the modification of module's address after, due to other abnormal modules may send it is default
The data of frame number, therefore modified address may still conflict at this time.The module then continues monitored data transmission line, until
When determining that modified module's address no longer conflicts, by the data of the default frame number of modified module's address transmission, and
Data stop itself data after being sent completely are sent, and Upper system can determine the module's address clashed and punching
The quantity of prominent module.To sum up, when address conflict occurs for module in parallel, the scheme of the application realizes the upper of address conflict
Report.
Specific embodiment
Core of the invention is to provide a kind of address conflict report method of wired in parallel, when address occurs for module in parallel
When conflict, reporting for address conflict is realized.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.Obviously, described embodiments are only a part of the embodiments of the present invention, rather than
Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise
Under every other embodiment obtained, shall fall within the protection scope of the present invention.
Referring to FIG. 1, Fig. 1 is a kind of implementation flow chart of the address conflict report method of wired in parallel in the present invention, it should
Method is applied in each module for being connected in parallel on data line road, and the module's address of modules is by physical address and punching
Prominent address is constituted, method includes the following steps:
Step S101: itself module's address and the first duration of monitored data transmission line are obtained.
For each module for being connected in parallel on data line road, the mould of itself can be obtained after electrifying startup
Block address and the first duration of monitored data transmission line.The module's address of modules is by physical address and conflict address structure
At as modules are used for carrying out the ground of data transmitting on data transmission link in the prior art for physical address
Location, it is that modules increase the address matched that conflict address, which is in the scheme of the application, together constitutes respective mode with physical address
The module's address of block.Therefore, there are address conflicts between two modules described in this application, refer to the module of the two modules
Address is identical, specifically, refer to the physical address of the two modules be it is identical, conflict address be also identical.And it needs
It is noted that in general, the conflict address of modules is all the same before a modification, i.e., the initial setting up of the conflict address of each module
It is usually identical.
Data transmission link typically data/address bus, the Data Transport Protocol specifically used can also be according to practical need
It is set, modules are connected in parallel on data line road, can be based on itself module's address, with data line
The interaction of road progress data.
Module monitors data transmission link, refers to that module acquisition is carried out by the data transmission link
The module's address for other modules that data are sent, and by the module of the module's address of other modules of acquisition and itself
Address is compared.First duration can be set and be adjusted according to the actual situation, such as basis is connected in parallel on data line
The module number of road, the type of data transmission link, the factors such as message transmission rate are set and are adjusted, this is had no effect on
The implementation of invention.
After monitoring the first duration, the operation of step S102 can be executed.
Step S102: when determining module's address in the first duration there are when address conflict, by rushing in module's address
It modifies according to preset rules prominent address.
For any one module, when the module determines itself module's address in the first duration, there are address conflicts
When, it is identical as the module's address of itself to illustrate that at least one is connected in parallel on the module's address of other modules of data transmission link.
Therefore, in the present solution, the module can modify the conflict address in the module's address of itself according to preset rules.Default rule
It can then be set according to the actual situation, but it is clear that, after being modified according to preset rules, the module of the module
Location will change, specifically, the conflict address in its module's address can change.
Certainly, for any one module, when the module is not determined by module's address in the first duration, there are address punchings
When prominent, illustrate that the module's address of the module is normal, which can start to work normally.When each module is not respective
Own module address is determined in the first duration after starting there are when address conflict, that is to say, bright be connected in parallel on data line
The module's address of the modules of road is normal.
S103: the second duration of monitored data transmission line judges modified module's address with the presence or absence of address conflict.
After the modification for carrying out module's address, which continues the second duration of monitored data transmission line, and judgement is repaired
Module's address after changing whether there is address conflict.Second duration can also according to the factors such as the message transmission rate of each module into
Row setting and adjustment.
In second duration, judge that modified module's address there is no when address conflict, can execute step S104
Operation, and there are the operation that when address conflict, can execute step S105 when judging modified module's address
Step S104: the data of default frame number are sent by modified module's address, and are stopped after data are sent completely
Only the data of itself are sent.
Modified module's address is judged in second duration, and there is no address conflicts, illustrate to pass through in the second duration
Data transmission link carries out the module's address of other modules of data interaction, not with the modified module's address of the module
Together.Then the module sends the data of default frame number by modified module's address, and stops itself after data are sent completely
Data send.
It is easy to understand and is described with a specific example, in this kind of example, the initial conflict site homogeneous of modules
Together.For example, the module's address of modules A is constituted are as follows: the module's address of conflict one+physical address of address A, module B are constituted are as follows: conflict
Address one+physical address B after modules A electrifying startup, carries out data interaction by data transmission link, it is assumed that module B later
Electrifying startup and there is address exception, module's address becomes: conflict one+physical address of address A.At this point, module B is supervised
After listening the first duration, it is found that itself module's address there are address conflict, is rushed with the module's address of modules A in the embodiment
It is prominent.Module B then modifies the module's address of itself are as follows: conflict two+physical address of address A.Continue after monitoring the second duration, really
Make in the second duration by data transmission link carry out data interaction modules module's address with " conflict address
Two+physical address A " is different, and by " conflict two+physical address of address A ", this module's address sends default frame number to module B at this time
Data, and the data for stopping after data are sent completely itself are sent.
Step S105: continue monitored data transmission line and pass through when determining that modified module's address no longer conflicts
Modified module's address sends the data of default frame number, and stops the data transmission of itself after data are sent completely.
Judge that modified module's address still has address conflict in second duration, illustrate in the second duration, leads to
The module's address that data transmission link carries out other modules of data interaction is crossed, at least one is modified with the module
Module's address is identical.Then the module continues monitored data transmission line, until determining that modified module's address no longer conflicts
When, the data of default frame number are sent by modified module's address, and stop the data hair of itself after data are sent completely
It send.
It is still described with a specific example, for example, the module's address of modules A is constituted are as follows: conflict one+physical address of address
The module's address of A, module B are constituted are as follows: the module's address of conflict one+physical address of address B, module C are constituted are as follows: conflict address one
+ physical address C.After modules A electrifying startup, data interaction is carried out by data transmission link, it is assumed that module B and module later
C successively electrifying startup, and there is address exception, module's address all becomes: conflict one+physical address of address A.This
When, module B and module C have respectively monitored the first duration of data transmission link after power-up, can successively find itself
There are address conflicts for module's address, and according to preset rules, successively modify the module's address of itself are as follows: and conflict address two+
Physical address A.
Hereafter, such as module B has first monitored the second duration, and determine in the second duration by data transmission link into
The module's address of the modules of row data interaction is different from " conflict two+physical address of address A ", and module B passes through " punching at this time
Prominent this module's address of two+physical address of address A " sends the data of default frame number, and stops itself after data are sent completely
Data send.During module C monitors the second duration, possible module B is carrying out the transmission of the data of default frame number, then
In the second duration, module C judges out modified module's address " conflict two+physical address of address A ", and there are still addresses
Conflict, therefore, module C continue monitored data transmission line, until passing through when determining that modified module's address no longer conflicts
" conflict two+physical address of address A " sends the data of default frame number, and stops the data hair of itself after data are sent completely
It send.When module C, which monitors out " conflict two+physical address of address A ", no longer to conflict, the data of specification module B have been sent.
It in embodiment above-mentioned, is described by taking the module's address conflict of two and three modules as an example, when having more
When more module's address conflicts, the modules for monitoring out address conflict successively carry out the data transmission of default frame number, on
Position system can determine the module number there are address conflict according to the totalframes of the data of the default frame number received.
Using method provided by the embodiment of the present invention, applied in each module for being connected in parallel on data line road,
The module's address of modules is made of physical address and conflict address, comprising: is obtained the module's address of itself and is monitored number
According to the first duration of transmission line;When determining that module's address, will be in module's address there are when address conflict in the first duration
It modifies according to preset rules conflict address;The second duration of monitored data transmission line judges that modified module's address is
It is no that there are address conflicts;If it is not, then sending the data of default frame number by modified module's address, and it is sent completely in data
The data for stopping itself afterwards are sent;If so, continuing monitored data transmission line, when determining modified module's address no longer
When conflict, the data of default frame number are sent by modified module's address, and stop the number of itself after data are sent completely
According to transmission.
In the scheme of the application, when any one module, which listens to module's address, there is conflict, by the module of itself
Address is modified, specifically, the conflict address in module's address is modified.Therefore, it is rushed in case of module's address
It is prominent that only there are two module, the module due to listening to module's address conflict has carried out the modification of module's address, can so that
Modified address no longer conflicts.I.e. after module monitored data second duration of transmission line, it can be determined that go out modified mould
Block address no longer conflicts, and the data of default frame number is sent by modified module's address, also allowing for Upper system can obtain
Know that conflict occurs in which module's address.In case of module's address conflict there are three or three or more modules, monitor
To module's address conflict module carried out the modification of module's address after, due to other abnormal modules may send it is default
The data of frame number, therefore modified address may still conflict at this time.The module then continues monitored data transmission line, until
When determining that modified module's address no longer conflicts, by the data of the default frame number of modified module's address transmission, and
Data stop itself data after being sent completely are sent, and Upper system can determine the module's address clashed and punching
The quantity of prominent module.To sum up, when address conflict occurs for module in parallel, the scheme of the application realizes the upper of address conflict
Report.
In a kind of specific embodiment of the invention, data transmission link is the number on Modular UPS UPS
According to bus.
Modular UPS (Uninterruptible Power Supply, uninterruptible power supply) due to its have it is good
Availability and stability, application field is increasing, is the trend of future development, therefore, in the specific implementation, data line
Road can be the data/address bus on Modular UPS.When data transmission link is the data/address bus on Modular UPS, applicant
To the message transmission rate of data/address bus, after the quantity etc. of module accounts for, the first duration and the second duration are all provided with
It being set to 3 seconds, 3 seconds durations are set as suitable duration setting, both will not be too short due to the time, it is unable to judge accurately out and whether deposits
The address conflict the case where, and the process that module will not be caused to start since the time is too long is slow.
In a kind of specific embodiment of the invention, module's address is 1 bit swiping address and 5 physical address bits structures
At address, conflict address be module's address highest order.
In view of typically, the quantity of module does not exceed 32, therefore can be by the physical address in module's address
It is set as 5.Conflict address is also a part of module's address, and conflict address the space occupied is bigger, the data transmitting of module
It is more impacted, therefore, usually conflict address can be arranged to 1, and as the highest order in module's address.It is such to set
Mode is set, occupied space of the module's address in data transfer is advantageously reduced.
In the embodiment that conflict address is arranged to 1, the conflict address in module's address being pressed in step S102
It modifies according to preset rules, it can be with specifically: according to preset rules, conflict address by 0 is revised as 1.
It should be pointed out that the initial conflict address of modules is 0 in this kind of embodiment.For example, a certain mould
It is binary machine language that the initial normal module's address of block, which is 000101,0 and 1, and therein 00101 is physical address,
The 0 of highest order is conflict address, since the conflict address in the embodiment is one, is usually referred to as conflict position.The mould
When block is modified according to preset rules, which can be revised as 1 by 0.Certainly, in other embodiments, may be used
The initial conflict address of modules is disposed as 1, correspondingly, can will be rushed when modifying according to preset rules
Prominent position is revised as 0 by 1, has no effect on implementation of the invention.
In a kind of specific embodiment of the invention, the digit of the conflict address in module's address is more than or equal to physically
The digit of location;Correspondingly, in this kind of embodiment, preset rules include: conflict address after modules modification mutually not phase
Together.
In each embodiment above-mentioned, when needing to modify to conflict address, the respective alteration ruler of modules
It is all the same, such as be by module's address: " conflict when module B and module C successively carry out the modification of conflict address hereinbefore
Address one+physical address A " modification are as follows: " conflict two+physical address of address A ", this is also common embodiment.Because of conflict
Address is that the application is the address that modules increase newly, if setting is too long, conflict address the space occupied is larger, module
Data transmitting will be affected, therefore conflict address is usually configured shorter, as the address that conflicts in aforementioned embodiments is
The highest order of module's address.Since conflict address is shorter, module number is more, therefore when carrying out the modification of conflict address, respectively
Module is generally also according to identical modification mode.And since modification mode is identical, may also there are multiple address conflict moulds
Block carries out the case where data report using identical address, and specifically to orient is which module address conflict occurs, then needs
It wants Upper system further to judge, such as which module data excessively not sent for a long time can be observed, to find out these addresses
Abnormal module.
In this kind of embodiment of the application, more digits are distributed for conflict address, specifically, in module's address
The digit of conflict address is more than or equal to the digit of physical address, and modules is also allowed for carry out the modification of conflict address in this way
When, the conflict address after modifying is different.Each module specifically modifies mode, can be set and is stored in advance
In preset rules.
In this kind of embodiment, since the conflict address after modules modification is different, so that address punching occurs
Prominent each module carry out data on give the correct time, use mutually different module's address, also allowing for Upper system can be with
The used module's address for having modified the address that conflicts, it is different directly to orient address when sending the data of default frame number according to module
Normal module, has saved positioning time.
In a kind of specific embodiment of the invention, pass through the data for the default frame number that modified module's address is sent
For the data for carrying preset warning message.
In the scheme of the application, the data of the default frame number of the module transmission of conflict address are had modified, data content can
To be arbitrary content, implementation of the invention is had no effect on.Specifically, when not carrying specific information in the data of default frame number
When, the modules due to listening to address conflict can stop the data of itself after the data for having sent default frame number
It sends, Upper system, which can count, does not have the modules of data interaction for a long time, and selects and have sent default frame number
Data each module, can be it is determined that there is failure in which or which module.
And in this kind of embodiment of the application, the data of the default frame number of the module transmission of conflict address are had modified,
For the data for carrying specific information, specifically, to carry the data of preset warning message.It can make upper system in this way
System in time and accurately determines out module and address conflict occurs according to the warning message in data, further, can be with
Related prompt message is sent, to prompt related personnel to handle in time.Therefore, the data in this kind of embodiment carry pre-
If warning message, be conducive to address collision failure it is timely discovery and processing.
In a kind of specific embodiment of the invention, presetting frame number is 10 frames.In view of having modified the mould of conflict address
The data for the default frame number that block is sent, preferably carry the data of warning message, and warning message usually can be used 10
Frame data are indicated, and therefore, in this kind of embodiment presetting frame number is 10 frames, it is of course also possible to carry out according to the actual situation
Certain adjustment.
Corresponding to above method embodiment, the embodiment of the invention also provides a kind of address conflicts of wired in parallel to report
System, the address conflict reporting system of wired in parallel described below and the address conflict side of reporting of above-described wired in parallel
Method can correspond to each other reference.
It is shown in Figure 2, for a kind of address conflict reporting system of wired in parallel in the present invention, it is connected in parallel on applied to each
In the module of data line road, the module's address of modules is made of physical address and conflict address, comprising:
Monitor module 201, for obtain itself module's address and the first duration of monitored data transmission line;
Conflict address modified module 202, for when determined in the first duration module's address exist conflict when, by module
It modifies according to preset rules conflict address in address;
Judgment module 203 is used for the second duration of monitored data transmission line, judges whether modified module's address rushes
It is prominent, if it is not, then triggering the first data transmission blocks 204, otherwise trigger the second data transmission blocks 205;
First data transmission blocks 204, for sending the data of default frame number by modified module's address, and in number
It is sent according to the data for stopping itself after being sent completely;
Second data transmission blocks 205, for continuing monitored data transmission line, when determining modified module's address
When no longer conflicting, the data of default frame number are sent by modified module's address, and stop itself after data are sent completely
Data send.
In a kind of specific embodiment of the invention, data transmission link is the number on Modular UPS UPS
According to bus.
In a kind of specific embodiment of the invention, the first duration and the second duration are 3 seconds.
In a kind of specific embodiment of the invention, module's address is 1 bit swiping address and 5 physical address bits structures
At address, conflict address be module's address highest order.
In a kind of specific embodiment of the invention, conflict address modified module 202 is specifically used for: when in the first duration
When inside determining that module's address has conflict, according to preset rules, conflict address is revised as 1 by 0.
In a kind of specific embodiment of the invention, the digit of the conflict address in module's address is more than or equal to physically
The digit of location;Preset rules include: that the conflict address after modules modification is different.
In a kind of specific embodiment of the invention, pass through the data for the default frame number that modified module's address is sent
For the data for carrying preset warning message.
In a kind of specific embodiment of the invention, presetting frame number is 10 frames.
Corresponding to above method and system embodiment, the embodiment of the invention also provides a kind of punchings of the address of wired in parallel
Prominent reporting equipment and a kind of computer readable storage medium.
Fig. 3 is seen, the address conflict reporting equipment of the wired in parallel is connected in parallel on data line road applied to each
Module in, the module's address of modules is made of physical address and conflict address, comprising:
Memory 301 reports program for storage address conflict;
Processor 302 reports program for executing address conflict to realize the wired in parallel in any of the above-described embodiment
The step of address conflict report method.
Address conflict is stored on the computer readable storage medium and reports program, which reports program processed
Device realizes the step of address conflict report method of the wired in parallel in any of the above-described embodiment when executing.Calculating mentioned here
Machine readable storage medium storing program for executing includes that random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electric erasable can
Any other form of storage well known in programming ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field
Medium.
It should also be noted that, herein, relational terms such as first and second and the like are used merely to one
Entity or operation are distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation
There are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to contain
Lid non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including element.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
Used herein a specific example illustrates the principle and implementation of the invention, and above embodiments are said
It is bright to be merely used to help understand technical solution of the present invention and its core concept.It should be pointed out that for the common of the art
, without departing from the principle of the present invention, can be with several improvements and modifications are made to the present invention for technical staff, these
Improvement and modification are also fallen within the protection scope of the claims of the present invention.