Automatic test method, system and equipment of programmable logic controller and medium

By acquiring and analyzing the test signals and performance data of the PLC module through automated testing methods, the problems of low efficiency and poor accuracy of traditional manual testing are solved, and efficient and accurate testing of the PLC module is achieved, supporting quality traceability and product optimization.

CN120742846APending Publication Date: 2025-10-03THREE GORGES INTELLIGENT CONTROL TECHNOLOGY CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202510878734.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

Traditional PLC module testing relies on manual operation, resulting in long testing cycles, low efficiency and prone to errors. It cannot meet the efficient testing needs of modern industrial production and affects the accuracy of PLC module performance evaluation and production progress.

Method used

An automated testing method is adopted to obtain the test task configuration file, generate and send the test signal to the PLC, receive and collect its response output signal and operation performance data in real time, perform data analysis and generate a test report to achieve standardization and normalization of the test process.

Benefits of technology

It significantly improves the testing efficiency and accuracy of PLC modules, realizes the standardization and normalization of the testing process, strengthens data management and analysis capabilities, supports quality traceability and product optimization, and enhances the compatibility and versatility of the testing system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120742846A_ABST
    Figure CN120742846A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic testing method, system and device of a programmable logic controller and a medium. The test method comprises the following steps: acquiring a test task configuration file, and generating a corresponding test signal according to the test task configuration file; sending a test signal to a programmable logic controller corresponding to the test task configuration file, receiving an output signal of the programmable logic controller in response to the test signal, and collecting operation performance data of the programmable logic controller; and analyzing the data change conditions of the output signal and the operation performance data, and generating a test report of the programmable logic controller. According to the scheme, the test efficiency and precision of the PLC module are remarkably improved, the standardization and normalization of the test process are realized, the data management and analysis capability is enhanced, quality tracing and product optimization are supported, and the compatibility and universality of the test system are enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of automated testing technology, and in particular relates to an automated testing method, system, electronic device, and storage medium for a programmable logic controller. Background Art

[0002] With the rapid development of industrial automation technology, PLCs (Programmable Logic Controllers), as core components of automated control, have been widely used in various industrial equipment. PLCs play a crucial role in automated control, and their stability and reliability are crucial to industrial production efficiency and product quality.

[0003] However, traditional methods for testing PLC modules rely heavily on manual labor, which has limited the advancement of industrial automation and intelligentization. Manual testing requires tedious steps such as wiring, signal input, and output testing. This is particularly true when testing the input and output (DI / DO / AI / AO) modules of multiple PLC devices. This results in lengthy testing cycles, failing to meet the efficient testing requirements of modern industrial production and significantly impacting production schedules. Furthermore, manual testing is prone to errors, potentially leading to inaccurate test results, hindering the proper assessment of PLC module performance and increasing subsequent commissioning and repair costs. Summary of the Invention

[0004] To address the above issues, the present disclosure provides an automated testing method, system, electronic device, and storage medium for programmable logic controllers. This solution improves the efficiency and accuracy of PLC module testing, standardizes and normalizes the testing process, enhances data management and analysis capabilities, supports quality traceability and product optimization, and enhances the compatibility and versatility of the testing system.

[0005] In order to solve the above technical problems, the first aspect of the present invention provides an automated testing method for a programmable logic controller, the method comprising: Obtaining a test task configuration file, and generating a corresponding test signal according to the test task configuration file; Sending the test signal to a programmable logic controller corresponding to the test task configuration file, receiving an output signal of the programmable logic controller in response to the test signal, and collecting operating performance data of the programmable logic controller; The output signal and the data change of the operating performance data are analyzed to generate a test report of the programmable logic controller.

[0006] According to a preferred embodiment of the present invention, sending the test signal to the programmable logic controller corresponding to the test task profile, receiving an output signal of the programmable logic controller in response to the test signal, and collecting operating performance data of the programmable logic controller include: Sending a test signal including a first specific digital signal to a digital input module of the programmable logic controller; the first specific digital signal includes: a plurality of square wave signals of a plurality of frequencies and a plurality of pulse widths; Acquire state change information of the digital input module after receiving the test signal as an output signal; Collecting the test time, signal parameters and response results of the digital input module as operation performance data; Analyzing data changes of the output signal and the operating performance data, including: According to the correspondence between the first specific digital signal and the state change information and the operating performance data, it is determined whether the digital input module accurately receives and identifies the sent first specific digital signal.

[0007] According to a preferred embodiment of the present invention, receiving an output signal of the programmable logic controller in response to the test signal includes: receiving a second specific digital signal output by the digital output module of the programmable logic controller as an output signal; wherein the second specific digital signal includes: a high level signal, a low level signal and a specific pulse sequence signal; Analyzing data changes of the output signal and the operating performance data, including: Determining the accuracy, stability, and response speed of the digital output module based on the operating performance data; The electrical parameters of the second specific digital signal are compared with theoretical values ​​to determine whether the digital output module meets preset design requirements.

[0008] According to a preferred embodiment of the present invention, sending the test signal to the programmable logic controller corresponding to the test task configuration file and collecting the operating performance data of the programmable logic controller includes: Sending a test signal including a first specific analog signal to an analog input module of the programmable logic controller; the first specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; Collecting the amplitude, fluctuation range and response time of the signal of the analog input module as operation performance data; Analyzing data changes of the output signal and the operating performance data, including: The accuracy, stability and dynamic response characteristics of the analog input module are determined according to the amplitude of the signal, the fluctuation range of the signal and the response time.

[0009] According to a preferred embodiment of the present invention, receiving an output signal of the programmable logic controller in response to the test signal includes: Receiving a second specific analog signal output by the analog output module of the programmable logic controller as an output signal; the second specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; Analyzing data changes of the output signal and the operating performance data, including: The deviation between the second specific analog signal and the target value is used to determine the short-term stability, long-term drift and response speed of the signal to sudden changes in instructions, and based on the short-term stability, long-term drift and response speed to sudden changes in instructions, it is determined whether the analog output module can output an analog signal that meets the preset stability requirements.

[0010] According to a preferred embodiment of the present invention, generating a test report of the programmable logic controller includes: The test task configuration file, test signal, output signal, operation performance data and analysis results of the analysis of data changes of the output signal and the operation performance data are summarized to generate the test report.

[0011] According to a preferred embodiment of the present invention, the testing method further comprises: The test task configuration file is generated based on the entered programmable logic controller model, test items and test parameters.

[0012] In order to solve the above technical problems, the second aspect of the present invention provides an automated testing system for a programmable logic controller, the testing system comprising: A signal source module is used to obtain a test task configuration file and generate a corresponding test signal according to the test task configuration file; an automated test control module, configured to send the test signal to a programmable logic controller corresponding to the test task configuration file, receive an output signal of the programmable logic controller in response to the test signal, and collect operating performance data of the programmable logic controller; The intelligent analysis module is used to analyze the data changes of the output signal and the operating performance data and generate a test report of the programmable logic controller.

[0013] In order to solve the above technical problems, the third aspect of the present invention provides an electronic device, comprising: processor; and A memory storing computer-executable instructions, wherein when the computer-executable instructions are executed, the processor is caused to perform the method described in any one of the above embodiments.

[0014] In order to solve the above technical problems, the fourth aspect of the present invention proposes a computer storage medium, wherein the computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method described in any one of the above embodiments is implemented.

[0015] Compared with the existing technology, the present disclosure has the following advantages: the present disclosure automatically obtains the test task configuration file, generates and sends the test signal to the programmable logic controller (PLC), receives and collects its response output signal and operating performance data in real time, and then analyzes the data changes and generates a test report. This process significantly improves the testing efficiency and accuracy of the PLC module, realizes the standardization and normalization of the test process, strengthens the data management and analysis capabilities, supports quality traceability and product optimization, and enhances the compatibility and versatility of the test system.

[0016] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures indicated in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0018] Figure 1 The present invention shows a first flow chart of an automated testing method for a programmable logic controller according to an embodiment of the present disclosure; Figure 2 A second flow chart of an automated testing method for a programmable logic controller according to an embodiment of the present disclosure is shown; Figure 3 A schematic flow chart of a method for testing a digital output module according to an embodiment of the present disclosure is shown; Figure 4 A third flow chart of an automated testing method for a programmable logic controller according to an embodiment of the present disclosure is shown; Figure 5 A schematic flow chart of a method for testing an analog output module according to an embodiment of the present disclosure is shown; Figure 6 A schematic structural diagram of an automated testing system for a programmable logic controller according to an embodiment of the present disclosure is shown; Figure 7 A schematic structural diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.

[0020] The same reference numerals in the accompanying drawings represent the same or similar elements, components or parts, and thus repeated descriptions of the same or similar elements, components or parts may be omitted below. It should also be understood that although the first, second, third and other numbered adjectives may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these adjectives. In other words, these adjectives are only used to distinguish one from another. For example, the first device may also be called the second device, but this does not deviate from the essential technical solution of the present invention. In addition, the terms "and / or" and "and / or" refer to all combinations including any one or more of the listed items.

[0021] See also Figure 1 , Figure 1 This is a flow chart of an automated testing method for a programmable logic controller provided by the present invention, as shown in FIG. Figure 1 As shown, the test methods include: S11. Obtain a test task configuration file, and generate a corresponding test signal according to the test task configuration file.

[0022] In this embodiment, the test task configuration file can be a file containing parameters set by relevant personnel for the programmable logic controller to be tested. For example, a user interface installed on a control host can be provided, allowing operators to easily configure test tasks, including selecting the PLC model, test items, and setting test parameters. Alternatively, the configuration file can be pre-stored in the system. For example, corresponding test task configuration files can be configured for different programmable logic controller models. When the programmable logic controller needs to be tested, the corresponding configuration file is retrieved from the memory.

[0023] In this embodiment, a high-precision signal source is equipped to stably and reliably generate various test signals to meet the input requirements of different programmable logic controllers. Based on the test task configuration file, the high-precision signal source generates matching test signals for the programmable logic controller test task.

[0024] S12. Send a test signal to the programmable logic controller corresponding to the test task configuration file, receive an output signal of the programmable logic controller in response to the test signal, and collect operating performance data of the programmable logic controller.

[0025] In this embodiment, a programmable logic controller (PLC) is a digital computing electronic system designed specifically for industrial applications. It uses a programmable memory to store instructions for performing logic operations, sequence control, timing, counting, and arithmetic operations. It controls various types of machinery or production processes through digital or analog input and output.

[0026] In this embodiment, this solution also provides a dedicated fixture, designed based on the interface layout and dimensional characteristics of different PLC models. The fixture is constructed from high-strength, wear-resistant materials to ensure stable operation in various working environments. High-precision electrical connection components are integrated within the fixture, enabling fast and reliable connection to the PLC module. Anti-static and short-circuit protection measures are also included, effectively protecting the PLC equipment and test bench.

[0027] In this embodiment, after sending a test signal to a programmable logic controller (PLC), an output signal from the PLC in response to the test signal is obtained. Specifically, a high-precision measuring instrument is configured to accurately measure the output signal of the PLC module, ensuring the authenticity and reliability of the collected test data. Upon receiving the output signal, a data acquisition unit can perform preliminary processing on the signal collected from the PLC module. A protocol conversion unit, capable of adapting to various PLC communication protocols, parses the collected data into a unified format. A data processing unit further processes and analyzes the parsed data to extract key test metrics.

[0028] In this embodiment, the output signal refers to the electrical signal that the PLC module processes and outputs according to its internal program after receiving the test signal. These signals can be both digital and analog. Operational performance data refers to the data set collected in real time by high-precision measuring instruments during the PLC module testing process, including the PLC module's response to the test signal, the stability, accuracy, and response speed of the output signal, and other key performance indicators (such as voltage, current, frequency, pulse width, signal amplitude, fluctuation range, and response time).

[0029] S13. Analyze the data changes of the output signal and the operating performance data, and generate a test report of the programmable logic controller.

[0030] In this embodiment, in-depth analysis of the data changes of the output signals and operating performance data of the PLC module is a key step in evaluating the performance of the PLC module. Specifically, by comparing the actual output signal with the preset standard or theoretical value, quantitatively evaluating indicators such as the accuracy, stability, and response speed of the signal, and combining it with a comprehensive analysis of the operating performance data (such as changes in parameters such as voltage, current, and frequency), the system can automatically generate a detailed programmable logic controller test report. This report not only records the test results, but also deeply analyzes the data change trends during the test process, providing a scientific basis for quality assessment, fault diagnosis, and performance optimization of the PLC module, and significantly improving test efficiency and accuracy.

