Equipment cascade control method
Through the multi-level device cascade control method, resource detection messages and mapping resource tables are used to realize flexible expansion and unified management of remote terminal unit hardware interfaces, solving the problems of limited interface expansion and difficult management, and realizing unlimited cascading and one machine The effect of one-network management.
Patent Information
- Application Number
- CN202410549013.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-09-03
AI Technical Summary
Existing remote terminal units rely on external expansion chips when expanding hardware interfaces, resulting in limited interface expansion and difficult management, making it impossible to achieve flexible expansion and unified management.
The multi-level device cascade control method is adopted to achieve flexible expansion and unified management of hardware interfaces through resource detection message transmission and mapping resource tables between the host and auxiliary machines. The host uniformly maps hardware resources to achieve unlimited cascading and one-machine-one-machine mapping. Network management.
It achieves flexible expansion and unified management of hardware interfaces, avoids restrictions on the number of interfaces, saves adaptation workload, and achieves plug-and-play effect.
Smart Images

Figure CN118590508A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to a cascade system control method. Background Art
[0002] Remote Terminal Unit (RTU), also known as Remote Terminal Control System in Chinese, is responsible for monitoring and controlling field signals and industrial equipment. The RTU has a variety of external interfaces, including relays, controlled power supplies, analog quantities, switch quantities, RS232 / 485, Ethernet, CAN, IO interrupts, etc. It provides multifunctional equipment for data collection, calculation, and network communication for terminal devices with different types of interfaces. It supports the collection of data from various industrial equipment such as PLCs, instruments, sensors, water and gas meters, power equipment, CNC, etc. It is the core edge node for building the industrial Internet system.
[0003] The number / type of external hardware interfaces of the remote terminal unit directly determines the number / type of sensors to be collected. If you want to connect a large number of sensor devices to collect data, it is not enough to rely on the limited number of hardware interfaces that come with the MCU, so you need to consider how to expand the hardware interface. In the prior art, expanding the hardware interface usually requires an external expansion chip of the MCU, such as an expansion USB chip, an expansion IO chip, an expansion serial port chip, etc. Through the expansion chip, one hardware interface can be expanded to multiple hardware interfaces. Such as expanding the USB port: 1 USB expands 4 USB ports, expanding the serial port: 1 USB expands 4 serial ports. The existing chip expansion technology expands the hardware interface resources of the MCU, and the MCU manages these interfaces in the same way as the hardware interfaces that come with the MCU, and these hardware interfaces can be used separately. At present, for the scheme of expanding hardware interfaces, the expansion interface depends on the expansion chip. The interface change requires re-board making and mass production, which requires a lot of time and manpower costs. The number of interfaces expanded by different expansion chips is also limited. For example, the expansion serial port chip ch342 can only expand 2 serial ports, while ch344 can expand 4 serial ports. The existing management method can only manage a single device. If the devices are distributed discretely, if you want to know the interface usage of the device, you can only log in to the management and view each device separately, and the management method and usage method are greatly limited. For devices such as remote terminal units, the number of external sensors can be more or less, which requires that the external hardware interface can be flexibly expanded, and these devices can be managed uniformly. Therefore, it is urgent for remote terminal units to provide a solution that can flexibly expand hardware interfaces and uniformly manage multiple devices. Summary of the invention
[0004] In view of the above problems, the purpose of the present invention is to provide a device cascade control method to solve the problem that the existing expansion hardware has few interfaces and is difficult to manage.
[0005] In order to achieve the above object, the technical solution proposed by the present invention is: The present invention discloses a device cascade control method, including a host and n-level auxiliary machines, n is a natural number, wherein the first-level auxiliary machine is directly connected to the host in communication, and the n+1-level auxiliary machine is connected in communication with the n-level auxiliary machine; the host and the auxiliary machine are both provided with multiple hardware interfaces, the hardware interface of the host is used to connect the auxiliary machine or peripheral equipment, and the hardware interface of the auxiliary machine is used to connect the auxiliary machine or peripheral equipment of the next level. After the host is powered on, it sends a resource detection message to all hardware interfaces; after the first-level auxiliary machine receives the resource detection message, it forwards it to all current hardware interfaces, and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the host; after the n+1-level auxiliary machine receives the resource detection message, it forwards it to all current hardware interfaces, and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the n-level auxiliary machine; after the host receives the hardware resource message reported by the first-level auxiliary machine, it generates a mapping resource table, and when corresponding control is required, it addresses downward and controls a specified hardware interface according to the mapping resource table.
[0006] Furthermore, the host sends resource detection messages to all hardware interfaces within a preset period of time.
[0007] Furthermore, when the hardware interface of the auxiliary machine is successfully connected, the auxiliary machine actively reports its own hardware resources to the host machine.
[0008] The hardware resources include: one or more of the number of hardware interfaces, the usage of hardware interfaces, and the type of hardware interfaces.
[0009] Wherein, the host is provided with a display screen, and the display screen is used to display the transmission data of the hardware resources and / or the peripheral devices.
[0010] Among them, the communication connection mode is any one or more of serial port connection, wifi connection, bluetooth connection, NFC connection, and RFID connection.
[0011] Preferably, the host can set the priority level of any hardware resource and perform data transmission or control according to the priority level.
[0012] Preferably, the display screen displays the transmission data in order of priority.
[0013] Preferably, after the host receives the hardware resource message reported by the first-level auxiliary machine, it replies to the first-level auxiliary machine; if the first-level auxiliary machine does not receive the reply message, it re-reports the hardware resource message; after the n-th level auxiliary machine receives the resource message reported by the n+1-th level auxiliary machine, it replies to the n+1-th level auxiliary machine; if the n+1-th level auxiliary machine does not receive the reply message, it re-reports the hardware resource message.
[0014] Among them, the host and auxiliary machines are RTU devices; the peripheral devices are one or more of PLC devices, sensors, instruments, CNC equipment, and power equipment.
[0015] By adopting the above technical solution, the beneficial effects of the present invention are as follows: the present invention realizes unlimited cascading through a multi-level device cascade topology, does not require additional adaptation work, and saves adaptation workload. The host uniformly maps hardware resources to achieve flexible expansion, and there is no limit on the number of expansion interfaces. The host uniformly manages any hardware interface on other auxiliary machines to achieve one-machine-one-network management. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A one-level cascade topology diagram is provided for the present invention.
[0017] Figure 2 A three-level cascade topology diagram is provided for the present invention.
[0018] Figure 3 It is a schematic diagram of the hardware interface in the present invention being connected via wireless communication. DETAILED DESCRIPTION
[0019] The present invention will be further described below in conjunction with the accompanying drawings and specific implementation methods.
[0020] like Figure 1 As shown, a device cascade control method, wherein the device cascade mode is a mesh topology connection: including a host and n-level auxiliary machines, n is a natural number. The host and the auxiliary machine are both provided with multiple hardware interfaces, the hardware interface of the host is used to connect the auxiliary machine or peripheral equipment, and the hardware interface of the auxiliary machine is used to connect the auxiliary machine or peripheral equipment of the next level.
[0021] The host and the auxiliary machine can both be RTU devices, with one RTU designated as the host and the rest as auxiliary machines. Preferably, since the host is a control and management device, it uses an RTU device with more complete functions and larger storage capacity. The host can monitor the operating status of various connected peripheral devices in real time, and has functions such as data acquisition, data processing, data display, data transmission, and remote control. The host is provided with a display screen, which is used to display all hardware resources and / or transmission data of peripheral devices.
[0022] The auxiliary machines can be cascaded in multiple levels as needed. The first-level auxiliary machine is directly connected to the host machine, and the n+1-level auxiliary machine is connected to the n-level auxiliary machine. Figure 1 There is a one-level cascade in the system, and the first-level auxiliary machine is directly connected to the main machine. Figure 2 As shown, there are three levels of cascade connection, the auxiliary machine of the first level is directly connected to the main machine for communication, the auxiliary machine of the second level is connected to the auxiliary machine of the first level for communication (n=1), the auxiliary machine of the third level is connected to the auxiliary machine of the second level for communication (n=2), and so on.
[0023] There are many ways to connect the host and the auxiliary machine, as well as the cascaded auxiliary machines, which can be any one or more of serial port connection, WiFi connection, Bluetooth connection, NFC connection, and RFID connection. For example, directly connect through the serial port between the hardware interfaces, or, Figure 3 As shown, a wireless module A is connected to the hardware interface of the upper level, and a wireless module B is connected to the hardware interface of the lower level, and wireless module A and wireless module B are connected for wireless communication.
[0024] Each hardware interface can be used to connect peripheral devices, including one or more of PLC devices, sensors (such as light sensors, pressure sensors, temperature sensors, etc.), instruments (such as rain gauges, water level meters, flow meters, cameras, water pumps, valves, etc.), CNC equipment, and power equipment (such as relays, transformers, etc.).
[0025] The innovation of this application is that the main or auxiliary machines at all levels are connected to each other through hardware interfaces to form a mesh cascade topology, so that the hardware interface (hardware interface) of each cascade device will be mapped to the hardware resources of the host. For the host, as long as the mapping relationship of each hardware interface is controlled and the usage of each hardware interface is managed, these mapped hardware resources are the same as the hardware resources of the host, thereby achieving plug-and-play, unlimited expansion, and unified management. The specific device cascade control method is described in detail as follows.
[0026] Embodiment 1 S1. Send resource detection message After the host is powered on, it sends resource detection messages to all hardware interfaces. You can also pre-set a cycle time, and the host sends resource detection messages to all hardware interfaces within the set cycle time.
[0027] In a specific embodiment, taking the resource detection protocol as an example, the message structure is shown in Table 1 and Table 2 below.
[0028] Table 1. Resource detection message structure
[0029] Table 2. Control message structure
[0030] S2. Receive reported information After receiving the resource detection message, the first-level auxiliary machine forwards it to all current hardware interfaces and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the host. After receiving the resource detection message, the n+1-th-level auxiliary machine forwards it to all current hardware interfaces and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the n-th-level auxiliary machine.
[0031] Hardware resources include: the number of hardware interfaces, the usage of hardware interfaces, and one or more of the types of hardware interfaces.
[0032] That is, after the current level of cascaded equipment receives the resource detection message, it forwards it to all current hardware interfaces and reports its own hardware resources together with the hardware resources reported by the next level to the cascaded equipment at the previous level. In this way, reporting is achieved layer by layer. When the hardware interface communication connection of the auxiliary machine is successful, the auxiliary machine can also actively report its own hardware resources to the host machine. For example, the hardware resource situation reported by an auxiliary machine is shown in Table 3 below.
[0033] Table 3. Hardware resource status table
[0034] After the host receives the hardware resource message reported by the first-level auxiliary machine, it replies to the first-level auxiliary machine; if the first-level auxiliary machine does not receive the reply message, it re-reports the hardware resource message. After the n-th-level auxiliary machine receives the resource message reported by the n+1-th-level auxiliary machine, it replies to the n+1-th-level auxiliary machine; if the n+1-th-level auxiliary machine does not receive the reply message, it re-reports the hardware resource message. The information is replied layer by layer to ensure that no information is missed. The message structure of the reply information is shown in Table 4 below.
[0035] Table 4. Reply message structure
[0036] S3. Generate mapping resource table After the host receives the hardware resource message reported by the first-level auxiliary machine, it generates a mapping resource table. The structure of the mapping resource table is organized according to interface and resource. Interface: Indicates the interface position of the current auxiliary machine (for example, 1-1 means under interface 1 of host 1), and the host addresses according to the interface address. Resource: Indicates the interface resource status of the current auxiliary machine, Name indicates the model of the auxiliary machine, Adc, Can, Gpio, Serial indicate the interface type, and the corresponding number of interfaces.
[0037] For example, in one embodiment, there are three auxiliary machines, namely K100, K200, and K300. K100 is located under interface 1 of host 1, K200 is located under interface 2 of host 1, and K300 is located under interface 1 of interface 2 of host 1 (that is, under interface 1 of auxiliary machine 2). Among them, the interface resources of K100 are Adc*5, Can*2, Gpio*20, Serial*5; the interface resources of K200 are Adc*2, Can*1, Gpio*10, Serial*3; the interface resources of K300 are Adc*1, Can*1, Gpio*5, Serial*2, and the mapping resource table generated by the host is shown in Table 5 below.
[0038] Table 5. Mapping resource table structure
[0039] S4. Implement control based on the mapping resource table The host is provided with a display screen, which is used to display the transmission data of the hardware resources and / or the peripheral devices. When corresponding control is required, a certain hardware interface is addressed downward and controlled according to the mapping resource table.
[0040] Control includes the following aspects: 1. The host collects various signals such as temperature, pressure, flow, liquid level, etc. on site through peripheral devices of various hardware interfaces, such as sensors, and converts them into digital signals and displays them on the display screen.
[0041] 2. The host can control the switching and operation of peripheral devices according to the control signals to each hardware interface.
[0042] 3. The host can process, calculate, store and other operations on the collected data, and can also perform alarm processing and troubleshooting.
[0043] 4. The host transmits the collected data to the central control center or the superior system through the network connection, and accepts instructions from the central control center or the superior system to achieve two-way communication.
[0044] Embodiment 2 The difference between this embodiment and the first embodiment is that after generating the mapping resource table in step S3, the host can set the priority level of any hardware resource and transmit or control data according to the priority level. The display screen displays the transmission data in order of priority level.
[0045] For example, the hardware interfaces corresponding to actuators, motors, pumps and other devices are set as high-priority hardware interfaces. When controlling, the host gives priority to processing and controlling these hardware interfaces.
[0046] The present invention realizes flexible expansion of hardware interfaces by mapping the hardware interfaces of each remote terminal unit (i.e., auxiliary machine) in the cascade topology to the host, thereby solving the problem of limited number of expansion interfaces. At the same time, the host controls other auxiliary machines in the cascade topology, thereby realizing one-machine-one-network management and solving the problem of single-device management of expansion interfaces.
[0047] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes in form and details may be made to the present invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A device cascade control method, characterized in that: It includes a host and n-level auxiliary machines, where n is a natural number, wherein the first-level auxiliary machine is directly connected to the host in communication, and the n+1-th-level auxiliary machine is connected to the n-th-level auxiliary machine in communication; the host and the auxiliary machine are both provided with a plurality of hardware interfaces, the hardware interface of the host is used to connect to the auxiliary machine or peripheral equipment, and the hardware interface of the auxiliary machine is used to connect to the auxiliary machine or peripheral equipment of the next level; After the host is powered on, it sends resource detection messages to all hardware interfaces; After receiving the resource detection message, the first-level auxiliary machine forwards it to all current hardware interfaces, and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the host; After receiving the resource detection message, the n+1th level auxiliary machine forwards it to all current hardware interfaces, and reports the hardware resources of the current auxiliary machine and the hardware resources under all hardware interfaces to the nth level auxiliary machine; After receiving the hardware resource message reported by the first-level auxiliary machine, the host generates a mapping resource table. When corresponding control is required, it addresses and controls a specified hardware interface according to the mapping resource table.
2. The device cascade control method according to claim 1, characterized in that: The host sends resource detection messages to all hardware interfaces within a preset cycle time.
3. The device cascade control method according to claim 1, characterized in that: When the hardware interface of the auxiliary machine is successfully connected, the auxiliary machine actively reports its own hardware resources to the host machine.
4. The device cascade control method according to claim 1, characterized in that: The hardware resources include: one or more of the number of hardware interfaces, the usage of hardware interfaces, and the type of hardware interfaces.
5. The device cascade control method according to claim 1, characterized in that: The host is provided with a display screen, which is used to display the transmission data of the hardware resources and / or the peripheral devices.
6. The device cascade control method according to claim 1, characterized in that: The communication connection mode is any one or more of serial port connection, WiFi connection, Bluetooth connection, NFC connection, and RFID connection.
7. The device cascade control method according to claim 5, characterized in that: The host can set the priority level of any hardware resource and perform data transmission or control according to the priority level.
8. The device cascade control method according to claim 7, characterized in that: The display screen displays the transmission data in order of priority.
9. The device cascade control method according to claim 7, characterized in that: After receiving the hardware resource message reported by the first-level auxiliary machine, the host machine replies to the first-level auxiliary machine; if the first-level auxiliary machine does not receive the reply message, it re-reports the hardware resource message; After receiving the resource message reported by the n+1th level auxiliary machine, the nth level auxiliary machine replies to the n+1th level auxiliary machine; if the n+1th level auxiliary machine does not receive the reply message, it re-reports the hardware resource message.
10. The device cascade control method according to claim 1, characterized in that: The host and auxiliary devices are RTU devices; the peripheral devices are one or more of PLC devices, sensors, instruments, CNC devices, and power equipment.
