A double-switch linkage control system based on RS485 communication

By designing a dual-switch linkage control system in an RS485 communication system, and utilizing an independent communication control module and a mode selection DIP switch, any switch can actively initiate control commands, solving the problem of inflexible operation in a fixed master-slave mode and achieving efficient and flexible switch linkage control.

CN224342192UActive Publication Date: 2026-06-09SHANGHAI KINGSI POWER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Utility models(China)
Current Assignee / Owner
SHANGHAI KINGSI POWER CO LTD
Filing Date
2025-06-17
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing switch linkage systems based on RS485 communication, the fixed master-slave mode results in the slave device being unable to actively control the system, leading to inflexible operation, slow system response, and a lack of redundancy and fault tolerance.

Method used

Design a dual-switch linkage control system. The first and second switches are directly interconnected via an RS485 communication bus. Each switch is equipped with an independent communication control module and a mode selection DIP switch, enabling either switch to actively initiate control commands, achieving flexible operation and rapid response.

Benefits of technology

It breaks the fixed master-slave relationship limitation of traditional RS485 systems, greatly improves the flexibility and response speed of system operation, enhances the reliability and security of the system, and meets the needs of various application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN224342192U_ABST
    Figure CN224342192U_ABST
Patent Text Reader

Abstract

The application discloses a double-switch linkage control system based on RS485 communication and relates to the field of power system control.The structure comprises a first switch and a second switch, and the first switch and the second switch are directly interconnected through an RS485 communication bus; wherein the first switch comprises a first mode selection dial code switch, a first opening button, a first closing button, a first running state indicator, a first alarm indicator, a first internal RS485 communication interface, a first state detection circuit module and a first communication control module; the second switch comprises a second mode selection dial code switch, a second opening button, a second closing button, a second running state indicator, a second alarm indicator, a second internal RS485 communication interface, a second state detection circuit module and a second communication control module. Through the application, the problem that the switch system based on RS485 communication needs to fix the master-slave relationship and the slave machine cannot actively control, resulting in inflexible operation, is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power system control, and more specifically, to a dual-switch linkage control system based on RS485 communication. Background Technology

[0002] In the field of electrical control, RS485 communication-based switch linkage systems are widely used in scenarios such as dual power supply switching and parallel capacity expansion. However, existing RS485 switch linkage systems typically employ a fixed master-slave (one master, one slave) communication architecture, where the master is responsible for sending control commands, and the slave can only respond passively. This architecture suffers from poor operational flexibility; the slave cannot proactively initiate control commands and must rely on the master's operation, resulting in sluggish system response and failing to meet the needs of scenarios requiring rapid switching or dual-machine collaborative control. If the master fails, the slave cannot take over control, causing the entire system to fail, lacking redundancy and fault tolerance.

[0003] There is currently no effective solution to the problem that switching systems based on RS485 communication in related technologies require a fixed master-slave relationship, and the slave device cannot actively control the system, resulting in inflexible operation. Utility Model Content

[0004] The main purpose of this application is to provide a dual-switch linkage control system based on RS485 communication, so as to solve the problem that the switch system based on RS485 communication in the related technology requires a fixed master-slave relationship, and the slave device cannot actively control it, resulting in inflexible operation.

[0005] To achieve the above objectives, a dual-switch linkage control system based on RS485 communication is provided. This system includes: a first switch and a second switch, which are directly interconnected via an RS485 communication bus. The first switch includes: a first mode selection DIP switch for switching between single-machine mode, parallel mode, or interlocking mode; a first open button; a first close button; a first operating status indicator for displaying the open / close status of the first switch; a first alarm indicator for displaying the fault alarm status of the first switch; a first internal RS485 communication interface connected to the second internal RS485 communication interface of the second switch; a first status detection circuit module for real-time detection of the open / close status and electrical parameters of the first switch; and a first communication control module. The first switch is used to select the DIP switch setting according to the first mode and transmit the linkage control signal through the RS485 communication bus; the second switch includes: a second mode selection DIP switch for switching between single-machine mode, parallel mode, or interlock mode; a second open button; a second close button; a second running status indicator for displaying the open / close status of the second switch; a second alarm indicator for displaying the fault alarm status of the second switch; a second internal RS485 communication interface connected to the first internal RS485 communication interface of the first switch; a second status detection circuit module for real-time detection of the open / close status and electrical parameters of the second switch; and a second communication control module for transmitting the linkage control signal through the RS485 communication bus according to the setting of the second mode selection DIP switch.

