PLC port mapping system, mapping method and related device
By automatically mapping spare ports in the PLC port mapping system, the system interruption problem caused by PLC port corruption is solved, and the temporary operation of the equipment and the reduction of economic losses are achieved.
Patent Information
- Application Number
- CN202510246328.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-06-03
AI Technical Summary
In industrial automation systems, damage to the PLC port will cause system operation to be interrupted. The traditional method is to replace the entire PLC, which is costly and will lead to production suspension and bring economic losses to the company.
Provided is a PLC port mapping system, including a PLC body, a mapping module, a configuration software and a storage module. When a port corruption is detected, the alternate port is automatically mapped as a damaged port to ensure temporary operation of the device.
By quickly mapping the spare port, the equipment can be maintained for a short-term operation and reduce economic losses caused by PLC port damage.
Smart Images

Figure CN120085603A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial automation, and particularly to a PLC port mapping system, a mapping method, and related devices. Background Art
[0002] In modern industrial automation systems, the PLC, as the core control unit, its stability and reliability are crucial. However, the damage of the PLC port may cause the interruption of the operation of the entire system. Traditionally, in the face of the situation of PLC port damage, the measure of replacing the entire PLC is usually taken. This method is not only costly but also causes the suspension of the production process, bringing huge economic losses to the enterprise. Therefore, there is an urgent need for a new technical solution that can, when the PLC port is damaged, map a spare port to temporarily replace the damaged port, so as to maintain the short-term operation of the device and reduce the impact on the production process. Summary of the Invention
[0003] The purpose of this application is to provide a PLC port mapping system, a mapping method, and related devices, which can quickly map a spare port to a damaged port when detecting the damage of the PLC port, so as to achieve the temporary operation of the device, thereby effectively reducing the economic losses caused by the damage of the PLC port.
[0004] To achieve the above purpose, this application provides the following solutions:
[0005] In a first aspect, this application provides a PLC port mapping system, including:
[0006] A PLC body; the PLC body has multiple ports; the multiple ports include spare ports and used ports, and when a used port is damaged, the spare port is mapped to the damaged used port;
[0007] A mapping module, configured to automatically map a spare port to a damaged port when detecting port damage;
[0008] A configuration software, configured for a user to configure the mapping relationship of the mapping module;
[0009] A saving module, configured to save the mapping relationship configured by the user.
[0010] Optionally, the mapping module includes:
[0011] A mapping control unit, configured to automatically perform port mapping operations according to the detected working state of the port;
[0012] A port address configuration unit, configured to set the communication address of the port mapping.
[0013] Optionally, the configuration software includes:
[0014] The port configuration interface is used to display the current port status and provide port mapping configuration options for users.
[0015] Optionally, the saving module includes:
[0016] The power-off protection unit is used to protect the mapping relationship data from being lost when the power supply is interrupted.
[0017] Optionally, it further includes:
[0018] The restart control unit is used to control the PLC to restart after the user completes the port mapping configuration.
[0019] Optionally, it further includes:
[0020] The mapping confirmation unit is used to confirm with the user whether the mapping relationship is correct after the mapping operation is completed;
[0021] The mapping display unit is used to show the user the current port mapping status after the port mapping operation is completed.
[0022] In a second aspect, the present application provides a PLC port mapping method based on the above PLC port mapping system, including:
[0023] Receiving a port mapping request;
[0024] Based on the system configuration rules, verifying the port information in the port mapping request;
[0025] Creating or updating a port mapping relationship in the PLC port mapping system, and associating the port information with the internal network address;
[0026] Feeding back the mapping result to the user; the mapping result is mapping success or mapping failure;
[0027] After the mapping is successful, updating the network routing table.
[0028] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to implement the PLC port mapping method described in any one of the above.
[0029] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the PLC port mapping method described in any one of the above.
[0030] In a fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the PLC port mapping method described in any one of the above.
[0031] According to the specific embodiments provided in this application, the following technical effects are disclosed in this application:
[0032] This application provides a PLC port mapping system, a mapping method, and related devices. The system includes a PLC body; the PLC body has multiple ports; a mapping module, which is responsible for automatically replacing a faulty interface with a spare interface when at least one interface fails; a configuration software for the user to map the mapping relationship of the mapping module; and a storage module for storing the corresponding relationship set by the user. Once a PLC port fails, the system based on this application can quickly replace the faulty interface with a spare interface to ensure the temporary operation of the device and effectively reduce the economic losses caused by PLC interface failures. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0034] Figure 1 It is a schematic diagram of the functional modules of a PLC port mapping system provided in an embodiment of this application;
[0035] Figure 2 It is the PLC programming software configuration provided in an embodiment of this application Figure 1 ;
[0036] Figure 3 It is the PLC programming software configuration provided in an embodiment of this application Figure 2 ;
[0037] Figure 4 It is the PLC programming software configuration provided in an embodiment of this application Figure 3 ;
[0038] Figure 5 It is an application environment diagram of a PLC port mapping method provided in an embodiment of this application;
[0039] Figure 6 It is a flow schematic diagram of a PLC port mapping method provided in an embodiment of this application;
[0040] Figure 7 It is a schematic diagram of the structure of a computer device provided in an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0041] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0042] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] In an exemplary embodiment, as Figure 1 shown, this embodiment provides a PLC port mapping system, including:
[0044] A PLC body; the PLC body has multiple ports; the multiple ports include spare ports and used ports. When a used port is damaged, the spare port is mapped to the damaged used port;
[0045] A mapping module, which is used to automatically map a spare port to a damaged port when a port damage is detected;
[0046] A configuration software, which is used for users to configure the mapping relationship of the mapping module;
[0047] A saving module, which is used to save the mapping relationship configured by the user.
[0048] In this embodiment, the design of the mapping module includes multiple key components, specifically as follows:
[0049] A status detection unit, the main function of this unit is to monitor the working status of the port in real time to ensure the normal operation of the port and the stability of data transmission;
[0050] A mapping control unit, which is responsible for automatically performing port mapping operations according to the real-time working status information provided by the status detection unit to ensure the correct transmission and processing of data;
[0051] A port address configuration unit, the main responsibility of this unit is to set the communication address of the port mapping to ensure that data can be accurately sent to the specified port.
[0052] The configuration software includes:
[0053] A port configuration interface, the main function of this interface is to display the current port status and provide port mapping configuration options for users, so that users can intuitively understand the port status and perform corresponding configurations. Specifically, as Figures 2 - 4 shown, the port configuration interface includes a logic input module, a logic output module, an analog input module, an analog output module, and a control input module;
[0054] As Figure 4 shown, when it is necessary to switch the damaged port, for example, the port at channel 3 fails, then pull down the option and select the port to which it needs to be mapped.
[0055] In addition, the saving module is also an important part of the system, and it includes:
[0056] The power-off protection unit, whose main function is to protect the mapping relationship data from being lost in case of power interruption or accidental power-off, ensuring the integrity and reliability of the system data.
[0057] Among them, the system also includes:
[0058] The restart control unit, which is responsible for controlling the PLC to restart after the user completes the port mapping configuration, ensuring that the new configuration can take effect and run stably.
[0059] Among them, the system also includes:
[0060] The mapping confirmation unit, whose main role is to confirm to the user whether the mapping relationship is correct after the mapping operation, ensuring the user's satisfaction with the mapping result;
[0061] The mapping display unit, which is responsible for showing the user the current port mapping status after the port mapping operation, enabling the user to clearly understand the port mapping situation.
[0062] In addition, the PLC port mapping method provided by the embodiments of this application can be applied to such as Figure 5In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set separately, integrated on the server 104, placed on the cloud or other servers. The terminal 102 can send a port mapping request to be processed to the server 104. After receiving the port mapping request to be processed, for the port mapping request to be processed, the server 104 verifies the port information in the port mapping request based on the system configuration rules; creates or updates the port mapping relationship in the PLC port mapping system, associates the port information with the internal network address; feeds back the mapping result to the user; the mapping result is successful mapping or unsuccessful mapping; after successful mapping, updates the network routing table. The server 104 can feedback the obtained mapping result to the terminal 102. In addition, in some embodiments, the PLC port mapping method can also be implemented separately by the server 104 or the terminal 102. For example, the terminal 102 can directly process the port mapping request to be processed, or the server 104 can obtain the port mapping request to be processed from the data storage system and process the port mapping request to be processed.
[0063] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0064] In an exemplary embodiment, as Figure 6 shown, a PLC port mapping method is provided. This method is executed by a computer device, and specifically can be executed separately by a computer device such as a terminal or a server, or can be jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 5 the server 104 in
[0065] Step 601, receive a port mapping request;
[0066] Step 602, verify the port information in the port mapping request based on the system configuration rules;
[0067] Step 603, create or update the port mapping relationship in the PLC port mapping system, and associate the port information with the internal network address;
[0068] Step 604: Feed back the mapping result to the user; the mapping result is either successful mapping or unsuccessful mapping.
[0069] Step 605: Update the network routing table after successful mapping.
[0070] In an exemplary embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as shown in Figure 7 the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store processed data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a PLC port mapping method.
[0071] Those skilled in the art can understand that Figure 7 the structure shown in is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0072] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0073] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0074] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by the processor, the steps in the above method embodiments are implemented.
[0075] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0076] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the various embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0077] The databases involved in the various embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the various embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0078] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered to be within the scope described in this specification.
[0079] In this article, specific examples are used to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A PLC port mapping system, characterized in that, the PLC port mapping system includes: A PLC body; the PLC body has multiple ports; the multiple ports include spare ports and used ports. When a used port is damaged, the spare port is mapped to the damaged used port; A mapping module, which is used to automatically map a spare port to a damaged port when a port damage is detected; Configuration software, which is used for users to configure the mapping relationship of the mapping module; A saving module, which is used to save the mapping relationship configured by the user.
2. The PLC port mapping system according to claim 1, characterized in that, the mapping module includes: A mapping control unit, which is used to automatically execute port mapping operations according to the detected working state of the port; A port address configuration unit, which is used to set the communication address of the port mapping.
3. The PLC port mapping system according to claim 1, characterized in that, the configuration software includes: A port configuration interface, which is used to display the current port status and provide port mapping configuration options for users.
4. The PLC port mapping system according to claim 1, characterized in that, the saving module includes: A power-off protection unit, which is used to protect the mapping relationship data from being lost when the power supply is interrupted.
5. The PLC port mapping system according to claim 1, characterized in that, it further includes: A restart control unit, which is used to control the PLC to restart after the user completes the port mapping configuration.
6. The PLC port mapping system according to claim 1, characterized in that, it further includes: A mapping confirmation unit, which is used to confirm with the user whether the mapping relationship is correct after the mapping operation is completed; A mapping display unit, which is used to display the current port mapping status to the user after the port mapping operation is completed.
7. A PLC port mapping method based on the PLC port mapping system according to any one of claims 1-6, characterized in that, the mapping method includes: Receiving a port mapping request; Based on the system configuration rules, verifying the port information in the port mapping request; Creating or updating a port mapping relationship in the PLC port mapping system, and associating the port information with the internal network address; Feeding back the mapping result to the user; the mapping result is mapping success or mapping failure; After the mapping is successful, updating the network routing table.
8. A computer device, including: A memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that the processor executes the computer program to implement the PLC port mapping method according to claim 7.
9. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the computer program is executed by a processor, it implements the PLC port mapping method according to claim 7.
10. A computer program product, including a computer program, characterized in that, when the computer program is executed by a processor, it implements the PLC port mapping method according to claim 7.
