Summary of the invention
Technical matters to be solved by this invention is: a kind of monitoring vehicles in real time system is provided, adopts the communication mode of multiple spot to a bit, can realize the real-time status of all operational vehicles in multi-thread, many cars, the networking monitoring and setting scope.
In addition, the present invention also provides the method for real-time of above-mentioned monitoring vehicles in real time system.
For solving the problems of the technologies described above, the present invention adopts following technical scheme:
A kind of monitoring vehicles in real time system, this system comprise the server that is arranged on control center, are arranged on the client in each vehicle; Described server comprises the monitoring module, is used to monitor all imminent connections; The client of each car is initiatively initiated communication request, after described monitoring module listens to communication request, connects and formation is put in this connection; Server comprises a Communications Processor Module, in order to handle the existing communication that connects, monitors module and continues to monitor other vehicle communication requests; Network breaks down or vehicle arrangement breaks down, and monitoring system disconnects and connecting; After fault is got rid of, attempt above-mentioned connection procedure again.
As a preferred embodiment of the present invention, polling cycle is less than the minimum value of communication cycle, being provided with of overtime duration needs to guarantee that the polling cycle under the linking number state of saturation also can not surpass the minimum value of communication cycle, need formulate according to actual needs for the setting of polling cycle and overtime duration; Described polling cycle refers to inquire about the time interval of the data in all connections, and described communication cycle refers to that all data that connect send at interval; When polling cycle less than communication cycle, then can occur overtime; It is overtime to judge that earlier this overtime connection that whether is network or vehicle arrangement fault cause disconnects, if not, judge that then this overtime representative connection breaks down.
As a preferred embodiment of the present invention, when overtime the appearance, this overtime whether appearance is first at first judged by system, if new overtime connection is then write down expired times and is " 1 "; If not, judge then whether this overtimely reaches the time upper limit that system is provided with, if think that then this connection lost efficacy, with its deletion; Otherwise, should overtimely list normal connection table in; Not overtime when connecting, program adding equally judges once whether be used for definite this connection once overtime, if once overtime, then from " overtime connection table ", it is deleted, thus the effective connection in effective control linkage formation.
As a preferred embodiment of the present invention, vehicle sends communication request as client to control center, and wherein function code is 66H, and data are vehicle ID; Control center is as server end, receive request after, return its response, response is 01H, expression prepares to accept its data, its residual value is all invalid; After receiving the response that can communicate by letter when client, the data that transmit are transferred to server end successively, finish communication, at this moment, function code is 67H, and data bit then is a warning information; When connection can't be set up, this monitoring system was temporary with existing alarm, behind the communication recovery, the effective alarm in the buffer memory is sent to control center; When mistake appearred in communication, this monitoring system was taked retransmission mechanism, and warning information is sent to control center.
The monitoring method of above-mentioned monitoring vehicles in real time system, this method comprise the steps: that the client of each car initiatively initiates communication request; The monitoring module of described server is monitored all imminent connections; After monitoring module and listening to communication request, connect and formation is put in this connection; The Communications Processor Module of server is handled the existing communication that connects, and monitors module and continues to monitor other vehicle communication requests; Network breaks down or vehicle arrangement breaks down, and monitoring system disconnects and connecting; After fault is got rid of, can attempt above-mentioned connection procedure again.
As a preferred embodiment of the present invention, polling cycle is less than the minimum value of communication cycle, being provided with of overtime duration needs to guarantee that the polling cycle under the linking number state of saturation also can not surpass the minimum value of communication cycle, need formulate according to actual needs for the setting of polling cycle and overtime duration; Described polling cycle refers to inquire about the time interval of the data in all connections, and described communication cycle refers to that all data that connect send at interval; When polling cycle less than communication cycle, then can occur overtime; It is overtime to judge that earlier this overtime connection that whether is network or vehicle arrangement fault cause disconnects, if not, judge that then this overtime representative connection breaks down.
As a preferred embodiment of the present invention, when overtime the appearance, this overtime whether appearance is first at first judged by system, if new overtime connection is then write down expired times and is " 1 "; If not, judge then whether this overtimely reaches the time upper limit that system is provided with, if think that then this connection lost efficacy, with its deletion; Otherwise, should overtimely list normal connection table in; Not overtime when connecting, program adding equally judges once whether be used for definite this connection once overtime, if once overtime, then from " overtime connection table ", it is deleted, thus the effective connection in effective control linkage formation.
As a preferred embodiment of the present invention, vehicle sends communication request as client to control center, and wherein function code is 66H, and data are vehicle ID; Control center is as server end, receive request after, return its response, response is 01H, expression prepares to accept its data, its residual value is all invalid; After receiving the response that can communicate by letter when client, the data that transmit are transferred to server end successively, finish communication, at this moment, function code is 67H, and data bit then is a warning information; When connection can't be set up, this monitoring system was temporary with existing alarm, behind the communication recovery, the effective alarm in the buffer memory is sent to control center; When mistake appearred in communication, this monitoring system was taked retransmission mechanism, and warning information is sent to control center.
Beneficial effect of the present invention is: the monitoring vehicles in real time system and method that the present invention proposes, adopted the mode of a kind of " deleting invalid connection ", both many-one communication can be carried out in real time, exactly, the invalid connection that causes owing to network or mobile unit fault can be deleted again effectively.Simultaneously, the present invention adopts industrial control field to use Modbus/TCP agreement very widely, has not only finished the unification of three kinds of vehicle information, and can improve security, the reliability of communication.
In addition, the present invention can realize the real-time status of multi-thread, many cars, all operational vehicles of networking monitoring city rail system.Security information such as railway car fire alarm, EmS door alarm, the urgent intercommunication of passenger are sent to driver, station and CCC in real time, for the control of ground central authorities provides raw data, the CCTV video monitoring system that links is simultaneously in time grasped various accidents during the train operation.Native system can use on multiple different municipal rail trains such as Pang Badi, Siemens, Alstom, Zhuzhou, long-traveller, carries out information data by train MVB bus protocol and native system and communicates by letter.
Real-time monitoring system of the present invention can be monitored train safe information in real time at pilothouse and ground control centre, and operation provides effective safety guarantee means to urban railway transit train, improves the operation level of municipal rail train.In addition, this system also provides security alarm historical information query function, can prevent the generation of some safety failures by the analyzing and processing to historical information.
Embodiment
Describe the preferred embodiments of the present invention in detail below in conjunction with accompanying drawing.
Embodiment one
Present embodiment is that example is introduced monitoring vehicles in real time system and method for the present invention with the track traffic, and the present invention can be used in the vehicles such as train, public transport, taxi, steamer even aircraft certainly.
See also Fig. 3, the monitoring vehicles in real time system that the present invention discloses comprises the server that is arranged on control center, is arranged on the client in each vehicle; Described server comprises the monitoring module, is used to monitor all imminent connections; The client of each car is initiatively initiated communication request, after described monitoring module listens to communication request, connects and formation is put in this connection; Server comprises a Communications Processor Module, in order to handle the existing communication that connects, monitors module and continues to monitor other vehicle communication requests; Network breaks down or vehicle arrangement breaks down, and monitoring system disconnects and connecting; After fault is got rid of, attempt above-mentioned connection procedure again.
Polling cycle (inquiring about the time interval of all data that connect) is less than the minimum value of communication cycle (all data that connect send at interval), being provided with of overtime duration needs to guarantee that the polling cycle under the linking number state of saturation also can not surpass the minimum value of communication cycle, need formulate according to actual needs for the setting of polling cycle and overtime duration; When polling cycle less than communication cycle, then can occur overtime; It is overtime to judge that earlier this overtime connection that whether is network or vehicle arrangement fault cause disconnects, if not, judge that then this overtime representative connection breaks down.
See also Fig. 2, the principle of work of system of the present invention is as follows: when overtime the appearance, system judges at first whether this " overtime " occurs first, if new " overtime " connects, then writes down expired times and is " 1 "; If not, then judge " overtime " whether to reach the time upper limit that system is provided with, if think that then this connection lost efficacy, with its deletion; Otherwise, should " overtime " list normal connection in.Not overtime when connecting, program adding equally judges once whether be used for definite this connection once overtime, if once overtime, then from " overtime connection ", it is deleted, thus the effective connection in effective control linkage formation.
Vehicle sends communication request as client to control center, and wherein function code is 66H, and data are vehicle ID; Control center is as server end, receive request after, return its response, response is 01H, expression prepares to accept its data, its residual value is all invalid; After receiving the response that can communicate by letter when client, the data that transmit are transferred to server end successively, finish communication, at this moment, function code is 67H, and data bit then is a warning information; When connection can't be set up, this monitoring system was temporary with existing alarm, behind the communication recovery, the effective alarm in the buffer memory is sent to control center; When mistake appearred in communication, this monitoring system was taked retransmission mechanism, and warning information is sent to control center.
More than introduced monitoring vehicles in real time of the present invention system, the present invention also discloses a kind of monitoring vehicles in real time method when disclosing the monitoring vehicles in real time system.
This method comprises the steps: that the client of each car initiatively initiates communication request; The monitoring module of described server is monitored all imminent connections; After monitoring module and listening to communication request, connect and formation is put in this connection; The Communications Processor Module of server is handled the existing communication that connects, and monitors module and continues to monitor other vehicle communication requests; Network breaks down or vehicle arrangement breaks down, and monitoring system disconnects and connecting; After fault is got rid of, can attempt above-mentioned connection procedure again.
In sum, the monitoring vehicles in real time system and method that the present invention proposes, adopt the mode of a kind of " deleting invalid connection ", both can carry out many-one communication in real time, exactly, can delete the invalid connection that causes owing to network or mobile unit fault again effectively.Simultaneously, the present invention adopts industrial control field to use Modbus/TCP agreement very widely, has not only finished the unification of three kinds of vehicle information, and can improve security, the reliability of communication.
Embodiment two
The present invention has adapted to the high request of track traffic to safety precaution, can significantly strengthen the professional monitoring system of passenger safety image scene monitoring capacity in the car.System keeps real-time Communication for Power with train in travelling, by obtaining running status and emergency circumstance information, can reflect warning information and image scene in real time on the pilothouse man-machine interface.By car ground broadband wireless network (based on 802.11a/g, 3G technology etc.) bearer path, system with the alarm information real-time Transmission to the ground control centre, automatically realize emergency circumstance location, image scene Real Time Observation and playing back videos, can effectively promote track traffic emergency disposing capacity.
See also Fig. 1, the present invention has disclosed a kind of monitoring vehicles in real time system, this system comprises one or more warning information sending modules 11, the audio/visual information acquisition module 12 in the compartment 10 that is arranged on each vehicle 30, be arranged on (as pilothouse) in the vehicle 30 vehicle-mounted alarm subsystem 20, be arranged on the remote monitoring subsystem of far-end.In the present embodiment, the remote monitoring subsystem comprises the station Monitor And Control Subsystem 40 that is arranged on each station, the CSRC subsystem 50 that is arranged on control center.
[warning information sending module]
Warning information sending module 11 is existing alarm module, can alarm automatically, perhaps manually alarms by modes such as passenger's pulling, urgent intercommunication alarms; Warning information is sent to vehicle-mounted alarm subsystem 20.In the compartment a plurality of warning information sending modules 11 can be arranged.Because this module is a prior art, does not do at this and gives unnecessary details.
[audio/visual information acquisition module]
Audio/visual information acquisition module 12 can comprise voice acquisition devices such as shooting first-class video acquisition device, microphone, and it is used for obtaining the various condition informations of vehicle, comprise audio frequency or/and picture or/and video information or the like.In the present embodiment, this module also belongs to existing equipment.
[vehicle-mounted alarm subsystem]
Vehicle-mounted alarm subsystem 20 is in order to receive the warning information that described warning information sending module 11 sends, and control the condition information that described audio/visual information acquisition module 12 obtains corresponding vehicle, preserved and be sent to the remote monitoring subsystem by wireless network.
Described vehicle-mounted alarm subsystem 20 comprises display unit, storer, alarm prompt unit, preserves unit, communication unit, video automatic switch unit, camera head positioning unit automatically.
Display unit is generally display in order to display message.
Storer is in order to storage Various types of data information.
The alarm prompt unit sends prompting behind the warning information that receives described warning information sending module transmission.The mode of prompting can be sound or image conversion is reported to the police.During normal the operation, only show a lamp quick botton; There is the alarm situation to take place, the button demonstration of can glimmering, click can show the pilothouse observation interface.Vehicle-mounted alarm subsystem provides real-time train status information for the driver, as: fire alarm, danger button state, vehicle door status or the like.
Automatically preserve the unit in order to the condition information of preserving vehicle/compartment that warning information takes place to the storer of described vehicle-mounted alarm subsystem 20.
Communication unit is sent to described remote monitoring subsystem in order to the condition information that described automatic preservation unit is preserved.
The video automatic switch unit with so that in the described display unit content displayed automatically switch to vehicle/compartment that warning information takes place.
The camera head positioning unit in order to the visual angle of automatic positioning shooting device to described warning information sending module, perhaps, by artificial visual angle by this camera head positioning unit regulated at will camera head.Realize fire, car door emergency release, the prompting of the promptly quick location of intercommunication location point, and Real-time Alarm by the camera head positioning unit.
In addition, vehicle-mounted alarm subsystem 20 can also comprise the place ahead station platform situation acquiring unit, and the station Monitor And Control Subsystem at station, the place ahead obtains the real-time video information of the place ahead platform at any time to the video recording of the situation of this platform by wireless telecommunications.
When running into burst alarm situation, vehicle-mounted alarm subsystem can accurately be located the position that alarm takes place fast, and by car ground broadband wireless communication network warning information is reached the ground control centre.Check field condition by the camera of retrieving for examination this position, simultaneity factor will begin video recording automatically to be removed until alarm failure, and the security alarm information that is taken place will be stored in this locality with text and video recording form.In addition, the driver can check next stop platform image by the man-machine interface switching, understands the information that enters the station.
[station Monitor And Control Subsystem]
Station Monitor And Control Subsystem 40 is arranged at each station, is used for receiving sailing the station into or/and be about to sail into condition information in the up-downgoing vehicle car 10 at station in setting-up time.
Station Monitor And Control Subsystem major function has two: the one, can manage the vehicle that enters the station effectively, in real time, and as shown in FIG., control machine room AT STATION and can observe directly the interior situation by the camera that calls in the uplink and downlink vehicle; Can receive the warning information that vehicle-mounted warning system sends exactly in addition, timely rescue guarantee is provided for the fault vehicle.
[CSRC subsystem]
CSRC subsystem 50 is in order to obtaining the condition information of all vehicles in use, and is stored in its database.
Ground central authorities control subsystem 50 realizes realizing information transmission between car ground, image conversion circuit travel condition of vehicle (license number, up-downgoing, interval etc.) based on the multi-link technology of Modbus/TCP agreement.When alarm burst, receive in real time and show train burst warning information, switch to image scene fast, and can retrieve for examination the accident video recording fast, help to judge cause and accelerate disposal efficiency.In addition, the ground control centre is also with the historical information by Database Systems query warning situation.
Ground system of CCC can also realize the real-time information interaction with comprehensively monitoring (ISCS), unified (UC) system that communicates by letter of Cisco.
Database provides functions such as data storage, inquiry for total system, its major function is divided into two parts: vehicle-mounted local storage and ground control centre storage.Vehicle-mounted local storage meeting is all stored all warning information in a day with the text document form according to time tag in local system; The ground control centre then is to store the warning information on vehicle-mounted into local data base by the car-ground radio system, in addition, also provides query function.
More than introduced monitoring vehicles in real time of the present invention system, below introduced its method of real-time, this method comprises the steps:
Steps A, when detecting vehicle burst safety failure or potential safety hazard, the automatic or manual triggering alarm of described warning information sending module also sends a warning message to described vehicle-mounted alarm subsystem;
Step B, vehicle-mounted alarm subsystem receive the warning information that described warning information sending module sends, and control the condition information that described audio/visual information acquisition module obtains corresponding vehicle, preserved and be sent to described remote monitoring subsystem by wireless network;
Step C, remote monitoring subsystem (comprising station Monitor And Control Subsystem, CSRC subsystem) obtain the vehicle condition information that described vehicle-mounted alarm subsystem sends.
In sum, real-time monitoring system of the present invention can be monitored train safe information in real time at pilothouse and ground control centre, and operation provides effective safety guarantee means to urban railway transit train, improves the operation level of municipal rail train.In addition, this system also provides security alarm historical information query function, can prevent the generation of some safety failures by the analyzing and processing to historical information.
Mainly the technical matters of Xie Jueing comprises following several respects:
-realization rail transit train security information is uploaded monitoring function in real time;
-overcome car ground broadband wireless network (based on 802.1a/g, the 3G technology etc.) loss of data that packet loss caused;
The realtime graphic alarm and the sound alarm of-realization security information;
The quick location of-realization security alarm information location point;
The real time monitoring of-realization alarm status and interlock automatic video recording;
-realization pilothouse man-machine interface checking to the place ahead station platform image;
-realize that control center manages the Centralized Monitoring of the train that travels;
-realize taking precautions against natural calamities and control center has access to playback immediately to the accident video recording;
-realization station supervisory system having access to automatically to incoming train car inner video image.
Embodiment three
Native system adopts the communication mode of multiple spot to a bit, sets up communication link by many cars and control center.Its principle of work is as follows: control center monitors module and is used to monitor all imminent connections as server; Each car is as a client, initiatively initiate communication request, after monitoring module and listening to communication request, connect and formation is put in this connection, the Communications Processor Module of control center is handled the existing communication that connects, and continues to monitor other vehicle communication requests and monitor module.Network breaks down or vehicle arrangement breaks down, and connects then to disconnect, and after fault is got rid of, can attempt above-mentioned connection procedure again.
Many-to-one communication mode has determined control center that the multi-link mode of poll that must adopt is communicated by letter, polling cycle (inquiring about the time interval of all data that connect) need be slightly less than the minimum value of communication cycle (all data that connect send at interval), being provided with of overtime duration needs to guarantee that the polling cycle under the linking number state of saturation also can not surpass the minimum value of communication cycle, need formulate according to actual needs for the setting of polling cycle and overtime duration.When polling cycle less than communication cycle, then " overtime " can appear, but this overtime can not represent to connect break down, should disconnect overtime differentiation with being connected of causing of network or vehicle arrangement fault.
The mode that native system has adopted a kind of " deleting invalid connection " both can be carried out many-one communication in real time, exactly, can delete the invalid connection that causes owing to network or mobile unit fault again effectively.
Its principle of work is as follows: when overtime the appearance, system judges at first whether this " overtime " occurs first, if new " overtime " connects, then writes down expired times and is " 1 "; If not, then judge " overtime " whether to reach the time upper limit that system is provided with, if think that then this connection lost efficacy, with its deletion; Otherwise, should " overtime " list normal connection in.
Not overtime when connecting, program adding equally judges once whether be used for definite this connection once overtime, if once overtime, then from " overtime connection ", it is deleted, thus the effective connection in effective control linkage formation.
In the native system, vehicle is divided into three kinds, obtains all differences to some extent on the form of information and the agreement on every kind of vehicle, therefore, needs a kind of unified agreement come the warning information of three kinds of vehicles of standard, makes control center can handle the alarm of three kinds of vehicles simultaneously.Consider the instability of car-ground radio network again, be badly in need of a kind of method that can safely and reliably alarm in time be reported.
Native system adopts industrial control field to use Modbus/TCP agreement very widely, has not only finished the unification of three kinds of vehicle information, and can improve security, the reliability of communication.
Its message format is as follows:
The message format of Client end as shown in Figure 5, the message format of Server end is as shown in Figure 6.
Communication process is: vehicle sends communication request as client to control center, and wherein function code is 66H, and data are vehicle ID; Control center is as server end, receive request after, return its response, response is 01H, expression prepares to accept its data, its residual value is all invalid.After receiving the response that can communicate by letter when client, the data that transmit are transferred to server end successively, finish communication, at this moment, function code is 67H, and data bit then is a warning information, and its form as shown in Figure 7.
The treatment mechanism of several situations is as follows:
When connection can't be set up, native system can be temporary with existing alarm, behind the communication recovery, the effective alarm in the buffer memory is sent to control center;
When mistake appearred in communication, native system was taked retransmission mechanism, and warning information is sent to control center.
The TCP communication of total system, combine " optimal design of multi-link TCP communication " and " self-defined Modbus/TCP communication protocol ", the former deletes " invalid connection " in time, effectively, and latter's adding is shaken hands and retransmission mechanism, improves security, accuracy and the high efficiency of communication effectively.
Embodiment four
The warning information (EmS door, fire and urgent intercommunication etc.) that monitoring system of the present invention utilizes vehicle arrangement to produce, finish the information interaction of vehicle and ground control centre (being called for short " control center ") by vehicle-ground wireless communication (802.11a/b/g, 3G), the various warning information that all vehicles are taken place are forwarded to the server of control center in real time, related content when control center can check that current and alarm takes place by modes such as literal, image, videos, thus realize all car operation states of monitoring in real time.
Onboard subsystem is sent communication request as client to server (control center's subsystem), after server is received request, returns its response; After receiving the response that to communicate by letter when client, the data that transmit are transferred to server end successively, finish communication.Native system to Serial Port Information (RS232, RS422,2-/4-RS485) or the self-adaptation of Ethernet information (xml form and IP packet format) transmission time interval, realize with the train safe rate of information throughput synchronously, accurate receiving alarm information.
Present embodiment effectively overcomes the influence that packet loss brought of car ground broadband wireless network based on the information transmission technology of the optimization of Modbus/TCP agreement.In the monitoring system of present embodiment, vehicle is divided into three kinds, obtain all differences to some extent on the form of warning information and the agreement on every kind of vehicle, therefore, the Modbus/TCP agreement that native system adopts industrial control field extensively to adopt, not only finish the unification of three kinds of vehicle information, and can improve security, the reliability of communication.
Native system control center obtains the running status of all vehicles in use in real time, communicate by letter by Modbus/TCP, vehicle position information (i.e. the interval of the current operation of this car) is sent to the server at corresponding station, the station supervisory system is according to this information, vehicle tabulation in the searching database, the monitoring image of this vehicle of index is realized dynamically switching; Simultaneously, onboard servers is according to the station information in vehicle location information and the database, the monitoring image of the station platform of its traffic coverage of dynamic call.
Communication process as shown in Figure 3, onboard subsystem is sent communication request as client to server (control center's subsystem), after server is received request, returns its response; After receiving the response that to communicate by letter when client, the data that transmit are transferred to server end successively, finish communication.Wherein step 1 is the client-requested communication steps, and step 2 is a server response request step, and step 3 sends data step for client, and step 4 is a server response transmission step.
Message format such as Fig. 5, shown in Figure 6 of Client end, Server end.
This method improvement existing Modbus/TCP communication, increased " request---response " process (1 and 2 stages among the communication process figure), guarantee the reliability and the security of communication.Warning information to different automobile types has carried out recompile, has realized the compatibility of native system to multiple vehicle.When communication was broken down, client can be put into buffer memory with warning information, treat communication rebulid after, resend to control center server.
The present invention sets up communication port between vehicle in use and each station, realizes that vehicle in use is associated with station between its location, for existing video monitoring system provides the interlock call method, and the validity of assurance monitoring image.
Native system adopts the communication mode of " many-one ", and control center's Monitor And Control Subsystem is as server, and the vehicle-mounted alarm subsystem on each vehicle is as client.Communication is initiated by client, sends communication request to server, and communication link is set up in the request of server responding communication.
Because the instability of car-ground radio network may cause certain to connect interior disconnection of short time, asks again to connect when client, server is set up new connection for it, needs this moment last one " invalid connection " deletion, thereby improves communication efficiency.In native system, adopted multi-link real-time update algorithm to finish the deletion of " invalid connection ".
For " many-one " communication mode, need to adopt polling mode to finish multi-point, in order to improve communication efficiency, TCP communication need be provided with overtime; Simultaneously, the selection of polling cycle also directly influences communication efficiency.Polling cycle should be slightly less than the minimum value of all communication cycles.
Because the instability of car-ground radio network may cause certain to connect interior disconnection of short time, asks again to connect when client, server is set up new connection for it, needs this moment last one " invalid connection " deletion, thereby improves communication efficiency.In native system, adopted multi-link real-time update algorithm to finish the deletion of " invalid connection ", its algorithm flow chart is as shown in Figure 2.
As can be seen from Figure 2, repeatedly overtime when a certain connection, then determine that it is invalid connection, server is deleted it, treats that client initiates communication request again, and server is set up communication link for it again.Therefore, can reduce the time to live of " invalid connection " effectively, and then improve the communication efficiency of total system.
In addition, native system adopt based on inquiry dynamically read algorithm, both can improve reading efficiency effectively, can reduce the consumption of CPU again, algorithm flow chart is as shown in Figure 4.
The data read process of this method is: before beginning to read, empty serial equipment, judge com-state then, if no datat, the 100ms that then delays time inquires about com-state again; If data are arranged, reading of data behind the time-delay 50ms is put into formation with data after reading and is waited for judgement, after the 100ms time-delay, continues to check com-state.Time-delay in this algorithm is the speed according to the serial data transmission, the data length of each transmission is set, the time-delay of 50ms guarantees the once integrality of the data of transmission, 100ms is " polling cycle ", according to theoretical calculate, the serial communication of communication cycle more than 300ms, this program all can guarantee the accurate communication of data.In the native system, communication cycle is 1s~2s, therefore can well finish the collection of data.
Here description of the invention and application is illustrative, is not to want with scope restriction of the present invention in the above-described embodiments.Here the distortion of disclosed embodiment and change are possible, and the various parts of the replacement of embodiment and equivalence are known for those those of ordinary skill in the art.Those skilled in the art are noted that under the situation that does not break away from spirit of the present invention or essential characteristic, and the present invention can be with other form, structure, layout, ratio, and realize with other assembly, material and parts.Under the situation that does not break away from the scope of the invention and spirit, can carry out other distortion and change here to disclosed embodiment.