[0006] Optionally, the first state detection circuit module includes: a first voltage detection unit for monitoring the power supply state of the first switch input terminal; a first current detection unit for acquiring the load current of the first switch in real time; and a first temperature sensor for detecting the operating temperature of the first switch body.

[0007] Optionally, the second state detection circuit module includes: a second voltage detection unit for monitoring the power supply status of the second switch input terminal; a second current detection unit for acquiring the load current of the second switch in real time; and a second temperature sensor for detecting the operating temperature of the second switch body.

[0008] Optionally, the first state detection circuit module and the first communication control module are connected via an SPI interface to transmit electrical parameter data in real time.

[0009] Optionally, the second state detection circuit module and the second communication control module are connected via an SPI interface to transmit electrical parameter data in real time.

[0010] Optionally, the contacts of the first mode selection DIP switch are directly connected to the GPIO pins of the first communication control module, and the contacts of the second mode selection DIP switch are directly connected to the GPIO pins of the second communication control module.

[0011] Optionally, the physical connection between the first internal RS485 communication interface and the second internal RS485 communication interface is to directly interconnect using twisted-pair shielded cables, with the shielding layer grounded.

[0012] Optionally, the mechanical structure of the first trip button and the first close button is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

[0013] Optionally, the mechanical structure of the second trip button and the second close button is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

[0014] Optionally, the power modules of the first and second switches draw power from the three-phase input terminals.

[0015] Compared with the prior art, the beneficial effects of this utility model are as follows: The dual-switch linkage control system based on RS485 communication provided by this application includes a first switch and a second switch. The first switch and the second switch are directly interconnected through an RS485 communication bus. Through the innovative design of configuring independent communication control modules and mode selection DIP switches for both switches, the limitation of the traditional RS485 system that must have a fixed master-slave relationship is completely broken, so that any switch can actively initiate control commands, which greatly improves the flexibility and response speed of system operation. Attached Figure Description

[0016] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0017] Figure 1 This is a schematic diagram of a dual-switch linkage control system based on RS485 communication provided according to an embodiment of this application;

[0018] Figure 2 This is a schematic diagram of the transmission timing of handshake frames and heartbeat frames according to embodiments of this application;

[0019] Figure 3 This is an internal communication flowchart of sending opening and closing commands to any switch in the parallel mode according to the embodiments of this application;

[0020] Figure 4 This is a flowchart illustrating the process of sending commands to a closed switch to control the switching between two switches under the interlocking mode provided in the embodiments of this application.

[0021] Figure 5 This is a flowchart illustrating the process of sending commands to a switch in the open state to control the switching of two switches under the interlocking mode provided in the embodiments of this application;

[0022] Wherein, 01 is the first switch, and 02 is the second switch;

[0023] 011-First mode selection DIP switch, 012-First trip button, 013-First close button, 014-First operating status indicator, 015-First alarm indicator, 016-First internal RS485 communication interface, 017-First status detection circuit module, 018-First communication control module, 021-First mode selection DIP switch, 022-First trip button, 023-First close button, 024-First operating status indicator, 025-First alarm indicator, 026-First internal RS485 communication interface, 027-First status detection circuit module, 028-Second communication control module. Detailed Implementation

[0024] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0025] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0027] Example 1

[0028] This application provides, as follows: Figure 1 The dual-switch linkage control system based on RS485 communication shown includes:

[0029] The first switch 01 and the second switch 02 are directly interconnected via an RS485 communication bus.

