Ethernet interface-based multi-purpose multi-backup control method and device, equipment and medium
Patent Information
- Application Number
- CN202311018029.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-08-14
AI Technical Summary
但是这两种控制方案中,接线繁琐且容易出错,影响调试效率,若出现线路断开或控制器IO口损害,容易导致控制异常等问题出现;同时,需要额外增加一个“专用”的中央控制器处理逻辑,增加硬件成本
[0019]本发明实施例的技术方案,应用于通过以太网交换机与多个从站设备通讯的主站设备,每个设备配置有PLC控制器和触摸屏,各触摸屏以太网接口均接入以太网交换机,通过主站设备的触摸屏,经以太网交换机实时读取各从站设备的设备状态信息,并将包括主站设备在内的所有设备的设备状态信息发送给所有从站设备;通过以太网交换机,如果确定主站设备与处于运行状态的目标从站设备通讯中断,则根据目标从站设备的设备属性,从处于在线状态的设备中选择一个启动;设备属性包括主机或备机;如果检测到主站设备的PLC控制器与主站设备的触摸屏通讯中断,同时主站设备处于运行状态,则控制主站设备停机,并根据主站设备的设备属性,从处于在线状态的设备中选择一个启动,解决了相关技术中接线复杂和硬件成本高的问题,通过触摸屏以太网接口以及以太网交换机实现设备与设备间的数据交互,减少了接线复杂性与硬件成本,提高了传输效率和调试效率,减少延时,增加了系统反应速度。
Smart Images

Figure CN116800592B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and in particular to a multi-use and multi-standby control method, apparatus, device and medium based on an Ethernet interface. Background Technology
[0002] In a central air conditioning control system, if a running unit shuts down due to a fault and there is no backup unit to take over, it will affect the user experience and may lead to serious consequences in some cases. Therefore, a reliable, easy-to-operate, and cost-effective multi-use and multi-backup control solution is needed.
[0003] Currently, hardwiring or a dedicated multi-purpose / multi-standby controller is commonly used to control the start and stop of multiple units. However, both of these control schemes involve cumbersome wiring that is prone to errors, affecting debugging efficiency. If a line is disconnected or the controller's I / O port is damaged, it can easily lead to control abnormalities. At the same time, an additional "dedicated" central controller processing logic is required, increasing hardware costs. Summary of the Invention
[0004] This invention provides a multi-use and multi-standby control method, device, equipment, and medium based on an Ethernet interface. It realizes data interaction between devices through a touch screen Ethernet interface and an Ethernet switch, reducing wiring complexity and hardware costs, improving transmission efficiency and debugging efficiency, reducing latency, and increasing system response speed.
[0005] According to one aspect of the present invention, a multi-use, multi-standby control method based on an Ethernet interface is provided, applied to a master station device. The master station device communicates with multiple slave station devices through an Ethernet switch. The master station device and the slave station devices are configured with PLC controllers and touch screens, and the Ethernet interfaces of each touch screen are connected to the Ethernet switch. The method includes:
[0006] The device status information of each slave device is read in real time through the touch screen of the master device and the Ethernet switch, and the device status information of all devices, including the master device, is sent to all slave devices.
[0007] If it is determined that communication between the master device and the target slave device that is in operation is interrupted via an Ethernet switch, then a device is selected from the online devices to be started based on the device attributes of the target slave device; the device attributes include master or backup.
[0008] If the communication between the PLC controller of the master station device and the touch screen of the master station device is interrupted, and the master station device is in operation, the master station device will be stopped, and one of the online devices will be selected to start according to the device attributes of the master station device.
[0009] According to another aspect of the present invention, a multi-use, multi-standby control method based on an Ethernet interface is provided, applied to slave devices. The slave devices communicate with a master device through an Ethernet switch. Both the master and slave devices are equipped with a PLC controller and a touch screen. The Ethernet interface of each touch screen is connected to the Ethernet switch. The method includes:
[0010] The device receives device status information from the master device and all other devices via the master device through the Ethernet switch via the touch screen on the device.
[0011] If it is determined that communication between the local machine and the master device is interrupted via an Ethernet switch, then the local machine is set to an offline state.
[0012] If a communication interruption is detected between the PLC controller and the touchscreen of the machine, and the machine is in operation, the machine will be stopped, and one of the online devices will be selected to start based on the device attributes of the machine; the device attributes include master or standby machine.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] PLC controller and touch screen;
[0015] At least one processor; and
[0016] A memory that is communicatively connected to at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to execute the Ethernet interface-based multi-use and multi-standby control method of any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions for causing a processor to execute and implement the Ethernet interface-based multi-use and multi-standby control method of any embodiment of the present invention.
[0019] The technical solution of this invention is applied to a master station device that communicates with multiple slave devices via an Ethernet switch. Each device is equipped with a PLC controller and a touch screen. The Ethernet interface of each touch screen is connected to the Ethernet switch. Through the touch screen of the master station device, the device status information of each slave device is read in real time via the Ethernet switch, and the device status information of all devices, including the master station device, is sent to all slave devices. If it is determined through the Ethernet switch that the communication between the master station device and the target slave device in the running state is interrupted, a device in the online state is selected to be started according to the device attributes of the target slave device. The device attributes include master or backup. If it is detected that the communication between the PLC controller of the master station device and the touch screen of the master station device is interrupted, and the master station device is in the running state, the master station device is controlled to stop, and a device in the online state is selected to be started according to the device attributes of the master station device. This solves the problems of complex wiring and high hardware cost in related technologies. Data interaction between devices is realized through the touch screen Ethernet interface and the Ethernet switch, reducing wiring complexity and hardware cost, improving transmission efficiency and debugging efficiency, reducing latency, and increasing system response speed.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a multi-use, multi-standby control method based on an Ethernet interface provided in Embodiment 1 of the present invention;
[0023] Figure 2 This is a diagram showing the relationship between a master station device and a slave station device according to Embodiment 1 of the present invention;
[0024] Figure 3 This is a flowchart of another multi-use and multi-standby control method based on an Ethernet interface provided in Embodiment 2 of the present invention;
[0025] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the Ethernet interface-based multi-use and multi-standby control method according to embodiments of the present invention. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "target," etc., in the specification, claims, and accompanying drawings of this invention 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 embodiments of the invention 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 a 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.
[0028] Example 1
[0029] Figure 1 This is a flowchart of a multi-use and multi-standby control method based on an Ethernet interface according to Embodiment 1 of the present invention. This embodiment is applicable to situations where the master station device communicates with the slave station device through the Ethernet interface of the touch screen via an Ethernet switch, and if it finds that the communication between the master station and the slave station is interrupted during operation, or the communication between the slave station and the master station is interrupted, other online devices are selected to run. This method can be executed by electronic devices, such as the master station device.
[0030] like Figure 1 As shown, this method is applied to a master station device, which communicates with multiple slave devices via an Ethernet switch. Both the master and slave devices are equipped with PLC controllers and touchscreens, and each touchscreen's Ethernet interface is connected to the Ethernet switch. The method includes:
[0031] S110. The device status information of each slave device is read in real time through the touch screen of the master device and the Ethernet switch, and the device status information of all devices, including the master device, is sent to all slave devices.
[0032] Among them, the touch screens connected to the Ethernet switch realize data interaction through the MODBUS-TCP protocol; and the device status information includes: online status, device attributes, running status, standby machine running switch status, power on / off status, and heartbeat detection results.
[0033] In this embodiment, as Figure 2 As shown, there is only one master station device, but there can be multiple slave stations. Both the master station device and each slave station device are equipped with a PLC controller and a touchscreen. Each touchscreen's Ethernet interface is connected to an Ethernet switch, and data exchange between touchscreens is achieved via the MODBUS-TCP protocol. The touchscreens are used to display data collected or monitored by the PLC controller, which controls the touchscreens through its internal protocol. The control program is written using the touchscreen's built-in scripting function and can be divided into the data exchange section between the master and slave stations, and the control logic section between the master and slave stations.
[0034] In this embodiment, because the touchscreens interact via the MODBUS-TCP protocol, a master-slave relationship exists. Therefore, the data interaction program between the master and slave devices is divided into a master program and a slave program. The master program enables the master device to send commands to and read data from the slave devices via an Ethernet switch; the slave program enables the slave devices to receive commands from the master device via an Ethernet switch, thus enabling data sharing between the master device and all slave devices.
[0035] In one optional implementation, the device status information is read in real time from the touch screens of each slave device via the touch screen Ethernet interface of the master device according to the MODBUS-TCP protocol, and the device status information of the master device and all slave devices is sent to the touch screens of all slave devices via the Ethernet switch. The device status information includes: online status, device attributes, running status, standby machine running switch status, power on / off status, and heartbeat detection results.
[0036] In this embodiment, since the touchscreens interact with each other via the MODBUS-TCP protocol, the master device can read the device status information of each slave device through the touchscreen Ethernet interface according to the MODBUS-TCP protocol via the Ethernet switch. This includes, for example, the device's online status, device attributes, operating status, standby machine operating switch status, power on / off status, and heartbeat detection results. Then, the master device processes the device status information of all devices, including the master device itself. For example, the online status of all devices is organized into a single word (data type), and then the processed device status information is sent to all slave devices via the Ethernet switch. This allows the master device and slave devices to share the device status information of all devices. Consequently, when any device fails and causes a shutdown, the master device can calculate the device that can take over from the master device based on the shared device status information.
[0037] Among these parameters, online status is crucial for determining whether equipment can be started. Only when the equipment is online can its ability to start be determined; if the equipment is offline, it certainly cannot start. Equipment attributes indicate whether the equipment is the primary or backup unit. Operating status indicates whether the equipment is currently running. Backup unit operation switch status refers to the equipment's status: when the backup unit operation switch is on, the equipment is a backup unit; when the backup unit operation switch is off, the equipment is the primary unit. Power on / off status includes both power-on and power-off states. Heartbeat detection results include the heartbeat detection results between the PLC controller and the touchscreen, as well as the heartbeat detection results between the primary and secondary units.
[0038] In this embodiment, scripting is performed using the built-in scripting function of the touchscreen, significantly reducing the program size of the PLC controller. Connecting each device via the touchscreen's Ethernet interface and an Ethernet switch enables data exchange between devices, reducing wiring complexity, improving debugging and transmission efficiency, reducing latency, and increasing system responsiveness. The master station sends device status information from all devices to all slave stations, increasing system reliability. No additional controller is required, reducing hardware costs.
[0039] Optionally, it also includes: configuring the device attributes of the local machine in response to a trigger operation of the standby machine operation switch on the device touchscreen; and configuring the local touchscreen Ethernet interface communication station number of the local machine in response to a local address configuration operation on the device touchscreen.
[0040] In this embodiment, the relationship between the host and the standby device can be flexibly adjusted, and the user operation is simple. Specifically, each device can be configured as the host or the standby device by setting the standby device operation switch on its own touch screen. In addition, each device can also set the touch screen Ethernet interface communication station number on the touch screen in response to the local address configuration operation.
[0041] S120. If it is determined through the Ethernet switch that the communication between the master device and the target slave device in operation is interrupted, then select one of the online devices to start based on the device attributes of the target slave device.
[0042] The device attributes include primary or backup device. The primary device operates as the main unit, and the backup device acts as a standby unit. There is no mutual backup relationship between primary devices or between backup devices; only the primary and backup devices have a mutual backup relationship. In one optional implementation, any device in an online state satisfies all of the following conditions: its touchscreen is communicating normally via MODBUS-TCP; its PLC controller is communicating normally with its touchscreen; it is fault-free; it is not in operation; and it is not under the control of a host computer. If any condition is not met, the device is offline.
[0043] Specifically, if the heartbeat detection between the master and slave devices is normal, then the touchscreen on this machine is in normal MODBUS-TCP communication mode. If the heartbeat detection between the PLC controller and the touchscreen on this machine is normal, then the communication between the PLC controller and the touchscreen is normal. Whether the device is faulty is determined by whether a fault flag is triggered. "This machine is not under host computer control" means that when remote control is selected, control is delegated to the corresponding centralized control unit.
[0044] Optionally, via an Ethernet switch, if it is determined that communication between the master device and the target slave device in operation is interrupted, then based on the device attributes of the target slave device, one device is selected from the online devices to start. This includes: if the touchscreen of the master device does not receive heartbeat detection feedback information from the target slave device in operation from the Ethernet switch, then it is determined that communication between the master device and the target slave device is interrupted, and the target slave device is offline; if the target slave device's device attribute is master, then the device with the smallest communication station number is selected from the online devices with the device attribute of standby; if the target slave device's device attribute is standby, then the device with the smallest communication station number is selected from the online devices with the device attribute of master.
[0045] In this embodiment, a heartbeat detection mechanism exists between the master and slave devices. This mechanism is used by the slave device to determine the communication status with the master device. The master device sends a heartbeat signal via an Ethernet switch, and the slave device receives the heartbeat signal via its Ethernet switch. If the slave device does not receive the heartbeat signal through the touchscreen Ethernet interface after a certain time delay, it is determined that the slave device is in a state of communication interruption with the master device. If the slave device is running at this time, it will automatically shut down and trigger its own fault flag, making it offline. Since the communication between the slave device and the master device is interrupted, it is impossible to send the communication station number of the device to be started, selected based on its own device attributes, to the master device. Therefore, after determining that the slave device's operating unit is faulty based on the heartbeat detection result, the master device will proactively calculate and start another online device based on the slave device's device attributes. Specifically, since the backup relationship exists only between the master and the standby device, if the slave device is the master, the search starts from the device with the smallest communication station number and finds the first online standby device to start; if the slave device is the standby device, the search starts from the device with the smallest communication station number and finds the first online master device to start.
[0046] It should be noted that if communication between the slave device and the master device is interrupted, but the slave device is not in a running state, the slave device will still trigger its own fault flag, making itself offline. However, the master device will not select one of the online devices to start based on the target slave device's device attributes.
[0047] S130. If it is detected that the communication between the PLC controller of the master station device and the touch screen of the master station device is interrupted, and the master station device is in the running state, then the master station device is stopped, and one of the online devices is selected to start according to the device attributes of the master station device.
[0048] In one optional implementation, if the PLC controller of the master station device does not receive heartbeat detection feedback information sent by the touch screen of the master station device, it is determined that the communication between the PLC controller of the master station device and the touch screen is interrupted; if the master station device is in running state, the master station device is stopped through the PLC controller of the master station device and set to offline state; if the device attribute of the master station device is master, the device with the smallest communication station number is selected from the devices that are online and have the device attribute of standby; if the device attribute of the master station device is standby, the device with the smallest communication station number is selected from the devices that are online and have the device attribute of master.
[0049] In this embodiment, a heartbeat detection mechanism exists between the PLC controller of the master station device and the touchscreen. This mechanism is used by the PLC controller to determine the communication status between the master station device and the touchscreen. The touchscreen sends a heartbeat signal, which the PLC controller receives. If the PLC controller does not receive the heartbeat signal sent through the touchscreen's Ethernet interface after a certain time delay, it is determined that the PLC controller is in a state of communication interruption with the touchscreen, and the master station device cannot obtain information about other devices. If the master station device is running at this time, the PLC controller will control the master station device to stop and trigger its fault flag, causing the master station device to be offline. The master station device will then calculate and start another online device based on its own device attributes. Since there is only a mutual backup relationship between the master and backup devices, if the master station device is the master, it will start from the device with the smallest communication station number and search for the first online backup device to start; if the master station device is the backup device, it will start from the device with the smallest communication station number and search for the first online master device to start.
[0050] It should be noted that if the communication between the PLC controller of the master station device and the touch screen is interrupted, but the master station device is not in operation, the master station device will still trigger its own fault flag, making the device offline. However, the master station device will not select one of the online devices to start based on its own device attributes.
[0051] The technical solution of this invention is applied to a master station device that communicates with multiple slave devices via an Ethernet switch. Each device is equipped with a PLC controller and a touch screen. The Ethernet interface of each touch screen is connected to the Ethernet switch. Through the touch screen of the master station device, the device status information of each slave device is read in real time via the Ethernet switch, and the device status information of all devices, including the master station device, is sent to all slave devices. If it is determined through the Ethernet switch that the communication between the master station device and the target slave device in the running state is interrupted, a device in the online state is selected to be started according to the device attributes of the target slave device. The device attributes include master or backup. If it is detected that the communication between the PLC controller of the master station device and the touch screen of the master station device is interrupted, and the master station device is in the running state, the master station device is controlled to stop, and a device in the online state is selected to be started according to the device attributes of the master station device. This solves the problems of complex wiring and high hardware cost in related technologies. Data interaction between devices is realized through the touch screen Ethernet interface and the Ethernet switch, reducing wiring complexity and hardware cost, improving transmission efficiency and debugging efficiency, reducing latency, and increasing system response speed.
[0052] Example 2
[0053] Figure 3This is a flowchart of another multi-use and multi-standby control method based on an Ethernet interface provided in Embodiment 2 of the present invention. This embodiment can be applied to the situation where a slave device communicates with a master device through an Ethernet switch via a touch screen Ethernet interface, and if a communication interruption is detected during operation, another online device is selected to run. This method can be executed by an electronic device, such as a slave device.
[0054] like Figure 3 As shown, this method is applied to slave devices, which communicate with a master device via an Ethernet switch. Both the master and slave devices are configured with PLC controllers and touchscreens, and the Ethernet interfaces of each touchscreen are connected to the Ethernet switch. The method includes:
[0055] S310: Through the touch screen of this device, it receives device status information of all devices, including the master device, sent by the master device via the Ethernet switch.
[0056] In this embodiment, as Figure 2 As shown, there is only one master station device, but there can be multiple slave stations. The local machine can be any one of these slave stations. Both the master station device and each slave station device are equipped with a PLC controller and a touchscreen. Each device is connected to an Ethernet switch via the touchscreen's Ethernet interface. Data exchange between touchscreens is achieved via the MODBUS-TCP protocol. The PLC controller controls the touchscreens through its internal protocol. The control program is written using the touchscreen's built-in scripting function and can be divided into the data exchange section between the master and slave stations, and the control logic section between the master and slave stations. The local machine's program is used to receive commands from the master station device and achieve data sharing with it.
[0057] In one optional implementation, the device status information of all devices, including the master device, can be received in real time from the master device's touchscreen via the local touchscreen Ethernet interface according to the MODBUS-TCP protocol and transmitted through an Ethernet switch. This enables data sharing, allowing the system to calculate replacement devices based on the shared device status information when the local device experiences a failure and downtime. The device status information includes: online status, device attributes, operating status, standby device on / off status, power on / off status, and heartbeat detection results.
[0058] In this embodiment, scripting is performed using the built-in scripting function of the touchscreen, significantly reducing the program size of the PLC controller. Connecting each device via the touchscreen's Ethernet interface and an Ethernet switch enables data exchange between devices, reducing wiring complexity, improving debugging and transmission efficiency, reducing latency, and increasing system responsiveness. The master station sends device status information from all devices to all slave stations, increasing system reliability. No additional controller is required, reducing hardware costs.
[0059] In this embodiment, the device attributes can be flexibly switched between primary and backup modes, and the user operation is simple. Specifically, the device can be configured as either a primary or backup device by setting a backup operation switch on its touchscreen. Furthermore, the device can also set its touchscreen Ethernet interface communication station number in response to a local address configuration operation on the touchscreen.
[0060] S320: If it is determined that communication between the local machine and the master station device is interrupted via an Ethernet switch, the local machine is set to an offline state.
[0061] In one alternative implementation, any device in an online state satisfies all of the following conditions: its touchscreen is communicating normally via MODBUS-TCP; its PLC controller is communicating normally with its touchscreen; the device is fault-free; the device is not in operation; and the device is not under the control of a host computer. If any condition is not met, the device is in an offline state.
[0062] In this embodiment, a heartbeat detection mechanism exists between the master and slave devices. This mechanism is used by the slave device to determine the communication status with the master device. The master device sends a heartbeat signal through an Ethernet switch, and the slave device receives the heartbeat signal through the same switch. If the slave device does not receive the heartbeat signal through the touchscreen Ethernet interface after a certain time delay, it is determined that the slave device is in a state of communication interruption with the master device. If the slave device is running at this time, its PLC controller will control the device to stop and trigger its fault flag, thus putting the device in an offline state.
[0063] It should be noted that since the communication between the slave device and the master device has been interrupted at this time, the slave device is unable to send the communication station number of the device to be started selected according to its own device attributes to the master device. Therefore, the slave device does not actually need to select a device to be started. Instead, the master device, after determining that the operating unit of the slave device is faulty based on the heartbeat detection result of the slave device, actively calculates another online device to start based on the device attributes of the slave device.
[0064] S330. If it is detected that the communication between the PLC controller and the touch screen of the machine is interrupted, and the machine is in operation, the machine is stopped and selected from the online devices to start according to the device attributes of the machine.
[0065] The device attributes include whether it is a primary or backup device. In one optional implementation, if the local PLC controller does not receive heartbeat detection feedback information from the local touchscreen, it is determined that the communication between the local PLC controller and the local touchscreen is interrupted. If the local device is in operation, the local PLC controller controls the local device to stop and sets the local device to an offline state. If the local device attribute is primary, the device with the smallest communication station number is selected from the online devices with the backup device attribute to start. If the local device attribute is backup, the device with the smallest communication station number is selected from the online devices with the primary device attribute to start.
[0066] In this embodiment, a heartbeat detection exists between the PLC controller and the touchscreen of the slave device. This heartbeat detection is used by the PLC controller to determine the communication status between the PLC controller and the touchscreen. The touchscreen sends a heartbeat signal, and the PLC controller receives the heartbeat signal. If the PLC controller does not receive the heartbeat signal through the touchscreen's Ethernet interface after a certain time delay, it is determined that the PLC controller is in a state of communication interruption with the touchscreen, and the slave device cannot obtain information about other devices. If the slave device is in a running state at this time, its PLC controller will control the slave device to stop and trigger its fault flag, causing the slave device to be in an offline state. The slave device will also calculate and start another online device based on its device attributes. Since there is only a mutual backup relationship between the master and the backup device, if the slave device is the master device, it will start from the device with the smallest communication station number and search for the first online backup device to start; if the slave device is the backup device, it will start from the device with the smallest communication station number and search for the first online master device to start.
[0067] It should be noted that if the communication between the PLC controller and the touch screen is interrupted, but the device is not in operation, the device will still trigger a fault flag, putting it in an offline state. However, the device will not select one of the online devices to start based on its device attributes.
[0068] The technical solution of this invention is applied to a slave device. The slave device communicates with a master device via an Ethernet switch. Both the master and slave devices are equipped with PLC controllers and touchscreens. Each touchscreen's Ethernet interface is connected to the Ethernet switch. Through the touchscreen, the slave device receives device status information from the master device, including the master device itself, via the Ethernet switch. If the Ethernet switch determines that communication between the slave device and the master device is interrupted, the slave device is set to an offline state. If communication interruption between the slave device's PLC controller and its touchscreen is detected, and the slave device is in a running state, the slave device is stopped, and a device is selected from the online devices to be started based on the slave device's device attributes, including master or backup. This solves the problems of complex wiring and high hardware costs in related technologies. By realizing data interaction between devices through the touchscreen's Ethernet interface and the Ethernet switch, the complexity of wiring and hardware costs are reduced, transmission efficiency and debugging efficiency are improved, latency is reduced, and system response speed is increased.
[0069] Example 3
[0070] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0071] like Figure 4 As shown, the electronic device 10 includes a PLC controller 111 and a touch screen 112, at least one processor 11, and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An Ethernet interface 15 is also connected to the bus 14.
[0072] Multiple components in electronic device 10 are connected to Ethernet interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0073] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as multi-use / multi-standby control methods based on an Ethernet interface.
[0074] In some embodiments, the Ethernet interface-based multi-use / multi-standby control method can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the Ethernet interface-based multi-use / multi-standby control method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the Ethernet interface-based multi-use / multi-standby control method by any other suitable means (e.g., by means of firmware).
[0075] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0076] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0077] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0078] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0079] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0080] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0081] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0082] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A multi-use, multi-standby control method based on an Ethernet interface, characterized in that, The method is applied to a master station device that communicates with multiple slave station devices via an Ethernet switch. The master station device and the slave station devices are equipped with PLC controllers and touchscreens, and the Ethernet interfaces of each touchscreen are connected to the Ethernet switch. The method includes: The device status information of each slave device is read in real time through the touch screen of the master device and the Ethernet switch, and the device status information of all devices, including the master device, is sent to all slave devices. If, through the Ethernet switch, it is determined that communication between the master station device and the target slave station device in operation is interrupted, then, based on the device attributes of the target slave station device, one of the online devices is selected for startup; the device attributes include master or backup; wherein, the master is the primary operating device, and the backup is the standby unit; there is no mutual backup relationship between the master and the master, or between the backups, only between the master and the backup. If it is detected that the communication between the PLC controller of the master station device and the touch screen of the master station device is interrupted, and the master station device is in the running state, then the master station device is controlled to stop, and one of the online devices is selected to start according to the device attributes of the master station device. Any device that is online satisfies all of the following conditions: The touchscreen on this device is in normal MODBUS-TCP communication mode. The PLC controller and the touch screen of this machine communicate normally. This machine is functioning correctly; This machine is not running; and This machine is not under the control of a host computer.
2. The method according to claim 1, characterized in that, Touchscreens connected to the Ethernet switch interact with each other via the MODBUS-TCP protocol; and, The device status information includes: online status, device attributes, operating status, standby machine operation switch status, power on / off status, and heartbeat detection results.
3. The method according to claim 1, characterized in that, If, via the Ethernet switch, it is determined that communication between the master device and the target slave device in operation is interrupted, then, based on the device attributes of the target slave device, one device is selected from the online devices to be started, including: If the touchscreen of the master station device does not receive heartbeat detection feedback information from the Ethernet switch from the target slave device which is in operation, it is determined that the communication between the master station device and the target slave device is interrupted, and the target slave device is offline. If the target slave device has the device attribute of master, then select the device with the smallest communication station number from the online devices with the device attribute of standby; If the target slave device is a standby device, then the device with the smallest communication station number will be selected from the online devices with the device attribute of master.
4. The method according to claim 1, characterized in that, If a communication interruption is detected between the PLC controller of the master station device and the touchscreen of the master station device, and the master station device is in operation, then the master station device is controlled to stop, and a device is selected from the online devices to be started according to the device attributes of the master station device, including: If the PLC controller of the master station device does not receive the heartbeat detection feedback information sent by the touch screen of the master station device, it is determined that the communication between the PLC controller of the master station device and the touch screen is interrupted. If the master station equipment is in operation, the PLC controller of the master station equipment is used to control the master station equipment to stop and set the master station equipment to an offline state. If the device attribute of the master station device is host, then select the device with the smallest communication station number from the devices that are online and have the device attribute of standby; If the primary station device is a standby device, then the device with the smallest communication station number will be selected from the online devices with the primary device attribute and the lowest communication station number for startup.
5. The method according to claim 1, characterized in that, Also includes: Configure the device properties of this machine in response to a trigger operation of the standby operation switch on the device touchscreen; In response to a local address configuration operation on the device's touchscreen, configure the local touchscreen Ethernet interface communication station number.
6. A multi-use, multi-standby control method based on an Ethernet interface, characterized in that, The method is applied to slave devices, which communicate with a master device via an Ethernet switch. Both the master and slave devices are equipped with a PLC controller and a touchscreen, and each touchscreen's Ethernet interface is connected to the Ethernet switch. The method includes: The device receives device status information of all devices, including the master device, sent by the master device via the Ethernet switch through the touch screen of the device. If it is determined through the Ethernet switch that communication between the local machine and the master station device is interrupted, the local machine is set to an offline state. If a communication interruption is detected between the PLC controller and the touchscreen of the machine, and the machine is in operation, the machine will be stopped, and one of the online devices will be selected to start based on the device attributes of the machine; the device attributes include main machine or standby machine. The master station device is configured to, via the Ethernet switch, if it determines that communication between the master station device and the target slave station device in operation is interrupted, select one of the online devices to start based on the device attributes of the target slave station device; the device attributes include master or backup; wherein the master is the primary operating device and the backup is the standby unit; there is no mutual backup relationship between the master and the master, or between the backups; only the master and the backup have a mutual backup relationship. Any device that is online satisfies all of the following conditions: The touchscreen on this device is in normal MODBUS-TCP communication mode. The PLC controller and the touch screen of this machine communicate normally. This machine is functioning correctly; This machine is not running; and This machine is not under the control of a host computer.
7. The method according to claim 6, characterized in that, If a communication interruption is detected between the PLC controller and the touchscreen of the machine, and the machine is in operation, the machine is controlled to stop, and a device is selected to start from the online devices according to the machine's device attributes, including: If the PLC controller of this machine does not receive the heartbeat detection feedback information sent by the touch screen of this machine, it is determined that the communication between the PLC controller of this machine and the touch screen of this machine is interrupted. If the machine is running, the machine can be stopped and set to offline status via the PLC controller. If the device attribute of this machine is master, then select the device with the smallest communication station number from the online devices with the device attribute of standby; If the device attribute of this machine is standby, then select the device with the smallest communication station number from the online devices with the device attribute of master to start.
8. An electronic device, characterized in that, The electronic device includes: PLC controller and touch screen; At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the multi-use multi-standby control method based on the Ethernet interface according to any one of claims 1-5, or to perform the multi-use multi-standby control method based on the Ethernet interface according to any one of claims 6-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the multi-use multi-standby control method based on an Ethernet interface as described in any one of claims 1-5, or to execute the multi-use multi-standby control method based on an Ethernet interface as described in any one of claims 6-7.
Citation Information
Patent Citations
Air compressor touch screen joint control system and method
CN105715527A