A kind of wired connection multimode TT&C system address automatic identifying method
Technical field
The present invention relates to multimode TT&C system communication fields, and in particular to a kind of wired connection multimode TT&C system is logical
Interrogate address automatic identifying method.
Background technique
Existing multimode TT&C system such as BMS(battery management system), modular power source, charging pile module etc., address is known
Do not use following several schemes mainly:
One, using toggle switch, after system installs, to each module, manual setting address, this method need to increase hard one by one
Part switch, and manual intervention when installation, have certain technical requirements to existing block construction personnel, complicated for operation when module number is more
It is very inconvenient.
Two, using address chip, program needs install globally unique location chip on each module board, should
Scheme realizes that address distribution can not be corresponding with physical link, and it is discontinuous to distribute address.
Three, using simulation address sampling plan, the resistance of different samplings is designed in the bearing of module, hardware is identical
Module, which is placed on different location, adopts different analog voltages and obtains different addresses, but program needs are pre-placed difference
Stationary backplate, engineer application and maintenance replacement it is very inconvenient.
In view of this, problems present in Address Recognition of the present inventor for above-mentioned multimode TT&C system, and
Deeply design, and then generate the present invention.
Summary of the invention
The purpose of the present invention is to provide a kind of wired connection multimode TT&C system address automatic identifying method,
Address setting is simple, avoids because address repeats not communicating i.e. module setting address and system line physical address
Inconsistent the problem of causing system that can not work.
To achieve the above object, the technical solution adopted by the present invention is that:
A kind of wired connection multimode TT&C system address automatic identifying method comprising following steps:
Step 1, in multimode TT&C system host module and multiple submodule on two ports, that is, port A and port are set
B, and be sequentially connected host module and submodule by port A and port B, it is specific as follows:
The port B of a upper module and the port A of next module are attached using connecting detection line, and the last one submodule
Port B and the port A of host module be attached by connecting detection line;
It after the completion of step 2, host module are connected with submodule, is powered on to multimode TT&C system, each module starts automatic identification
Its address, specific as follows:
After step 2.1, system electrification, host module sets initial address automatically, is simultaneously emitted by communication broadcast frame, informs system master
The initial address of machine module, and host module is set to current block i, start automatic distribution address;
Step 2.2, host module are called the roll on communication bus inquires next module of current block i, and the address of current block i is
I, by signal port B output pulse signal after it is called the roll, to find next module i+1 of its physical connection;
Step 2.3, next module i+1 the pulse signal that is issued to module i of Port detecting after, whether judge next module
For host module, if next module is host module, then it represents that each module's address in multimode TT&C system has been assigned,
Start normal system communication;If next module i+1 is not host module, 2.4 are entered step;
Step 2.4, next module i+1 distribute address i+1, while the response host module on communication bus, host module automatically
Next module is set to current block;Subsequently into step 2.2, start the address distribution of next module, until multimode observing and controlling
Each module's address in system is assigned;
When the module in multimode TT&C system changes, system electrification, system repeats steps 2.1 to step are given again
2.4, the unique address for giving each module assignment new by new physical connection sequence automatically.
After adopting the above scheme, construction personnel only needs the host module of multimode TT&C system through connecting detection line
It is connected in turn with submodule, then gives system electrification, after system electrification, the modules in system can press object automatically
The order of connection is managed to the unique address of each module assignment.When some module or increases and reduces because needing replacing in system
When module number, system re-power and can automatically by new physical connection sequence to each module assignment newly uniquely
Location.It does not need to be manually set, it is simple and reliable, it effectively prevents that i.e. module setting address can not be communicated because of address repetition and is
It unites route physical address inconsistent the problem of causing system that can not work.
Detailed description of the invention
Fig. 1 is the connection schematic diagram of each intermodule of the present invention;
Fig. 2 is module's address automatic identification flow chart of the present invention.
Specific embodiment
As depicted in figs. 1 and 2, present invention discloses a kind of wired connection multimode TT&C system address automatic identifications
Method comprising following steps:
Step 1, in multimode TT&C system host module and multiple submodule (set in module 1, module 2 ... module n)
Two ports i.e. port A and port B is set, and is sequentially connected host module and submodule by port A and port B, is had
Body is as follows:
Using connecting detection line by the port A of the port B of a upper module (including host module and submodule) and next module into
Row connection, and the port A of the port B of the last one submodule and host module is attached by connecting detection line.
It after the completion of step 2, host module are connected with submodule, is powered on to multimode TT&C system, each module starts automatically
Identify its address, specific as follows:
After step 2.1, system electrification, host module sets initial address automatically, is simultaneously emitted by communication broadcast frame, informs system master
The initial address of machine module, and host module is set to current block i, start automatic distribution address;
Step 2.2, host, which start to call the roll on communication bus, inquires next module of current block i, and the address of current block i is
I, by signal port B output pulse signal after it is called the roll, to find next module i+1 of its physical connection.
Step 2.3, next module i+1 the pulse signal that is issued to module i of Port detecting after, judge next module
It whether is host module, if next module is host module, then it represents that each module's address in multimode TT&C system has distributed
It completes, normal system communication can be started;If next module i+1 is not host module, 2.4 are entered step.
When whether judge next module is host module, can be sentenced by judging whether host receives pulse signal
It is disconnected.If in succession is exactly host by module i next, host just will receive pulse signal, at this point, next module is exactly host mould
Block;If in succession is submodule by module i next, host would not receive pulse signal, that next module is not just host
Module.
Step 2.4, next module i+1 distribute address i+1, while the response host module on communication bus, host automatically
Next module is set to current block by module;Subsequently into step 2.2, start the address distribution of next module, until multimode
Each module's address in TT&C system is assigned.
Address above mentioned identifies in assigning process that current block can be host module, be also possible to any one submodule.
When system just powers on, the automatic setting address of host is 0, at this point, current block is host module, host module passes through in its letter
Number port B output pulse signal, to find the next module i.e. module 1 of its physical connection, the port A of module 1 is detected
After surveying the pulse signal that main module issues, judging out it is not host module, and then can distribute address automatically is 1, while
Response host module on communication bus, to complete the address distribution of module 1.
If current block address be n, be module n, at this point, module n by its signal port B output pulse signal with
The next module i.e. host module of its physical connection is found, the port A of host module detects the arteries and veins that detection main module issues
After rushing signal, it is judged out as host module, at this point, end address is distributed, can start normal system communication.
When some submodule needs replacing in multimode TT&C system, or increases or decreases submodule quantity, only
It needs to re-power to system, system can carry out giving by new physical connection sequence automatically according to above-mentioned steps 2.1 to step 2.4
The new unique address of each module assignment, does not need to think to set, simple and reliable, effectively prevents repeating because of address
I.e. module setting address and system line physical address inconsistent the problem of causing system that can not work can not be communicated.
The above is only the embodiment of the present invention, is not intended to limit the scope of the present invention, therefore all
Any subtle modifications, equivalent variations and modifications to the above embodiments according to the technical essence of the invention still fall within this
In the range of inventive technique scheme.