[0030] Specifically, the two switches (switch 01 and switch 02) are in listening mode most of the time, only switching to sending mode when a command is needed, and immediately switching back to listening mode after sending. Command response processing is handled within an interrupt, ensuring fast response times. Upon power-on, both switches immediately send a handshake frame, and one switch must reply immediately upon receiving it. To prevent simultaneous handshakes from causing both switches to miss each other, a failed handshake is retransmitted after a random delay. After a successful handshake, the two switches send heartbeat frames at regular intervals to confirm each other's normal operation. Heartbeat frames do not require a reply; one switch waits a fixed time T after receiving the other's heartbeat frame before sending its own, ensuring no heartbeat frame conflicts occur due to time differences between the two switches. The handshake and heartbeat frames include information such as the switch's open / closed status and fault alarm status, allowing the two switches to understand each other's status. If a switch does not receive a heartbeat frame within 2T after sending its own heartbeat frame, it can unilaterally send heartbeat frames at 2T intervals. If no heartbeat frame is received from the other switch after the set maximum allowed heartbeat frame interval, it can be determined that the other switch has lost power, is malfunctioning, or that there is a communication failure between the two switches. Simultaneously, the switch will not send heartbeat frames but will send handshake frames. If the other switch resumes normal operation or the communication failure is resolved, a connection can be immediately established, and normal operation can resume. Therefore, the dual-switch linkage control system based on RS485 communication provided in this application includes a first switch and a second switch. The first and second switches are directly interconnected via an RS485 communication bus. Through the innovative design of configuring independent communication control modules and mode selection DIP switches for both switches, the limitation of traditional RS485 systems requiring a fixed master-slave relationship is completely broken, allowing any switch to actively initiate control commands, significantly improving the flexibility and response speed of system operation.

[0031] The first switch 01 includes: a first mode selection DIP switch 011 for switching between single-machine mode, parallel mode, or interlock mode; a first open button 012; a first close button 013; a first operating status indicator 014 for displaying the open / close status of the first switch; a first alarm indicator 015 for displaying the fault alarm status of the first switch; a first internal RS485 communication interface 016 for connecting to the second internal RS485 communication interface of the second switch; a first status detection circuit module 017 for real-time detection of the open / close status and electrical parameters of the first switch; and a first communication control module 018 for transmitting linkage control signals via an RS485 communication bus according to the setting of the first mode selection DIP switch.

[0032] The second switch 02 includes: a second mode selection DIP switch 021 for switching between single-machine mode, parallel mode, or interlock mode; a second open button 022; a second close button 023; a second operating status indicator 024 for displaying the open / close status of the second switch; a second alarm indicator 025 for displaying the fault alarm status of the second switch; a second internal RS485 communication interface 026 connected to the first internal RS485 communication interface of the first switch; a second status detection circuit module 027 for real-time detection of the open / close status and electrical parameters of the second switch; and a second communication control module 028 for transmitting linkage control signals via the RS485 communication bus according to the setting of the second mode selection DIP switch.

[0033] Specifically, both the first switch 01 and the second switch 02 include mode selection DIP switches, providing user-configurable mode selection so that the system can adapt to different application scenarios. When the mode selection DIP switches of both switches are set to parallel mode, either switch can send a synchronous closing or opening command frame to the other switch by operating a button on one switch, sending a communication command, or due to electrical protection (e.g., over-temperature protection). In this case, the switch sending the command frame (referred to as switch A) becomes the temporary master, and the other switch (referred to as switch B) becomes the temporary slave. After receiving the closing or opening command from switch A, switch B confirms whether the command can be executed and then sends a response frame to switch A via the RS485 communication bus, indicating whether it agrees to execute the command. After agreeing to execute, the two switches synchronously close or open in parallel. After the action is completed, switch B sends an action feedback frame to switch A, reporting whether the closing or opening was successful. Switch A combines the feedback frame from switch A with its own closing or opening execution status. Once the action command execution is completed, the two switches return to an equal mode, and the master-slave distinction is no longer distinguished. Because when switch A sends the opening / closing command, switch B might be sending a heartbeat command and thus unable to receive the opening / closing command frame. Therefore, sending the opening / closing command will result in multiple timeout retries. Since heartbeat frames do not require a response, the other switch, after finishing sending the heartbeat frame and switching to listening mode, will quickly receive the retransmitted opening / closing command frame and then execute the command. This method ensures that the action command is not lost.

[0034] Specifically, when both switches' mode selection DIP switches are set to interlock mode, this is suitable for applications requiring rapid switching between dual power supply lines. If line switching is required, one switch must be opened first, followed by the other closing. Both switches cannot be closed simultaneously, otherwise, a loop will form between the two different power supplies, causing damage to the electrical system. This opening-then-closing action can also be achieved by operating the button or contact signal of either switch, or by sending communication signals. Switching operations can also be preset with a switching interval or executed immediately to meet different site requirements. If an operator wants to open a switch that was originally closed (referred to as switch A) and close another switch (referred to as switch B), switch A will become a temporary master switch. It will first open itself, and after completing its opening action and waiting for the set switching delay, it will send a closing command to switch B. Upon receiving the closing command, if switch B's state meets the closing conditions, it will send a response frame to switch A and close the switch. After switch B sends a closing completion notification, it then sends a closing completion feedback frame to switch A.

