Framework system based on PLC equipment scene automatic test

By providing a fully automated PLC equipment scenario automated testing framework system, it solves the problems of low efficiency and low coverage of existing PLC testing methods, achieves efficient, comprehensive, and accurate PLC testing, and improves product quality and reliability.

CN119356202APending Publication Date: 2025-01-24NANDA AUTOMATION TECH JIANGSU CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411563812.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The existing PLC testing methods are inefficient, have poor coverage, unstable results, difficult to simulate complex scenarios, insufficient performance testing, lack of unified standards, difficult data analysis, poor adaptability, high cost, and insufficient safety testing.

Method used

Provides a framework system based on PLC device scenarios automation testing, including scene simulation modules, test case generating modules, automated execution modules, data collection and analysis modules, report generation modules, and central control modules to achieve fully automated testing processes.

Benefits of technology

It improves the comprehensiveness and accuracy of testing, improves testing efficiency, reduces costs, enhances system flexibility and adaptability, provides real-time data analysis and visualization functions, improves the quality and reliability of PLC products, and enhances Security testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356202A_ABST
    Figure CN119356202A_ABST
Patent Text Reader

Abstract

The invention discloses a framework system based on PLC equipment scene automatic testing, and relates to the technical field of PLC equipment, and the framework system comprises a scene simulation module which is used for simulating input signals and working conditions in different industrial environments; the test case generation module automatically generates standardized test cases based on scene requirements; the automatic execution module is responsible for executing the test case according to a preset process and recording a running state; the data acquisition and analysis module acquires test data in real time and performs intelligent analysis; the report generation module automatically generates a standard test report; the central control module uniformly dispatches all the modules to work cooperatively, automatic testing of the PLC equipment in various industrial scenes can be achieved through the framework system, the testing efficiency and accuracy are improved, the automation degree of testing of the PLC equipment is remarkably improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PLC equipment, and in particular to a framework system based on automatic testing of PLC equipment scenarios. Background Art

[0002] PLC (Programmable Logic Controller) testing technology has made some progress in recent years, but there are still many problems. At present, the industry mainly uses the following testing methods: 1. Manual test: Engineers directly operate the PLC, write programs and observe the results. This is the most basic and common method.

[0003] 2. Use simple automation tools: Some companies have developed basic automated testing tools, but their functions are often limited.

[0004] 3.PLC Simulator: Use software to simulate the PLC operating environment and perform tests in a virtual environment.

[0005] 4. Hardware-in-the-loop testing (HIL): Connect the PLC to simulated hardware devices to create a test environment that is close to reality.

[0006] However, these methods all have obvious shortcomings: 1. Inefficiency: Manual testing is time-consuming and difficult to handle complex systems. Even semi-automated tools require a lot of manual intervention.

[0007] 2. Incomplete test coverage: Due to time and cost constraints, it is difficult to test all possible situations, and it is easy to miss important scenarios.

[0008] 3. Unstable results: Manual testing cannot guarantee the consistency of each test, and the results may vary from person to person.

[0009] 4. Difficulty in simulating complex scenarios: Existing simulators and HIL systems often cannot fully restore complex industrial environments, especially some extreme or abnormal situations.

[0010] 5. Insufficient performance testing: It is difficult to conduct long-term, high-load testing, and it is impossible to fully verify the stability and performance limits of the PLC.

[0011] 6. Lack of unified standards: Different companies and testers may use different testing methods, making it difficult to compare the results horizontally.

[0012] 7. Difficulty in data analysis: The large amount of data generated by the test often needs to be manually sorted and analyzed, which is time-consuming and prone to errors.

[0013] 8. Poor adaptability: When PLC functions are updated rapidly, existing testing methods often cannot keep up with the pace.

[0014] 9. High cost: Comprehensive testing usually requires a lot of manpower and time, and the cost remains high.

[0015] 10. Insufficient safety testing: It is difficult to fully test the safety performance of PLC under various abnormal situations.

