Switch base box self-adapting method, switch panel and switch base box
Patent Information
- Application Number
- CN202311243652.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2043-09-25
Smart Images

Figure CN117254985B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to a self-adaptation method for switch boxes for smart home systems, switch panels, and switch boxes. Background Technology
[0002] In smart home systems, switch panels installed on building surfaces (such as walls, doors, appliances, and furniture surfaces) work in conjunction with switch boxes installed within the building structure (such as those embedded in walls) to control home appliances, such as lighting fixtures. Switch panels typically have one or more user-operated switches, each of which can be a physical button or a virtual button provided by a touchscreen or touch panel. Switch boxes usually house one or more relays, which can be connected to the wiring of home appliances via wiring, allowing control of those appliances' on / off states. The switch panel connects to the switch box's communication interface via its communication interface, enabling the switches on the switch panel to control the relays in the switch box. Summary of the Invention
[0003] One of the purposes of this disclosure is to provide a self-adaptive method for switch boxes, switch panels, and switch boxes.
[0004] According to a first aspect of this disclosure, a self-adaptation method for a switch box is provided, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: reading a first parameter and a second parameter via the first communication interface and the second communication interface respectively, the first parameter indicating the number m of relays included in a first switch box connected to the first communication interface, and the second parameter indicating the number n of relays included in a second switch box connected to the second communication interface; in response to a specific switch on the switch panel being triggered, determining a specific relay corresponding to the specific switch based on the sequence number x of the specific switch and whether reading the first parameter and / or the second parameter was successful; and in response to the specific relay in the first switch box, controlling the specific relay via the first communication interface, or in response to the specific relay in the second switch box, controlling the specific relay via the second communication interface.
[0005] According to a second aspect of this disclosure, a self-adaptation method for a switch box is provided, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: reading a first parameter and a second parameter via the first communication interface and the second communication interface respectively, the first parameter indicating the number m of relays included in a first switch box connected to the first communication interface, and the second parameter indicating the number n of relays included in a second switch box connected to the second communication interface; associating the plurality of switches on the switch panel with corresponding relays in the first switch box and / or the second switch box according to the serial numbers of the plurality of switches on the switch panel and whether the reading of the first parameter and / or the second parameter was successful; and controlling the specific relay in response to the triggering of a specific switch on the switch panel via a communication interface connected to the switch box containing the specific relay associated with the specific switch.
[0006] According to a third aspect of this disclosure, a self-adaptation method for a switch box is provided, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: reading a first parameter and a second parameter via the first communication interface and the second communication interface respectively, the first parameter indicating the number m of relays included in a first switch box connected to the first communication interface, and the second parameter indicating the number n of relays included in a second switch box connected to the second communication interface; in response to successful reading of the first parameter and successful reading of the second parameter, connecting the first switch to the m-th switch of the switch panel to the m-th relay of the relay connected to the first communication interface respectively. The first to the mth relays are associated, and the (m+1)th to (m+n)th switches of the switch panel are associated with the first to the nth relays connected to the second communication interface, respectively; in response to a successful reading of the first parameter and a failed reading of the second parameter, the first to the mth switches of the switch panel are associated with the first to the mth relays connected to the first communication interface, respectively; and in response to a failed reading of the first parameter and a successful reading of the second parameter, the first to the nth switches of the switch panel are associated with the first to the nth relays connected to the second communication interface, respectively.
[0007] According to a fourth aspect of this disclosure, a self-adaptive method for a switch box is provided, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box. The method includes: reading a first parameter and a second parameter via the first communication interface and the second communication interface respectively, the first parameter indicating the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicating the number n of relays included in the second switch box connected to the second communication interface; in response to the triggering of a switch with serial number x in the switch panel, performing the following operations: in response to successful reading of both the first and second parameters, controlling the xth relay in the first switch box via the first communication interface if x is not greater than m, and controlling the xmth relay in the second switch box via the second communication interface if x is greater than m; or in response to successful reading of the first parameter and unsuccessful reading of the second parameter, controlling the xth relay in the first switch box via the first communication interface; or in response to unsuccessful reading of the first parameter and successful reading of the second parameter, controlling the xth relay in the second switch box via the second communication interface.
[0008] According to a fifth aspect of this disclosure, a self-adaptive method for a switch box is provided, executed by a switch panel, the switch panel including a communication interface for connecting the switch box, the method comprising: in response to power-on of the switch panel, reading parameters of the switch box connected to the communication interface via the communication interface, the parameters indicating the number of relays included in the switch box; and in response to a specific switch on the switch panel being triggered, controlling a specific relay among the relays included in the switch box corresponding to the serial number of the specific switch via the communication interface.
[0009] According to a sixth aspect of this disclosure, a switch panel is provided, comprising: a plurality of switches; a first communication interface for connecting to a first switch box; a second communication interface for connecting to a second switch box; and a controller configured to: read a first parameter and a second parameter via the first communication interface and the second communication interface respectively, wherein the first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface; in response to a specific switch among the plurality of switches being triggered, determine a specific relay corresponding to the specific switch based on the sequence number x of the specific switch and whether reading the first parameter and / or the second parameter is successful; and in response to the specific relay in the first switch box, control the specific relay via the first communication interface, or in response to the specific relay in the second switch box, control the specific relay via the second communication interface.
[0010] According to a seventh aspect of this disclosure, a switch panel is provided, comprising: a plurality of switches; a first communication interface for connecting to a first switch box; a second communication interface for connecting to a second switch box; and a controller configured to: read a first parameter and a second parameter via the first communication interface and the second communication interface respectively, wherein the first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface; associate the plurality of switches on the switch panel with corresponding relays in the first switch box and / or the second switch box based on the serial numbers of the plurality of switches on the switch panel and whether the reading of the first parameter and / or the second parameter is successful; and control the specific relay in response to the triggering of a specific switch on the switch panel via a communication interface connected to the switch box containing the specific relay associated with the specific switch.
[0011] According to an eighth aspect of this disclosure, a switch panel is provided, comprising: a plurality of switches; a first communication interface for connecting to a first switch box; a second communication interface for connecting to a second switch box; and a controller configured to: read a first parameter and a second parameter via the first communication interface and the second communication interface respectively, wherein the first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface; and in response to successful reading of the first parameter and successful reading of the second parameter, connecting the first switch to the m-th switch among the plurality of switches to the relays connected to the first communication interface respectively. The first to the m-th relays are associated, and the (m+1)-m+n switches of the plurality of switches are respectively associated with the first to the n-th relays of the relays connected to the second communication interface; in response to a successful reading of the first parameter and a failed reading of the second parameter, the first to the m-th switches of the plurality of switches are respectively associated with the first to the m-th relays of the relays connected to the first communication interface; and in response to a failed reading of the first parameter and a successful reading of the second parameter, the first to the n-th switches of the plurality of switches are respectively associated with the first to the n-th relays of the relays connected to the second communication interface.
[0012] According to a ninth aspect of this disclosure, a switch panel is provided, comprising: a plurality of switches; a first communication interface for connecting to a first switch box; a second communication interface for connecting to a second switch box; and a controller configured to: read a first parameter and a second parameter via the first communication interface and the second communication interface respectively, wherein the first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface; and, in response to the triggering of a switch with serial number x in the switch panel, perform the following operations: in response to successful reading of both the first and second parameters, control the xth relay in the first switch box via the first communication interface if x is not greater than m, and control the xmth relay in the second switch box via the second communication interface if x is greater than m; or in response to successful reading of the first parameter and unsuccessful reading of the second parameter, control the xth relay in the first switch box via the first communication interface; or in response to unsuccessful reading of the first parameter and successful reading of the second parameter, control the xth relay in the second switch box via the second communication interface.
[0013] According to a tenth aspect of this disclosure, a switch panel is provided, comprising: a plurality of switches; a communication interface for connecting to a switch box; and a controller configured to: in response to power-on of the switch panel, read parameters of the switch box connected to the communication interface via the communication interface, the parameters indicating the number m of relays included in the switch box; and in response to a specific switch on the switch panel being triggered, control via the communication interface a corresponding relay among the m relays included in the switch box corresponding to the serial number of the specific switch.
[0014] According to the eleventh aspect of this disclosure, a switch box is provided, comprising: a plurality of relays housed therein; a communication interface for connecting a switch panel; and a memory configured to store parameters indicating the number of the plurality of relays, such that the switch panel reads the parameters from the memory via the communication interface.
[0015] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0016] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.
[0017] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein: Figure 1This is a schematic flowchart of a switch box self-adaptation method according to an embodiment of the present disclosure.
[0018] Figure 2 This is a schematic flowchart of a switch box self-adaptation method according to an embodiment of the present disclosure.
[0019] Figure 3 This is a schematic flowchart of a switch box self-adaptation method according to an embodiment of the present disclosure.
[0020] Figures 4A to 4C This is a schematic diagram illustrating the implementation of the switch box self-adaptation method according to an embodiment of the present disclosure.
[0021] Figure 5 This is a schematic diagram of at least a portion of the hardware structure of a switch panel according to an embodiment of the present disclosure. Detailed Implementation
[0022] The present disclosure will now be described with reference to the accompanying drawings, which illustrate several embodiments of the present disclosure. However, it should be understood that the present disclosure can be presented in many different ways and is not limited to the embodiments described below; in fact, the embodiments described below are intended to make the disclosure more complete and to fully illustrate the scope of protection of the present disclosure to those skilled in the art. It should also be understood that the embodiments disclosed herein can be combined in various ways to provide further additional embodiments.
[0023] It should be understood that the same reference numerals denote the same elements in all the accompanying drawings. For clarity, the dimensions of certain features may be modified in the drawings.
[0024] It should be understood that the terminology used herein is for describing specific embodiments only and is not intended to limit this disclosure. All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. For the sake of brevity and / or clarity, well-known functions or structures may not be described in detail.
[0025] In this document, the term "connection" is intended to encompass a physical, electrical, and / or communicative link between one feature and another, and there may or may not be an intermediate feature between the two features. When the connection is a communicative connection, even if A and B are mentioned as "directly connected," it is only intended to emphasize that one or more features emphasized in this disclosure do not exist between A and B, but does not imply a limitation that A and B are connected without any components. Those skilled in the art will understand that A and B can be connected via cables, routers, gateways, channels, links, networks, etc. It should be noted that in the accompanying drawings of this disclosure, whether the connection between A and B is direct or indirect, it is represented by a straight line connecting A and B.
[0026] In this document, the term “A or B” includes both “A and B” and “A or B”, rather than exclusively including only “A” or only “B”, unless otherwise specified.
[0027] In this document, the term "exemplary" means "used as an example, instance, or illustration," and not as a "model" to be precisely copied. Any implementation described herein by example is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, this disclosure is not limited to any theory expressed or implied in the foregoing description of the technical field, background, invention, or specific embodiments.
[0028] In this document, the term "substantially" means any minor variation caused by design or manufacturing defects, device or component tolerances, environmental influences, and / or other factors. The term "substantially" also allows for differences from the perfect or ideal situation due to parasitic effects, noise, and other practical considerations that may exist in actual implementations.
[0029] Additionally, terms such as “first,” “second,” etc., may be used in this document for reference purposes only and are not intended to be limiting. For example, unless the context clearly indicates otherwise, the words “first,” “second,” and other such numerical terms relating to structures or elements do not imply order or sequence.
[0030] It should also be understood that when the term “including / contains” is used herein, it indicates the presence of the indicated feature, whole, step, operation, unit and / or component, but does not preclude the presence or addition of one or more other features, wholes, steps, operations, units and / or components and / or combinations thereof.
[0031] Currently, existing switch panels (sometimes referred to as "panels" in this article) bind the switches and relays in the switch boxes (sometimes referred to as "boxes" in this article) in a one-to-one manner according to the switch serial number and relay serial number. For example, the switch with serial number 1 on the switch panel is bound to the relay with serial number 1 in the switch box. If modification is needed, the binding relationship can only be changed by configuring the switch panel through user software. When changing the type of switch box, such as replacing a 4-way switch box with a 2-way switch box, the binding relationship needs to be reconfigured. This makes the user operation quite cumbersome.
[0032] To address this, this disclosure proposes a switch box self-adaptation method, a switch panel, and a switch box. The switch box self-adaptation method is executed by the switch panel. According to an embodiment of this disclosure, the switch box, in addition to including multiple relays housed therein and a communication interface for connecting to the switch panel, also includes a memory storing a parameter indicating the number of relays included in the switch box, so that the switch panel can read the parameter from the memory via the communication interface. After the switch box is connected to the switch panel via the communication interface, the switch panel can read the parameter stored in the switch box's memory via the communication interface, thereby determining the number of relays in the switch box. The switch panel, through software running therein, associates multiple switches on the switch panel with corresponding relays in the switch box, allowing the user to control the corresponding relays by operating the switches on the switch panel.
[0033] In some embodiments, the switch panel includes multiple communication interfaces. Taking two of these communication interfaces, namely the first and second communication interfaces, as examples, each communication interface can connect to a switch box, meaning the switch panel can connect to both the first and second switch boxes. It should be understood that there is no limitation on the model of the connected switch boxes, therefore the number of relays included in each connected switch box can be arbitrary. The switch panel can read parameters via the first and second communication interfaces respectively, to read a first parameter and a second parameter. In one example, the switch panel can perform such parameter reading after power-on. For example, in response to power-on of the switch panel, the first parameter and the second parameter are read via the first and second communication interfaces respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. Subsequently, the switch panel can control the corresponding relays based on whether the reading of the first and / or second parameters was successful, and the sequence number of each switch among the multiple switches it includes.
[0034] In some embodiments, the switch panel may include only one communication interface. Similarly, the switch panel can read parameters from the switch box via this communication interface to determine the number of relays included in the switch box, thereby associating each switch on the switch panel with a corresponding relay in the box, so as to control the relays via the switches. For example, in response to power-on, the switch panel can read parameters from the switch box connected to the communication interface, indicating the number of relays included in the switch box. In response to a successful parameter read, the switches on the switch panel are associated with the corresponding relays in the switch box according to their serial numbers. In response to a specific switch being triggered, the switch panel can control the specific relay in the switch box corresponding to the serial number of that specific switch via the communication interface. In response to a failed parameter read, no response is given to triggering operations on a specific switch on the switch panel.
[0035] Figure 1 This is a schematic flowchart of a switch box self-adaptation method 100 according to an embodiment of the present disclosure. In this example, after the switch panel reads parameters, when the switch on the switch panel is triggered, the switch panel determines the relay corresponding to the switch, thereby performing control. Figure 1 As shown, method 100 includes: reading a first parameter and a second parameter via a first communication interface and a second communication interface respectively (operation 110); determining a specific relay corresponding to a specific switch in response to a specific switch being triggered (step 120); and controlling the specific relay via a communication interface connected to the switch box where the specific relay is located (step 130). For example, if the determined specific relay is in the first switch box, the specific relay is controlled via the first communication interface; if the determined specific relay is in the second switch box, the specific relay is controlled via the second communication interface.
[0036] In some examples, the specific relay corresponding to a specific switch can be determined based on the specific switch number x and whether the first parameter and / or the second parameter were read successfully. It should be understood that the switch number refers to the sequentially assigned number of one or more switches on a switch panel. For ease of description, the switch number x in this disclosure starts from 1.
[0037] For example, if both the first and second parameters are read successfully, it indicates that both the first and second communication interfaces of the switch panel are connected to the switch box, i.e., connected to the first and second switch boxes respectively. In this case, it is determined whether the sequence number x of the specific switch is greater than m (where m is the number of relays contained in the first switch box). If the sequence number x of the specific switch is not greater than m, then the specific relay corresponding to the specific switch with sequence number x is determined to be the xth relay in the first switch box. If the sequence number x of the specific switch is greater than m, then it is determined whether the sequence number x of the specific switch is greater than m+n (where n is the number of relays contained in the second switch box), i.e., whether the sequence number x of the switch is greater than the sum of the number of relays contained in the first and second switch boxes. If the sequence number x of the specific switch is not greater than m+n, then the specific relay is determined to be the xmth relay in the second switch box. If reading the first parameter is successful but reading the second parameter fails, it indicates that the first communication interface of the switch panel is connected to the switch box, but the second communication interface is not connected to the switch box (or the connection is unsuccessful, for example, due to improper connection or damaged wiring). In this case, the switch panel is only connected to the first switch box. In this situation, determine if the sequence number x of the specific switch is greater than m. If the sequence number x of the specific switch is not greater than m, then the specific relay is determined to be the x-th relay in the first switch box. If reading the first parameter fails but reading the second parameter is successful, it indicates that the first communication interface of the switch panel is not connected (or the connection is unsuccessful) to the switch box, but the second communication interface is connected to the switch box. In this case, the switch panel is only connected to the second switch box. In this case, determine if the sequence number x of the specific switch is greater than n. If the sequence number x of the specific switch is not greater than n, then the specific relay is determined to be the x-th relay in the second switch box.
[0038] In some examples, in response to the triggering of the switch with serial number x in the switch panel, the following operations are performed: If both the first and second parameters are read successfully, the xth relay in the first switch box is controlled via the first communication interface if x is not greater than m, and the xmth relay in the second switch box is controlled via the second communication interface if x is greater than m. If the first parameter is read successfully but the second parameter fails to be read, the xth relay in the first switch box is controlled via the first communication interface. If the first parameter fails to be read but the second parameter is read successfully, the xth relay in the second switch box is controlled via the second communication interface.
[0039] Figure 2This is a schematic flowchart of a switch box self-adaptation method 200 according to an embodiment of this disclosure. In this example, after reading parameters, the switch panel associates one or more switches on the switch panel with corresponding relays in the switch box, so that when a switch is subsequently triggered, the relay associated with that switch can be controlled via the corresponding communication interface. Thus, method 200 determines the association between the switches on the switch panel and the relays in the switch box after the communication interface is reinstalled or after the switch panel is powered on, and directly controls the associated relay when a switch is subsequently triggered; instead of determining the corresponding relay for control when a switch is triggered, as in method 100. Figure 2 As shown, method 200 includes: reading a first parameter and a second parameter via a first communication interface and a second communication interface respectively (operation 210); associating the switch on the switch panel with a corresponding relay among the relays included in each switch box (step 220); and controlling a specific relay corresponding to a specific switch via the corresponding communication interface in response to a specific switch on the switch panel being triggered (step 230). For example, if the associated specific relay is in the first switch box, the specific relay is controlled via the first communication interface; if the associated specific relay is in the second switch box, the specific relay is controlled via the second communication interface.
[0040] In some examples, multiple switches on the switch panel can be associated with corresponding relays in the first and / or second switch boxes based on their serial numbers and whether reading the first and / or second parameters was successful. For example, if reading the first and second parameters is successful, the first to the m-th switches on the switch panel are associated with the first to the m-th relays connected to the first communication interface, and the (m+1)-m+n switches on the switch panel are associated with the first to the n-th relays connected to the second communication interface. If reading the first parameter is successful but reading the second parameter fails, the first to the m-th switches on the switch panel are associated with the first to the m-th relays connected to the first communication interface. If reading the first parameter fails but reading the second parameter is successful, the first to the n-th switches on the switch panel are associated with the first to the n-th relays connected to the second communication interface.
[0041] The following is combined Figure 3The following describes a specific example of the software processing flow of a switch panel to illustrate the switch box self-adaptation method 300 according to an embodiment of the present disclosure. In method 300, in response to power-on of the switch panel, variables a and b are initialized, i.e., a=0 and b=0 (operation 301). The type of the switch box connected to the first communication interface of the switch panel (referred to as "communication port A" in this example) is read (operation 302), wherein the type of the switch box can indicate the number of relays it includes. If the read is successful, data m is saved to indicate that the number of relays in the switch box connected to communication port A is m, and variable a is reassigned so that a=1. If the read is unsuccessful, variable a retains its initial value of 0. The type of the switch box connected to the first communication interface of the switch panel (referred to as "communication port B" in this example) is read (operation 303). If the read is successful, data n is saved to indicate that the number of relays in the switch box connected to communication port B is n, and variable b is reassigned so that b=1. If the read is unsuccessful, variable b retains its initial value of 0.
[0042] Continuously monitor the switch panel for triggered switches (operation 304). If switch number x (referred to as "switch x" in this example) is detected as triggered, proceed to operation 305; otherwise, continue monitoring using operation 304. Determine if both a and b are equal to 1 (operation 305). If so, proceed to operation 306; otherwise, proceed to operation 308. Determine if x is less than or equal to m (operation 306). If so, control relay x on communication port A; otherwise, proceed to operation 307. Determine if x minus m is less than or equal to n (operation 307). If so, control relay xm on communication port B; otherwise, return to operation 304 to continue monitoring. Determine if a is equal to 1 (operation 308). If so, proceed to operation 309; otherwise, proceed to operation 310. Determine if x is less than or equal to m (operation 309). If so, control relay x on communication port A; otherwise, return to operation 304 to continue monitoring. Determine if b equals 1 (operation 310). If yes, execute operation 311; otherwise, return to operation 304 to continue testing. Determine if x is less than or equal to m (operation 311). If yes, control the x-channel relay of the communication B port back box; otherwise, return to operation 304 to continue testing.
[0043] Figure 4A , Figure 4B and Figure 4CExamples 410, 420, and 430 illustrate the implementation of the switch box self-adaptation method according to embodiments of the present disclosure. Example 410 illustrates the case of replacing the switch box. Initially, a 4-way switch box and a 2-way switch box are respectively connected to the communication port A and communication port B of a 6-way switch panel. By implementing the switch box self-adaptation method according to embodiments of the present disclosure, such as any one of the methods 100, 200, and 300 described above, the association relationship (also referred to herein as "binding relationship") between the switch and the relay is as follows: Switch 1 corresponds to relay 1 in the 4-way junction box; Switch 2 corresponds to relay 2 in the 4-way junction box; Switch 3 corresponds to relay 3 in the 4-way junction box; Switch 4 corresponds to relay 4 in the 4-way junction box; Switch 5 corresponds to relay 1 in the 2-way junction box; Switch 6 corresponds to relay 2 in the 2-way junction box.
[0044] If the switch box connected to communication port A is replaced, for example, by replacing the connected box with a 5-channel box, the binding relationship between the switch and the relay becomes as follows by executing the switch box self-adaptation method according to an embodiment of this disclosure: Switch 1 corresponds to relay 1 in the 5-way junction box; Switch 2 corresponds to relay 2 in the 5-way junction box; Switch 3 corresponds to relay 3 in the 5-way junction box; Switch 4 corresponds to relay 4 in the 5-way junction box; Switch 5 corresponds to relay 5 in the 5-way junction box; Switch 6 corresponds to relay 1 in the 2-way junction box.
[0045] Since the 6-way switch panel only includes 6 switches, there is no corresponding switch for relay 2 in the 2-way junction box. It should be understood that if there were other switches on the switch panel, those other switches could be bound to relay 2 in the 2-way junction box.
[0046] Example 420 illustrates a scenario where the communication interfaces of two switch boxes connected to a switch panel are interchanged. Initially, a 4-channel box and a 2-channel box are connected to communication ports A and B of a 6-channel switch panel, respectively. By executing the switch box self-adaptation method according to an embodiment of this disclosure, the relationship between the switch and the relay is the same as described at the beginning of Example 410, and will not be repeated here. After interchangering the positions of the 4-channel box and the 2-channel box—that is, connecting the 4-channel box to communication port B and the 2-channel box to communication port A—by executing the switch box self-adaptation method according to an embodiment of this disclosure, the relationship between the switch and the relay becomes as follows: Switch 1 corresponds to relay 1 in the 2-way junction box; Switch 2 corresponds to relay 2 in the 2-way junction box; Switch 3 corresponds to relay 1 in the 4-way junction box; Switch 4 corresponds to relay 2 in the 4-way junction box; Switch 5 corresponds to relay 3 in the 4-way junction box; Switch 6 corresponds to relay 4 in the 4-way junction box.
[0047] Example 430 illustrates a scenario where one of the two switch boxes connected to a switch panel is missing. Initially, a 4-way switch box and a 2-way switch box are connected to communication ports A and B of a 6-way switch panel, respectively. By executing the switch box self-adaptation method according to an embodiment of this disclosure, the relationship between the switch and the relay is the same as described at the beginning of Example 410, and will not be repeated here. If the switch box connected to communication port A is subsequently removed, such as... Figure 4C As shown, this is equivalent to communication port A not being connected to the back box, and only one 2-way back box being connected to communication port B of the 6-way switch panel. Then, by executing the switch back box self-adaptation method according to an embodiment of this disclosure, the binding relationship between the switch and the relay becomes: Switch 1 corresponds to relay 1 in the 2-way junction box; Switch 2 corresponds to relay 2 in the 2-way junction box; Switch 3 has no corresponding relay; Switch 4 has no corresponding relay; Switch 5 has no corresponding relay; Switch 6 has no corresponding relay.
[0048] Figure 5 This is a schematic diagram of at least a portion of the hardware structure of a switch panel 500 according to an embodiment of the present disclosure. The switch panel 500 includes a plurality of switches disposed thereon, each of which may be a physical button or a virtual button; a first communication interface for connecting to a first switch box; a second communication interface for connecting to a second switch box; and a controller for executing software processing flows of the switch panel. The functionality of the controller may be implemented by one or more processors 510 running a series of executable instructions 521 stored in one or more memories 520. In some embodiments, the functionality of the controller may be any one or more of the methods 100, 200, and 300 described above. The one or more processors may be any conventional processor, such as a commercially available central processing unit (CPU), graphics processing unit (GPU), microprogrammed controller (MCU), etc. Alternatively, the one or more processors may also be special-purpose components, such as application-specific integrated circuits (ASICs) or other hardware-based processors.
[0049] Each of one or more memories 520 may store content accessible by one or more processors 510, including instructions 521 executable by one or more processors 510, and data 522 retrieved, manipulated, or stored by one or more processors 510. Instructions 521 may be any set of instructions that will be executed directly by one or more processors 510, such as machine code, or any set of instructions that will be executed indirectly, such as a script. The terms “instruction,” “application,” “process,” “step,” and “program” are used interchangeably in this disclosure. Instructions 521 may be stored in object code format for direct processing by one or more processors 510, or stored in any other computer language, including scripts or sets of standalone source code modules that are interpreted on demand or compiled in advance. Instructions 521 may include instructions that cause one or more processors 510 to act as various neural networks in this disclosure. The function, methods, and routines of instructions 521 are explained in more detail in other parts of this disclosure. Data 522 may include any information sufficient to identify relevant information, such as numbers, descriptive text, proprietary code, pointers, references to data stored in other memories such as other network locations, or information used by functions to compute relevant data. Data 522 can be formatted in any computing device readable format, such as, but not limited to, binary values, ASCII, or Unicode. Data 522 may also be stored in a computer register (not shown) or as a table or XML document with many different fields and records in a relational database.
[0050] One or more memories 520 may be any temporary or non-temporary computer-readable storage medium capable of storing content accessible by one or more processors 510, such as hard disk drives, memory cards, ROM, RAM, DVDs, CDs, USB storage, writable memory, and read-only memory. One or more of the memories 520 may include a distributed storage system, wherein instructions 521 and / or data 522 may be stored on multiple different storage devices that may be physically located in the same or different geographical locations. One or more of the memories 520 may be connected to one or more processors 510 via a network, and / or may be directly connected to or incorporated into any of the one or more processors 510.
[0051] The self-adaptive method for switch boxes and the switch panel disclosed herein, when used with the connected switch box, allow the switch panel to automatically map the switches on the panel to the relays in the switch box after the panel is powered on or the switches on it are triggered. This allows users to freely replace different types of switch boxes or interchange their positions, making the installation of the panel and switch box more convenient and flexible. Furthermore, users do not need to manually configure the binding relationship between the switches and relays, simplifying the user's operation.
[0052] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. The various embodiments disclosed herein can be combined in any way without departing from the spirit and scope of this disclosure. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.
Claims
1. A self-adaptation method for a switch box, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to the triggering of a specific switch on the switch panel, a specific relay corresponding to the specific switch is determined based on the switch's serial number x and whether reading the first parameter and / or the second parameter was successful; and The specific relay is controlled via a first communication interface in response to the specific relay in the first switch box, or via a second communication interface in response to the specific relay in the second switch box.
2. The method according to claim 1, further comprising: In response to the successful reading of the first parameter and the successful reading of the second parameter, determine whether the sequence number x of the specific switch is greater than m; In response to the fact that the sequence number x of the specific switch is not greater than m, the specific relay is determined to be the xth relay in the first switch box; In response to the fact that the sequence number x of the specific switch is greater than m, determine whether the sequence number x of the specific switch is greater than m+n; In response to the fact that the sequence number x of the specific switch is not greater than m+n, the specific relay is determined to be the xm-th relay in the second switch box.
3. The method according to claim 1, further comprising: In response to a successful reading of the first parameter and a failure to read the second parameter, determine whether the sequence number x of the specific switch is greater than m; as well as In response to the fact that the sequence number x of the specific switch is not greater than m, the specific relay is determined to be the xth relay in the first switch box.
4. The method according to claim 1, further comprising: In response to a failure to read the first parameter and a success in reading the second parameter, determine whether the sequence number x of the specific switch is greater than n; as well as In response to the fact that the sequence number x of the specific switch is not greater than n, the specific relay is determined to be the xth relay in the second switch box.
5. The method according to claim 1, wherein, In response to the power-on of the switch panel, the first parameter and the second parameter are read via the first communication interface and the second communication interface, respectively.
6. A self-adaptation method for a switch box, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. Based on the serial numbers of multiple switches on the switch panel and whether the reading of the first parameter and / or the second parameter was successful, the multiple switches on the switch panel are associated with corresponding relays in the first switch box and / or the second switch box; and In response to the triggering of a specific switch on the switch panel, the specific relay is controlled via a communication interface connected to the switch box containing the specific relay associated with the specific switch.
7. A self-adaptation method for a switch box, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to successful reading of the first parameter and successful reading of the second parameter, the first to the mth switches of the switch panel are associated with the first to the mth relays connected to the first communication interface, and the (m+1)th to the (m+n)th switches of the switch panel are associated with the first to the nth relays connected to the second communication interface. In response to a successful reading of the first parameter and a failure to read the second parameter, the first to the mth switches of the switch panel are associated with the first to the mth relays connected to the first communication interface, respectively. as well as In response to a failure to read the first parameter and a success in reading the second parameter, the first to the nth switches of the switch panel are associated with the first to the nth relays of the relays connected to the second communication interface, respectively.
8. A self-adaptation method for a switch box, executed by a switch panel, the switch panel including a first communication interface and a second communication interface for connecting the switch box, the method comprising: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to the activation of switch x in the switch panel, the following operation is performed: In response to successful reading of both the first and second parameters, if x is not greater than m, the xth relay in the first switch box is controlled via the first communication interface; if x is greater than m, the xmth relay in the second switch box is controlled via the second communication interface; or In response to a successful read of the first parameter and a failed read of the second parameter, the x-th relay in the first switch box is controlled via the first communication interface; or In response to the failure to read the first parameter and the success of reading the second parameter, the xth relay in the second switch box is controlled via the second communication interface.
9. A switch panel, comprising: Multiple switches; The first communication interface is used to connect to the first switch box; The second communication interface is used to connect to the second switch box. as well as The controller is configured as follows: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to the triggering of a specific switch among the plurality of switches, a specific relay corresponding to the specific switch is determined based on the sequence number x of the specific switch and whether reading the first parameter and / or the second parameter was successful; and The specific relay is controlled via a first communication interface in response to the specific relay in the first switch box, or via a second communication interface in response to the specific relay in the second switch box.
10. The switch panel according to claim 9, wherein, The controller is also configured to: In response to the successful reading of the first parameter and the successful reading of the second parameter, determine whether the sequence number x of the specific switch is greater than m; In response to the fact that the sequence number x of the specific switch is not greater than m, the specific relay is determined to be the xth relay in the first switch box; In response to the fact that the sequence number x of the specific switch is greater than m, determine whether the sequence number x of the specific switch is greater than m+n; In response to the fact that the sequence number x of the specific switch is not greater than m+n, the specific relay is determined to be the xm-th relay in the second switch box.
11. The switch panel according to claim 9, wherein, The controller is also configured to: In response to a successful reading of the first parameter and a failure to read the second parameter, determine whether the sequence number x of the specific switch is greater than m; and In response to the fact that the sequence number x of the specific switch is not greater than m, the specific relay is determined to be the xth relay in the first switch box.
12. The switch panel according to claim 9, wherein, The controller is also configured to: In response to a failure to read the first parameter and a success in reading the second parameter, determine whether the sequence number x of the specific switch is greater than n; and In response to the fact that the sequence number x of the specific switch is not greater than n, the specific relay is determined to be the xth relay in the second switch box.
13. The switch panel according to claim 9, wherein, The controller is also configured to: In response to the power-on of the switch panel, the first parameter and the second parameter are read via the first communication interface and the second communication interface, respectively.
14. A switch panel, comprising: Multiple switches; The first communication interface is used to connect to the first switch box; The second communication interface is used to connect to the second switch box. as well as The controller is configured as follows: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. Based on the serial numbers of multiple switches on the switch panel and whether the reading of the first parameter and / or the second parameter was successful, the multiple switches on the switch panel are associated with corresponding relays in the first switch box and / or the second switch box; and In response to the triggering of a specific switch on the switch panel, the specific relay is controlled via a communication interface connected to the switch box containing the specific relay associated with the specific switch.
15. A switch panel, comprising: Multiple switches; The first communication interface is used to connect to the first switch box; The second communication interface is used to connect to the second switch box. as well as The controller is configured as follows: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to successful reading of the first parameter and successful reading of the second parameter, the first to the mth switches among the plurality of switches are associated with the first to the mth relays among the relays connected to the first communication interface, and the (m+1)th to the (m+n)th switches among the plurality of switches are associated with the first to the nth relays among the relays connected to the second communication interface. In response to a successful reading of the first parameter and a failure to read the second parameter, the first to the mth switches among the plurality of switches are respectively associated with the first to the mth relays among the relays connected to the first communication interface; as well as In response to a failure to read the first parameter and a success in reading the second parameter, the first to the nth switches among the plurality of switches are associated with the first to the nth relays among the relays connected to the second communication interface, respectively.
16. A switch panel, comprising: Multiple switches; The first communication interface is used to connect to the first switch box; The second communication interface is used to connect to the second switch box. as well as The controller is configured as follows: The first parameter and the second parameter are read through the first communication interface and the second communication interface respectively. The first parameter indicates the number m of relays included in the first switch box connected to the first communication interface, and the second parameter indicates the number n of relays included in the second switch box connected to the second communication interface. In response to the activation of switch x in the switch panel, the following operation is performed: In response to successful reading of both the first and second parameters, if x is not greater than m, the xth relay in the first switch box is controlled via the first communication interface; if x is greater than m, the xmth relay in the second switch box is controlled via the second communication interface; or In response to a successful read of the first parameter and a failed read of the second parameter, the x-th relay in the first switch box is controlled via the first communication interface; or In response to the failure to read the first parameter and the success of reading the second parameter, the xth relay in the second switch box is controlled via the second communication interface.
Citation Information
Patent Citations
Multi-mode configuration method and device of control panel, equipment, panel and medium
CN114690649A