[0035] On the other hand, if an operator wants to close a switch that was originally open (referred to as switch A) while opening another switch (referred to as switch B), switch A will become a temporary master switch. It will first send a opening command to switch B via the RS485 communication bus. After receiving the opening command, switch B will respond according to its own status. If switch B can perform the opening action, it will immediately perform the opening action and send an action feedback frame to switch A after the opening is completed. After receiving the action feedback frame from switch B, switch A will wait for the set switching delay before sending a closing request frame to switch B for confirmation. If switch B's status does not change after opening, it will send a closing permission response, and switch A will immediately close the switch. The fact that switch A still sends a closing request frame for confirmation after switch B opens is also a necessary safety guarantee, because during the waiting switching delay, switch B may experience an abnormal malfunction or be manually closed before switch A has had time to notify it. The opening and closing command frames and closing request command frames sent by switch A to switch B will also have multiple timeout retries to prevent the commands from being unacceptable due to the transmission of heartbeat frames.

[0036] Specifically, the first and second trip buttons are used to manually operate the tripping action of their respective switches. When one switch performs a tripping operation via a button, it notifies the other switch through the communication control module to perform a coordinated operation.

[0037] Specifically, the first closing button and the second closing button are used to manually operate the closing action of their respective switches. Similar to the opening button, the closing operation is also notified to the other switch via the communication control module.

[0038] Specifically, both the first and second switches include a status detection circuit module for real-time detection of the switch's open / closed status and electrical parameters. Detectable voltage parameters include input voltage, voltage harmonics, and voltage sags, while detectable current parameters include load current, short-circuit current, and current harmonics.

[0039] Specifically, the first and second communication control modules are responsible for the communication tasks of the first and second switches, respectively. Each module can independently receive, parse, send, and respond to signals on the RS485 communication bus, ensuring that each switch can operate according to its own mode selection DIP switch settings. This design allows the two switches to act as master or slave to each other in different operating scenarios. For example, in parallel mode, either switch can become a temporary master, sending opening and closing commands to the other switch. This flexibility relies on the independent processing capabilities of the two communication control modules.

[0040] Specifically, the first and second state detection circuit modules detect the opening / closing status and electrical parameters of their respective switches, and can send this information to each other via a communication interface. Through the communication control module, the two switches can monitor each other's status in real time. For example, when one switch needs to perform an opening / closing operation, it sends a command to the other switch via the communication control module and waits for status feedback from the other, ensuring the safety and reliability of the operation.

[0041] In summary, the first and second switches are interconnected via an RS485 communication bus, achieving efficient communication and coordinated control. The communication control module handles the communication protocol and signal transmission, the status detection module provides real-time status information, and indicator lights and buttons are used for operation and status display. This symmetrical design not only improves the system's flexibility and versatility but also enhances its reliability and security, enabling the two switches to work collaboratively in different operating modes to meet the needs of various application scenarios. This solves the problem in related technologies where RS485 communication-based switch systems require a fixed master-slave relationship, and the slave device cannot actively control the switch, resulting in inflexible operation.

[0042] Optionally, the first state detection circuit module 017 includes: a first voltage detection unit for monitoring the power supply state of the first switch input terminal; a first current detection unit for acquiring the load current of the first switch in real time; and a first temperature sensor for detecting the operating temperature of the first switch body.

[0043] Optionally, the second state detection circuit module 027 includes: a second voltage detection unit for monitoring the power supply status of the second switch input terminal; a second current detection unit for acquiring the load current of the second switch in real time; and a second temperature sensor for detecting the operating temperature of the second switch body.

[0044] Optionally, the first state detection circuit module 017 and the first communication control module 018 are connected via an SPI interface to transmit electrical parameter data in real time.

[0045] Optionally, the second state detection circuit module 027 and the second communication control module 028 are connected via an SPI interface to transmit electrical parameter data in real time.

[0046] Specifically, the three detection units of the first state detection circuit module can form a distributed detection network through the SPI bus. For example, the sampling period can be configured as follows: voltage 100ms / time, current 50ms / time, temperature 1s / time in normal mode; and all parameters are sampled at high speed in fault mode at 10ms.

[0047] Optionally, the contacts of the first mode selection DIP switch 011 are directly connected to the GPIO pins of the first communication control module 018.

[0048] Optionally, the contacts of the second mode selection DIP switch 021 are directly connected to the GPIO pins of the second communication control module 028.

[0049] Specifically, the GPIO level can be directly changed by the mechanical position of the physical DIP switch, forming a pure hardware signal path of "switch contact-GPIO-firmware" without the need for intermediate conversion circuits, thereby achieving the beneficial effect of improved real-time performance.

[0050] Optionally, the physical connection between the first internal RS485 communication interface 016 and the second internal RS485 communication interface 026 is to directly interconnect using twisted-pair shielded cables, with the shielding layer grounded.

[0051] Specifically, twisted-pair shielded cable is a special type of cable consisting of two or more insulated wires twisted together in a specific manner and wrapped in a shielding material. Twisted-pair cables effectively reduce electromagnetic interference, while the shielding layer further enhances anti-interference capabilities. Direct interconnection of twisted-pair shielded cables refers to the direct connection of the RS485 communication interfaces of the first and second switches via this type of twisted-pair shielded cable, eliminating the need for additional repeater equipment or complex wiring. Grounding the shielding layer effectively eliminates the effects of electromagnetic interference because grounding provides a low-impedance path for interfering signals, guiding them to the earth and thus protecting the integrity of the communication signal. By employing a direct interconnection of twisted-pair shielded cables and grounding the shielding layer, the system achieves significant improvements in anti-interference capabilities, communication reliability, and signal integrity.

[0052] Optionally, the mechanical structure of the first trip button 012 and the first close button 013 is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

[0053] Optionally, the mechanical structure of the second trip button 022 and the second close button 023 is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

[0054] Specifically, the aforementioned dual-contact self-locking button design includes two contacts. When the button is pressed, both contacts close or open simultaneously, ensuring stable signal transmission. Simultaneously, the button has a self-locking function, meaning that once pressed, it remains in a locked state and will not automatically spring back due to external forces (such as vibration). Once the button is pressed and locked, its state remains unchanged until a reverse operation is performed (e.g., pressing the button again to unlock). This design ensures the stability and reliability of the switch state, preventing unexpected changes in the switch state due to misoperation or external interference.

[0055] Optionally, the power modules of the first switch 01 and the second switch 02 draw power through the three-phase input terminals.

[0056] Specifically, the power modules of the first and second switches are designed to draw power from a three-phase power system. Three-phase power can be used to provide power to high-power equipment or in situations requiring a stable power supply. By adopting a three-phase input design, the system achieves significant improvements in high-power support, power supply stability, adaptability, system efficiency, equipment compatibility, and reliability.

[0057] Specifically, the power modules for the first and second switches can also be powered by an external power source.

[0058] Optionally, the frame types sent by the first and second switches via internal RS485 communication include handshake frames, heartbeat frames, closing request frames, command frames, action feedback frames, and corresponding responses. The heartbeat frame does not include a response. Each frame consists of a type byte, a data field, and a checksum field. For faster response, the baud rate can be increased, a shorter data field can be designed, or the checksum field can be omitted. Simultaneously, the response task can be placed in a timer interrupt within the MCU program to determine the interval between received frames. If a reception timeout occurs, it can be determined that a frame has been sent, and a response can be immediately initiated, improving the real-time performance of the response.

[0059] A frame communication can continuously send handshake frames through the internal communication bus at random intervals after the switch is powered on. Using random time intervals can prevent two switches from continuously sending handshake frames at the same time after being powered on, thus preventing them from communicating with each other. Figure 2The timing diagram illustrates the transmission of handshake and heartbeat frames. Once one switch receives a handshake frame, it immediately sends a handshake response frame, establishing communication between the two switches. The handshake frame also includes the current mode selection of each switch. If the modes of the two switches are inconsistent, it is considered a configuration error, triggering an immediate alarm and locking the switch to prevent malfunctions or personal injury.

[0060] After communication is established between two switches, the heartbeat frame is first sent by the sender of the handshake frame at interval T. The other switch, upon receiving the heartbeat frame, does not need to respond but instead sends its own heartbeat frame at interval T. If either switch does not receive a heartbeat frame within 2T, it will immediately send one and continue sending heartbeat frames at a frequency of 2T. If no heartbeat frame is received within 6T, it is assumed that the other switch has lost connection, and that switch will begin sending handshake frames at random intervals, waiting to re-establish the connection. If a switch configured in parallel or interlocked mode confirms a lost connection, it will also issue an alarm and enter a locked state.

[0061] Figure 3 This diagram illustrates the internal communication flow when sending a closing / opening command to either switch in parallel operation. Taking the first switch as an example, the operation can be initiated via contact signals, buttons, or communication commands on the first switch. Alternatively, the first switch may experience a fault requiring tripping. The specific process is as follows:

[0062] 1. The first switch will first confirm that its own power supply, drive, etc. are normal and can operate, and then send the corresponding opening and closing command to the second switch and wait for the second switch to respond;

[0063] 2. If the second switch receives a command through the second communication control module, it will also check whether its own power supply and drive are normal;

[0064] (1) If everything is normal, the second switch will respond to the first switch to allow the action to resume. If there is an abnormality, the second switch will respond to the first switch to cancel the action. Upon receiving this response, the first switch will cancel the action and issue a corresponding warning.

[0065] (2) If the first switch does not receive a response from the second switch within the set timeout period, it will retry multiple times. After confirming that there is no response, it will issue a corresponding warning.

[0066] 3. If action is permitted, the second switch will activate after all response frames have been sent, and the first switch will activate after receiving the response and verifying it. The two switches can then activate synchronously.

[0067] 4. If both switches are activated, because the activation times of the two switches may differ, the first switch will wait for the action feedback frame from the second switch during the set timeout period.

[0068] 5. If the second switch successfully responds, the first switch can report the action via external communication or contact signal. If the second switch fails to respond or fails to respond within the timeout period, the first switch will also illuminate the alarm indicator and report the action via external communication.

[0069] Figure 4 This diagram illustrates a flowchart of how two switches, in interlocked mode, send commands to a closed switch to control the opening and closing of the two switches. For example, when the first switch issues an opening / closing command, it is in the closed state, and the second switch is in the open state.

[0070] 1. When the first switch is initially closed, after receiving an external state switching command, it first determines whether it is in an executable command state: if it is not executable, it directly responds with a non-execution action reply; if it is an executable command, it responds with an executable action reply, and immediately executes the tripping action after the response is completed.

[0071] 2. After the first switch trips, it determines whether its own action was successful. If it is unsuccessful, it determines that the switching command failed and issues a warning; if it is successful, it begins to wait according to the set switching delay.

[0072] 3. After the delay ends, the first switch sends an internal closing command frame to the second switch. After sending the internal closing command, the first switch will also wait for the response from the second switch. If there is no response, it will retry after a timeout.

[0073] 4. After receiving the closing command, the second switch determines whether it is in a state where the closing command can be executed: if it cannot be executed, it responds with an unexecuted command reply; if it can be executed, it responds with an executable command reply, and then immediately executes the closing action after the reply is completed.

[0074] 5. After completing the closing action, the second switch will send feedback on whether the action was successful or failed, based on its own closing result. After receiving the executable command to restore from the second switch, the first switch will wait to receive feedback from the second switch. If the received feedback indicates failure, the switching command will be deemed to have failed and a warning will be issued; if the received feedback indicates success, the switching will be confirmed and the final result will be fed back.

[0075] Figure 5This document illustrates a flowchart demonstrating how two switches, in interlocked mode, control the opening and closing switching of the two switches by sending a command to the switch in the open state. For example, when a switching command is issued to the first switch, it is in the open state, and the second switch is in the closed state. The specific process is as follows:

[0076] 1. Upon receiving an external state switching command, the first switch determines whether it is in a state where the switching command can be executed. If it cannot be executed, it directly reports that it will not perform the action; if it can be executed, it sends an internal tripping command frame to the second switch.

[0077] 2. After receiving the tripping command through the second communication control module, the second switch determines whether it is in an executable tripping state. If it is not executable, it responds with an executable command; if it is executable, it responds with an executable command and then performs the tripping action, while the first switch begins to wait for feedback from the second switch.

[0078] 3. After performing the tripping action, the second switch determines whether the tripping result confirmation action was successful. In interlocked mode, when the second switch completes the tripping action and sends a successful action feedback to the first switch, the first switch receives the feedback signal through the first internal RS485 communication interface, and the first communication control module parses and processes it. If successful, it replies with a successful action feedback to the first switch, and the first switch begins to execute the subsequent process; if it fails, it replies with an action failure feedback, and the first switch determines that the switching command failed and issues a warning.

[0079] 4. After receiving successful feedback from the second switch, the first switch will wait for a set delay before preparing to perform the closing action. After the delay, the first switch sends a closing request command frame to the second switch and re-enters the command receiving and judgment process;

[0080] 5. After receiving the closing request frame, the second switch will respond with an executable reply if it confirms that it is in the open state; otherwise, it will respond with an inexecutable reply. If the first switch does not receive a duplicate request within the timeout period, it will retransmit the request; if it receives an inexecutable reply, it will cancel the action, consider the switching to have failed, and issue a warning; if it receives a command response frame and confirms that the content is executable, it will begin to execute the closing action.

[0081] 6. After the first switch completes the closing action, it judges its own closing result. If the closing fails, it determines that the switching command has failed and issues a warning; if the closing is successful, it reports the successful action result.

[0082] The entire control method design process achieves reliable control of state switching through dual-switch state verification, action execution judgment, command interaction response, and timeout retry mechanism, ensuring the accuracy of command execution and system stability.

Claims

1. A dual-switch linkage control system based on RS485 communication, characterized in that, include: A first switch and a second switch, the first switch and the second switch being directly interconnected via an RS485 communication bus; The first switch includes: The first mode selection DIP switch is used to switch between stand-alone mode, parallel mode, or interlock mode. First trip button; First closing button; The first operating status indicator light is used to display the opening and closing status of the first switch; The first alarm indicator light is used to display the fault alarm status of the first switch; The first internal RS485 communication interface is connected to the second internal RS485 communication interface of the second switch; The first state detection circuit module is used to detect the opening and closing status and electrical parameters of the first switch in real time. The first communication control module is used to select the setting of the DIP switch according to the first mode and transmit the linkage control signal through the RS485 communication bus. The second switch includes: The second mode selection DIP switch is used to switch between stand-alone mode, parallel mode, or interlock mode. Second trip button; Second closing button; The second operating status indicator light is used to display the opening and closing status of the second switch; The second alarm indicator light is used to display the fault alarm status of the second switch; The second internal RS485 communication interface is connected to the first internal RS485 communication interface of the first switch. The second state detection circuit module is used to detect the opening and closing status and electrical parameters of the second switch in real time. The second communication control module is used to select the setting of the DIP switch according to the second mode and transmit the linkage control signal through the RS485 communication bus.

2. The system according to claim 1, characterized in that, The first state detection circuit module includes: The first voltage detection unit is used to monitor the power supply status of the first switch input terminal; The first current detection unit is used to collect the load current of the first switch in real time; The first temperature sensor is used to detect the operating temperature of the first switch.

3. The system according to claim 1, characterized in that, The second state detection circuit module includes: The second voltage detection unit is used to monitor the power supply status of the second switch input terminal; The second current detection unit is used to collect the load current of the second switch in real time; The second temperature sensor is used to detect the operating temperature of the second switch.

4. The system according to claim 1, characterized in that, The first state detection circuit module is connected to the first communication control module via an SPI interface to transmit electrical parameter data in real time.

5. The system according to claim 1, characterized in that, The second state detection circuit module is connected to the second communication control module via an SPI interface to transmit electrical parameter data in real time.

6. The system according to claim 1, characterized in that, The contacts of the first mode selection DIP switch are directly connected to the GPIO pins of the first communication control module, and the contacts of the second mode selection DIP switch are directly connected to the GPIO pins of the second communication control module.

7. The system according to claim 1, characterized in that, The physical connection between the first internal RS485 communication interface and the second internal RS485 communication interface is achieved by directly interconnecting them using twisted-pair shielded cables, with the shielding layer grounded.

8. The system according to claim 1, characterized in that, The mechanical structure of the first trip button and the first close button is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

9. The system according to claim 1, characterized in that, The mechanical structure of the second trip button and the second close button is a double-contact self-locking button, which remains locked after being pressed until the reverse operation is performed.

10. The system according to claim 1, characterized in that, The power modules of the first and second switches draw power from the three-phase input terminals.