Summary of the invention
The technical problem that the present invention solves is to overcome the shortcoming that existing wind and light complementary road lamp does not have long distance control system, provide a kind of the realization that wind and light complementary road lamp is carried out remote monitoring, and to the implementation method of the simple long distance control system communications of the remote monitoring of wind and light complementary road lamp.
The implementation method of long distance control system communications of the present invention is: the Surveillance center of long distance control system sends command information to host computer, described host computer sends to the intelligent controller that it is controlled with the command information of receiving, described intelligent controller is according to this command information control wind and light complementary road lamp, described command information has comprised instruction head and the instruction body of command identification effect, described instruction body comprises command length, the device address, serial number and instruction type, described device address is described intelligent controller address, and described serial number is the number of times that described command information repeats to send.
As preferably, described instruction body also comprises the expansion equipment address, and described expansion equipment is other intelligent controller.
As preferably, described instruction body also comprises data content, and described data content is as the replenishing of described instruction type, and corresponding with described instruction type, jointly indicates described intelligent controller to finish described instruction type setting function task.
As preferably, described command information has also comprised the instruction afterbody of verification effect.
As preferably, described host computer sends command information to described Surveillance center, the command information that described host computer sends to described Surveillance center has comprised instruction head and the instruction body of command identification effect, described host computer comprises command length, device address, serial number and instruction type to the instruction body of the command information that described Surveillance center sends, described device address is described intelligent controller address, and described serial number is the number of times that described command information repeats to send.
As preferably, described intelligent controller returns acknowledgement information to described host computer after receiving command information, described host computer returns the acknowledgement information that receives to described Surveillance center, described acknowledgement information has comprised receipt instruction head and the receipt instruction body of command identification effect, described receipt instruction body comprises command length, device address, serial number and receipt instruction type, described device address is described intelligent controller address, and described serial number is the number of times that described acknowledgement information repeats to send.
As preferably, the receipt instruction body of described acknowledgement information also comprises the expansion equipment address, and described expansion equipment is other intelligent controller.
As preferably, the receipt instruction body of described acknowledgement information also comprises data content, and described data content is as the replenishing of described instruction type, and corresponding with described instruction type, comprises the receipt data of corresponding described instruction type defined.
As preferably, described acknowledgement information has also comprised the receipt instruction afterbody of verification effect.
As preferably, the backward described host computer of command information that described Surveillance center receives described host computer transmission returns acknowledgement information, described acknowledgement information comprises receipt instruction head and receipt instruction body, and described receipt instruction body comprises command length, device address, serial number and receipt instruction type.
The present invention also provides a kind of wind and light complementary road lamp device, comprise Surveillance center, host computer and intelligent controller and wind and light complementary road lamp, described host computer communicates to connect with described Surveillance center on the one hand, on the other hand with some described intelligent controller communication connections, described intelligent controller is controlled described wind and light complementary road lamp, and the implementation method by aforesaid long distance control system communications between described Surveillance center, host computer and the intelligent controller realizes communications.
The implementation method of long distance control system communications of the present invention and wind and light complementary road lamp device compared with prior art have following beneficial effect:
1, the implementation method of the communications of long distance control system of the present invention, owing to set up targetedly command information, the address that this command information is directly set up the intelligent controller that needs control with the information such as communicate by letter, can simply, conveniently realize the remote monitoring to wind and light complementary road lamp, reduced simultaneously the workload that administers and maintains, so that simple to the remote monitoring of wind and light complementary road lamp.
2, the implementation method of the communications of long distance control system of the present invention, because the command information of its transmission has the expansion equipment address, therefore Surveillance center can only send a command information to host computer, and this host computer is with device address and the instruction that sends same content of the intelligent controller that points to of expansion equipment address of this command information in the command information.So, Surveillance center does not need to send many information to this host computer, can reduce on the one hand the work load of Surveillance center, on the other hand owing to the amount of information that sends reduces greatly, can greatly improve the communications efficient between Surveillance center and the host computer, thereby greatly improve the efficient of long distance control system communications.
3, in the present invention, because the instruction body of acknowledgement information also has the expansion equipment address, therefore, host computer can be identical with the content received in section sometime, and only many different acknowledgement information of device address are integrated into an acknowledgement information and are sent to Surveillance center, and do not need the acknowledgement information of each intelligent controller all is sent to Surveillance center, so, not only reduce the work load of host computer, also greatly reduced amount of information, further improved the efficient of communications.
Embodiment
The implementation method of long distance control system communications of the present invention is: the Surveillance center of long distance control system sends command information to host computer, host computer is issued the intelligent controller that it is controlled with the command information of receiving, wherein wind and light complementary road lamp of each intelligent controller control.Command information comprises instruction head and instruction body.The implementation method of the communications of long distance control system of the present invention can be by sending the command information realization to the remote monitoring of wind and light complementary road lamp to intelligent controller, simultaneously so that the workload that administers and maintains of remote monitoring is lower, operation is simple.
In the first embodiment of the present invention, as shown in Figure 1, the instruction body comprises command length, device address, serial number and instruction.In the present embodiment, command length, device address, serial number and instruction are arranged in order, and certainly, it puts in order and also can do as required other settings.
In the present embodiment, described command information has also comprised the instruction afterbody of verification effect.The instruction afterbody adopts the CRC code, and namely cyclic redundancy check (CRC) code is the hexadecimal number of two bytes, as the check way of instruction at the correctness of transmission course.Certainly, the instruction afterbody also can adopt other check codes.Certainly, in other embodiments, command information also can not comprise the instruction afterbody.
Wherein, the instruction head is called again packet header, plays command identification.The instruction head is generally the hexadecimal number of a byte, can be 24H, also can be other hexadecimal number, such as 25H, 88H etc.Command length is the hexadecimal number of two bytes, is the byte number aggregate value that comprises instruction head, instruction body and instruction afterbody.The device address claims again device id, represents ID number of intelligent controller, is defaulted as the hexadecimal number of Eight characters joint, also can increase or the minimizing byte number according to actual conditions, but which intelligent controller device address refer message instruction is sent to.Serial number is the hexadecimal number of two bytes, refers to the positive integer since 1, and the repetition transmission times of presentation directives also can increase or reduce byte number according to actual needs.Instruction is the hexadecimal number of a byte, and the type of presentation directives such as read operation or write operation, also can increase or reduce byte number according to actual needs.
As shown in Figure 2, in a second embodiment, the instruction body also comprises the expansion equipment address, and the expansion equipment address is ID number of other intelligent controllers, can be ID number an of intelligent controller, also can be ID number of a plurality of intelligent controllers.The Surveillance center of long distance control system often need to send to all intelligent controllers or a plurality of intelligent controller the command information of same content.The implementation method of the communications of long distance control system of the present invention, because the command information of its transmission has the expansion equipment address, therefore Surveillance center can only send a command information to host computer, and this host computer is sent to this command information the intelligent controller of device address and the sensing of expansion equipment address simultaneously.So, Surveillance center does not need to send many information to this host computer, can reduce on the one hand the work load of Surveillance center, on the other hand owing to the amount of information that sends reduces greatly, can greatly improve the communications efficient between Surveillance center and the host computer, thereby greatly improve the efficient of long distance control system communications.The other guide of present embodiment is identical with the second embodiment.
In the 3rd embodiment, referring to Fig. 3, the instruction body also comprises data content except command length, device address, serial number and instruction.Data content is as the replenishing of described instruction type, and corresponding with described instruction type, jointly indicates described intelligent controller to finish described instruction type setting function task.Data content is the hexadecimal number of indefinite length, when its length is 0, namely represent without any data content.The other guide of present embodiment is identical with the first embodiment.
The each several part of instruction message can be set byte number as required, the below is an example A according to the 3rd embodiment: " 0X240015212223242526272800013A03001100029F05 " is a complete instruction, this is a telemetry command, has 21 bytes.Wherein first byte is 24H, expression packet header, i.e. instruction head.The 2-3 byte is 0015H, and presentation directives's length is 21 bytes.The 4-11 byte is 2122232425262728H, is the device address, represents that this instruction is to send to which intelligent controller, has 8 byte numbers.The 12-13 byte is 0001H, is serial number, represents that this instruction is to send for the first time.The 14th byte is 3AH, is instruction, and expression is telemetry command.The 15-19 byte is 0300110002H, is data content, and 03 of expression MODBUS reads the holding register function, and 5 byte numbers are arranged.The 20-21 byte is 9F05H, is instruction afterbody 3, and the crc value that represents this instruction is 9F05H, if this two byte is not 9F05H after receiving, the CRC result who calculates after perhaps receiving is not identical with this two byte, and there is error of transmission in this expression, then requires again transmission primaries.
In the 4th embodiment, referring to Fig. 4, wherein the instruction body comprises command length, device address, serial number, instruction, data content and expansion equipment address.In the present embodiment, the length of instruction head is 1 byte, and the length of instruction afterbody is 2 bytes.The length of command length is 2 bytes, the length of device address is 8 bytes, the length of serial number is 2 bytes, the length of instruction is 1 byte, and the length of data content is 0 ~ n byte, and the length of each expansion equipment address is 8 bytes, and a command information is as comprising m expansion equipment address, then the total length of instruction body is 13 ~ 13+n+8m byte (n and m 〉=0, and be positive integer).Then the total length of instruction is 16 ~ 16+n+8m byte (n 〉=0 and for positive integer).
" 0X,240,025,212,223,242,526,272,800,013,A03,001,100,023,132,333,435,363,738 41424344454647481707 " are according to one of the 4th embodiment complete command information, this is a telemetry command information, wherein the 1st byte 24H is the instruction head, 2-3 byte " 0025H " is command length, 4-11 byte " 2122232425262728H " is the device address, 12-13 byte " 0001H " is serial number, the 14th byte " 3AH " is instruction type, be in the present example " remote measurement ", being " 6AH " such as the 14th byte, then is " remote control "; Be " 5AH " such as the 14th byte, then representative " remote signalling ".Certainly, also can set according to actual needs the content of the 14th byte, such as regulation " 88H " or " AAH " representative " remote measurement " instruction type.15-19 byte " 0300110002H " is data content, the 20-35 byte is the expansion equipment address, the telemetry command that the address is sent out same for equipment and the address of " 3132333435363738H " for the equipment of " 4142434445464748H " is returned in expression simultaneously, 36-37 byte " 1707H " is the instruction afterbody, the crc value that represents this receipt is 1707H, if this two byte is not 1707H after receiving, the CRC result who calculates after perhaps receiving is not identical with this two byte, there is error of transmission in this expression, then requires again transmission primaries.
Certainly, the instruction head is not to be made of a byte yet, and the length of each component part of instruction head, instruction body and the length of instruction afterbody also can be done other settings as required.
In the various embodiments described above, described host computer also can send command information to described Surveillance center, described host computer comprises instruction head and instruction body to the command information that described Surveillance center sends, and described host computer comprises command length, device address, serial number and instruction type to the instruction body of the command information that described Surveillance center sends.Certainly, command information also can further comprise the instruction afterbody of verification effect, and described instruction body also can further comprise data content and expansion equipment address.The backward described host computer of command information that described Surveillance center receives described host computer transmission returns acknowledgement information, described acknowledgement information comprises receipt instruction head and receipt instruction body, and described receipt instruction body comprises command length, device address, serial number and receipt instruction type.Certainly, acknowledgement information also can further comprise the instruction afterbody of verification effect, and receipt instruction body also can further comprise data content and expansion equipment address.For example, when certain intelligent controller or host computer abnormal situation, host computer can send command information to Surveillance center, and the backward host computer of Surveillance center's estimate of situation returns acknowledgement information.
In the above-described embodiments, described intelligent controller also can return acknowledgement information to described control centre after receiving command information.Described acknowledgement information comprises receipt instruction head, receipt instruction body and receipt instruction afterbody, and wherein receipt instruction body comprises command length, device address, serial number and receipt instruction type.The receipt instruction type of acknowledgement information is mutually corresponding with the instruction type of its command information under the general situation, is B5H such as the instruction type in the command information, and then the receipt instruction type in its acknowledgement information is 5BH, and other instructions are according to this principle.Certainly acknowledgement information also can not comprise receipt instruction afterbody in other embodiments.
The below is example B, and namely for the acknowledgement information of the command information of example A: " 0X24001021222324252627280001A3C016 ", this is the acknowledgement information of a telemetry command, has 16 bytes.Wherein first byte is 24H, expression packet header, i.e. receipt instruction head.The 2-3 byte is 0010H, and expression receipt command information length is 16 bytes.The 4-11 byte is 2122232425262728H, is the device address, represents this instruction from this equipment, and 8 byte numbers are arranged.The 12-13 byte is 0001H, is serial number, represents that this receipt is to send for the first time.The 14th byte is A3H, is the receipt instruction type, and expression is the receipt of telemetry command, and the instruction of its correspondence is 3AH (seing above the example A of face).The 15-16 byte is C016H, is receipt instruction afterbody, and the crc value that represents this receipt is C016H, if this two byte is not C016H after receiving, the CRC result who calculates after perhaps receiving is not identical with this two byte, and there is error of transmission in this expression, then requires again transmission primaries.
As preferably, the receipt instruction body of described acknowledgement information also comprises the expansion equipment address.The acknowledgement information that a plurality of intelligent controllers are made after receiving command information sends to host computer, and the acknowledgement information that host computer is received as a rule content is identical, only has the device address different.In the present invention, because the receipt instruction body of acknowledgement information has the expansion equipment address, therefore, host computer can be integrated into an acknowledgement information with many different acknowledgement information of the identical only device address of content received in section sometime and be sent to Surveillance center, and do not need the acknowledgement information of each intelligent controller is sent to separately respectively Surveillance center, so, not only reduced the work load of host computer, also greatly reduce amount of information, further improved the efficient of communications.
As further preferred, the instruction body of described acknowledgement information also comprises data content, and namely the receipt instruction body of acknowledgement information comprises command length, device address, serial number, receipt instruction type, data content and expansion equipment address.Data content is as the replenishing of described instruction type, and corresponding with described instruction type, comprises the receipt data of corresponding described instruction type defined.Data content is the hexadecimal number of indefinite length, when its length is 0, namely represent without any data content.
The present invention also provides a kind of wind and light complementary road lamp device, comprise Surveillance center, host computer and intelligent controller and wind and light complementary road lamp, described host computer communicates to connect with described Surveillance center on the one hand, on the other hand with some described intelligent controller communication connections, described intelligent controller is controlled described wind and light complementary road lamp, and the implementation method by aforesaid long distance control system communications between described Surveillance center, host computer and the intelligent controller realizes communications.
In all embodiment of the present invention, described instruction head, receipt instruction head, command length, device address, serial number, instruction type, receipt instruction type, data content, expansion equipment address, instruction afterbody and receipt instruction afterbody are hexadecimal number and consist of.
Upper embodiment is exemplary embodiment of the present invention only, is not used in restriction the present invention, and protection scope of the present invention is defined by the claims.Those skilled in the art in essence of the present invention and protection range, various modifications that the present invention is made or be equal to replacement and also drop in protection scope of the present invention.