[0016] In general, the current PLC testing field urgently needs an automated testing solution that can improve efficiency, increase coverage, improve accuracy, and reduce costs. In particular, a comprehensive testing system is needed that can simulate various complex scenarios, automatically generate and execute tests, analyze data in real time, and generate reports. This is exactly why we developed this new PLC device scenario automated testing framework. Summary of the invention

[0017] The purpose of the present invention is to provide a framework system based on PLC equipment scenario automated testing, which solves the problems existing in the background technology.

[0018] In order to solve the above technical problems, the present invention adopts the following technical solutions: The present invention provides a framework system based on PLC equipment scenario automation testing, including: a scenario simulation module for simulating various industrial environments and operation scenarios.

[0019] Test case generation module, used to automatically generate comprehensive test cases.

[0020] The automated execution module is used to automatically execute test cases and interact with the PLC.

[0021] Data acquisition and analysis module, used to collect and analyze test data.

[0022] Report generation module, used to automatically generate test reports.

[0023] Central control module, used to manage the entire testing process.

[0024] The beneficial effects of the present invention are: (1) comprehensiveness and accuracy. The system creates a highly realistic virtual industrial environment through a scenario simulation module, and combines it with an intelligent test case generation algorithm to fully cover various working scenarios and boundary conditions of PLC. This method greatly improves the comprehensiveness of the test and ensures a comprehensive evaluation of the functions and performance of the PLC. The system can simulate various normal, abnormal and even extreme situations, effectively verify the performance of the PLC under different conditions, and improve the accuracy and reliability of the test.

[0025] (2) Efficiency and automation. The entire testing process is highly automated, from test case generation to execution, data analysis, and report generation, without the need for human intervention. This automation greatly improves testing efficiency, reduces human errors, and also saves a lot of manpower and time costs. The advantages of the system are particularly obvious when long-term or repeated testing is required.

[0026] (3) Flexibility and customizability. The system provides a wealth of configuration options and custom interfaces. Users can adjust test parameters, scenario settings, and analysis methods according to specific needs. This flexibility enables the system to adapt to various types and brands of PLCs, as well as various industrial application scenarios. At the same time, users can add customized test cases and analysis algorithms according to specific needs, further enhancing the adaptability of the system.

[0027] (4) Real-time and visualization: The data acquisition and analysis module provides real-time data processing and visualization functions, enabling users to detect and diagnose problems in a timely manner. Intuitive charts and reports make complex test results easy to understand and interpret, helping to make quick decisions and improvements.

[0028] (5) Scalability and integration. The system adopts a modular design, and each functional module communicates through a standard interface. This architecture makes the system scalable. New functions or new modules can be easily integrated into the existing system. In addition, the API interface provided by the system enables it to be easily integrated with other enterprise systems (such as CI / CD platforms), improving the overall level of automation.

[0029] (6) Improve product quality and reliability. Through comprehensive and rigorous automated testing, the system can effectively identify potential problems and performance bottlenecks in PLC programs. This helps developers to find and fix defects in a timely manner, significantly improve the quality and reliability of PLC products, and reduce the risk of failure in actual applications.

[0030] (7) Reduce testing costs. Although some initial investment may be required, in the long run, the system can significantly reduce the overall cost of PLC testing. Automated testing reduces reliance on manual labor and reduces labor costs; virtual environment simulation reduces the need for actual hardware equipment and reduces equipment costs; efficient testing processes shorten product development cycles and reduce time costs.

[0031] (8) Promote standardization and knowledge accumulation. The use of the system promotes the standardization of PLC test processes and helps to establish unified test standards and best practices. At the same time, the test data and analysis results accumulated by the system form a valuable knowledge base that can be used to continuously improve PLC products and test methods.

[0032] (9) Improved safety: By simulating various extreme and abnormal situations, the system can comprehensively evaluate the performance of PLC under various conditions, especially in some dangerous or difficult to test scenarios in actual environments. This greatly improves the safety of PLC applications, especially in some high-risk industrial environments.

[0033] (10) Support for remote testing and collaboration. The system’s web interface and networking features support remote operation and monitoring, making it easier for team members in different locations to collaborate. This feature is particularly valuable in the current global development environment, improving team collaboration efficiency and making remote work possible. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is a schematic diagram of the system module of the present invention.

[0036] Figure 2 It is a schematic diagram of the scene simulation module of the present invention.

[0037] Figure 3 A schematic diagram of a test case generation module of the present invention.

[0038] Figure 4 It is a schematic diagram of the automation execution module of the present invention.

[0039] Figure 5 It is a schematic diagram of the data acquisition and analysis module of the present invention.

[0040] Figure 6 It is a schematic diagram of the report generation module of the present invention.

[0041] Figure 7 It is a schematic diagram of the central control module of the present invention.

[0042] Figure 8 It is a schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0043] 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.

[0044] Reference Figure 1 As shown, the present invention provides a framework system based on PLC device scenario automated testing, including: a scenario simulation module, a test case generation module, an automated execution module, a data acquisition and analysis module, a report generation module and a central control module.

[0045] It should be noted that the scenario simulation module is connected to the test case generation module, the test case generation module is connected to the automation execution module, the automation execution module is connected to the data acquisition and analysis module, the data acquisition and analysis module is connected to the report generation module, and the report generation module is connected to the central control module.

[0046] Reference Figure 2 As shown, the scenario simulation module is used to simulate various industrial environments and operation scenarios.

[0047] In a specific embodiment of the present invention, the specific method for simulating various industrial environments and operation scenarios is: using software simulation technology to create a virtual PLC environment and providing a graphical interface to allow users to customize scenario parameters.

[0048] In a specific embodiment, the scenario simulation module is the basis of the entire system and is responsible for creating a virtual PLC operating environment. It uses advanced software simulation technology and can accurately simulate various industrial equipment and processes. The module contains a scenario library that stores a variety of preset industrial scenarios, such as production lines, chemical plants, energy systems, etc. Users can select and customize these scenarios through a graphical interface.

[0049] The core of scenario simulation is a real-time simulation engine that can simulate the PLC's input and output signals, communication protocols, and the behaviors of various sensors and actuators connected to it. For example, it can simulate the reading changes of temperature sensors, the switch status of valves, the speed of motors, etc. This engine supports the import of actual industrial data to enhance the authenticity of the simulation.

[0050] The module also includes an exception generator that can insert various anomalies randomly or according to preset conditions during normal operation, such as sensor failure, communication interruption, power supply fluctuation, etc. This enables the system to test the performance of the PLC under various extreme and abnormal conditions.

[0051] Reference Figure 3 As shown, the test case generation module is used to automatically generate comprehensive test cases.

[0052] In a specific embodiment of the present invention, the specific method for automatically generating basic test cases is as follows: automatically generating basic test cases based on PLC functional specifications, using a combination test algorithm to generate boundary condition tests, combining scenario parameters to generate test cases for specific scenarios, and supporting customizing and importing test cases.

[0053] In a specific embodiment, the test case generation module uses an intelligent algorithm to automatically generate comprehensive test cases. It first analyzes the functional specification of the PLC and extracts key functional points and parameters. Based on this information, the module uses a combinatorial testing algorithm to generate a series of basic test cases to cover the normal operation of each functional point.

[0054] The module then applies boundary value analysis and equivalence class partitioning techniques to generate boundary condition tests for each parameter. For example, for a temperature control PLC, it generates test cases to verify the behavior of the PLC at the minimum temperature, maximum temperature, and critical temperature points.

[0055] The module also combines the scenario parameters provided by the scenario simulation module to generate test cases for specific scenarios. For example, when simulating a chemical plant scenario, it generates a series of test cases to verify the PLC's ability to control the chemical reaction process. In addition, the module provides a test case editor that allows users to manually add, modify or import custom test cases. These user-defined test cases will be integrated with the automatically generated test cases to form a comprehensive test set.

[0056] Reference Figure 4 As shown, the automatic execution module is used to automatically execute test cases and interact with the PLC.

[0057] In a specific embodiment of the present invention, the specific method for automatically executing test cases is as follows: developed based on an open source test framework, implementing communication interfaces with various PLC models, allowing parallel test execution, and providing test interruption and continuation functions.

[0058] In a specific embodiment, the automated execution module, which is responsible for automatically executing the generated test cases, is developed based on an open source testing framework (such as pytest), but is heavily customized to meet the special needs of PLC testing.

[0059] The core of the module is a universal PLC communication interface that supports a variety of common PLC communication protocols, such as Modbus, Profinet, EtherNet / IP, etc. This enables the module to communicate with PLCs of various manufacturers and models. The communication interface can simulate various I / O operations, send instructions to the PLC and read the response.

[0060] The execution engine supports parallel testing and can run multiple test cases simultaneously, greatly improving test efficiency. It also implements an intelligent scheduling algorithm that can automatically arrange the execution order based on the dependencies and priorities of the test cases.

[0061] The module also includes a status monitoring system that tracks the execution status of each test case in real time. If the test process is interrupted, the system can record the current status and support continuing the test from the breakpoint. This is particularly useful for long-running stability tests.

[0062] Reference Figure 5 As shown, the data acquisition and analysis module is used to collect and analyze test data.

[0063] In a specific embodiment of the present invention, the specific method for collecting and analyzing test data is: real-time acquisition of PLC operation data and test results, using a time series database to store a large amount of test data, applying statistical analysis methods to process data, and supporting custom analysis indicators and algorithms.

[0064] In a specific embodiment of the present invention, the statistical analysis method is used to process data, and the specific method is: collect and analyze all data generated during the test process, and use a high-performance time series database to store various real-time data. The real-time data include: PLC input and output values, internal state variables, response time, etc.

[0065] Using a distributed data collection architecture, data can be collected from multiple sources at high speed and pre-processed in real time.

[0066] Various statistical charts are generated by using preset analysis algorithms, including trend analysis, correlation analysis, performance index calculation, etc. The various statistical icons include time series charts, scatter plots, heat maps, etc., which intuitively display the performance and behavioral characteristics of the PLC.

[0067] Reference Figure 6 As shown, the report generation module is used to automatically generate a test report.

[0068] In a specific embodiment of the present invention, the specific method for automatically generating a test report is: using a configurable report template, integrating test results and data analysis results, generating a detailed report containing charts and statistical information, and supporting output in multiple formats.

[0069] In a specific embodiment, the report generation module is responsible for integrating the test results and analysis data into a comprehensive test report, using a flexible template engine to support multiple report templates, and users can select or customize templates as needed.

[0070] The report content includes a description of the test environment, a list of test cases, detailed test results (including pass / fail status, error messages, etc.), a summary of performance indicators, data analysis results, etc. The module can embed various charts and visualization effects to make the report more intuitive.

[0071] Supports interactive reporting function, allowing users to perform simple data filtering and interactive operations when viewing reports. For example, users can click on a test result to view a more detailed execution log.

[0072] Reports can be exported in multiple formats, including PDF, HTML, Word, etc., for easy use and sharing in different scenarios.

[0073] Reference Figure 7 As shown, the central control module is used to manage the entire test process.

[0074] In a specific embodiment of the present invention, the specific method for managing the entire test process is: allowing users to configure and monitor tests, using message queues to coordinate the work of various modules, implementing the scheduling and management of test tasks, and providing an API interface for integration with other systems.

[0075] In a specific embodiment of the present invention, the message queue is used to coordinate the work of each module to realize the scheduling and management of test tasks. The specific method is: coordinate the work of all other modules, provide a Web-based user interface, and allow users to configure various test data. The various test data include: test parameters, monitor test progress, view results, etc.

[0076] The interface design adopts a responsive layout, which can be well displayed on desktop and mobile devices. It contains various functional areas, including: project management, test configuration, real-time monitoring, result analysis, etc.

[0077] The background is based on message queues to achieve loosely coupled communication between modules.

[0078] Reference Figure 8 As shown, in a specific embodiment, the workflow of the system is divided into six main stages, each of which is closely connected to form a complete automated testing cycle.

[0079] The test preparation phase is the starting point of the entire process. Users first log in to the Web interface of the central control module, where they can create new test projects or select existing projects. The system will guide users to complete the test configuration step by step. Users need to select the model of the target PLC. They can choose from the system's preset PLC library or manually enter new PLC parameters. Next, users select or configure the test environment, which includes selecting industrial scenarios (such as production lines, chemical plants, etc.) and setting environmental parameters (such as temperature range, humidity, etc.). Users can also specify key areas of testing, such as functional testing, performance testing, or stability testing. After completing the configuration, the scenario simulation module will automatically generate a virtual industrial environment based on these settings to prepare for subsequent testing.

[0080] Entering the test case generation stage, the system will automatically create a comprehensive set of test cases based on the previous configuration. The test case generation module first analyzes the functional specifications of the PLC and extracts key control points and parameters. Then, it will generate test cases covering normal operations, boundary conditions and abnormal situations. For example, for temperature control PLC, the system will generate test cases to test control accuracy within the normal temperature range, response speed when temperature changes suddenly, and alarm function when exceeding the allowable range. After generation, the system will display an overview of all test cases on the interface. Users can view detailed information for each case and have the opportunity to add, modify or delete cases. At the end of this stage, a comprehensive and customized test case set is ready.

[0081] The test execution phase is the core of the entire process. The automated execution module takes over control and starts running test cases one by one. For each test case, the module first sets the initial conditions and then sends the corresponding instructions or simulates input signals to the PLC. At the same time, it monitors the output and internal state changes of the PLC. For example, when testing the temperature control function, the system may simulate the input changes of the temperature sensor and then observe how the PLC adjusts the output of the heating or cooling equipment. The whole process is fully automatic, but users can monitor the test progress in real time through the interface of the central control module. If an abnormality is found, the system will immediately record the detailed information and decide whether to continue the test according to the preset strategy. For long-term stability testing, the system supports periodic state saving so that it can continue from the breakpoint in case of unexpected interruption.

[0082] At the same time, the data collection and analysis stage is also in progress. The data collection and analysis module continues to work during the entire test execution process, collecting various data in real time, including the input and output values ​​of the PLC, internal state variables, response time, etc. The collected raw data will be pre-processed, such as noise removal, outlier detection, etc., and then stored in the time series database. At the same time, the module will perform real-time analysis and calculate various performance indicators, such as control accuracy, response time, resource utilization, etc. These real-time analysis results will be dynamically displayed on the interface of the central control module, allowing users to discover potential problems in a timely manner. For some complex analysis tasks, such as long-term trend analysis or pattern recognition, the system will continue to process data in the background and notify the user after the analysis is completed.

[0083] When all test cases are executed, the system enters the report generation stage. The report generation module will integrate all test results and analysis data to generate a comprehensive test report. The report content includes an overview of the test environment, a list of test cases, detailed test results (including the pass / fail status of each case, error information, etc.), a summary of performance indicators, data analysis results, etc. The system will automatically generate various charts, such as trend charts, scatter plots, heat maps, etc., to intuitively display the performance and behavioral characteristics of the PLC. The report adopts a modular structure, and users can choose which parts to include according to their needs. The generated report is saved in PDF format by default, but it also supports exporting to other formats, such as HTML or Word.

[0084] Finally, it is the result feedback stage. The generated report will be immediately displayed on the interface of the central control module, and the user can view it directly online. The system will highlight any failed test cases or abnormal performance indicators to facilitate users to quickly locate problems. Users can click on any part to view more detailed information, such as the complete execution log of a failed test case. Based on these results, users can decide whether further testing is needed, or directly adjust and optimize the PLC program. The system also provides a feedback mechanism that allows users to mark and comment on test results. This information will be saved and used for future test improvements.

[0085] The entire process is a closed loop. Users can reconfigure test parameters based on feedback results and start a new round of testing to continuously optimize the performance and reliability of the PLC. This systematic and automated testing method greatly improves the efficiency and comprehensiveness of PLC testing and provides strong support for the development and application of PLCs.

[0086] The above contents are merely examples and explanations of the concept of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, they shall all fall within the protection scope of the present invention.

Claims

1. A framework system based on PLC equipment scenario automated testing, characterized in that: include: Scenario simulation module, used to simulate various industrial environments and operation scenarios; Test case generation module, used to automatically generate comprehensive test cases; The automated execution module is used to automatically execute test cases and interact with the PLC; Data acquisition and analysis module, used to collect and analyze test data; Report generation module, used to automatically generate test reports; Central control module, used to manage the entire testing process.

2. A framework system based on PLC equipment scenario automated testing according to claim 1, characterized in that: The specific method of simulating various industrial environments and operation scenarios is as follows: Use software simulation technology to create a virtual PLC environment and provide a graphical interface, allowing users to customize scenario parameters.

3. According to claim 1, a framework system based on PLC equipment scenario automated testing is characterized in that: The specific method of automatically generating basic test cases is as follows: Automatically generate basic test cases based on PLC functional specifications, use combinatorial test algorithms to generate boundary condition tests, combine scenario parameters to generate test cases for specific scenarios, and support customizing and importing test cases.

4. A framework system based on PLC equipment scenario automated testing according to claim 1, characterized in that: The specific method of automatically executing the test case is as follows: Developed based on an open source test framework, it implements communication interfaces with various PLC models, allows parallel test execution, and provides test interruption and resumption functions.

5. A framework system based on PLC equipment scenario automated testing according to claim 1, characterized in that: The specific method of collecting and analyzing test data is as follows: Collect PLC operation data and test results in real time, use time series database to store large amounts of test data, apply statistical analysis methods to process data, and support custom analysis indicators and algorithms.

6. A framework system based on PLC equipment scenario automated testing according to claim 5, characterized in that: The specific method of applying statistical analysis method to process data is as follows: Collect and analyze all data generated during the test, and use a high-performance time series database to store various real-time data, including: PLC input and output values, internal state variables, response time, etc.; Using a distributed data collection architecture, data can be collected from multiple sources at high speed and pre-processed in real time; Various statistical charts are generated by using preset analysis algorithms, including trend analysis, correlation analysis, performance index calculation, etc. The various statistical icons include time series charts, scatter plots, heat maps, etc., which intuitively display the performance and behavioral characteristics of the PLC.

7. A framework system based on PLC equipment scenario automated testing according to claim 1, characterized in that: The specific method of automatically generating a test report is as follows: Use configurable report templates to integrate test results and data analysis results, generate detailed reports with charts and statistical information, and support multiple formats for output.

8. The framework system based on PLC equipment scenario automated testing according to claim 1 is characterized in that: The specific method of managing the entire test process is as follows: It allows users to configure and monitor tests, use message queues to coordinate the work of various modules, schedule and manage test tasks, and provide API interfaces for integration with other systems.

9. A framework system based on PLC equipment scenario automated testing according to claim 8, characterized in that: The message queue is used to coordinate the work of each module to realize the scheduling and management of test tasks. The specific method is as follows: Coordinate the work of all other modules, provide a web-based user interface, and allow users to configure various test data, including test parameters, monitor test progress, view results, etc.; The interface design adopts a responsive layout, which can be well displayed on desktops and mobile devices. It contains various functional areas, including: project management, test configuration, real-time monitoring, result analysis, etc. The background is based on message queues to achieve loosely coupled communication between modules.