[0031] In this embodiment, the test task configuration file, the test signal, the output signal, the operation performance data, and the analysis results of the data changes of the output signal and the operation performance data are summarized to generate a test report.

[0032] The present invention automatically obtains test task configuration files, generates and sends test signals to a programmable logic controller (PLC), receives and collects its response output signals and operating performance data in real time, and then analyzes data changes and generates test reports. This process significantly improves the testing efficiency and accuracy of PLC modules, realizes the standardization and normalization of the testing process, strengthens data management and analysis capabilities, supports quality traceability and product optimization, and enhances the compatibility and versatility of the test system.

[0033] See also Figure 2 , Figure 2 This is a second flow chart of an automated testing method for a programmable logic controller provided by the present invention. Figure 2 As shown, the test methods include: S21. Send a test signal including a first specific digital signal to a digital input module of a programmable logic controller; the first specific digital signal includes: a plurality of square wave signals with a plurality of frequencies and a plurality of pulse widths.

[0034] In this embodiment, the DI module (a digital input module) is used to read digital signals, such as status information from a sensor or switch. DI module testing implementation: In this solution, a precisely controlled signal source sends a series of specific digital signals to the DI module, including various types such as square wave signals with varying frequencies and pulse widths.

[0035] S22. Obtain state change information of the digital input module after receiving the test signal as an output signal.

[0036] In this embodiment, during the signal transmission process, measuring instruments are used to monitor the DI module's response in real time, accurately capturing information about the module's state changes after receiving the signal. This captured data is then stably transmitted to the control program. State change information refers to data captured by high-precision measuring instruments during PLC module testing, specifically the changes in the module's internal state or output signal after receiving a specific test signal. This information, including but not limited to signal reception status, response time, level changes, and pulse sequences, serves as a crucial basis for evaluating PLC module performance and determining whether it meets design requirements. Analyzing this state change information enables comprehensive verification and precise testing of PLC module functionality.

[0037] S23. Collect the test time, signal parameters, and response results of the digital input module as operation performance data.

[0038] In this embodiment, test time: records the specific time period from the start to the end of the test, which is used to measure the test efficiency. It is also an important basis for analyzing the performance stability of the PLC module in different time periods. Signal parameters: describes in detail the signal characteristics used in the test process, such as signal type (digital signal, analog signal), amplitude, frequency, pulse width, etc. These parameters are crucial to ensuring the accuracy and repeatability of the test. Response results: reflects the actual output of the PLC module after receiving a specific test signal, including the accuracy, stability, response time, etc. of the output signal. It is the core indicator for judging whether the PLC module meets the design requirements. By comparing the expected results with the actual response results, the performance shortcomings of the PLC module can be accurately located, providing direction for subsequent optimization and improvement.

[0039] S24. Determine whether the digital input module accurately receives and identifies the sent first specific digital signal based on the correspondence between the first specific digital signal and the state change information and the operating performance data.

[0040] In this embodiment, upon receiving the collected data, the control program immediately applies a preset algorithm to analyze and process the data to determine whether the DI module can accurately receive and identify the transmitted digital signal. Based on the determination result, the control program records the DI module test status in a detailed and objective manner in a test report, including key information such as test time, signal parameters, and response results.

[0041] In this embodiment, after the test signal is input to the digital input module, the digital output module outputs the processing result of the programmable logic controller on the test signal. DO module: digital output module, used to control the output of digital signals, such as controlling the on / off status of a device. The status of the digital output module can also be determined based on the output signal and the above-mentioned operating performance data, such as Figure 3 As shown in FIG, the testing method of the digital output module includes the following steps: S31. Receive a second specific digital signal output by a digital output module of a programmable logic controller as an output signal; the second specific digital signal includes: a high-level signal, a low-level signal, and a specific pulse sequence signal.

[0042] In this embodiment, after receiving the test signal, the programmable logic controller (PLC) executes its internal logic to output the test result. The DO module then outputs different digital signals based on the predefined logic relationships. Signal types include high-level and low-level signals, as well as specific pulse sequences. The measuring instrument monitors the actual output signal of the DO module in real time, accurately capturing parameters such as voltage, current, frequency, and pulse width, and provides stable and rapid feedback to the control program.

[0043] S32. Determine the accuracy, stability, and response speed of the digital output module based on the operating performance data.

[0044] In this embodiment, the control program performs quantitative evaluation and analysis on indicators such as accuracy, stability, and response speed of the output signal through the collected operating performance data.

[0045] S33. Compare the electrical parameters of the second specific digital signal with the theoretical values ​​to determine whether the digital output module meets the preset design requirements.

[0046] In this embodiment, since the test signal is generated based on the configuration, the condition of the test signal is known. When testing the PLC, the corresponding theoretical value can be determined according to the internal program of the PLC. By comparing this theoretical value with the actual value, it can be determined whether the digital output module meets the requirements.

[0047] In this embodiment, the theoretical value is compared with the second specific digital signal, the deviation range is calculated, and it is determined whether the DO module meets the design requirements. The relevant test results are recorded in detail in the test report, including test items, judgment criteria, actual measurement data, judgment results, etc.

[0048] See also Figure 4 , Figure 4 The third flow chart of the automated testing method for a programmable logic controller provided by the present invention is as follows: Figure 4As shown, the test methods include: S41, sending a test signal including a first specific analog signal to the analog input module of the programmable logic controller; the first specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes. In this embodiment, the AI ​​module (an analog input module) is used to read analog signals, such as continuously changing physical quantities like temperature and pressure. The AI ​​module's acquisition target value is set in the PLC so that it acquires the corresponding analog signals according to a predetermined pattern, thereby inputting the corresponding analog signals into the AI ​​module. Signal types include DC voltages or currents of varying amplitudes.

[0049] S42. Collect the amplitude, fluctuation range, and response time of the signal of the analog input module as operation performance data.

[0050] In this embodiment, the measuring instrument collects the actual output signal of the AI ​​module in real time, accurately measures the signal's amplitude, fluctuation range, response time and other parameters, and stably transmits the data to the control program.

[0051] S43. Determine the accuracy, stability, and dynamic response characteristics of the analog input module based on the signal amplitude, signal fluctuation range, and response time.

[0052] In this embodiment, the control software performs quantitative analysis and judgment on the accuracy, stability, and dynamic response characteristics of the output signal, compares the deviation between the actual output signal and the target value, evaluates the signal's short-term stability, long-term drift, and response speed to sudden changes, and records the test results in detail in a test report, including key content such as test conditions, measurement data, and analysis conclusions.

[0053] In this embodiment, after the test signal is input to the analog input module, the analog output module outputs the processing result of the programmable logic controller on the test signal. AO module: analog output module, used to output analog signals, such as the operating speed or position of the control device. The status of the analog output module can also be determined based on the output signal, such as Figure 5 As shown in the figure, the test method of the analog output module includes the following steps: S51. Receive a second specific analog signal output by an analog output module of a programmable logic controller as an output signal; the second specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes.

[0054] In this embodiment, the output target value of the AO module causes it to output a corresponding analog signal according to a predetermined rule, and the signal type includes DC voltage or current signals of different amplitudes.

[0055] S52. Determine the short-term stability, long-term drift, and response speed to mutation instructions of the signal based on the deviation between the second specific analog signal and the target value, and determine whether the analog output module can output an analog signal that meets the preset stability requirements based on the short-term stability, long-term drift, and response speed to mutation instructions.

[0056] In this embodiment, the deviation between the actual output signal and the target value is compared, and the short-term stability, long-term drift, and response speed to sudden changes of the signal are evaluated to determine whether the AO module can accurately and stably output an analog signal that meets the requirements. The test results are recorded in detail in a test report, including key content such as test conditions, measurement data, and analysis conclusions.

[0057] See also Figure 6 , Figure 6 The present invention provides an automatic test system for a programmable logic controller, which includes a signal source module 11 , an automatic test control module 12 , and an intelligent analysis module 13 .

[0058] In this embodiment, the signal source module 11 is used to obtain a test task configuration file and generate a corresponding test signal according to the test task configuration file.

