A kind of multinode serial communication scan method
Technical field
The invention belongs to technology of serial communication, be specially a kind of multinode serial communication scan method.
Background technology
Under the serial communication situation, a large amount of stipulations adopt one main many from poll pattern, article one, articulate a plurality of smart machines on the bus, when there is one or more smart machine fault at the scene, reasons such as maintenance stop communication, and when being polled to this smart machine, communication is overtime to be judged by waiting, when having many smart machines to be in interruption status on the bus, communication speed reduces because of waiting overtime being affected of communication.When the scene has multiple devices to be in stopped status, polling cycle even can reach 50-60 second, whole bus communication speed can be affected.
Summary of the invention
At the problems referred to above, the invention provides the multinode serial communication scan method that a kind of communication speed increases, polling cycle reduces greatly.
The technical scheme that the present invention is adopted for its technical matters of solution is:
A kind of multinode serial communication scan method may further comprise the steps:
(1) overtime decision content of normal communication and the overtime decision content of short communication are set, the overtime decision content of short communication is less than the overtime decision content of normal communication;
(2) communication center to passage institute to some extent connection intelligent equipment call, utilize the overtime decision content of normal communication to judge the shutdown or the malfunction of smart machine, to taking place to shut down or the smart machine of malfunction carries out count tag;
Utilize the overtime decision content of normal communication to judge its shutdown or malfunction when (3) communication center is called the smart machine that does not have count tag next time; when calling the smart machine that count tag is arranged next time, communication center utilize the overtime decision content of short communication to judge whether to recover communication; remove count tag when recovering communication, circulate with this.
As preferred embodiment, communication center was all called the smart machine that does not have count tag in each cycle, and be separated by some cycles of communication center just call the smart machine that count tag is arranged.
The invention has the beneficial effects as follows: method of the present invention adopts count tag, reduce to shut down or the mode of malfunction smart machine poll time greatly reduces whole polling cycle and takes time; improve communication speed; reduction because of the part smart machine unusually to the influence of whole bus communication speed; after having many equipment downtimes or fault in the system; adopt method polling cycle of the present invention can shorten to 4-5 second, obvious more in the equipment effect how of the present invention more of shutdown or fault.
Embodiment
A kind of multinode serial communication scan method of the present invention may further comprise the steps:
(1) overtime decision content of normal communication and the overtime decision content of short communication are set, the overtime decision content of short communication is less than the overtime decision content of normal communication, during practical application, the size of the overtime decision content of normal communication can the several seconds, and the overtime decision content of short communication then can be set to tens of milliseconds;
(2) communication center to passage institute to some extent connection intelligent equipment call, utilize the overtime decision content of normal communication to judge the shutdown or the malfunction of smart machine, equipment just often equipment is beamed back at once and is recalled signal, the equipment that surpasses the overtime decision content of normal communication then is judged as the smart machine of shutdown or malfunction, and the smart machine that shutdown or malfunction take place is carried out count tag;
Utilize the overtime decision content of normal communication to judge its shutdown or malfunction when (3) communication center is called the smart machine that does not have count tag next time; when calling the smart machine that count tag is arranged next time, communication center utilize the overtime decision content of short communication to judge whether to recover communication; remove count tag when recovering communication; call according to normal condition after knowing the equipment of count tag, circulate with this.
In addition, in order further to increase sweep velocity, the present invention can be further mode by frequency reducing be optimized, promptly communication center was all called the smart machine that does not have count tag in each cycle, communication center some cycles of being separated by just call the smart machine that count tag is arranged.The method that this frequency reducing is called the smart machine that count tag is arranged can reduce unnecessary calling number of times, further reduces the polling cycle size.
Embodiments of the present invention are not restricted to the described embodiments, as long as it reaches technique effect of the present invention with essentially identical means, all should belong to protection scope of the present invention.