CN103025008B - Street lamp control method - Google Patents
Street lamp control method Download PDFInfo
- Publication number
- CN103025008B CN103025008B CN201210508798.1A CN201210508798A CN103025008B CN 103025008 B CN103025008 B CN 103025008B CN 201210508798 A CN201210508798 A CN 201210508798A CN 103025008 B CN103025008 B CN 103025008B
- Authority
- CN
- China
- Prior art keywords
- concentrator
- data
- control
- node controller
- feedback
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02B—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
- Y02B20/00—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
- Y02B20/72—Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps in street lighting
Landscapes
- Optical Communication System (AREA)
- Selective Calling Equipment (AREA)
Abstract
The invention discloses a street lamp control method. The street lamp control method comprises the following steps: an upper machine sends first control data to a concentrator, the concentrator processes the first control data and sends second control data to a node controller, and the node controller controls a street lamp according to received second control data; the concentrator further sends first feedback data to the upper machine, and the node controller further sends second feedback data to the concentrator. The first control data, the second control data, the first feedback data and the second feedback data are transmitted in a data frame mode. Data fields in the first control data and the first feedback data include control instructions and operation object information. Data fields in the second control data and the second feedback data include control instructions and control object information. The street lamp control method can control a large amount of street lamps and saves wire layout cost.
Description
Technical field
The present invention relates to street lamp intelligent control technology, particularly relate to a kind of method for controlling street lamps.
Background technology
Along with the Intellectualized Tendency of field of street lamp lighting is more and more obvious, propose various street lighting intelligent control scheme, as power line carrier scheme, GPRS scheme, Zigbee scheme etc.
In street lighting field of intelligent control, usually can require to realize carrying out single lamp control, group control, Broadcasting Control, Region control to street lamp, also comprise the function such as collection, fault alarm of the status poll to light fixture, current and voltage data.RS-485 standard is as an electric interfaces specification, and it specify only the electrical characteristics of balance driver and receiver, and does not specify connector transmission cable and communication protocol.
Meanwhile, because street lighting belongs to public illumination field, its region controlled is usually larger, in units of the administrative region of general Shi Yi county one-level.Namely a set of street lighting intelligent control system needs to control several thousand even up to ten thousand lamps usually.But RS-485 main frame is hung relatively less from machine quantity, general plain edition RS485 scheme: 1 host computer control≤32/64 are from machine; And enhancement mode RS485 scheme: 1 host computer control≤128/256 are from machine.
Summary of the invention
Based on this, be necessary to provide a kind of method for controlling street lamps based on RS485 communication interface, its huge street lamp of can controlling the size.
A kind of method for controlling street lamps, based on street lamp control system, this street lamp control system comprises host computer, concentrator and Node Controller, and described host computer is connected by Ethernet, GPRS or cdma communication with more than one concentrator; Described concentrator is connected by RS485 interface communication with more than one Node Controller; Described Node Controller is used for being connected with streetlight control circuit, the method comprises the steps: that host computer sends the first control data to concentrator, concentrator sends the second control data to Node Controller after the first control data being processed, and Node Controller controls street lamp according to the second received control data; Described concentrator also sends the first feedback data to host computer, and Node Controller also sends the second feedback data to concentrator; Wherein, described first control data, the second control data, the first feedback data and the second feedback data are transmitted all as a data frame; The Frame of described first control data and the first feedback data comprises frame head, frame delineation territory, data field and postamble; Data field in described first control data and the first feedback data comprises control command and operand information; The Frame of described second control data and the second feedback data comprises frame head, data field and postamble, and the data field in described second control data and the second feedback data comprises control command and control object information.
Wherein in an embodiment, the data field in described first control data and the first feedback data comprises: command id, for representing feedback information and operator message; Main command, is used to indicate concentrator operation specified node controller, specified node controller group, all Node Controller or the operation of instruction concentrator self; Subcommand, is used to indicate concentrator self or performs concrete operation to Node Controller; Data length, for representing the length of data field; And data field, for representing operand information.
Wherein in an embodiment, the different numeric representations operation of described operator message is initiated by host computer, is initiated by concentrator, is initiated by local keys of key, initiated or initiated by task by note; The different numeric representation Frame of described feedback information is sent out, receive responsive feedback, successful operation feeds back and operation failure feeds back.
Wherein in an embodiment, described command id occupies a byte, wherein the low 4 bit representation operator messages of this byte, high 4 bit representation feedback informations.
Wherein in an embodiment, described first control data is used for execution and turns on light or turn off the light operation, and correspondingly, described subcommand is set to turn on light instruction numerical value or instruction numerical value of turning off the light, described data field comprises Node Controller mark, and turn on light data or data of turning off the light.
Wherein in an embodiment, if when described main command is set to be used to indicate concentrator operation specified node controller group, the Node Controller mark of described data field also comprises group mark.
Wherein in an embodiment, described first control data is for more than one in proceeding as follows: the information issuing the Node Controller of concentrator; Concentrator configuration or removing Node Controller; Read and issue Node Controller; The concentrator synchronization server time; Concentrator is restarted or is resetted; Obtain concentrator release information; Issue and inquire about concentrator parameter; Issue and inquire about concentrator operating parameter; Issue and inquire about host computer parameter; And the electric parameter of inquiry concentrator.
Wherein in an embodiment, described concentrator operating parameter comprises: autoboot time, communication time window, sending times, 485 electric meter address, phase shortage number of times, switching value number of times, patrol and examine number of times, burglar alarm number of times, underload warning, network latency window and heartbeat packet time window.
Wherein in an embodiment, the frame head in described second control data and the second feedback data comprises: start-of-frame, for representing the beginning of a frame; Address field, comprises Node Controller mark; And control code, represent control mode; Data field in described second control data and the second feedback data comprises: command code, represents control command or response instruction; Command parameter is the parameter of control command, or response instruction return numerical value.
Wherein in an embodiment, described control code is for representing that concentrator Controlling vertex controller, Node Controller return to the result of concentrator reported data or single-point configuration.
Wherein in an embodiment, the data field in described second control data and the second feedback data also comprises device code; Described second control data is used for that concentrator Controlling vertex controller is turned on light or turned off the light, Node Controller is to the version number of concentrator reported data and query node controller.
Above-mentioned method for controlling street lamps, the frame format of multiple necessary information is comprised by design, make between host computer and concentrator, to realize the transfer of data based on Ethernet, GPRS and cdma communication mode, and between concentrator and Node Controller, only use RS485 interface communication, therefore the number of connection between host computer and concentrator can greatly expand, therefore, it is possible to from the street lamp of PC control substantial amounts.In addition, during wireless transmission based on GPRS and CDMA, the deployment cost of cable can also be saved.
Accompanying drawing explanation
Fig. 1 is a kind of street lamp control system structure chart of the method for controlling street lamps being applicable to an enforcement;
Fig. 2 is the frame format schematic diagram of the first control data or the first feedback data;
Fig. 3 is the frame format schematic diagram of the second control data or the second feedback data.
Embodiment
As shown in Figure 1, for being applicable to a kind of street lamp control system structure chart of the method for controlling street lamps of an enforcement.This street lamp control system 10 comprises host computer 100, concentrator 200, Node Controller 300 and street lamp 400.Host computer 100 is connected by Ethernet, GPRS or cdma communication with more than one concentrator 200; Each concentrator 200 is connected by RS485 interface communication with more than one Node Controller 300; Each Node Controller 300 is connected with multiple street lamp 400.
Based on this street lamp control system 10, the method for controlling street lamps of the present embodiment comprises following key step.
Host computer 100 sends the first control data to concentrator 200, and concentrator 200 sends the second control data to Node Controller 300 after first control data being processed.Node Controller 300 controls street lamp 400 according to the second received control data.For described first control data, if desired, concentrator 200 also sends the first feedback data to host computer 100.For described second control data, if desired, Node Controller 300 also sends the second feedback data to concentrator 200.
The first above-mentioned control data, the first feedback data, the second control data and the second feedback data are transmitted all as a data frame.In the present embodiment, the first control data is identical with the frame format of the first feedback data, all comprises frame head, frame delineation territory, data field and postamble.
Particularly, as shown in Figure 2, be the frame format schematic diagram of the first control data or the first feedback data.
Frame head represents that a Frame is initial, and also namely data receiver, when frame head data being detected, namely knows that a Frame has started transmission.Normally, frame head data can not be identical with other data in Frame, to avoid the erroneous judgement of frame head.In the present embodiment, frame head occupies a byte, and its value can adopt 0xFFFE.
The every terms of information of frame delineation territory to Frame is described, and specifically comprises frame length, frame serial number, protocol version and Customer ID.Frame length represents the data length of whole frame.Frame serial number represents the numbering of initiator to frame.Protocol version is generally made up of binary-coded decimal, represents the protocol version of current use.
Data field comprises control command and operand information.Specifically comprise: command id, main command, subcommand, data length and data field.
Command id is for representing feedback information and operator message.The different numeric representations operation of described operator message is initiated by host computer, is initiated by concentrator, is initiated by local keys of key, initiated or initiated by task by note.The different numeric representation Frame of described feedback information is sent out, receive responsive feedback, successful operation feeds back and operation failure feeds back.Wherein local keys of key refers to the button on concentrator, by the Frame that the order of button operation generating run is relevant.Note refers to the short-message instruction that concentrator receives, and generates relevant Frame according to this short-message instruction.
In the present embodiment, described command id occupies a byte, wherein the low 4 bit representation operator messages of this byte, high 4 bit representation feedback informations.Particularly, as shown in the table.
Table 1
Such as, when command id is 0x00 (value of high 4 is 0x0, and the value of low 4 is 0x0), represent that notebook data frame is the Frame that host computer sends.When the value of high 4 of command id position 0x11(is 0x1, the value of low 4 is 0x1) time, represent that notebook data frame is the feedback frame that concentrator have received after a Frame.Above-mentioned combination should be significant, instead of combination in any.The 0x0 of such as high 4 can with the combination in any of low 4, and 0x1,0x2,0x3 of high 4 should combine with 0x0,0x1 of low 4.
Main command, for representing the operand of concentrator, can represent concentrator operation specified node controller, running node controller group respectively by different values, operate whole Node Controller and concentrator self operation etc.
In the present embodiment, described main command occupies a byte, represents multiple operand by different values.Shown in table specific as follows.
Table 2
Subcommand is used to indicate concentrator self or performs concrete operation to Node Controller.Such as turn on light, turn off the light.Subcommand needs to coordinate with main command and could represent a complete order, such as, when main command is that when indicating concentrator to operate certain Node Controller, subcommand can be order of turning on light or turn off the light.And when main command is concentrator self operation, subcommand can be that concentrator is restarted, resetted and the order such as inquiry.
In the present embodiment, subcommand occupies two bytes, and following table enumerates the implication of the various value that can get of the present embodiment subcommand and representative thereof.
Table 3
Command id, main command and subcommand get be worth accordingly time, just can represent various the first control data from host computer 100 to concentrator 200, or represent various the first feedback data feeding back to host computer from concentrator 200.Meanwhile, for various the first different control data and the first feedback data, the value of its data field represents different implications.Below in conjunction with table 1 and table 2, in his-and-hers watches 3, various concrete operational order illustrates one by one.In below illustrating, all omit frame head, the numerical value of frame delineation territory and postamble fills, mainly the various valued combinations of data field are described.
1, to turn on light operation.This operation is initiated by host computer 100, also can be initiated by autotask.Can also be operate initiation by note or local keys of key.
When operation is initiated by host computer 100, host computer 100 sends the first control data to concentrator 200, instruction concentrator 200 controls concrete Node Controller 300, concentrator 200 is to host computer 100 transmission and reception feedback frame, inform and receive this first control data, then perform operation of turning on light, and send operating result frame, teaching process result.Reception feedback frame and operating result frame all belong to the first feedback data.Host computer 100 can indicate concentrator 200 to operate specified node controller, running node controller group operates whole Node Controller.
Indicate concentrator 200 running node controller group for host computer 100, the value of each field of the concrete data field of the first control data is as shown in the table.
Wherein, command id is that 0x00 represents that host computer 100 sends this Frame, main command is that 0x82 represents concentrator running node controller group, subcommand be 0x0012 represent turn on light, data field comprises Node Controller mark (node UID) and data of turning on light.Data of turning on light occupy a byte, represent and perform to corresponding lamp operation of turning on light, represent and do not operate when being 0 when each (bit) in this byte is 1.
For this first control data, concentrator 200 is first to host computer 100 transmission and reception feedback frame.
Wherein command id high 4 be 1, low 4 without implication, expression receives feedback.
After concentrator 200 running node controller 300, further to host computer 100 transmit operation result frame.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r/0x3r | Data field length | |||
1B | 1B | 2Bs | 2Bs | 0~6KBs |
Wherein command id high 4 be 2 expression successful operations, be 3 expression operation failures.
When operation is initiated by autotask, only above-mentioned command id need be replaced with 0x04, and when corresponding control individual node controller, Node Controller group and whole Node Controller, main command is corresponding replaces with 0x81,0x82 and 0x83.
When operating by local keys of key or note initiation, above-mentioned command id is 0x02 or 0x03.Normally, these two kinds of modes of operation are all that therefore main command is all set to 0x83 usually for all Node Controllers.
When operate be not initiated by host computer 100 time, concentrator 200 need not send this reception feedback frame, but to host computer 100 transmit operation result frame, and can arrange corresponding command id, main command and subcommand in operating result frame.
2, to turn off the light operation.Operate roughly the same with turning on light, just subcommand is 0x0013, and 1 in the data of turning off the light of data field represent operation of turning off the light, 0 expression inoperation.
3, the information of the Node Controller of concentrator is issued.Specifically which street lamp is controlled based on understanding Node Controller 300 to the various operations of Node Controller 300, by giving Node Controller 300 certain meaning to Node Controller 300 times photos and sending messages.When host computer 100 needs to issue Node Controller information, realized by the first control data, the frame structure of the Frame of this first control data is as shown in the table.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x00 | 0x84 | 0x0026 | Data field length | |
1B | 1B | 2Bs | 2Bs | N*10Bs |
Wherein command id 0x00 represents that host computer 100 sends this Frame, and main command 0x84 represents that concentrator 200 self operates, and subcommand 0x0026 represents that host computer 100 issues the instruction of Node Controller information to concentrator 200.According to this instruction, the information in data field stores by concentrator 200.In the present embodiment, data field is the information that a segment table shows the Node Controller 300 be connected with concentrator 200 with 10 bytes.Specifically, the information of a Node Controller 300 comprises Node Controller mark, group # and device type.
Concentrator 200 responds this first control data, transmission and reception feedback frame.
4, concentrator configuration node controller.Host computer 100 sends the Frame of this instruction concentrator 200 configuration node controller 300, and carries configuration node information.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x0027 | ||
1B | 1B | 2Bs | 2Bs | 6Bs/0B |
Subcommand 0x0027 is expressed as the Frame for configuring, and configuration data is positioned at data field.This configuration data can be 6 byte datas for some Node Controllers 300, and now the data according to this 6 byte are configured certain Node Controller 300 corresponding by concentrator 200; Also can not comprise any data in this data field, now concentrator 200 is configured according to the above-mentioned Node Controller information issuing preservation all Node Controllers 300.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x3r | 0x84 | 0x0027 | ||
1B | 1B | 2Bs | 2Bs | N*6Bs |
When operation failure, command id is 0x3r, and data field only comprises the information of the Node Controller 300 of configuration failure.When successful operation, command id is 0x2r.
5, Node Controller information removed by concentrator.Substantially identical with configuration node controller 300, subcommand is set to 0x0028.Host computer 100 sends the Frame that Node Controller 300 removed by this instruction concentrator 200, and carries the information needing the Node Controller removed.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x0028 | ||
1B | 1B | 2Bs | 2Bs | 6Bs/0Bs |
Subcommand 0x0028 is expressed as the Frame for removing, and configuration data is positioned at data field.This configuration data can be 6 byte datas for some Node Controllers 300, and now concentrator 200 will delete the information of this Node Controller 300 in the above-mentioned Node Controller information issuing preservation; Also can not comprise any data in this data field, now concentrator 200 is by all above-mentioned Node Controller information issuing preservation of deletion.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
6, reading has issued Node Controller information.Host computer 100 reads the above-mentioned Node Controller information issued from concentrator 200.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back:
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x84 | 0x0029 | xxH | |
1B | 1B | 2Bs | 2Bs | N*10Bs |
During concentrator successful operation, to host computer transmit operation result frame, command id is 0x2r, and data field comprises the above-mentioned Node Controller information issued.During concentrator operation failure, command id is 0x3r.
7, concentrator and host computer lock in time.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x002a | xx | xx |
1B | 1B | 2Bs | 2Bs | 7Bs |
Title | Explanation | Length |
Year | By 1 byte representation side-play amount from 2000 | 1B |
Month | In month, use 1 byte representation | 1B |
Day | On the date, use 1 byte representation | 1B |
Week | In week, use 1 byte representation | 1B |
Time | Clock, uses 1 byte representation | 1B |
Point | Minute, use 1 byte representation | 1B |
Second | In second, use 1 byte representation | 1B |
Host computer 100 is to concentrator 200 transmitting time data, and instruction concentrator 200 regulates its temporal.Time data comprises within a data area, and specific to year, month, day, week, time, minute, second.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
8, concentrator is restarted.Host computer 100 or other orders initiator indicate concentrator 200 to restart.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | |
0x0r | 0x84 | 0x002B | 0 | |
1B | 1B | 2Bs | 2Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
9, concentrator resets.Host computer 100 or other orders initiator indicate concentrator 200 to reset.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | |
0x0r | 0x84 | 0x002E | 0 | |
1B | 1B | 2Bs | 2Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
10, concentrator release information is obtained.Host computer 100 requires that concentrator 200 returns version information.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | |
0x0r | 0x84 | 0x002C | 0 | |
1B | 1B | 2Bs | 2Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x84 | 0x002C | ||
1B | 1B | 2Bs | 2Bs |
During concentrator successful operation, will return operating result frame, its data field comprises concentrator release information.
11, concentrator parameter is issued.Host computer 100 shows to issue concentrator parameter to the Frame that concentrator 200 sends, and carries concentrator parameter information.Data field comprises concentrator parameters, is specially longitude, latitude, time zone, system time and light-operated period.Subcommand is set to 0x0036.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x0036 | ||
1B | 1B | 2Bs | 2Bs | 16Bs |
Title | Explanation | Length |
Longitude | To get after decimal 2 * 100 (-180.00-+180.00) integers again | 2Bs |
Latitude | To get after decimal 2 * 100 (-90.00-+90.00) integers again | 2Bs |
Time zone | -11-+12 integer | 1B |
System time | Diurnal on days Hour Minute Second | 7Bs |
The light-operated period | The beginning time-division terminates time-division integer | 4Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
12, concentrator parameter is inquired about.Host computer 100 inquires about concentrator parameter.
Subcommand is set to 0x0037.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x0037 | |||
1B | 1B | 2Bs | 2Bs | 16Bs |
Title | Explanation | Length |
Longitude | To get after decimal 2 * 100 (-180.00-+180.00) integers again | 2Bs |
Latitude | To get after decimal 2 * 100 (-90.00-+90.00) integers again | 2Bs |
Time zone | -11-+12 integer | 1B |
System time | Diurnal on days Hour Minute Second | 7Bs |
The light-operated period | The beginning time-division terminates time-division integer | 4Bs |
During concentrator successful operation, to host computer transmit operation result frame, its command id mark represents successful operation, and its data field comprises concentrator parameter information.
13, concentrator operating parameter is issued.The instruction concentrator 200 that host computer 100 issues carries out the parameter operated.The subcommand of the first control data is set to 0x0038, and carries this operational parameter information.Just operational parameter information specifically can comprise: autoboot time, communication time window, sending times, 485 electric meter address, phase shortage number of times, switching value number of times, patrol and examine number of times, burglar alarm number of times, underload warning, network latency, window heartbeat packet interval.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x0038 | ||
1B | 1B | 2Bs | 2Bs | 7Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
14, concentrator operating parameter is inquired about.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x84 | 0x0039 | ||
1B | 1B | 2Bs | 2Bs | 7Bs |
Title | Explanation | Length |
Phase shortage number of times | Send phase shortage when going wrong continuously to report to the police, give tacit consent to 3 times | 1B |
Switching value number of times | Send switching value when going wrong continuously to report to the police, give tacit consent to 1 time | 1B |
Patrol and examine number of times | Send not slave mode when going wrong continuously, give tacit consent to 6 times | 1B |
Burglar alarm number of times | Send burglar alarm when going wrong continuously, give tacit consent to 6 times | 1B |
Underload warning | Send light fixture underload warning when going wrong continuously, give tacit consent to 3 times | 1B |
Network latency | Unit is minute, is defaulted as 6 minutes | 1B |
Heartbeat packet interval | Unit is minute, is defaulted as 2 minutes | 1B |
During concentrator successful operation, command id is set to 0x2r, and comprises the concentrator operating parameter fed back to host computer 100 in data field, specifically as shown above.
15, host computer parameter is issued.Host computer 100 informs himself parameter to concentrator 200.The subcommand of the first control data is set to 0x003A, and carries host computer parameter information.Store after concentrator 200 receives.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x0r | 0x84 | 0x003A | ||
1B | 1B | 2Bs | 2Bs | 140Bs |
Shown in host computer parameter information table specific as follows.
Title | Explanation | Length |
The main IP of server | PC control uses | 30Bs |
Server IP for subsequent use | PC control uses | 30Bs |
Service-Port | PC control uses | 10Bs |
Ftp server IP | Concentrator software upgrading uses | 30Bs |
Ftp server port | Concentrator software upgrading uses | 8Bs |
Upgrade file name | Ftp server to be upgraded filename | 30Bs |
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
16, host computer parameter is inquired about.Host computer 100 inquires about host computer parameter to concentrator 200.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Main command | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x84 | 0x003B | ||
1B | 1B | 2Bs | 2Bs | 140Bs |
Command id is set to 0x2r, represents successful operation.Data field comprises host computer parameter, table specific as follows.
17, the electric parameter of concentrator is inquired about.Host computer 100 inquires about the electric parameter stored in concentrator 200 to concentrator 200.Concentrator 200 can hang the metrical instruments such as multiple intelligent electric meters below, and concentrator 200 can obtain electric parameter to these metrical instruments and store in a register.Host computer 100 can obtain these electric parameters by these registers of access.
Concentrator responds: concentrator 200 responds this first control data, transmission and reception feedback frame.
Concentrator feeds back: concentrator 200 feeds back host computer 100 according to operating result.
Command id | Order | Subcommand | Data length | Data field |
M | C | SC | L | PDT |
0x2r | 0x84 | 0x003C | ||
1B | 1B | 2Bs | 2Bs | RegNum*2Bs |
During concentrator successful operation, to host computer 100 transmit operation result frame, its command id is set to 0x2r, and data field comprises register data.
Be more than the various functions by the first control data and the realization of the first feedback data between host computer 100 and concentrator 200.The bid value that various operation configures can also have other the form of expression.
In addition, various control and Node Controller 300 feedback data of concentrator 200 pairs of Node Controllers 300 is realized between concentrator 200 and Node Controller 300 by the second control data and the second feedback data.Wherein the second control data and the second feedback data are all the form transmission of Frame.
As shown in Figure 3, be the frame format schematic diagram of the second control data and the second feedback data.
Frame head comprises start-of-frame, address field, control code and data length.Wherein starting character represents the beginning of a frame, and address field comprises Node Controller mark, and control code represents control mode.In the present embodiment, starting character can represent with 0x68; Control code gets 3 values, the control mode that expression three kinds is different respectively.
Data field comprises device code/device type, command code and command parameter.Device code is the coding carrying out between equipment distinguishing, and is sent, represent with DEV by Node Controller 300 to concentrator 200; Device type is also the coding carrying out between equipment distinguishing, and is sent, represent with DET by concentrator 200 to Node Controller 300.Command code is the response instruction to concentrator 200 of the control command of concentrator 200 pairs of Node Controllers 300 or Node Controller 300.Command parameter is the parameter of control command, or response instruction return numerical value.
The control of concentrator 200 pairs of Node Controllers 300 is mainly turned on light and turns off the light control.The following data according to field each in frame are described.
1, turn on light.
Control code (C) is set to 0x01, and command code (CMD) is set to 0x32, represents the operation of turning on light of corresponding street lamp, represent inoperation when being 0 when the data (PDT) of data field each (bit) is 1.
2, turn off the light.
With turn on light similar, command code (CMD) is set to 0x33.The data (PDT) of data field each (bit) represents the operation of turning off the light of corresponding street lamp when being 1, represent inoperation when being 0.
For the second control data comprising instruction of turning on light and turn off the light, Node Controller 300 transmission and reception feedback frame.Following table is the feedback frame for operation of turning off the light.It increases the field DET of device type in data field, and inserts corresponding value.Start-of-frame is identical with the second control data with control code, and address field UID is set to 0.
For turn on light operation Frame and this frame similar, be only that command code (CMD) is set to 0x32.
In addition, command code can also be other operational orders, such as query software version number etc.
Above-mentioned method for controlling street lamps, the frame format of multiple necessary information is comprised by design, make between host computer and concentrator, to realize the transfer of data based on Ethernet, GPRS and cdma communication mode, and between concentrator and Node Controller, only use RS485 interface communication, therefore the number of connection between host computer and concentrator can greatly expand, therefore, it is possible to from the street lamp of PC control substantial amounts.In addition, during wireless transmission based on GPRS and CDMA, the deployment cost of cable can also be saved.
The above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.
Claims (10)
1. a method for controlling street lamps, based on street lamp control system, this street lamp control system comprises host computer, concentrator and Node Controller, and described host computer is connected by Ethernet, GPRS or cdma communication with more than one concentrator; Described concentrator is connected by RS485 interface communication with more than one Node Controller; Described Node Controller is used for being connected with streetlight control circuit, and the method comprises the steps:
Host computer sends the first control data to concentrator, and concentrator sends the second control data to Node Controller after the first control data being processed, and Node Controller controls street lamp according to the second received control data; Described concentrator also sends the first feedback data to host computer, and Node Controller also sends the second feedback data to concentrator; Wherein, described first control data, the second control data, the first feedback data and the second feedback data are transmitted all as a data frame;
The Frame of described first control data and the first feedback data comprises frame head, frame delineation territory, data field and postamble; Data field in described first control data and the first feedback data comprises control command and operand information;
The Frame of described second control data and the second feedback data comprises frame head, data field and postamble, and the data field in described second control data and the second feedback data comprises control command and control object information;
Data field in described first control data and the first feedback data comprises:
Command id, for representing feedback information and operator message;
Main command, is used to indicate concentrator operation specified node controller, specified node controller group, all Node Controller or the operation of instruction concentrator self;
Subcommand, is used to indicate concentrator self or performs concrete operation to Node Controller;
Data length, for representing the length of data field; And
Data field, for representing operand information.
2. method for controlling street lamps according to claim 1, is characterized in that, the different numeric representations operation of described operator message is initiated by host computer, is initiated by concentrator, initiated by local keys of key, initiated or initiated by task by note; The different numeric representation Frame of described feedback information is sent out, receive responsive feedback, successful operation feeds back and operation failure feeds back.
3. method for controlling street lamps according to claim 2, is characterized in that, described command id occupies a byte, wherein the low 4 bit representation operator messages of this byte, high 4 bit representation feedback informations.
4. method for controlling street lamps according to claim 2, it is characterized in that, described first control data is used for execution and turns on light or turn off the light operation, correspondingly, described subcommand is set to turn on light instruction numerical value or instruction numerical value of turning off the light, described data field comprises Node Controller mark, and turn on light data or data of turning off the light.
5. method for controlling street lamps according to claim 4, is characterized in that, if when described main command is set to be used to indicate concentrator operation specified node controller group, the Node Controller mark of described data field also comprises group mark.
6. method for controlling street lamps according to claim 2, is characterized in that, described first control data is for more than one in proceeding as follows:
Issue the information of the Node Controller of concentrator;
Concentrator configuration or removing Node Controller;
Read and issue Node Controller;
The concentrator synchronization server time;
Concentrator is restarted or is resetted;
Obtain concentrator release information;
Issue and inquire about concentrator parameter;
Issue and inquire about concentrator operating parameter;
Issue and inquire about host computer parameter; And
The electric parameter of inquiry concentrator.
7. method for controlling street lamps according to claim 6, it is characterized in that, described concentrator operating parameter comprises: autoboot time, communication time window, sending times, 485 electric meter address, phase shortage number of times, switching value number of times, patrol and examine number of times, burglar alarm number of times, underload warning, network latency window and heartbeat packet time window.
8. method for controlling street lamps according to claim 1, is characterized in that, the frame head in described second control data and the second feedback data comprises:
Start-of-frame, for representing the beginning of a frame;
Address field, comprises Node Controller mark; And
Control code, represents control mode;
Data field in described second control data and the second feedback data comprises:
Command code, represents control command or response instruction;
Command parameter is the parameter of control command, or response instruction return numerical value.
9. method for controlling street lamps according to claim 8, is characterized in that, described control code is for representing that concentrator Controlling vertex controller, Node Controller return to the result of concentrator reported data or single-point configuration.
10. method for controlling street lamps according to claim 8, is characterized in that, the data field in described second control data and the second feedback data also comprises device code; Described second control data is used for that concentrator Controlling vertex controller is turned on light or turned off the light, Node Controller is to the version number of concentrator reported data and query node controller.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210508798.1A CN103025008B (en) | 2012-12-03 | 2012-12-03 | Street lamp control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210508798.1A CN103025008B (en) | 2012-12-03 | 2012-12-03 | Street lamp control method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103025008A CN103025008A (en) | 2013-04-03 |
CN103025008B true CN103025008B (en) | 2015-04-08 |
Family
ID=47972983
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210508798.1A Active CN103025008B (en) | 2012-12-03 | 2012-12-03 | Street lamp control method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103025008B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103248545B (en) * | 2013-05-28 | 2016-02-10 | 北京和利时电机技术有限公司 | The ethernet communication method and system of system are broadcast for dynamic cinema special efficacy |
CN104869735B (en) * | 2015-04-15 | 2017-08-29 | 四川华体照明科技股份有限公司 | A kind of road lamp network topology detection method |
CN105429796B (en) * | 2015-11-12 | 2019-03-29 | 鲁东大学 | A kind of remote-wireless retransmission method based on intelligent controller |
CN111225483A (en) * | 2020-01-19 | 2020-06-02 | 上海中天照明成套有限公司 | Remote illumination comprehensive control management system and control method thereof |
CN113115502A (en) * | 2021-04-19 | 2021-07-13 | 宁波公牛光电科技有限公司 | Lamp control device and system for controlling lamp |
CN113985785B (en) * | 2021-10-28 | 2024-04-23 | 中国计量大学现代科技学院 | Distributed electrical equipment operation state monitoring method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003143672A (en) * | 2001-10-31 | 2003-05-16 | Matsushita Electric Works Ltd | Time schedule display method in remote monitor control system |
CN101267703A (en) * | 2008-04-30 | 2008-09-17 | 张少甫 | An energy-saving street lamp brightness on-demand dynamic adjusting system and its control method |
CN102323796A (en) * | 2011-05-12 | 2012-01-18 | 东莞市诗玛电子有限公司 | Automatic control method and system |
CN102548146A (en) * | 2011-12-31 | 2012-07-04 | 深圳市致烨科技有限公司 | Single lamp-based city street lam rapid scene control method, controller and system |
CN102611755A (en) * | 2012-03-27 | 2012-07-25 | 杭州电子科技大学 | Communication method between road lamp and remote equipment in road lamp control system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101990334B (en) * | 2009-07-31 | 2013-08-14 | 宁波家天下智能系统有限公司 | Lamp control system, method thereof, main controller and lamp control terminal |
-
2012
- 2012-12-03 CN CN201210508798.1A patent/CN103025008B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003143672A (en) * | 2001-10-31 | 2003-05-16 | Matsushita Electric Works Ltd | Time schedule display method in remote monitor control system |
CN101267703A (en) * | 2008-04-30 | 2008-09-17 | 张少甫 | An energy-saving street lamp brightness on-demand dynamic adjusting system and its control method |
CN102323796A (en) * | 2011-05-12 | 2012-01-18 | 东莞市诗玛电子有限公司 | Automatic control method and system |
CN102548146A (en) * | 2011-12-31 | 2012-07-04 | 深圳市致烨科技有限公司 | Single lamp-based city street lam rapid scene control method, controller and system |
CN102611755A (en) * | 2012-03-27 | 2012-07-25 | 杭州电子科技大学 | Communication method between road lamp and remote equipment in road lamp control system |
Also Published As
Publication number | Publication date |
---|---|
CN103025008A (en) | 2013-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103025008B (en) | Street lamp control method | |
CN103761848B (en) | A kind of data concentrated collection copies control table system | |
CN103345845B (en) | A kind of traffic signal control system with self-healing function | |
CN110932952B (en) | Control system, control method and upgrading method of intelligent household product | |
US11497106B2 (en) | Road lighting management system | |
CN105005192A (en) | Pointer-type multifunctional intelligent clock | |
CN201464898U (en) | Intelligent household GSM remote monitoring system | |
CN105223882A (en) | A kind of public illumination intelligent monitoring system based on GPRS | |
CN201388325Y (en) | Streetlight illumination wireless network control system | |
CN207473357U (en) | The interconnected system and apparatus control system of facility information | |
CN102608972A (en) | Remote monitoring method for wine cabinets | |
CN208190687U (en) | Community personnel perceptron based on Internet of Things | |
CN110890986A (en) | ZIGBEE terminal based batch network distribution system and method | |
CN105188223A (en) | LED street lamp digital power supply parameter setting method | |
CN201667131U (en) | Signal machine supporting wireless communication and wireless control system based on signal machine | |
CN104780658A (en) | Wireless monitoring system for street lamps | |
CN103987152A (en) | Intelligent control module of intelligent illumination system | |
CN208890822U (en) | It is a kind of with the RFID electronic wiring frame system identified safely | |
CN108449434A (en) | A kind of building energy consumption data collecting system | |
CN208998954U (en) | Contact temperature monitoring system in a kind of high-tension switch cabinet | |
CN210670111U (en) | Be applied to communication debugging equipment of wisdom lamp pole | |
KR101697116B1 (en) | Method and apparatus for controlling represention object of street light control system | |
CN103763826A (en) | Method for mounting wireless lamp controller, mobile mounting device and lighting control system | |
CN204836647U (en) | Street lamp wireless monitoring system | |
CN207650854U (en) | A kind of solar powered electronic price label device based on Zigbee |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |