Summary of the invention
The object of the present invention is to provide a kind of concentrating-distributed wireless control system, the distributed wireless control system that being intended to solve prior art provides can not realize can not realizing between Long-distance Control and master controller and the slave controller problem of data parameters redundancy backup through wireless mode.
The present invention is achieved in that a kind of concentrating-distributed wireless control system, and said system comprises master controller, a plurality of slave controller, receives the central controlled a plurality of wireless devices of said master controller:
Said master controller is connected through the local area control bus with said a plurality of slave controllers, forms and concentrates-distributed frame;
Said a plurality of wireless device is communicated by letter with said master controller through wireless mode;
Said master controller stores the control code table and the controlled variable of self control code table and controlled variable and said a plurality of slave controllers; With when slave controller breaks down, the control code table of self and the control code table and the controlled variable of controlled variable and this slave controller are transferred to this slave controller through the local area control bus;
Said slave controller stores the control code table and the controlled variable of self control code table and controlled variable and said master controller;
Said master controller also is used for when self breaks down, and receives self control code table and the control code table and the controlled variable of controlled variable and said master controller of said a plurality of slave controller transmission through the local area control bus;
Said control code table is address pairing and the state of a control information that said system binding procedure produces.
Another object of the present invention is to provide a kind of master controller, said master controller comprises:
Microprocessor; Be used to store the control code table and the controlled variable of self control code table and controlled variable and a plurality of slave controllers; With when slave controller breaks down, the control code table of self and the control code table and the controlled variable of controlled variable and slave controller are transferred to slave controller through the local area control bus; Also be used for when master controller self breaks down, receive control code table and the control code table and the controlled variable of controlled variable and a plurality of slave controllers of the master controller of a plurality of slave controllers transmission through the local area control bus;
With the wireless transceiver that said microprocessor is connected, be used for the parameter that learning state is provided with in parameter that the wireless device in the whole wireless network of the wireless receiving district uploads and order and the whole wireless network of the emission district, and transfer to LAN;
Said master controller and a plurality of slave controller are formed concentrated-distributed frame;
Said control code table is address pairing and the state of a control information that said system binding procedure produces.
Another object of the present invention is to provide a kind of slave controller, said slave controller comprises:
Microprocessor; Be used to store the control code table and the controlled variable of self control code table and controlled variable and master controller; With when master controller breaks down, the control code table of master controller and the control code table and the controlled variable of controlled variable and this controller self are transferred to master controller through the local area control bus; Also be used for when said slave controller self breaks down, receive control code table and the control code table and the controlled variable of controlled variable and this slave controller of the master controller of master controller transmission through the local area control bus;
Said slave controller and master controller are formed concentrated-distributed frame;
Said control code table is address pairing and the state of a control information that said system binding procedure produces.
In the present invention, master controller and each slave controller all store control code table of self and controlled variable and the other side's control code table and controlled variable, break down after control code table or controlled variable be destroyed or lose a side; Perhaps after changing master controller or slave controller, can by the other side through the local area control bus transfer should the side control code table or controlled variable to this side, the automatic recovery of realization controller; System maintenance is convenient unusually; In addition, because the local area control bus generally adopts cheap and simple and easy-on twisted-pair feeder thereof with each slave controller chain serial connection, few with the line amount; Easy for installation saving trouble saved system cost.
Embodiment
In order to make the object of the invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with accompanying drawing and embodiment.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
In embodiments of the present invention, master controller and each slave controller all store control code table of self and controlled variable and the other side's control code table and controlled variable, break down after control code table or controlled variable be destroyed or lose a side; Perhaps after changing master controller or slave controller, can by the other side through the local area control bus transfer should the side control code table or controlled variable to this side, the automatic recovery of realization controller; System maintenance is convenient unusually; In addition, because the local area control bus generally adopts cheap and simple and easy-on twisted-pair feeder thereof with each slave controller chain serial connection, few with the line amount; Person's thing easy for installation is saved system cost.
Fig. 1 is the structural representation of concentrating of providing of the embodiment of the invention-distributed wireless control system, for the ease of explanation, only shows the relevant part of the embodiment of the invention.In the present embodiment, this concentrated-distributed wireless control system comprises: the master controller 11, a plurality of slave controller 12 and a plurality of wireless device 13 that comprise a microprocessor 111 and a wireless transceiver 112.The band wireless transceiver 112 master controller 11 and a plurality of not with between the slave controller 12 of wireless transceiver 112 by the local area control bus (for example; CAN bus, RS232 bus, RS485 bus and Modbus etc.; In the present embodiment, adopt the CAN bus) connect, form and concentrate-distributed frame.In addition, master controller 11 is shared a wireless transceiver 112 with a plurality of slave controllers 12, with wireless device 13, forms wireless-wired hybrid Control Network like switch, sensor and other network equipment etc.
Wherein, master controller 11 can have one or more independently control channel with each slave controller 12, to satisfy the demand for control in a room or zone.In addition; The scope that each slave controller 12 that distributes and the distance between the master controller 11 generally should can reach in wireless telecommunications; Except carrying out each passage of master controller 11 the direct controlled in wireless with the master controller 11 direct wireless devices of binding 13 (such as switch and sensor); The signal that each wireless device 13 sends to slave controller 12 is the wireless transceiver 112 through master controller 11 earlier, and then is sent to slave controller 12 through the local area control bus.
In embodiments of the present invention; The microprocessor 111 of master controller 11 stores the control code table and the controlled variable of control code table and controlled variable and a plurality of slave controller 12 of master controller 11; When slave controller 12 breaks down; Microprocessor 111 is transferred to slave controller 12 through the CAN bus with the control code table of the master controller 11 of storage and the control code table and the controlled variable of controlled variable and slave controller 12; Simultaneously; When master controller 11 self breaks down, also can receive the control code table and the control code table and the controlled variable of controlled variable and each slave controller 12 of the master controller 11 of slave controller 12 transmission through the CAN bus, realize that control code table and controlled variable can recoveries automatically from other controller.
Wherein, the control code table is that the concrete operations demand according to different user produces, and does not have the wireless control system of control code table to can be compared to the computing machine that does not have software, can not offer the user and use.In case the equipment of storage control code table is destroyed or changed to the control code indumentum; The control code table just need be provided with again; The people that this work generally needs the professional or has a capability does, and be arranged to system control mode and pattern identically with originally, and this also requires the staff to know how original system binds; This can bring very burden in many cases, and cost is also very high.
Concrete binding procedure is exactly to connect each control element of not contact to accomplish predefined control function and effect.With a Lighting Control Assembly is example, and control system is by switch, various sensors, and lamp controller, and by gateway, the wireless and wired system that router, network controller and bus and host computer or the like are formed is formed.Task and effect that binding procedure will be accomplished are specially:
1, the switch of transmitting control commands or send the sensor (illuminance sensor, human body sensor etc.) of data and lamp controller and carry out related (be exactly in simple terms define which switch or signal controlling street lamp any) as receiving end.Normally realize through binding the address code of the address code of switch and sensor and controller.If transmitting terminal and receiving end have a plurality of application endpoints, binding so should be between each application endpoints:
Raw address: application endpoints-destination address: application endpoints
2, binding can be one-to-many or many-one, to realize the dirigibility of control.For example: a switch control multi-lamp, or lamp of a plurality of switch control.
3, scene control setting, promptly many (road) lamps of a switching signal are set to a predetermined brightness pattern.
4, control model setting.
5, the address pairing and the state of a control information of binding procedure generation generate so-called " control code table " (Binding Table).Different according to wireless control system technology and agreement, the control code table can be stored in transmitting terminal, and receiving end perhaps is stored in transmitting terminal and receiving end simultaneously.
Can find out that from above-mentioned description the binding procedure before the generation control code table is complicated unusually, artificial realization to bind recovery system, bother very much to original control function and effect.In the present embodiment; The master controller 11 that provides stores self and the control code table of far-end slave controller 12, breaks down at slave controller 12, after the control code indumentum is destroyed or lost; Perhaps after changing slave controller; Can realize the automatic recovery of slave controller 12 control code tables by control code table to the slave controller 12 of master controller 11 control code table and the master controller 11 through local area control bus transfer slave controller 12 self, system maintenance is convenient unusually.
In addition; In embodiments of the present invention; Slave controller 12 comprises microprocessor 121; This microprocessor 121 stores the control code table and the controlled variable of control code table and controlled variable and this slave controller 12 self of master controller 11, and when master controller 11 broke down, microprocessor 121 was transferred to master controller 11 through the CAN bus with the control code table and the controlled variable of the control code table of the master controller 11 of storage and controlled variable and this slave controller 12 self; Simultaneously; When slave controller 12 self breaks down, also can receive the control code table and the control code table and the controlled variable of controlled variable and this slave controller 12 of the master controller 11 of master controller 11 transmission through the CAN bus, because slave controller 12 stores the control code table and the controlled variable of self and far-end master controller 11; Break down at master controller 11; After control code table or controlled variable are destroyed or lose, perhaps after changing master controller, can be by the control code table and controlled variable to the master controller 11 of control code table and controlled variable and the slave controller 12 of slave controller 12 through local area control bus transfer master controller 11 self; Realize the automatic recovery of master controller 11 control code tables and controlled variable, system maintenance is convenient unusually.
A plurality of wireless devices 13 are communicated by letter with the wireless transceiver 112 of master controller 11 through wireless mode; Each wireless device 13 is handled the operational code in the operational code section separately on master controller 11; Because the control code table of master controller 11 of the present invention and slave controller 12 is classifications; Make in a radio network controller operational code section of dividing a plurality of wireless devices 13; In all wireless zones under the control of each user terminal can be distributed in the zone like this, both improved the speed of searching of operational code, reduced again master controller, slave controller and with each wireless device 13 between the conflict of communicating by letter.In addition; The microprocessor 111 of the master controller that how much depends on selection of the number of on-the-spot installable wireless device 13 and microprocessor 121 storage spaces of a plurality of slave controllers 12 have much (also can expand inadequately), and only use a wireless transceiver 112 in the system in The whole control zone.
Wherein, Wireless device 13 can be the wireless device of wireless and passive; Also can be the wireless device that only possesses radio characteristics, when this wireless device does not possess sourceless characteristic, come working power to be provided to wireless device 13 by " power taking " principle of slave controller nearby 12 or master controller 11.
The master controller 11 in the embodiment of the invention and the control code table (Binding Table) of each slave controller 12 and controlled variable are to be stored in master controller 11 and the slave controller 12 redundant intersection of distribution; Behind any one out of order controller, the control code table can recover from other controller automatically in the controller replacement system of new no any memory.Relatively in the past, when controller broke down, wherein all information of storage can be lost, and system need be provided with (Binding) again, and the redundant storing mode that intersects of the distribution of this control code table and controlled variable brings great convenience to system maintenance; In addition, be that the concentrating of center-distributed wireless control system has combined " wireless " and " wired " two kinds of communication modes advantage separately effectively with the master controller, (controller arrives numerous wireless devices to the communication of " planar "; Such as switch and sensor) adopted wireless mode, and local bus mode (for example, CAN bus, RS232 bus, RS485 bus and Modbus etc.) has been adopted in the communication (Controller-to-Controller) of " wire "; On the one hand the on line between each opertaing device of system is significantly reduced; Practiced thrift material and installation work-hour expense, on the other hand, because the local area control bus generally adopts cheap and simple and easy-on twisted-pair feeder thereof with each slave controller chain serial connection; Few with the line amount; Easy for installation saving trouble, in addition, the shared wireless transceiver of master controller and a plurality of slave controller; This has just saved installs expensive wireless transceiver on each slave controller, reduced system cost significantly.
Fig. 2 is the structured flowchart of the master controller that provides of the embodiment of the invention, for the ease of explanation, only shows the relevant part of the embodiment of the invention.In the present embodiment, this master controller comprises: microprocessor 21, wireless transceiver 22, key functional module 23, field channels drive module 24, bus driver module 25, power module 26 and indicating module 27.
Wherein, Key functional module 23 drives module 24 with microprocessor 21, field channels and power module 26 is connected respectively; Be used to realize channel selecting, study and erasing of information; Guarantee that with this controll plant on each passage by client's the will state of finishing the work, the phenomenon of mistake control can not take place each other.
Field channels drives module 24 and is connected respectively with power module 26 with microprocessor 21, is used to drive key functional module 23 selected passages.
Bus driver module 25 is connected respectively with power module 26 with microprocessor 21, is used to drive the CAN bus.
Power module 26 drives module 24, bus driver module 25 and indicating module 27 with microprocessor 21, wireless transceiver 22, key functional module 23, field channels and is connected respectively, is used to provide the working power of these modules.
Indicating module 27 is connected with microprocessor 21, is used to indicate the selection and the duty of each passage.
Wherein, microprocessor 21 comprises: storage unit, transmission unit.
Wherein, storage unit is used to store the control code table and the controlled variable of control code table and controlled variable and a plurality of slave controllers of master controller;
Transmission unit is used for when slave controller breaks down; Through the CAN bus control code table of the master controller of storage and the control code table and the controlled variable of controlled variable and slave controller in the storage unit 111 are transferred to slave controller; Simultaneously; When master controller self breaks down; Also can receive the control code table and the control code table and the controlled variable of controlled variable and each slave controller of the master controller of slave controller transmission through the CAN bus, realize that control code table and controlled variable can recoveries automatically from other controller.
Fig. 3 is the structured flowchart of the slave controller that provides of the embodiment of the invention, for the ease of explanation, only shows the relevant part of the embodiment of the invention.In the present embodiment, this slave controller comprises: microprocessor 31, key functional module 32, field channels drive module 33, bus driver module 34, power module 35 and indicating module 36.
Wherein, Key functional module 32 drives module 33 with microprocessor 31, field channels and power module 35 is connected respectively; Be used to realize channel selecting, study and erasing of information; Guarantee that with this controll plant on each passage by client's the will state of finishing the work, the phenomenon of mistake control can not take place each other.
Field channels drives module 33 and is connected respectively with power module 35 with microprocessor 31, is used to drive key functional module 32 selected passages.
Bus driver module 34 is connected respectively with power module 35 with microprocessor 31, is used to drive the CAN bus.
Power module 35 drives module 33, bus driver module 34 and indicating module 36 with microprocessor 31, key functional module 32, field channels and is connected respectively, is used to provide the working power of these modules.
Indicating module 36 is connected with microprocessor 31, is used to indicate the selection and the duty of each passage.
Wherein, microprocessor 31 comprises: storage unit 311 and transmission unit 312.
Wherein, storage unit 311 is used to store the control code table and the controlled variable of control code table and the controlled variable and the slave controller self of master controller;
Transmission unit 312 is used for when master controller breaks down; Through the CAN bus control code table of the master controller of storage and the control code table and the controlled variable of controlled variable and slave controller self in the storage unit 311 are transferred to master controller; Simultaneously; When himself breaks down; Also can receive the control code table and the control code table and the controlled variable of controlled variable and this slave controller of the master controller of master controller transmission through the CAN bus, realize that control code table and controlled variable can recoveries automatically from other controller.
In embodiments of the present invention; Master controller and each slave controller all store the control code table of self and controlled variable and the other side's control code table and controlled variable, break down after control code table or controlled variable be destroyed or lose perhaps behind replacing master controller or slave controller (through monitoring check code) a side; Can by the other side through the CAN bus transfer should the side the control code table to this side; Realize the automatic recovery of controller, system maintenance is convenient unusually, in addition; Can realize the communication between master controller and the wireless device through wireless mode; The parameter that learning state is provided with in the parameter that the wireless device of master controller in can the whole wireless network of wireless receiving district uploaded and order and the whole wireless network of the emission district, and transfer to LAN, realized centralized control.
In a word; The embodiment of the invention is carried out organic cooperation with wired communication protocol and wireless new communication protocol; Realize the method for wire communication and radio communication parallel transmission and diagnose and predict scheduling based on function code table; But the field device hommization is arbitrarily added in the existing control system, needed upgrade controller or during the controller that more renews, system still supports the new traffic agreement; Master controller and slave controller are concentrated diagnosis and are disperseed diagnosis also can add control system to set up efficiently between device and the diagnostic monitoring at the scene; Real-time communication path, and in same application, its reliability increases; Simple installation, cost reduces greatly; Each wireless device and controller are through wireless mode communication, and the on line between each opertaing device of system is significantly reduced, and have practiced thrift material and installation work-hour expense, in addition, only use a wireless transceiver in the system in The whole control zone, save cost; Adopt the local area control bus to connect master-slave controller; Can avoid the interactive request of upstream and downstream function code table and produce error code; In addition; Because the local area control bus generally adopts cheap and simple and easy-on twisted-pair feeder thereof with each slave controller chain serial connection, and is few with the line amount, easy for installation saving trouble; Each wireless device is handled the operational code in the operational code section separately on master controller; Because the control code table of master controller and slave controller is classification; Make the control of each user terminal can be distributed in all affiliated in zone wireless zones; Both improve the speed of searching of operational code, reduced the conflict of communicating by letter between each wireless control apparatus of master controller, slave controller and place thereof again; Use product that the present invention produced and can be widely used in building control and robotization, industrial automation, agricultural automation, environmental monitoring or the like.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.