CN111459853A - Relay equipment control system and method - Google Patents
Relay equipment control system and method Download PDFInfo
- Publication number
- CN111459853A CN111459853A CN202010322630.6A CN202010322630A CN111459853A CN 111459853 A CN111459853 A CN 111459853A CN 202010322630 A CN202010322630 A CN 202010322630A CN 111459853 A CN111459853 A CN 111459853A
- Authority
- CN
- China
- Prior art keywords
- relay
- control
- instruction
- message
- message queue
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/542—Event management; Broadcasting; Multicasting; Notifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/54—Indexing scheme relating to G06F9/54
- G06F2209/548—Queue
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0002—Serial port, e.g. RS232C
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L2012/40208—Bus networks characterized by the use of a particular bus standard
- H04L2012/40215—Controller Area Network CAN
Abstract
The invention discloses a relay equipment control system and a method, wherein the system comprises the following components from top to bottom: the upper application framework layer is used for managing and controlling the access of the application software, distributing legal service requests provided by the upper application to the functional sub-modules of the corresponding business operation layer, and simultaneously feeding back the state information of the functional sub-modules to the upper application software; the service operation layer is used for receiving a protocol instruction sent by upper application software, caching the protocol instruction to a message queue, monitoring an external dry contact point to generate a control instruction, caching the control instruction to the message queue, acquiring data from the message queue, analyzing the data according to corresponding configuration parameters, and controlling the disconnection/suction of each path of relay of a corresponding channel according to an analysis result; the real-time operating system layer consists of a real-time operating system microkernel, a file system, a common function library and a hardware driver, and provides various services such as task synchronization, task communication, data storage and peripheral access required by a real-time task upwards.
Description
Technical Field
The invention relates to the technical field of intelligent home, in particular to a relay equipment control system and method applicable to an intelligent home system.
Background
With the continuous development of scientific technology and the improvement of living standard of people, more and more household devices enter thousands of families, meanwhile, people also put forward higher requirements on the quality of life, and manual control of various household devices makes people feel troublesome, so that the intelligent household system is ready to operate.
The relay is an electric control device, and when the change of the input quantity in the relay reaches the specified requirement, the controlled quantity can be enabled to generate a preset step change in an electric output circuit. It is an automatic switch which uses small current to control large current operation, so it plays the role of automatic regulation, safety protection and switching circuit in the circuit. The relay is widely applied to various electrical equipment of the smart home.
However, at present, relay equipment on the market CAN only be controlled through a single control interface, an RS485 Bus interface or a CAN-Bus interface, that is, a main control panel intelligently issues various command messages through the single RS485 Bus interface or the CAN-Bus interface to control the corresponding relay, and the control mode is single, so that flexible control over external electric equipment cannot be realized.
Disclosure of Invention
In order to overcome the defects of the prior art, the invention aims to provide a relay control system and a method thereof, so as to provide a relay control device which has simple structure, flexible control mode and strong expansibility and can meet the complex application requirements, thereby realizing flexible control of external electrical equipment.
To achieve the above and other objects, the present invention provides a relay device control system, comprising, from top to bottom:
the upper application framework layer is used for managing and controlling the access of the application software, distributing legal service requests provided by the upper application to the functional sub-modules of the corresponding business operation layer, and simultaneously feeding back the state information of the functional sub-modules to the upper application software;
the service operation layer is used for receiving a protocol instruction sent by upper application software, caching the protocol instruction to a message queue, monitoring an external dry contact point to generate a control instruction, caching the control instruction to the message queue, acquiring data from the message queue, analyzing the data according to corresponding configuration parameters, and controlling the disconnection/suction of each path of relay of a corresponding channel according to an analysis result;
the real-time operating system layer consists of a real-time operating system microkernel, a file system, a common function library and a hardware driver, and provides various services such as task synchronization, task communication, data storage and peripheral access required by a real-time task upwards.
Preferably, the service operation layer includes:
the main contact signal monitoring unit is used for monitoring signals of an external main contact in real time, and generating a corresponding control instruction to the data receiving unit according to the configuration parameters when a trigger signal of the external main contact is detected;
the parameter configuration unit is used for receiving configuration parameters issued by the configuration end;
the data receiving unit is used for receiving a protocol instruction issued by the upper-layer master control and a control instruction generated by the trunk node signal monitoring unit and caching the control instruction to a message queue;
the data analysis unit is used for analyzing the message instructions in the message queue according to the message queue and the configuration parameters, and transmitting the result to the relay channel control module;
the relay channel control module is used for correspondingly controlling each channel of the relay according to the analysis result of the data analysis unit and feeding back the control result to the message response module;
and the message response module is used for generating a corresponding response message instruction according to the control result of the relay channel control module and feeding back the response message instruction to the upper-layer main control.
Preferably, the data receiving unit receives a protocol instruction sent by an upper layer master control through a CAN-Bus interface and/or an RS485 Bus interface.
Preferably, the relay device control system further includes a key signal monitoring unit, configured to monitor each physical key signal corresponding to each relay, generate a corresponding control instruction, and submit the control instruction to the data receiving unit.
Preferably, different priorities are given to the message instructions corresponding to the various operation modes in advance, and the data receiving unit buffers the received message instructions to the message queue according to the priorities of the message instructions.
Preferably, the priority of the message instruction corresponding to each operation mode is sequentially a control instruction generated by a physical key of each relay, a control instruction generated by an external dry contact, a CAN-Bus control protocol instruction and an RS485 control protocol instruction from high to low.
Preferably, the message response module feeds back the state of each path of relay to the upper-layer master control through the CAN-Bus and the RS485 Bus, and the feedback relay state message contains a state synchronization packet and associated equipment information.
Preferably, when a certain external dry contact is configured as an emergency mode switch through the parameter configuration unit, and when the dry contact signal monitoring unit monitors the signal triggering of the dry contact, a triggering control instruction of an emergency mode is generated to the data receiving unit, and after the signal triggering is analyzed by the data analyzing unit, a complete closing instruction is broadcasted to terminal equipment on the whole Bus through the CAN-Bus and the RS485 Bus.
Preferably, adjacent relays will turn on the relay function and forward the all-off command.
In order to achieve the above object, the present invention further provides a relay device control method, including the steps of:
step S1, receiving configuration parameters sent by a configuration end;
step S2, receiving protocol commands issued by upper layer main control in real time and caching the protocol commands to a message queue, monitoring signals of the external dry contact in real time, and generating corresponding control commands according to configuration parameters and caching the control commands to the message queue when detecting trigger signals of the external dry contact;
step S3, according to the message queue, analyzing the message instruction in the message queue according to the configuration parameter, and transmitting the result to the relay channel control module;
and step S4, the relay channel control module correspondingly controls each channel of the relay according to the analysis result, and feeds back the control result to the upper main control through the message response module.
Compared with the prior art, the relay equipment control system and the method receive the configuration parameters issued by the configuration end through the parameter configuration unit, the data receiving unit receives the protocol instructions issued by the upper main control in real time and caches the protocol instructions to the message queue, monitors the signals of the external dry contact in real time, generates corresponding control instructions according to the configuration parameters when the trigger signals of the external dry contact are detected and caches the control instructions to the message queue, the data analyzing unit analyzes the message instructions in the message queue according to the configuration parameters according to the message queue and transmits the results to the relay channel control module, the relay channel control module correspondingly controls each channel of the relay according to the analysis results and feeds back the control results to the upper main control through the message response module The relay control equipment can meet the complex application requirements so as to realize flexible control of external electrical equipment.
Drawings
FIG. 1 is a system architecture diagram of an embodiment of a relay device control system of the present invention;
fig. 2 is a schematic structural diagram of a service operation layer in an embodiment of the present invention;
FIG. 3 is a flow chart of steps of a relay device control method of the present invention;
FIG. 4 is a flowchart illustrating a command message receiving and parsing process according to the present embodiment;
FIG. 5 is a flow chart of the dry contact signal monitoring in the present embodiment;
FIG. 6 is a flow chart illustrating the monitoring of the key signal according to the present embodiment;
fig. 7 is a flow chart of issuing configuration parameters in the present embodiment;
fig. 8 is a flow chart of system monitoring in this embodiment.
Detailed Description
Other advantages and capabilities of the present invention will be readily apparent to those skilled in the art from the present disclosure by describing the embodiments of the present invention with specific embodiments thereof in conjunction with the accompanying drawings. The invention is capable of other and different embodiments and its several details are capable of modification in various other respects, all without departing from the spirit and scope of the present invention.
Fig. 1 is a system architecture diagram of a relay device control system according to the present invention. As shown in fig. 1, a relay apparatus control system of the present invention includes:
the upper application framework layer 10 is responsible for managing and controlling access and access of application software, distributing legal service requests provided by the upper application to the functional sub-modules of the corresponding business operation layer 20, and feeding back state information of the functional sub-modules to the upper application software. In the embodiment of the present invention, since the design of the upper application framework layer 10 is the prior art, it is not described herein.
The real-time operating system layer 20 is composed of modules such as a real-time operating system microkernel, a file system, a common function library, a hardware driver and the like, and provides various services such as task synchronization, task communication, data storage, peripheral access and the like required by a real-time task upwards. In the embodiment of the present invention, the real-time os layer 20 is designed in the prior art, and will not be described herein.
And the service operation layer 30 is used for receiving a protocol instruction issued by upper application software and monitoring a control instruction generated by an external dry contact point to cache the protocol instruction and the control instruction to a message queue, acquiring data from the message queue, analyzing the data according to corresponding configuration parameters, and opening/closing each path of relay according to an analysis result, thereby realizing the control of corresponding external equipment.
Specifically, as shown in fig. 2, the service operation layer 30 further includes:
the dry contact signal monitoring unit 301 is configured to monitor a signal of an external dry contact of the relay device in real time, and generate a corresponding control instruction to the data receiving unit 302 according to a configuration parameter when detecting a trigger signal of the external dry contact, so as to control a state of a corresponding relay, such as actuation or disconnection, according to a control protocol of the external dry contact and a user configuration parameter. Assuming that one dry contact corresponds to the first relay and the second relay, the dry contact is actuated when pressed and corresponds to the first relay and the second relay being open, and the dry contact is actuated when popped and corresponds to the first relay and the second relay being open, and the corresponding relationship and the control mode between each dry contact and the relay are preset by configuration parameter data, the dry contact signal monitoring unit 301 generates a corresponding control instruction to the data receiving unit 302 according to the real-time monitoring signal of the external dry contact and the configuration parameters.
In the invention, a certain dry contact CAN be configured into an emergency mode switch through the parameter configuration unit 302, when the dry contact signal monitoring unit 301 monitors that the signal of the dry contact is triggered, namely the emergency mode is triggered, a trigger control instruction of the emergency mode is generated to the data receiving unit 303, and after the trigger control instruction is analyzed by the data analyzing unit 304, a complete closing instruction is broadcasted to terminal equipment on the whole Bus through the CAN-Bus and the RS485 Bus, namely all the terminal equipment is in a closed state. In order to ensure that broadcast data in the main contact emergency mode can be broadcast to each terminal device of the whole system, the adjacent relay can start the relay function to help forward the 'full-off' instruction, that is, when one device broadcasts the full-off instruction, the node adjacent to the relay function can serve as the relay to help broadcast the full-off instruction again, and the devices on the bus can respond. .
The parameter configuration unit 302 is configured to receive a configuration parameter sent by a configuration end. In the specific embodiment of the invention, the PC configuration tool software utilizes a serial port (such as a USB2UART link) to send configuration parameter data, and the system can be connected with a plurality of intelligent household external devices through a multi-path relay, such as external air-conditioning fans or protocol curtain motor models through the relay. In the embodiment of the present invention, the relay device includes 8 relays, which can be externally connected with 10 external trunk contacts, the type of the device controlled by each relay, and which relay corresponds to each external trunk contact (one trunk contact may correspond to one relay, or one trunk contact may correspond to multiple relays) are all distinguished by configuration parameters and configured by the parameter configuration unit 302, and when the device receives a control instruction sent from an upper layer, the device analyzes which relay is targeted, then extracts configuration data of the relay, and determines how to control each relay by combining the two.
In an embodiment of the present invention, the parameter configuration unit 302 may be configured to select types of external dry contacts, such as a switch type and a light touch type, and may also be configured to combine multiple relays for use (e.g., controlling an air conditioner fan and a curtain motor).
The data receiving unit 303 is configured to receive a protocol instruction issued by an upper-layer master controller and a control instruction generated by the trunk node signal monitoring unit 301, where the protocol instruction includes, but is not limited to, a protocol header, a data length, a timestamp, a sending device ID, a receiving device ID, a control command word, control data, and a check code.
In the embodiment of the present invention, the upper main control panel issues various command messages through a CAN-Bus (Controller Area network Bus) or an RS485 Bus, and when the data receiving unit 302 receives a message instruction sent by the main control panel through a CAN-Bus interface and an RS485 Bus interface, the validity of data from the communication link is checked first, and if the current message instruction is a valid message instruction, the current message instruction is cached to the command message queue according to the priority thereof. In order to ensure that the device can accurately receive the control instruction issued by the upper main control, each complete protocol instruction is cached into the RBUFFER to generate a circular cache queue, and then the data is analyzed and processed by the protocol analysis process of the data analysis unit 304.
And the data analysis unit 304 is configured to analyze the message instruction in the message queue according to the message queue and according to the configuration parameter, and transmit the result to the relay channel control module 305. Specifically, the data analysis unit 304 obtains the protocol command or the control command generated by the dry contact signal monitoring unit from the message queue, analyzes according to the corresponding configuration parameter, and sends the analysis result to the relay channel control module 305.
The relay channel control module 305 performs corresponding control, such as attraction and release, on each channel of the relay according to the analysis result of the data analysis unit 304, and feeds back the control result to the message response module 306.
And the message response module 306 is configured to generate a corresponding response message instruction according to the control result of the relay channel control module 305, and feed back the response message instruction to the upper-layer main control. That is, the message response module 306 generates a corresponding response message protocol according to the control result of the relay channel control module 305, and feeds back the response message protocol to the master control through the Can-Bus and the RS485, that is, the status of each relay is fed back to the master control through the Can-Bus and the RS485 Bus to synchronize the status. In the embodiment of the present invention, in order to ensure that the master control states are synchronized timely, the message response module 306 feeds back the state synchronization packet and the associated device information contained in the relay state message.
Preferably, the business operation layer 30 further includes:
and a key signal monitoring unit 307, configured to monitor each physical key signal corresponding to each relay, generate a corresponding control instruction, and submit the control instruction to the data receiving unit 303. That is to say, in the present invention, each relay also corresponds to one physical button, so as to control each relay through the physical button. That is, in the present invention, the message command received by the data receiving unit not only includes a protocol command issued by the upper layer master through the CAN-Bus and RS485 Bus, but also includes a control instruction generated by the trunk node signal monitoring unit according to the configuration parameters when detecting the trigger signal of the external trunk node, and a control instruction generated by the key signal monitoring unit 307 monitoring each physical key signal, and is cached in the message queue.
That is, in the present invention, there are multiple operation modes for the relay, and in order to ensure that the multiple operation modes are not in conflict, the present invention may assign different priorities to the various operation modes in advance, in a specific embodiment of the present invention, the priority of the physical key of each relay is the highest, then the external dry contact, then the CAN-Bus control protocol instruction, and finally the RS485 control protocol instruction, but the present invention is not limited thereto.
Preferably, the business operation layer 30 further includes:
the monitoring unit 308 is used for monitoring power supply and signal abnormalities and generating an alarm prompt when the abnormalities occur. In an embodiment of the present invention, the monitoring unit 308 can be used to monitor whether the power supply is over-voltage for a long time, whether the temperature of the IC chip is too high for a long time, whether the data link is blocked for a long time, and the like.
Fig. 3 is a flowchart illustrating steps of a method for controlling a relay device according to the present invention. As shown in fig. 3, the method for controlling a relay device according to the present invention includes the steps of:
and step S1, receiving the configuration parameters sent by the configuration end.
In the specific embodiment of the invention, the PC configuration tool software utilizes a serial port (such as a USB2UART link) to send configuration parameter data, and the system can be connected with a plurality of intelligent household external devices through a multi-path relay, such as external air-conditioning fans or protocol curtain motor models through the relay.
In the embodiment of the invention, the types of the external dry contact points can be configured and selected, such as a switch type and a light touch type, and a multi-way relay can also be combined for use (such as controlling an air conditioner fan and a curtain motor).
And step S2, receiving the protocol command issued by the upper main control in real time and caching the protocol command to the message queue, monitoring the signal of the external dry contact in real time, and generating a corresponding control command according to the configuration parameters and caching the control command to the message queue when detecting the trigger signal of the external dry contact.
In the invention, an upper main control panel issues various command messages through a CAN-Bus (Controller Area Network Bus) or an RS485 Bus, when a message instruction sent by the main control panel is received through a CAN-Bus interface and an RS485 Bus interface, the legality of data from a communication link is checked firstly, and if the current message instruction is a legal message instruction, the legal message instruction is cached to a command message queue. In order to ensure that the equipment can accurately receive the control instruction issued by the upper main control, each complete protocol instruction is cached into RBUFFER to generate a circular cache queue, and then the protocol analysis process analyzes and processes the data.
Meanwhile, the dry contact signal monitoring unit monitors signals of the external dry contact in real time, and generates a corresponding control instruction according to the configuration parameters when detecting the trigger signal of the external dry contact so as to control the state of the corresponding relay, such as attraction or disconnection, according to the control protocol of the external dry contact and the configuration parameters of a user.
And step S3, analyzing the message instruction in the message queue according to the message queue and the configuration parameter, and transmitting the result to the relay channel control module. Specifically, a protocol instruction or a control instruction generated by the dry contact signal monitoring unit is obtained from the message queue, the protocol instruction or the control instruction is analyzed according to corresponding configuration parameters, and an analysis result is sent to the relay channel control module.
And step S4, the relay channel control module performs corresponding control, such as suction and release, on each channel of the relay according to the analysis result, and feeds back the control result to the upper main control through the message response module.
In the embodiment of the invention, the message response module generates a corresponding response message protocol according to the control result of the relay channel control module, and feeds back the response message protocol to the master control through the Can-Bus and the RS485, namely feeds back the states of the relays to the master control through the CAN-Bus and the RS485 Bus so as to synchronize the states. In the embodiment of the invention, in order to ensure that the master control states are synchronized timely, the message response module feeds back the state message of the relay, wherein the state message comprises the state synchronization packet and the associated equipment information.
Preferably, in step S2, the method further includes the following steps:
the key signal monitoring unit is used for monitoring each physical key signal corresponding to each relay in real time, and generating a corresponding control instruction to be submitted to the data receiving unit, namely, each relay also corresponds to one physical key so as to control each relay through the physical key.
Preferably, different priorities may be assigned to the operation modes in advance, and in step S2, each instruction is buffered in the message queue according to its priority. In the embodiment of the present invention, the physical key of each relay has the highest priority, and then the relay is an external dry contact, then a CAN-Bus control protocol instruction, and finally an RS485 control protocol instruction, but the present invention is not limited thereto.
Examples
In this embodiment, please refer to fig. 1 and fig. 2, wherein the protocol converter includes an upper application framework layer, a middle service operation layer, and a bottom real-time operating system layer. The business operation layer is also a layered structure and consists of an upper layer and a lower layer. The upper layer is a logic operation layer and is composed of module units such as data receiving, data caching, data analyzing, data forwarding, data storing, equipment configuration and the like, and the lower layer is a system monitoring module.
As shown in fig. 4, in this embodiment, the command message receiving and parsing process flow is as follows: receiving a message instruction, wherein the message instruction Can be any message instruction obtained by an external communication interface, and in the embodiment, the external communication interfaces include three types, namely a Can-bus interface, an RS485 bus interface and an external trunk contact interface; carrying out validity check on the received message instruction; if the verification is passed, analyzing the message instruction; the relay channel control module performs corresponding control, such as suction and release, on each channel of the relay according to the analysis result, and submits the control result to the message response module, and the message response module generates a corresponding response message instruction according to the result and feeds the response message instruction back to the main control panel through the Can-bus and the RS 485.
As shown in fig. 5, in the present embodiment, the procedure of monitoring the dry contact signal is as follows: monitoring whether the IO level (a dry contact is connected, and the pressing and bouncing of the dry contact can change the corresponding IO level) is changed; inquiring corresponding configuration parameters; generating a control command; the control command is submitted to the data receiving unit.
As shown in fig. 6, in this embodiment, the connection device has 8 physical keys, each key corresponds to each relay, and the connection device can control the actuation and the disconnection of the relays, and is mainly used for emergency or test situations, to observe whether the device has a response, and the monitoring process for the key signals is as follows: the AD value of an ADC (analog to digital converter) connected with each key is monitored in real time, which physical key is pressed is calculated according to the AD value, then a corresponding control protocol command is generated, the protocol command is sent to a data receiving unit, and then the data receiving unit processes the protocol command. As shown in fig. 7, in this embodiment, the issuing process of the configuration parameters is as follows: receiving data through a USB2UART interface; carrying out validity check on the received data; if the data is legal, the data is analyzed and stored, otherwise, the received data is discarded, and the receipt continues to be received.
As shown in fig. 8, in this embodiment, the system monitoring process is as follows: starting a monitoring unit; judging whether the power supply is overvoltage for a long time, and if so, alarming and resetting; if not, judging whether the temperature of the IC is too high for a long time, and if so, alarming and resetting; if not, further judging whether the data link is blocked for a long time, and if so, alarming and resetting.
To sum up, the present invention provides a relay device control system and method, wherein a parameter configuration unit receives configuration parameters issued by a configuration end, a data receiving unit receives protocol commands issued by an upper layer main control in real time and caches the protocol commands to a message queue, monitors signals of an external dry contact in real time, generates corresponding control commands according to the configuration parameters when a trigger signal of the external dry contact is detected, caches the control commands to the message queue, a data analyzing unit analyzes the message commands in the message queue according to the configuration parameters according to the message queue, and transmits the result to a relay channel control module, the relay channel control module performs corresponding control on each channel of a relay according to the analysis result, and feeds back the control result to the upper layer main control through a message response module The relay equipment control system can meet the complex application requirements so as to realize flexible control of external electric equipment.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Modifications and variations can be made to the above-described embodiments by those skilled in the art without departing from the spirit and scope of the present invention. Therefore, the scope of the invention should be determined from the following claims.
Claims (10)
1. A relay device control system comprising, from top to bottom:
the upper application framework layer is used for managing and controlling the access of the application software, distributing legal service requests provided by the upper application to the functional sub-modules of the corresponding business operation layer, and simultaneously feeding back the state information of the functional sub-modules to the upper application software;
the service operation layer is used for receiving a protocol instruction sent by upper application software, caching the protocol instruction to a message queue, monitoring an external dry contact point to generate a control instruction, caching the control instruction to the message queue, acquiring data from the message queue, analyzing the data according to corresponding configuration parameters, and controlling the disconnection/suction of each path of relay of a corresponding channel according to an analysis result;
the real-time operating system layer consists of a real-time operating system microkernel, a file system, a common function library and a hardware driver, and provides various services such as task synchronization, task communication, data storage and peripheral access required by a real-time task upwards.
2. The relay device control system of claim 1, wherein the service operation layer comprises:
the main contact signal monitoring unit is used for monitoring signals of an external main contact in real time, and generating a corresponding control instruction to the data receiving unit according to the configuration parameters when a trigger signal of the external main contact is detected;
the parameter configuration unit is used for receiving configuration parameters issued by the configuration end;
the data receiving unit is used for receiving a protocol instruction issued by the upper-layer master control and a control instruction generated by the trunk node signal monitoring unit and caching the control instruction to a message queue;
the data analysis unit is used for analyzing the message instructions in the message queue according to the message queue and the configuration parameters, and transmitting the result to the relay channel control module;
the relay channel control module is used for correspondingly controlling each channel of the relay according to the analysis result of the data analysis unit and feeding back the control result to the message response module;
and the message response module is used for generating a corresponding response message instruction according to the control result of the relay channel control module and feeding back the response message instruction to the upper-layer main control.
3. The relay device control system according to claim 2, wherein: and the data receiving unit receives a protocol instruction sent by the upper-layer master control through a CAN-Bus interface and/or an RS485 Bus interface.
4. A relay device control system according to claim 3, wherein: the relay control system also comprises a key signal monitoring unit which is used for monitoring each physical key signal corresponding to each path of relay, generating a corresponding control instruction and submitting the control instruction to the data receiving unit.
5. The relay device control system according to claim 4, wherein: and giving different priorities to the message instructions corresponding to various operation modes in advance, and caching the received message instructions to the message queue by the data receiving unit according to the priorities of the received message instructions.
6. The relay control system of claim 5, wherein: the priority of the message instruction corresponding to each operation mode is sequentially a control instruction generated by a physical key of each relay, a control instruction generated by an external dry contact, a CAN-Bus control protocol instruction and an RS485 control protocol instruction from high to low.
7. The relay device control system according to claim 6, wherein: and the message response module feeds back the state of each path of relay to the upper-layer master control through the CAN-Bus and the RS485 Bus, and the feedback relay state message contains a state synchronization packet and associated equipment information.
8. The relay device control system according to claim 7, wherein: when the parameter configuration unit configures a certain external trunk contact into an emergency mode switch, and the trunk contact signal monitoring unit monitors the signal triggering of the trunk contact, a triggering control instruction of an emergency mode is generated to the data receiving unit, and after the signal triggering is analyzed by the data analysis unit, a complete closing instruction is broadcasted to terminal equipment on the whole Bus through the CAN-Bus and the RS485 Bus.
9. The relay device control system according to claim 8, wherein: and the adjacent relays turn on the relay function and forward the full-off instruction.
10. A relay device control method includes the steps of:
step S1, receiving configuration parameters sent by a configuration end;
step S2, receiving protocol commands issued by upper layer main control in real time and caching the protocol commands to a message queue, monitoring signals of the external dry contact in real time, and generating corresponding control commands according to configuration parameters and caching the control commands to the message queue when detecting trigger signals of the external dry contact;
step S3, according to the message queue, analyzing the message instruction in the message queue according to the configuration parameter, and transmitting the result to the relay channel control module;
and step S4, the relay channel control module correspondingly controls each channel of the relay according to the analysis result, and feeds back the control result to the upper main control through the message response module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010322630.6A CN111459853B (en) | 2020-04-22 | 2020-04-22 | Relay equipment control system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010322630.6A CN111459853B (en) | 2020-04-22 | 2020-04-22 | Relay equipment control system and method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111459853A true CN111459853A (en) | 2020-07-28 |
CN111459853B CN111459853B (en) | 2021-11-30 |
Family
ID=71683756
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010322630.6A Active CN111459853B (en) | 2020-04-22 | 2020-04-22 | Relay equipment control system and method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111459853B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438565A (en) * | 2021-06-25 | 2021-09-24 | 上海飞奥燃气设备有限公司 | Gas meter handheld terminal and operation method thereof |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201829416U (en) * | 2010-09-13 | 2011-05-11 | 王卫国 | Manual and network concurrently-controlled relay output device |
CN201910578U (en) * | 2010-12-15 | 2011-07-27 | 常州多宝电子有限公司 | Intelligent control device of power safety appliance cabinet |
CN204116866U (en) * | 2014-08-29 | 2015-01-21 | 南京埃尔乔亿自控设备有限公司 | A kind of intelligent lighting case with meet an urgent need switching and fire-fighting link |
CN204549861U (en) * | 2015-04-10 | 2015-08-12 | 天津德仕达起重输送设备有限公司 | There is the overhead traveling crane of Remote Control Automatic reset function |
CN105072774A (en) * | 2015-09-02 | 2015-11-18 | 郑州伟尚电子科技有限公司 | An intelligent passive switch and an intelligent lighting control system based on the switch |
CN205103648U (en) * | 2015-11-06 | 2016-03-23 | 武汉市农业机械化科学研究所 | Multisource sensing information acquisition and control integration multipurpose plant suitable for networking of agricultural thing is used |
CN106249733A (en) * | 2016-08-08 | 2016-12-21 | 武汉工程大学 | The method of testing of a kind of airplane antiskid braking control box and system |
US20170033596A1 (en) * | 2015-01-18 | 2017-02-02 | Elliot N. Brooks | High Efficiency Uninterruptible Power Supply with Near Loss-Less Ultrafast Electromechanical Switching |
CN106547226A (en) * | 2016-10-25 | 2017-03-29 | 王声扬 | A kind of Multifunctional barricade control system with fire protection linkage control |
CN206178450U (en) * | 2016-07-25 | 2017-05-17 | 南京派菲克物联科技有限公司 | Intelligence centralized controller |
CN207410253U (en) * | 2017-10-31 | 2018-05-25 | 安瑞科(蚌埠)压缩机有限公司 | Compress electrical-mechanical system interlocking emergency stop device |
CN208820809U (en) * | 2018-07-06 | 2019-05-03 | 南京苏博曼纳软件科技有限公司 | A kind of intelligent gateway |
CN109861978A (en) * | 2018-12-28 | 2019-06-07 | 浙江工业大学 | A kind of Internet of Things SaaS platform based on MQTT agreement |
-
2020
- 2020-04-22 CN CN202010322630.6A patent/CN111459853B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201829416U (en) * | 2010-09-13 | 2011-05-11 | 王卫国 | Manual and network concurrently-controlled relay output device |
CN201910578U (en) * | 2010-12-15 | 2011-07-27 | 常州多宝电子有限公司 | Intelligent control device of power safety appliance cabinet |
CN204116866U (en) * | 2014-08-29 | 2015-01-21 | 南京埃尔乔亿自控设备有限公司 | A kind of intelligent lighting case with meet an urgent need switching and fire-fighting link |
US20170033596A1 (en) * | 2015-01-18 | 2017-02-02 | Elliot N. Brooks | High Efficiency Uninterruptible Power Supply with Near Loss-Less Ultrafast Electromechanical Switching |
CN204549861U (en) * | 2015-04-10 | 2015-08-12 | 天津德仕达起重输送设备有限公司 | There is the overhead traveling crane of Remote Control Automatic reset function |
CN105072774A (en) * | 2015-09-02 | 2015-11-18 | 郑州伟尚电子科技有限公司 | An intelligent passive switch and an intelligent lighting control system based on the switch |
CN205103648U (en) * | 2015-11-06 | 2016-03-23 | 武汉市农业机械化科学研究所 | Multisource sensing information acquisition and control integration multipurpose plant suitable for networking of agricultural thing is used |
CN206178450U (en) * | 2016-07-25 | 2017-05-17 | 南京派菲克物联科技有限公司 | Intelligence centralized controller |
CN106249733A (en) * | 2016-08-08 | 2016-12-21 | 武汉工程大学 | The method of testing of a kind of airplane antiskid braking control box and system |
CN106547226A (en) * | 2016-10-25 | 2017-03-29 | 王声扬 | A kind of Multifunctional barricade control system with fire protection linkage control |
CN207410253U (en) * | 2017-10-31 | 2018-05-25 | 安瑞科(蚌埠)压缩机有限公司 | Compress electrical-mechanical system interlocking emergency stop device |
CN208820809U (en) * | 2018-07-06 | 2019-05-03 | 南京苏博曼纳软件科技有限公司 | A kind of intelligent gateway |
CN109861978A (en) * | 2018-12-28 | 2019-06-07 | 浙江工业大学 | A kind of Internet of Things SaaS platform based on MQTT agreement |
Non-Patent Citations (1)
Title |
---|
AALBORG: ""OPERATING MANUAL DFM Digital Mass Flow Meter"", 《WWW.AALBORG.COM》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438565A (en) * | 2021-06-25 | 2021-09-24 | 上海飞奥燃气设备有限公司 | Gas meter handheld terminal and operation method thereof |
CN113438565B (en) * | 2021-06-25 | 2023-04-07 | 上海飞奥燃气设备有限公司 | Gas meter handheld terminal and operation method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN111459853B (en) | 2021-11-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20180024541A1 (en) | Smart home system and product thereof | |
CN110493270B (en) | Internet of things equipment access fusion control method and device | |
CN104345704B (en) | Wireless intelligent central control system of hotel rooms and control method thereof | |
WO2014068556A1 (en) | Audio and visual alert system | |
US10353368B2 (en) | Multi-sensor, event based occupancy determination and load management system | |
WO2014169807A1 (en) | Smart home system and control method | |
AU2019230217B2 (en) | Smart light switch/thermostat for control and energy management | |
CN101140690B (en) | Distributed alarming method and distributed alarm system | |
CN111600848B (en) | Protocol converter and control method thereof | |
CN111459853B (en) | Relay equipment control system and method | |
CN104167815A (en) | Electric equipment field monitoring apparatus | |
CN109831362A (en) | A kind of electronic equipment control method and system | |
CN108713173A (en) | Smart home early warning system and method | |
CN109656167A (en) | A kind of communication control system and method based on smart machine | |
US20140277591A1 (en) | Electrical Equipment and Communication Apparatus | |
CN105187549B (en) | A kind of long-distance remote-control method and system of smart home device | |
US7133692B2 (en) | Interface module in a vehicle | |
EP1905198A1 (en) | Telematic network for managing devices and events in a domestic environment | |
CN204929346U (en) | A network device and wireless light control system for wireless light control | |
US9829943B2 (en) | Remote monitoring method, remote monitoring system, first communication apparatus, second communication apparatus and server apparatus | |
CN110233783A (en) | A kind of electrical control system based on set of terminal positioning | |
CN117528883A (en) | Marine partition light control equipment and control method | |
CN109520075A (en) | Electric quantity display method, device, remote controler and air conditioner | |
CN114530939B (en) | Remote monitoring device and method for two-wire centralized power supply | |
CN219418006U (en) | Intelligent switch and intelligent switch system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |