A PLC data communication control system and method

By calculating the static and dynamic weights of the PLC and reasonably allocating the polling cycle, the problems of low communication efficiency and uneven resource allocation in traditional PLC data communication systems are solved, and the overall efficiency and response speed of the system are improved.

CN119200498BActive Publication Date: 2025-03-04SHANDONG HUAYUN IOT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411736169.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-04
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

In the case of a large number of PLCs or a large amount of communication data, the communication efficiency of traditional PLCs is low, which may lead to network congestion and communication delay, and uneven resource allocation, affecting system performance.

Method used

By obtaining the static weights and dynamic weights of all PLCs that need to be communicated, the comprehensive polling weights are calculated, and the polling cycle of each PLC is determined, and the communication resources are allocated reasonably to ensure that each PLC completes communication within its polling cycle.

Benefits of technology

It improves the overall efficiency and response speed of the PLC communication system, avoids network congestion and communication delay, and realizes load balancing and reasonable resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119200498B_ABST
    Figure CN119200498B_ABST
Patent Text Reader

Abstract

The invention discloses a PLC data communication control system and method, which relates to the technical field of PLC, including calculating the first hardware evaluation coefficient and the second hardware evaluation coefficient of the PLC, and further calculating the static weights of all PLCs that need to communicate; calculating the data evaluation coefficients and the interruption evaluation coefficients of all PLCs that need to communicate, and further calculating the dynamic weights of all PLCs that need to communicate; calculating the comprehensive polling weights of all PLCs that need to communicate based on the static weights and dynamic weights of all PLCs that need to communicate, and calculating the polling cycle of each PLC that needs to communicate, and determining the PLC polling table. Reasonably allocate communication resources to ensure that each PLC can complete communication within its polling cycle, avoid network congestion and communication delay, and improve the overall efficiency and response speed of the PLC communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of PLC technology, and in particular to a PLC data communication control system and method. Background Art

[0002] In the field of modern industrial automation, programmable logic controller (PLC) as a core control device undertakes important tasks such as data acquisition, logical operation, and control output. With the advancement of Industry 4.0 and intelligent manufacturing, the research and application of PLC data communication control systems and methods have received increasing attention. PLC data communication polling control system is a PLC communication system based on polling mechanism. In this system, the master PLC sends data requests to each slave PLC in a certain order, and the slave PLC returns the corresponding data after receiving the request. The polling mechanism ensures that each slave PLC can get timely communication service under the monitoring of the master PLC, thereby realizing the effective transmission of data and the stable operation of the system. Although PLC data communication polling control system has been widely used in the field of industrial automation, there are still some problems to be solved. Under the traditional polling mechanism, the master PLC needs to send requests to each slave PLC in turn, which may lead to low communication efficiency, especially when there are a large number of slave PLCs or a large amount of communication data.

[0003] In a Chinese invention application with application publication number CN118869549A, a PLC communication control method for a digital logistics warehousing system is disclosed, including collecting transmission delay data; obtaining high delay data and low delay data; calculating a channel transmission quality coefficient, and then obtaining a delay growth probability coefficient; obtaining a channel selectable coefficient at each moment based on the channel transmission quality coefficient and the delay growth probability coefficient, and controlling PLC communication.

[0004] In the above invention application, the PLC communication is controlled by collecting transmission delay data; obtaining high delay data and low delay data; calculating the channel transmission quality coefficient, and then obtaining the delay growth probability coefficient; obtaining the channel selectability coefficient at each moment based on the channel transmission quality coefficient and the delay growth probability coefficient, but it is necessary to perform real-time analysis on the PLC communication, process a large amount of data, and waste resources. If the polling mechanism does not take into account the actual communication needs of the slave PLC, it may cause some slave PLCs to not get enough communication resources, while others have excess resources. This imbalance in resource allocation will reduce the overall performance of the system and may cause some slave PLCs to malfunction due to insufficient resources.

[0005] To this end, the present invention provides a PLC data communication control system and method. Summary of the invention

[0006] 1. Technical issues to be resolved

[0007] In view of the deficiencies in the prior art, the present invention provides a PLC data communication control system and method. The present invention obtains the static weights and dynamic weights of all PLCs that need to communicate, calculates the comprehensive polling weights of all PLCs that need to communicate, calculates the polling cycle of each PLC that needs to communicate, determines the PLC polling table, and reasonably allocates communication resources to ensure that each PLC can complete communication within its polling cycle, avoid network congestion and communication delays, and improve the overall efficiency and response speed of the PLC communication system, thereby solving the technical problems recorded in the background technology.

[0008] (II) Technical solution

[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions: A PLC data communication control method, comprising the following steps:

[0010] Get the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate ;

[0011] Obtain the data exchange volume of all PLCs that need to communicate during the communication process , Data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate ;

[0012] Get the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table.

[0013] Furthermore, query the PLC technical manual to obtain the input points of all PLCs that need to communicate. , output points , processor frequency , Operation speed , Storage Capacity , the number of instruction types in the instruction set supported by the processor (including arithmetic operations, logical operations, data transfer, control transfer, etc.) and the number of instructions .

[0014] The number of input points refers to the number of external signals that the PLC can receive. These signals usually come from sensors, buttons or other input devices, and are used to provide the PLC with real-time information about the external environment. The number of output points refers to the number of external devices that the PLC can control. These outputs are usually used to control actuators, indicator lights or other output devices to enable the PLC to control the external environment.

[0015] Furthermore, obtain the input points of all PLCs that need to communicate , output points , the number of instruction types in the instruction set and the number of instructions , calculate the first hardware evaluation coefficient of the PLC :

[0016] in, Indicates the sequence number of all PLCs that need to communicate. , is the total number of PLCs that need to communicate.

[0017] Furthermore, obtain the processor main frequency of all PLCs that need to communicate , Operation speed and storage capacity , calculate the second hardware evaluation coefficient of the PLC :

[0018] The clock speed refers to the number of clock cycles the processor executes per second. A higher clock speed generally means the processor can execute instructions faster.

[0019] Further, obtain the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , calculate the static weights of all PLCs that need to communicate :

[0020] in, Indicates the maximum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the minimum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the maximum value of the second hardware evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the second hardware evaluation coefficient of all PLCs that need to communicate.

[0021] Furthermore, the data exchange volume of all PLCs that need to communicate during the communication process is obtained through the PLC log recording function. , and the data access frequency of each PLC communication data and life cycle , calculate the data evaluation coefficient of all PLCs that need to communicate :

[0022] Among them, the life cycle is the length of time from the generation to the destruction of data.

[0023] Furthermore, the interrupt execution time of all PLCs that need to communicate is obtained , interrupt event priority and interrupt frequency , calculate the interruption evaluation coefficient of all PLCs that need to communicate :

[0024] Among them, the priority order of interrupt events is emergency stop and safety-related events > equipment failure > periodic tasks > non-critical tasks, and the interrupt event priorities are 4, 3, 2, and 1 respectively.

[0025] Furthermore, obtain the data evaluation coefficients of all PLCs that need to communicate and interruption evaluation coefficient , calculate the dynamic weights of all PLCs that need to communicate :

[0026] in, Indicates the maximum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the maximum value of the interruption evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the interruption evaluation coefficient of all PLCs that need to communicate.

[0027] Furthermore, obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate :

[0028] .

[0029] Furthermore, the comprehensive polling weights of all PLCs that need to communicate are obtained , calculate the polling cycle of each PLC that needs to communicate :

[0030] in, is the ceiling function, The time required to traverse all PLCs that need to communicate.

[0031] A PLC data communication control system, comprising:

[0032] Static weight analysis module, obtains the input points of all PLCs that need to communicate , output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate ;

[0033] Dynamic weight analysis module to obtain the data exchange volume of all PLCs that need to communicate during the communication process , data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate ;

[0034] Polling determination module to obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table.

[0035] (III) Beneficial effects

[0036] The present invention provides a PLC data communication control system and method, which has the following beneficial effects:

[0037] 1. Get the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate , polling tasks can be reasonably allocated to avoid performance degradation of some PLCs due to overload and achieve load balancing.

[0038] 2. Obtain the amount of data exchanged during the communication process for all PLCs that need to communicate , Data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate , we can fully understand the communication performance of PLC and identify the key PLC nodes in the communication network, so as to reasonably allocate polling tasks, improve communication efficiency and reduce communication delay.

[0039] 3. Obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table, reasonably allocate communication resources, ensure that each PLC can complete communication within its polling cycle, avoid network congestion and communication delays, and improve the overall efficiency and response speed of the PLC communication system. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic flow chart of a PLC data communication control method of the present invention;

[0041] Figure 2 The present invention is a structural schematic diagram of a PLC data communication control system. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] See also Figure 1 The present invention provides a PLC data communication control method, comprising the following steps:

[0044] Step 1: Get the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate .

[0045] The step 1 includes the following contents:

[0046] Step 101: Query the PLC technical manual to obtain the input points of all PLCs that need to communicate. , Output points , processor frequency , Operation speed , Storage Capacity , the number of instruction types in the instruction set supported by the processor (including arithmetic operations, logical operations, data transfer, control transfer, etc.) and the number of instructions .

[0047] The number of input points refers to the number of external signals that the PLC can receive. These signals usually come from sensors, buttons or other input devices, and are used to provide the PLC with real-time information about the external environment. The number of output points refers to the number of external devices that the PLC can control. These outputs are usually used to control actuators, indicator lights or other output devices to enable the PLC to control the external environment.

[0048] Step 102: Get the input points of all PLCs that need to communicate , output points , the number of instruction types in the instruction set and the number of instructions , calculate the first hardware evaluation coefficient of the PLC :

[0049] in, Indicates the sequence number of all PLCs that need to communicate. , is the total number of PLCs that need to communicate.

[0050] Step 103: Obtain the processor main frequency of all PLCs that need to communicate , Operation speed and storage capacity , calculate the second hardware evaluation coefficient of the PLC :

[0051] The clock speed refers to the number of clock cycles the processor executes per second. A higher clock speed generally means the processor can execute instructions faster.

[0052] Step 104: Obtain the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , calculate the static weights of all PLCs that need to communicate :

[0053] in, Indicates the maximum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the minimum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the maximum value of the second hardware evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the second hardware evaluation coefficient of all PLCs that need to communicate.

[0054] When using, combine the contents in steps 101 to 104:

[0055] Get the input points of all PLCs that need to communicate , output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate , polling tasks can be reasonably allocated to avoid performance degradation of some PLCs due to overload and achieve load balancing.

[0056] Step 2: Obtain the data exchange volume of all PLCs that need to communicate during the communication process , data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate .

[0057] The step 2 includes the following contents:

[0058] Step 201: Obtain the data exchange volume of all PLCs that need to communicate during the communication process through the log recording function of the PLC , and the data access frequency of each PLC communication data and life cycle , calculate the data evaluation coefficient of all PLCs that need to communicate :

[0059] Among them, the life cycle is the length of time from the generation to the destruction of data.

[0060] Step 202: Use the performance monitoring function of the PLC to monitor each PLC interrupt event, and obtain the interrupt execution time of all PLCs that need to communicate after statistics. , interrupt event priority and interrupt frequency , calculate the interruption evaluation coefficient of all PLCs that need to communicate :

[0061] Among them, the priority order of interrupt events is emergency stop and safety-related events > equipment failure > periodic tasks > non-critical tasks, and the interrupt event priorities are 4, 3, 2, and 1 respectively.

[0062] Emergency stop and safety related events include emergency stop button pressed, safety door opened, temperature sensor detected overheating, etc. Equipment failure includes key equipment failure on the production line, power failure, communication interruption, etc. Periodic tasks include timer expiration, periodic data collection, equipment status monitoring, etc. Non-critical tasks include user interaction events

[0063] Step 203: Obtain the data evaluation coefficients of all PLCs that need to communicate and interruption evaluation coefficient , calculate the dynamic weights of all PLCs that need to communicate :

[0064] in, Indicates the maximum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the maximum value of the interruption evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the interruption evaluation coefficient of all PLCs that need to communicate.

[0065] When using, combine the contents in steps 201 to 203:

[0066] Obtain the data exchange volume of all PLCs that need to communicate during the communication process , Data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate , we can fully understand the communication performance of PLC and identify the key PLC nodes in the communication network, so as to reasonably allocate polling tasks, improve communication efficiency and reduce communication delay.

[0067] Step 3: Get the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table.

[0068] The step three includes the following contents:

[0069] Step 301: Obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate :

[0070] The corresponding comprehensive polling weight of all PLCs that need to communicate The calculation formula is as above.

[0071] Step 302: Obtain the comprehensive polling weights of all PLCs that need to communicate , calculate the polling cycle of each PLC that needs to communicate :

[0072] in, is the ceiling function, The time required to traverse all PLCs that need to communicate.

[0073] Step 303: Based on the polling cycle of all PLCs that need to communicate Determine the polling table, send data requests to each PLC in sequence according to the order of the polling table, and receive the data returned by it.

[0074] Polling is an active query method that periodically checks the status or data of each PLC to send and receive data.

[0075] When using, combine the contents in steps 301 to 303:

[0076] Get the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table, reasonably allocate communication resources, ensure that each PLC can complete communication within its polling cycle, avoid network congestion and communication delays, and improve the overall efficiency and response speed of the PLC communication system.

[0077] See also Figure 2 The present invention provides a PLC data communication control system, comprising:

[0078] Static weight analysis module, obtains the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate ;

[0079] Dynamic weight analysis module to obtain the data exchange volume of all PLCs that need to communicate during the communication process , data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate ;

[0080] Polling determination module to obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table.

[0081] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. A person of ordinary skill in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented in electronic hardware, or in a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution.

[0082] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0083] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A PLC data communication control method, characterized in that: The steps include: Get the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , calculate the first hardware evaluation coefficient of the PLC : in, Indicates the sequence number of all PLCs that need to communicate. , is the total number of PLCs that need to communicate; Get the processor main frequency of all PLCs that need to communicate , Operation speed and storage capacity , calculate the second hardware evaluation coefficient of the PLC : Get the first hardware evaluation coefficient of PLC and the second hardware evaluation coefficient , calculate the static weights of all PLCs that need to communicate : in, Indicates the maximum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the minimum value of the first hardware evaluation coefficient of all PLCs that need to communicate, Indicates the maximum value of the second hardware evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the second hardware evaluation coefficient of all PLCs that need to communicate; The PLC log function is used to obtain the data exchange volume of all PLCs that need to communicate during the communication process. , and the data access frequency of each PLC communication data and life cycle , calculate the data evaluation coefficient of all PLCs that need to communicate : Among them, the life cycle is the length of time from the generation to the destruction of data; Get the interrupt execution time of all PLCs that need to communicate , interrupt event priority and interrupt frequency , calculate the interruption evaluation coefficient of all PLCs that need to communicate : Among them, the priority of interrupt events is as follows: emergency stop and safety-related events > equipment failure > periodic tasks > non-critical tasks, and the interrupt event priorities are recorded as 4, 3, 2, and 1 respectively; Obtain data evaluation coefficients of all PLCs that need to communicate and interruption evaluation coefficient , calculate the dynamic weights of all PLCs that need to communicate : in, Indicates the maximum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the data evaluation coefficient of all PLCs that need to communicate. Indicates the maximum value of the interruption evaluation coefficient of all PLCs that need to communicate. Indicates the minimum value of the interruption evaluation coefficient of all PLCs that need to communicate; Get the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate : Get the comprehensive polling weight of all PLCs that need to communicate , calculate the polling cycle of each PLC that needs to communicate : in, is the ceiling function, Determine the PLC polling table based on the time required to traverse all PLCs that need to communicate.

2. A PLC data communication control system, used to implement the method described in claim 1, characterized in that: include: Static weight analysis module, obtains the input points of all PLCs that need to communicate , Output points , the number of instruction types in the instruction set and the number of instructions , processor frequency , Operation speed and storage capacity , calculate the first hardware evaluation coefficient of the PLC and the second hardware evaluation coefficient , and further calculate the static weights of all PLCs that need to communicate ; Dynamic weight analysis module to obtain the data exchange volume of all PLCs that need to communicate during the communication process , Data access frequency and life cycle , interrupt execution time , interrupt event priority and interrupt frequency , calculate the data evaluation coefficient of all PLCs that need to communicate and interruption evaluation coefficient , and further calculate the dynamic weights of all PLCs that need to communicate ; Polling determination module to obtain the static weights of all PLCs that need to communicate and dynamic weights , calculate the comprehensive polling weight of all PLCs that need to communicate , and calculate the polling cycle of each PLC that needs to communicate , determine the PLC polling table.

Citation Information

Patent Citations

  • PLC communication control method for digital logistics warehousing system

    CN118869549A

  • Data collection system by polling and method therefor and recording medium for recording collection control program

    JP1999055294A