[0059] In this embodiment, the automated test control module 12 is configured to send a test signal to a programmable logic controller corresponding to the test task configuration file, receive an output signal of the programmable logic controller in response to the test signal, and collect operating performance data of the programmable logic controller.

[0060] In this embodiment, the intelligent analysis module 13 is used to analyze the data changes of the output signal and the operating performance data and generate a test report of the programmable logic controller.

[0061] In this embodiment, the automated test control module 12 is specifically used to send a test signal including a first specific digital signal to the digital input module of the programmable logic controller; the first specific digital signal includes: multiple square wave signals of multiple frequencies and multiple pulse widths; obtain state change information of the digital input module after receiving the test signal as an output signal; receive a second specific digital signal output by the digital output module of the programmable logic controller as an output signal; the second specific digital signal includes: a high-level signal, a low-level signal and a specific pulse sequence signal; and collect the test time, signal parameters and response results of the digital input module as operation performance data.

[0062] In this embodiment, the intelligent analysis module 13 is specifically used to determine whether the digital input module accurately receives and identifies the first specific digital signal sent based on the correspondence between the first specific digital signal and the state change information and the operating performance data; determine the accuracy, stability and response speed of the digital output module based on the operating performance data; and compare the electrical parameters of the second specific digital signal with the theoretical values ​​to determine whether the digital output module meets the preset design requirements.

[0063] In this embodiment, the automated test control module 12 is specifically configured to send a test signal including a first specific analog signal to an analog input module of a programmable logic controller; the first specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; receive a second specific analog signal output by an analog output module of the programmable logic controller as an output signal; the second specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; and collect the amplitude, fluctuation range, and response time of the signal of the analog input module as operating performance data.

[0064] In this embodiment, the intelligent analysis module 13 is specifically used to determine the accuracy, stability and dynamic response characteristics of the analog input module based on the signal amplitude, signal fluctuation range and response time; determine the short-term stability, long-term drift and response speed of the signal to sudden changes based on the deviation of the second specific analog signal from the target value; and determine whether the analog output module can output an analog signal that meets the preset stability requirements based on the short-term stability, long-term drift and response speed to sudden changes.

[0065] In this embodiment, the intelligent analysis module 13 is specifically used to summarize the test task configuration files, test signals, output signals, operation performance data, and analysis results of data changes of the output signals and operation performance data to generate a test report.

[0066] In this embodiment, the test system further includes: a configuration file generating module, which is used to generate a test task configuration file based on the entered programmable logic controller model, test items and test parameters.

[0067] like Figure 7 As shown, an embodiment of the present invention provides an electronic device, including a processor 1110, a communication interface 1120, a memory 1130 and a communication bus 1140, wherein the processor 1110, the communication interface 1120, and the memory 1130 communicate with each other through the communication bus 1140; Memory 1130, for storing computer programs; The processor 1110 is configured to implement any of the above methods when executing the program stored in the memory 1130 .

[0068] In the electronic device provided by an embodiment of the present invention, the processor 1110 obtains a test task configuration file by executing a program stored in the memory 1130, generates a corresponding test signal according to the test task configuration file, sends the test signal to the programmable logic controller corresponding to the test task configuration file, receives an output signal of the programmable logic controller in response to the test signal, and collects operating performance data of the programmable logic controller; analyzes data changes of the output signal and the operating performance data, and generates a test report for the programmable logic controller.

[0069] The communication bus 1140 mentioned in the electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0070] The communication interface 1120 is used for communication between the electronic device and other devices.

[0071] The memory 1130 may include a random access memory 1130 (RAM) or a non-volatile memory 1130, such as at least one disk storage 1130. Alternatively, the memory 1130 may be at least one storage device located away from the processor 1110.

[0072] The above-mentioned processor 1110 can be a general-purpose processor 1110, including a central processing unit 1110 (CPU), a network processor 1110 (NP), etc.; it can also be a digital signal processor 1110 (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0073] An embodiment of the present invention provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors 1110 to implement the method of any of the above embodiments.

[0074] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0075] Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. An automated testing method for a programmable logic controller, characterized in that: The test method includes: Obtaining a test task configuration file, and generating a corresponding test signal according to the test task configuration file; Sending the test signal to a programmable logic controller corresponding to the test task configuration file, receiving an output signal of the programmable logic controller in response to the test signal, and collecting operating performance data of the programmable logic controller; The output signal and the data change of the operating performance data are analyzed to generate a test report of the programmable logic controller.

2. The testing method according to claim 1, wherein: The sending of the test signal to the programmable logic controller corresponding to the test task profile, receiving an output signal of the programmable logic controller in response to the test signal, and collecting operating performance data of the programmable logic controller includes: Sending a test signal including a first specific digital signal to a digital input module of the programmable logic controller; the first specific digital signal includes: a plurality of square wave signals of a plurality of frequencies and a plurality of pulse widths; Acquire state change information of the digital input module after receiving the test signal as an output signal; Collecting the test time, signal parameters and response results of the digital input module as operation performance data; Analyzing data changes of the output signal and the operating performance data, including: According to the correspondence between the first specific digital signal and the state change information and the operating performance data, it is determined whether the digital input module accurately receives and identifies the sent first specific digital signal.

3. The testing method according to claim 2, wherein: The receiving an output signal of the programmable logic controller in response to the test signal comprises: receiving a second specific digital signal output by the digital output module of the programmable logic controller as an output signal; wherein the second specific digital signal includes: a high level signal, a low level signal and a specific pulse sequence signal; Analyzing data changes of the output signal and the operating performance data, including: Determining the accuracy, stability, and response speed of the digital output module based on the operating performance data; The electrical parameters of the second specific digital signal are compared with theoretical values ​​to determine whether the digital output module meets preset design requirements.

4. The testing method according to claim 1, wherein: The sending of the test signal to the programmable logic controller corresponding to the test task configuration file and collecting the operating performance data of the programmable logic controller includes: Sending a test signal including a first specific analog signal to an analog input module of the programmable logic controller; the first specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; Collecting the amplitude, fluctuation range and response time of the signal of the analog input module as operation performance data; Analyzing data changes of the output signal and the operating performance data, including: The accuracy, stability and dynamic response characteristics of the analog input module are determined according to the amplitude of the signal, the fluctuation range of the signal and the response time.

5. The testing method according to claim 4, characterized in that: The receiving an output signal of the programmable logic controller in response to the test signal comprises: Receiving a second specific analog signal output by the analog output module of the programmable logic controller as an output signal; the second specific analog signal includes: a DC voltage signal or a DC current signal with multiple amplitudes; Analyzing data changes of the output signal and the operating performance data, including: The deviation between the second specific analog signal and the target value is used to determine the short-term stability, long-term drift and response speed of the signal to sudden changes in instructions, and based on the short-term stability, long-term drift and response speed to sudden changes in instructions, it is determined whether the analog output module can output an analog signal that meets the preset stability requirements.

6. The testing method according to claim 1, wherein: Generating a test report of the programmable logic controller includes: The test task configuration file, test signal, output signal, operation performance data and analysis results of the analysis of data changes of the output signal and the operation performance data are summarized to generate the test report.

7. The testing method according to any one of claims 1 to 6, characterized in that: The test method further comprises: The test task configuration file is generated based on the entered programmable logic controller model, test items and test parameters.

8. An automated testing system for a programmable logic controller, characterized in that: The test system comprises: A signal source module is used to obtain a test task configuration file and generate a corresponding test signal according to the test task configuration file; an automated test control module, configured to send the test signal to a programmable logic controller corresponding to the test task configuration file, receive an output signal of the programmable logic controller in response to the test signal, and collect operating performance data of the programmable logic controller; The intelligent analysis module is used to analyze the data changes of the output signal and the operating performance data and generate a test report of the programmable logic controller.

9. An electronic device, characterized in that: include: processor; as well as A memory storing computer executable instructions which, when executed, cause the processor to perform the method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that in, The computer storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • System and method for automatically testing analog module used for programmable logic controller (PLC)

    CN101887111A

  • Programmable logic controller (PLC) automatic testing platform using programmable relay structure

    CN102455701A

  • PLC (programmable logic controller) input and output module test method, device and system and computer equipment

    CN109947087A

  • Programmable logic controller detection method, device and equipment and storage medium

    CN110750085A

  • DI module and DO module detection method, medium, PLC and system

    CN113534732A