Along with the raising that science and technology development and people require automatization level, the control bus technology is just being played the part of more and more important role in some automated systems (for example domestic automation system).Since the 1970s and 1980s, famous control buss such as X-10, LonWorks and CEBus have more appearred thereafter in the Europe EIB system that just comes into vogue in the U.S., make automatic technology stride forward major step again.
In the control system of a bus type, each bus apparatus can be distributed in places different in the system, but all requires to link to each other with bus.Each links to each other with bus, can utilize bus communicate by letter (no matter being that data send or Data Receiving) equipment we all be referred to as " node " of bus.Bus node is divided into two big classes usually, and a class is used for the input of operational order, and for example control knob and numeric keypad, and the induction of some parameter/state or detection are as temperature/humidity sensor and infrared human body inductor.This category node all belongs to input equipment, can send signal to bus, and other node in the notice bus system " has certain control input or has certain situation to take place " etc.We are called " sensor " with this category node.As controlling input or having certain situation to take place, sensor will be when bus be sent signal, and we have just claimed this sensor quilt " triggering ".
We are referred to as " actuator " another kind of node, actuator can receive the signal from sensor from bus, when such signal occurs, actuator just can be analyzed this signal, see whether this signal is relevant with it, if relation is arranged, just actuator can be carried out corresponding operation, to finish a control procedure from the bus type that is input to output.Actuator is the output device on the bus in this sense.
Sensor in the control bus can send the data-signal that some are called " instruction code " to actuator in the past, and actuator just can be deciphered analysis to it after receiving these signals, and determined its output function according to the result who analyzes.In order correctly to transmit information, the instruction code of sensor must include the destination address of actuator, and actuator must be able to be understood the operational order in the instruction code.These destination addresses and operational order are that the user sets by " programming " when forming system, and they are stored among the interior nonvolatile memory (Nonvolatile Memories) of sensor usually, for example EEPROM, FLASH-ROM etc.We are referred to as " sensor is able to programme " system this type systematic.
When in the system more sensor being arranged, it is cumbersome that the programing work of sensor programmable system will become, in the time of for example in a system, will removing to control the same lamp (actuator) with three different local buttons (sensor), the user just has to simultaneously these three buttons be programmed, because these three buttons all must be programmable, this has increased the cost of system virtually.
In order to address this problem,, form the bus system of a kind of being called as " actuator is able to programme " so people have proposed another scheme again.This bus proposes programming is placed on the actuator, thereby sensor is simplified.In simple terms, all need not programming with this bus compatible sensor, the substitute is the packet of a default uniqueness in sensor, this packet is called as " event packet ".When sensor was triggered, this packet just was sent among the bus, and event data wraps in the propagation in the bus, representing in the system incident/ take place.Owing to there is not the intended target address, each actuator in the bus all can receive this packet simultaneously, and " knowing " has the generation of such " incident ".
Because a packet is represented an incident, and these incidents are not done clear and definite definition before, so we we can say that event packet itself there is no concrete implication.In order to make actuator produce correct " reaction " (operation) to this " incident ", the user must programme on actuator.Programing work divides two steps, at first will allow actuator read in the event packet of sensor, and then " illustrate " when it receives this packet to actuator should " how do i ", and actuator is preserved these data, and programing work is just accused and finished.
The actuator programmable system have one very unique distinction be exactly that an event packet of sensor can make a plurality of actuators produce different separately actions simultaneously.Suppose to have the one family cinema system, there are a sensor (control knob) and three actuators (being respectively lamp, curtain and audio-visual devices etc.) in this system, when control knob is pressed, representing the event packet of " entering the home theater state " just to be transmitted enters among the bus, this packet can make lamp dim simultaneously, curtain is shut, and audio-visual devices is opened etc. one by one, and each actuator can have different reaction (setting when the programming) to same event packet.Suppose that again a system has three sensors will control same actuator, then need only programme that the efficient of systems programming just has been enhanced virtually like this to this actuator.
Yet the number that also there is an actuator in its weak point, particularly system in actuator programmable bus system is more for a long time, the programing work complexity that just becomes, and cost also can correspondingly increase." sensor is able to programme " and " actuator is able to programme " similarly is that two on the balance stem are extreme, but each have their own relative merits always can't be in harmonious proportion the present situation of present control bus system that Here it is.
The object of the present invention is to provide the method and the formula control bus system of intermediary of the formula control transmission of a kind of intermediary, reduce the shortcoming and defect of aforementioned system by this, perhaps be at least users a kind of new selection is provided.
A kind of method that realizes that in including the formula control bus system of intermediary of sensor, intermediary device and actuator intermediary's formula control is transmitted may further comprise the steps:
The first step, default event packet in sensor, this packet is used to the incident of a precognition in the representative sensor;
In second step, when sensor was triggered, event packet just was conveyed among the system bus, and this event data wraps in the generation that propagation in the bus is used to represent this precognition incident;
In the 3rd step, when intermediary device receives event packet in bus after, just will be conveyed among the system bus with the pairing instruction code that includes destination address and operation instruction information of this event packet;
In the 4th step, when actuator received instruction code in bus after, this actuator was just operated output accordingly by the requirement of this instruction code, operated the overall process of transmitting from the control of actuator output thereby realize controlling from the sensor input.
The formula control bus system of intermediary of a kind of intermediary according to claim 1 formula control transmission method comprises
At least one sensor, this sensor comprises data sending device and register, has the event packet that is used for an incident of representative system in the register;
At least one intermediary device, this intermediary device comprises central processing unit or microcontroller, and be used to receive from the data sink of the Sensor Events packet of bus and be used to send and the corresponding data sending device that includes the actuator instruction code of destination address and operational order of this packet, and be used in the storage system from the destination address of the event packet of sensor and the hope of user's appointment and the actuator that these event packet are related and the erasable nonvolatile memory of operational order accordingly;
At least one actuator, this actuator comprise data sink and the instruction decoding device that is used to receive the actuator instruction code that is sent by intermediary device;
At least a transmission medium, this transmission medium couples together the sensor in the system, intermediary device and actuator, forms a complete distributed control bus system.The invention provides the formula control bus system of intermediary that a kind of intermediary formula is controlled the method for transmitting and utilized this method, it can be simplified sensor and actuator in a bus system simultaneously, thereby reduced the cost of system, while can also make system's composition become more flexible and be convenient, more is suitable for family and uses.
The present invention is further detailed explanation below in conjunction with drawings and Examples:
Fig. 1 is that a system of existing control bus technology " sensor is able to programme " forms synoptic diagram.We can see in the drawings a sensor and an actuator, and sensor and actuator interconnect by bus.Sensor has an input media (control knob) and a data dispensing device, and sensor contains can be by the instruction code of user program setting.Actuator then has an output unit (lamp control loop), a data receiving trap and an instruction decoding device.
We suppose that the control knob of sensor is the lamp control loop that is used for controlling actuator, and lamp is lighted when button is pressed, and lamp extinguishes when button discharges, and the steering logic relation in the system between the sensor and actuator is as shown in table 1:
Table 1
Sensor (able to programme) | Actuator |
Incident | The address | Instruction | The address | Instruction | Operation |
Button is pressed | A | I1 | A | I1 | Turn on light |
Button discharges | A | I2 | A | I2 | Turn off the light |
In the actuator hurdle, A is the address of actuator, and instruction I1 correspondence the operation of turning on light, and instruction I2 correspondence the operation of turning off the light, and I1 and I2 are default when actuator dispatches from the factory also to be solidificated among its translator.In the sensor hurdle, the content of address and instruction is variable (bracket representative programmable), and A and I1, I2 are by user's input when programming.
When the user pressed button, the data (instruction code) that sensor will include address A and instruction I1 sent on the bus; And when the user discharged button, the data (instruction code) that sensor will include address A and instruction I2 sent on the bus.Because address A is identical with the address of actuator, receives and identifies so instruction code can be performed device.Similarly, because the code translator of actuator is understood the implication of instruction I1 and I2, so actuator after receiving instruction code, can correctly be carried out corresponding output function.
Fig. 2 is that a system of existing control bus technology " actuator is able to programme " forms synoptic diagram.We can see in the drawings a sensor and an actuator, and sensor and actuator interconnect by bus.Sensor has an input media (control knob) and a data dispensing device, and sensor contains and the corresponding event packet of button, and these packets are default when equipment dispatches from the factory; " packet " and " output setting " that actuator then has an output unit (lamp control loop), data receiving trap and can be set by user program.
In this example, we suppose that the control knob of sensor is the lamp control loop that is used for controlling actuator, and lamp is lighted when button is pressed, and lamp extinguishes when button discharges, and the steering logic relation in the system between the sensor and actuator is as shown in table 2:
Table 2
Sensor | Actuator (able to programme) |
Incident | Packet | Packet | Operation |
Button is pressed | D1 | D1 | Turn on light |
Button discharges | D2 | D2 | Turn off the light |
In the sensor hurdle, event packet D1, D2 respectively corresponding two incidents, promptly button is pressed and is discharged, and when having these incidents to take place, corresponding D 1 or D2 will be conveyed among the bus.
In the actuator hurdle, packet and corresponding operation all can be set by user program, be set to D1, D2 respectively and turn on light, turn off the light in this example.When actuator received packet D1 that sensor sends or D2, this packet just was performed device and makes comparisons and confirm, and root should go executable operations according to operating and setting (turning on light/turn off the light) of packet correspondence, thereby the control procedure of system is achieved.
Fig. 3 is that the system of a kind of formula control bus system of intermediary of the present invention (intermediary device is able to programme) forms synoptic diagram.We find from figure, except that sensor and actuator, the node that also has an intermediary device by name in the system, this node is not the steering order that is used to import the user, the also non-operation that is used to carry out some essence, and just playing the part of the role of intermediary of similar " translater ", and just because of the role of this intermediary, make sensor and actuator in the system all can simplify simultaneously, thereby create the more simple and effective control system of a class.
The same with the sensor of Fig. 2, the sensor of Fig. 3 has an input media (control knob) and a data dispensing device, and sensor contains and the corresponding event packet of button; The actuator of this system then actuator with Fig. 1 is the same, and an output unit (lamp control loop), a data receiving trap and an instruction decoding device are arranged.And and Fig. 1, what Fig. 2 was different is that an intermediary device is arranged in Fig. 3, the existing data sink of this intermediary device, data sending device is arranged again, this data sink is used for receiving the event packet from sensor, and packet can be deposited into (normally EEPROM or FLASH-ROM etc.) among the nonvolatile memory in the intermediary device, the input when programming by the user is deposited in the another one effect of this nonvolatile memory, with the corresponding instruction code of event packet, these instruction codes include the destination address and the operational order of actuator, can send by dispensing device and enter among the bus, when corresponding actuator receives this instruction code, just go to carry out corresponding operation by the instruction in the code.
In this example, we suppose that equally the control knob of sensor is the lamp control loop that is used for controlling actuator, lamp is lighted when button is pressed, and lamp extinguishes when button discharges, and the steering logic relation in the system between sensor, intermediary device and the actuator is as shown in table 3:
Table 3
Sensor | Intermediary device (able to programme) | Actuator |
Incident | Packet | Packet | The address | Instruction | The address | Instruction | Operation |
Button is pressed | D1 | D1 | A | I1 | A | I1 | Turn on light |
Button discharges | D2 | D2 | A | I2 | A | I2 | Turn off the light |
In this system, the event packet of sensor and the operational order of actuator etc. has all preset (need not programme) when installing and using when product export, and unique what will programme is intermediary device.And the programming of intermediary device is very simple, as long as intermediary device reads in the event packet D1 and the D2 of sensor, and the destination address A of setting and D1 and the corresponding actuator of D2 and operational order I1 and I2 in programming process again, programming just announcement is finished.
We look at how signal transmits when pick up button is pressed and discharge again.When pick up button is pressed, the event packet D1 that is representing button to press just is conveyed among the bus, intermediary device receives behind the D1 the pairing instruction code that includes destination address A and operational order I1 of D1 is sent among the bus, this instruction code is received by the actuator of address by A, and carry out its operational order I1 (turning on light), realized the control procedure of user expectation; Similarly, when pick up button discharged, we can see similar above-mentioned " turning on light " operation process of " turning off the light ".We may safely draw the conclusion from above-mentioned analysis, and promptly sensor is realized by intermediary device the control of actuator.
Just can make sensors all in the system and actuator simplify (need not programming) simultaneously with an intermediary device, this is a characteristic of intermediary's formula control bus, the number of sensor, actuator is many more in the system, adopts the advantage of intermediary's formula bus just big more, and relative cost is also just low more.In an intelligent home system, need control or controlled node often to reach tens or tens, in these systems, use the preferable selection beyond doubt of intermediary's formula bus.
Above we have introduced notion, composition and the principle of intermediary device programmable system, below our parts structure of intermediary device one by one of looking at most critical in the system.Fig. 4 is a basic intermediary device block diagram, and the intermediary device among the figure has a bus interface, can receive and send data; A DLL (dynamic link library) or programmer are arranged, can import user's programming instruction; A display interface or display device are arranged, can show related parameter with convenient programming/control procedure; A central processing unit/microprocessor is arranged, and these parts are cores of intermediary device, coordinate the work of each associated components in the intermediary device; What link to each other with central processing unit/microprocessor also has erasable nonvolatile memory, and this storer is used for depositing the data of user program.
Certainly when introducing the basic structure of intermediary device, we should be understood that each actual intermediary device all has the different designs or the different forms of expression.Example intermediary device as shown in FIG. 5 just adopts computing machine to make programming and display device.This intermediary device is except having bus interface, central processing unit/microprocessor and erasable nonvolatile memory, and in order to be connected with computing machine, intermediary device has also comprised corresponding calculated machine interface.After programming was finished, we can also separate computing machine with intermediary device, and intermediary device still can normal operation (because programming data has deposited within the interior nonvolatile memory of intermediary device).
In Fig. 6, we have showed the intermediary device system construction drawing that another is practical, this intermediary device in design with the form of expression on different with Fig. 4, Fig. 5.It has separable intermediary device expansion module and programming/display device, in the time will carrying out systems programming, the work that must link together of these several parts, and after programming finishes, intermediary device just can separate with expansion module, intermediary device after the separation can work alone, and is playing the part of the role of an intermediary between sensor and actuator.
In Fig. 6, we find that intermediary device and expansion module all contain central processing unit/microprocessor, and can carry out data communication between these two parts.Infrared receiving device in the expansion module is equivalent to DLL (dynamic link library), and TV remote controller then is equivalent to programmer.Televisor itself is a display device, and the video/radio-frequency signal generator that joins with televisor has been a display interface then.It should be noted that, in the intermediary device expansion module, also include read-write storer, this storer can be deposited user's interim programming data, and these data finally can be sent to by the communication between central processing unit/microprocessor in the nonvolatile memory in the intermediary device and do nonvolatil preservation.Also has an infrared signal generator in addition in the expansion module, controlled televisor as display device (for example switch televisor or change the input pattern etc. of televisor) both can having sent control signal whenever necessary, can send undesired signal again, to stop the reception of televisor to other signal.The signal of infrared signal generator is exported by the infrared control line.
Fig. 7 is the circuit block-diagram of Fig. 6.We can see more specific circuit composition in the drawings.System bus 10 is made of a pair of twisted-pair feeder among the figure, the signal of sensor enters intermediary device by system bus 10, be sent to the central processing unit/microprocessor of intermediary device again by resistance 12, transistor 16 and pull-up resistor 14, and when the central processing unit/microprocessor of intermediary device had signal to send, signal then entered among the bus 10 by resistance 22, transistor 18 and pull-up resistor 20.
In Fig. 7,26 is infrared signal receiver, when infrared signal is imported, infrared signal is converted into digital signal and is sent in the central processing unit/microprocessor of expansion module, and the central processing unit/microprocessor of expansion module can also send control or undesired signal to televisor by resistance 32, transistor 30, infrared-emitting diode 28 and resistance 29, and wherein resistance 29 and infrared-emitting diode 28 are formed an infrared control line.24,34 is the crystal oscillator of central processing unit/microprocessor among the figure, and 36 is the video/radiofrequency signal lead-out terminal of expansion module.
Fig. 8 introduction be a control bus system of formula family of intermediary based on above-mentioned intermediary device principle.In Fig. 8, we can see that actuator has the lamp dimmer (Kai Heguan of control light, and light modulation etc.), infrared controller (control air conditioner and audio-visual devices etc.), appliance controller (Kai Heguan of control apparatus power supply), alarm controller (control hummer, the ringing and stop of warning signal etc.) etc., sensor then has electronic switch button (input user's steering order), security sensor (comprises the infrared human body inductor, gas leakage detector, smoke-detectors and door magnetic/window magnetic etc.), clock timer (regularly sending control signal), receiver of remote-control sytem (receiving user's telecommand).In different example application, it is different that used sensor and actuator perhaps have, but total principle is the same.
This system has adopted the intermediary device of band expansion module, and wherein televisor is a display device, and TV remote controller is a programmer, also comprises accessories such as infrared control line and video output cable in this external system.Special-purpose telepilot must be used with receiver of remote-control sytem among the figure, and it is equal to a sensor (control input).The telephone set that is connected with the intermediary device expansion module among the figure has two effects, and the one, the same as with TV remote controller programmer (importing programming instruction) with telephone keypad, the 2nd, be used as control device (sensor) as numeric keypad.Similarly, when intermediary device was not on the permanent staff the journey state, TV remote controller also can be used as controller (sensor) and uses.
We introduce a kind of Sensor Events data packet format that is applicable to intermediary's formula bus system at last, as shown in table 4 and a kind of actuator instruction code form that is applicable to intermediary's formula bus system, as table 5:
Table 4
The sensor identifier | Device class | The loop numbering | Node ID (status code) | Test |
A byte | A byte | A byte | Four bytes | A byte |
Table 5
The actuator identifier | Device class | The loop numbering | Destination address | Operational order | Test |
A byte | A byte | A byte | Two bytes | Two bytes | A byte |
In table 4, table 5, we find that its first byte all is used as identifier, are used for distinguishing these data and are from the event packet of sensor or will deliver to the instruction code of actuator.Event packet implicit nodes ID (node status code), oneself is preset in the sensor and guarantees the ID difference of each sensor these node ID when dispatching from the factory, thereby guarantees the uniqueness of each sensor node.The destination address and the corresponding operational order that in the instruction code data, then include actuator.Whether event packet and instruction code all have data and test function, effective to differentiate data, prevent that data from error occurring and causing the appearance of system misoperation in transmission course.