S7 Protocol Communication Testing Methods, Apparatus, Equipment and Storage Media

By acquiring and processing read/write request information based on the PLC data port in 3D printing equipment and classifying it, the problem of insufficient functionality in existing S7 protocol testing tools is solved, the results are visualized, and the efficiency and reliability of communication testing are improved.

CN120871734BActive Publication Date: 2026-01-06SHANGHAI HANBANG UNITED 3D TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511380210.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2026-01-06
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

Existing S7 protocol testing tools have limited functionality and cannot effectively display written values, data types, and address mappings, resulting in low communication testing efficiency for 3D printing equipment and difficulty in locating errors.

Method used

By acquiring read/write request information through the PLC data port, processing and classifying it, and performing corresponding point testing operations based on the classification results, the results can be visualized.

Benefits of technology

It improves the efficiency and reliability of communication testing, enabling rapid location and correction of communication errors, and ensuring the stable operation of 3D printing equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120871734B_ABST
    Figure CN120871734B_ABST
Patent Text Reader

Abstract

The application discloses a S7 protocol communication test method and device, equipment and a storage medium. The application obtains corresponding read-write request information based on a PLC data port; processes and classifies the read-write request information to obtain a processing classification result; performs a corresponding point test operation according to the processing classification result to obtain a communication test result. The application identifies and distinguishes the source of the read-write request through the PLC data port, and then processes and classifies the read-write request. Finally, the corresponding communication test result is obtained according to the processing classification result, the result visualization is realized, and the communication test efficiency and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data communication, and in particular to an S7 protocol communication testing method, apparatus, device and storage medium. Background Technology

[0002] Currently, Siemens S7 protocol is commonly used in 3D printing equipment control systems to achieve communication between the host computer and the PLC. However, because 3D printing equipment integrates multiple functions such as motion control, temperature control, and material feeding, the number and types of data points involved in the communication process are large. Furthermore, during the development phase, frequent data interactions can easily lead to errors such as address configuration and type mismatch, which are difficult to troubleshoot. Existing S7 testing tools have limited functionality, mostly supporting only basic data reading and writing, and cannot clearly display key information such as written values, data types, and address mappings, making it difficult for testers to quickly locate and correct errors.

[0003] To overcome the above limitations, there is an urgent need for an efficient, intuitive and comprehensive S7 protocol communication testing solution to improve testing efficiency and reliability. Summary of the Invention

[0004] This application provides an S7 protocol communication testing method, apparatus, device, and storage medium to solve the above-mentioned technical problems.

[0005] The first aspect of this application provides an S7 protocol communication testing method, comprising: acquiring corresponding read / write request information based on the PLC data port; processing and classifying the read / write request information to obtain processing and classification results; and performing corresponding point test operations based on the processing and classification results to obtain communication test results.

[0006] In some embodiments, obtaining corresponding read / write request information based on the PLC data port includes: obtaining device configuration information; setting the corresponding PLC data port according to the device configuration information; and obtaining the corresponding read / write request information based on the PLC data port.

[0007] In some embodiments, processing classification is performed based on read / write request information to obtain processing classification results, including: parsing the read / write request information into instructions to obtain instruction parsing results; obtaining a first type of processing classification result when the instruction parsing result is a write request instruction; obtaining a second type of processing classification result when the instruction parsing result is an I / O request instruction; and obtaining a third type of processing classification result when the instruction parsing result is a read request instruction.

[0008] In some embodiments, the corresponding point test operation is performed according to the processing classification result to obtain the communication test result, including: when the processing classification result is the first type of processing classification result, the read and write request information is filtered to obtain the filtered read and write request information; the filtered read and write request information is sent to the server for data display to obtain the communication test result.

[0009] In some embodiments, the corresponding point test operation is performed according to the processing classification result to obtain the communication test result, including: when the processing classification result is the second type of processing classification result, writing read / write request information to the control point to obtain the information writing result; performing data mapping according to the information writing result to obtain the information mapping result; and sending the information mapping result to the host computer for display to obtain the communication test result.

[0010] In some embodiments, corresponding point test operations are performed based on the processing classification results to obtain communication test results, including: when the processing classification result is a third type of processing classification result, the read / write request information is sent to the host computer for display to obtain the communication test results.

[0011] In some embodiments, after performing corresponding point test operations based on the processing classification results and obtaining communication test results, the method further includes: when the communication test results are unqualified, re-acquiring the corresponding read / write request information based on the PLC data port and performing subsequent test operations to obtain secondary communication test results.

[0012] The second aspect of this application proposes an S7 protocol communication testing device, including an information acquisition module, an information classification module, and a result output module. The information acquisition module is used to acquire corresponding read / write request information based on the PLC data port; the information classification module is used to process and classify the read / write request information to obtain the processing and classification results; and the result output module is used to perform corresponding point test operations based on the processing and classification results to obtain communication test results.

[0013] A third aspect of this application provides an electronic device comprising: a memory; a processor; and one or more computer programs stored in the memory, the one or more computer programs including instructions that, when executed by the processor, enable the implementation of the S7 protocol communication test method as described above.

[0014] The fourth aspect of this application provides a computer-readable storage medium storing a computer program, wherein the storage medium stores an S7 protocol communication test program, and when the S7 protocol communication test program is executed by a processor, it implements the steps of the S7 protocol communication test method described above.

[0015] The S7 protocol communication testing method, apparatus, equipment, and storage medium provided in this application can acquire corresponding read / write request information based on the PLC data port; then process and classify the read / write request information to obtain the processing and classification results; finally, perform corresponding point test operations based on the processing and classification results to obtain the communication test results. This application identifies and distinguishes the source of read / write requests through the PLC data port, processes and classifies them, and finally obtains the corresponding communication test results based on the processing and classification results, realizing result visualization and improving the efficiency and reliability of communication testing. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the structure of the S7 protocol communication test device provided in the embodiments of this application.

[0017] Figure 2 This is a flowchart illustrating the S7 protocol communication testing method provided in the embodiments of this application.

[0018] Figure 3 yes Figure 2 A schematic diagram of the sub-process of step S10.

[0019] Figure 4 yes Figure 2 A schematic diagram of the sub-process of step S20.

[0020] Figure 5 yes Figure 2 A schematic diagram of the sub-process of step S30.

[0021] Figure 6 yes Figure 2 A schematic diagram of another sub-process of step S30.

[0022] Figure 7 This is a structural block diagram of the S7 protocol communication testing device provided in the embodiments of this application.

[0023] Figure 8 This is another structural block diagram of the S7 protocol communication test device provided in the embodiments of this application. Detailed Implementation

[0024] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.

[0025] Currently, Siemens S7 communication protocol is typically used in the control systems of 3D printing equipment to achieve data exchange and command transmission between the host computer monitoring system and the PLC (Programmable Logic Controller). However, due to the high integration and complex processes of 3D printing equipment, its control system needs to handle multiple functions simultaneously, such as precise positioning of motion axes, temperature monitoring of heating modules, stepping control of the feeding mechanism, state switching of pneumatic valves, and safety alarm monitoring. This results in a large number and variety of communication data points. Furthermore, during the equipment software development and debugging phase, the host computer needs to maintain high-frequency, multi-dimensional, and continuous data interaction with the PLC. The read and write operations of a large number of points are prone to cause potential problems such as address mapping deviations, data type verification errors, and communication timing disorder due to human configuration negligence, inconsistent protocol parsing, or system compatibility issues. These errors are highly concealed and coupled, making them difficult to intuitively capture and locate using traditional debugging methods in a conventional development environment.

[0026] If the aforementioned communication problems are not identified and resolved through sufficient and effective testing in the early stages of development, they may lead to serious control logic errors in actual production operations. For example, issuing a heating command may trigger a feeding action, setting motion parameters may result in no response from the actual actuator, or even equipment failures and safety accidents such as printhead collisions and heated bed overheating. This not only affects the quality of printed products and causes production interruptions but may also lead to hardware damage and increased subsequent maintenance costs. However, the S7 protocol testing tools commonly used in the industry currently have relatively limited functionality, with most only able to perform basic data reading and writing and hexadecimal value display, lacking in-depth analysis and visualization support for the communication process. Specifically, existing tools cannot dynamically reflect the matching relationship between the host computer's write value to a specific point and its actual data type on the server side, nor can they intuitively display the corresponding logic between the address mapping structure and the actual device variables. This leaves developers and testers facing bottlenecks such as information fragmentation and low debugging efficiency when troubleshooting communication faults, failing to meet the high reliability and high efficiency testing requirements in complex industrial environments.

[0027] Therefore, this application provides an S7 protocol communication testing method, apparatus, device, and storage medium. It acquires corresponding read / write request information based on the PLC data port; then processes and classifies the read / write request information to obtain processing and classification results; finally, it performs corresponding point-based testing operations based on the processing and classification results to obtain communication test results. This application identifies and distinguishes the source of read / write requests through the PLC data port, processes and classifies them, and finally obtains the corresponding communication test results based on the processing and classification results. This achieves result visualization and improves the efficiency and reliability of communication testing.

[0028] Reference Figure 1 , Figure 1 This is a schematic diagram of the electronic device structure according to an embodiment of this application. Figure 1As shown, the electronic device 1000 may include: a processor 1001, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The processor 1001 may be, for example, a Central Processing Unit (CPU). The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard. Optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0029] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device 1000, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0030] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an S7 protocol communication test program.

[0031] Understandable, Figure 1 In the illustrated electronic device 1000, the network interface 1004 is mainly used for data communication with a network server. The user interface 1003 is mainly used for data interaction with the user. In this application, the electronic device 1000 uses the processor 1001 to call the control program stored in the memory 1005 to execute the S7 protocol communication test method provided in the embodiments of this application.

[0032] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating the S7 protocol communication testing method provided in an embodiment of this application. In some embodiments, the S7 protocol communication testing method may be... Figure 1 The electronic device 1000 in the system performs this operation. Specifically, for example... Figure 2 As shown, the S7 protocol communication test method includes the following steps:

[0033] Step S10: Obtain the corresponding read / write request information based on the PLC data port.

[0034] It is understood that in some embodiments, 3D printing equipment is typically configured with multiple PLCs (Programmable Logic Controllers) to improve its performance. These include, but are not limited to, a main control PLC responsible for task coordination, human-machine interaction, and global logic; a motion control PLC specializing in high-precision interpolation and positioning of multi-axis servo / stepper motors; a high-temperature extrusion PLC responsible for PID adjustment of print head temperature and torque control of the feed motor; a heated bed management PLC for implementing zoned temperature control of the printing platform; and auxiliary unit PLCs managing peripheral functions such as cooling, lighting, and safety locks. Furthermore, these different PLCs may involve some overlap in the points they access during read / write operations. Therefore, to effectively distinguish the PLCs corresponding to these points, corresponding PLC data ports can be set for different PLCs, and the PLCs corresponding to each point can be identified through these ports.

[0035] It is understood that in some embodiments, the process of 3D printing equipment software using the S7 protocol for data communication involves various data communication command information, which are read and write request information, including but not limited to write request command information, read request command information, and IO output point command information.

[0036] Please refer to this as well. Figure 3 , Figure 3 yes Figure 2 A schematic diagram of the sub-process of step S10. In some embodiments, the corresponding read / write request information can be obtained based on the following steps S11 to S13.

[0037] Step S11: Obtain device configuration information.

[0038] It is understood that in some embodiments, the 3D printing equipment includes multiple PLCs, each of which can communicate data using the S7 protocol, and each PLC has a different corresponding functional control unit, such as a motion control unit, a high-temperature molding unit, and a material handling unit. Therefore, by obtaining the equipment configuration information, the functional control status of each PLC can be understood.

[0039] Step S12: Set the corresponding PLC data port according to the equipment configuration information.

[0040] It is understood that in some embodiments, the functional control units corresponding to different PLCs are not the same. Therefore, in order to distinguish these PLCs, it is necessary to set the corresponding data port for each PLC so that users can accurately know the detection status of each PLC's corresponding point and make corresponding judgments when they check later.

[0041] It should be noted that in some embodiments, the process of setting the corresponding PLC data ports according to the device configuration information includes, but is not limited to, forwarding the S7 protocol requests of multiple different ports of the device to each PLC according to the device configuration information, thereby realizing a solution of distinguishing and accessing multiple PLCs with a single IP and different ports, which perfectly supports centralized monitoring and data acquisition of multiple PLCs in complex 3D printing equipment.

[0042] Step S13: Obtain the corresponding read / write request information based on the PLC data port.

[0043] It is understood that in some embodiments, different PLCs correspond to different functional control units, and the read / write request information they issue is also targeted at different functional control units. The process of obtaining the corresponding read / write request information based on the PLC data port includes, but is not limited to, obtaining and parsing communication data packets through the PLC data port to obtain the read / write request information initiated by the external client to the PLC, including operation type information, accessed memory area address information, and specific data value information. Among them, the operation type information includes write request information, read request information, and IO output point information, etc.

[0044] Step S20: Process and classify the read / write request information to obtain the processing and classification results.

[0045] It is understood that in some embodiments, in order to simplify communication detection, it is necessary to process and classify the read and write request information, that is, to select the corresponding display processing method according to different read and write request information, and then obtain the corresponding processing and classification results.

[0046] Please refer to this as well. Figure 4 , Figure 4 yes Figure 2 A schematic diagram of the sub-process of step S20. In some embodiments, the processing and classification results can be obtained based on steps S21 to S24.

[0047] Step S21: Parse the read / write request information to obtain the command parsing result.

[0048] It is understood that in some embodiments, the read / write request information includes specific operation instructions, such as read request instructions, write request instructions, and IO output request instructions, which can be processed and classified according to the type of operation instructions.

[0049] Step S22: When the instruction parsing result is a write request instruction, the first type of processing classification result is obtained.

[0050] It is understood that in some embodiments, a write request instruction is a data write command initiated by the host computer to the PLC, which aims to change the state of its internal storage area or output point. This instruction can follow the S7 industrial communication protocol and encapsulate key information such as target address, data type and write value.

[0051] Step S23: When the instruction parsing result is an IO request instruction, the second type of processing classification result is obtained.

[0052] It is understood that in some embodiments, the IO request instruction is a periodic hardware communication mechanism that runs autonomously at the PLC bottom layer. It can use the process image area (PII / PIQ) as a high-speed buffer to automatically and synchronously collect the signal status of all input modules in batches during each scan cycle and send control signals to the output modules. It is the core foundation for the PLC to achieve high-speed, reliable, and real-time control.

[0053] Step S24: When the instruction parsing result is a read request instruction, the third type of processing classification result is obtained.

[0054] It is understood that in some embodiments, the read request instruction is a data query command initiated by the host computer to obtain the internal status of the PLC. This instruction can follow the S7 industrial communication protocol and encapsulates key information such as the target address and data length.

[0055] Step S30: Perform the corresponding point test operation based on the processing and classification results to obtain the communication test results.

[0056] It is understood that in some embodiments, the points involved in different read and write request instructions are corresponding to each other. Therefore, the corresponding point test operation can be performed according to the different read and write request instructions corresponding to the processing classification results to obtain the execution results of the respective instruction operations, that is, to obtain the communication test results.

[0057] Please refer to this as well. Figure 5 , Figure 5 yes Figure 2 A schematic diagram of the sub-process of step S30. In some embodiments, communication test results can be obtained based on steps D31 to D32.

[0058] Step D31: When the classification result is the first category, filter the read / write request information to obtain the filtered read / write request information.

[0059] It is understood that in some embodiments, when the classification result is the first type of classification result, the read / write request information corresponds to a write request instruction information. Due to business needs, some write request instructions involve points that are periodically and cyclically written to the PLC, such as heartbeat signals and holding registers. This will cause this type of information to flood the server, thus missing other useful information. Therefore, it is necessary to filter the non-read / write request information to remove this type of write request instruction information.

[0060] It should also be noted that, in some embodiments, the process of filtering read and write request information includes, but is not limited to, first parsing the read and write request information, then extracting key features such as the operation type, target address, data value, and user source of the read and write request instruction, then matching it through a rule engine, verifying the business rules based on the silent list, and finally performing actions such as allowing, rejecting, or silent processing based on the matching results.

[0061] Step D32: Send the filtered read / write request information to the server for data display and obtain the communication test results.

[0062] It is understood that, in some embodiments, when the filtered read / write request information is sent to the server for data display, users can view the operation results of the points involved in the filtered read / write request information, i.e., the communication test results, through the server, thereby determining whether the results corresponding to the points are correct. The communication test results displayed on the server include the write time, the write point, the value of the write point, the actual type of the written data, the data type in the corresponding S7 protocol, and the PLC dedicated port number corresponding to the read / write request information.

[0063] Please refer to this as well. Figure 6 , Figure 6 yes Figure 2 A schematic diagram of another sub-process of step S30. In some embodiments, communication test results can also be obtained based on steps M31 to M33.

[0064] Step M31: When the classification result is the second type of classification result, write the read / write request information to the control point to obtain the information writing result.

[0065] It is understood that in some embodiments, when processing the classification result as the second type of classification result, the read / write request information corresponds to an IO request instruction information. When performing read and write operations, the points involved in the IO request instruction information are different, that is, the "command point" written by the program and the "status point" read by the program are physically or logically separated, thereby achieving decoupling of control instructions and status feedback.

[0066] Step M32: Perform data mapping based on the information writing results to obtain the information mapping results.

[0067] It is understandable that in some embodiments, in order to ensure that the host computer can accurately display the device status, an output mapping mechanism needs to be established. That is, when the program writes control instructions to the physical output point and obtains the information writing result, it synchronously updates the corresponding internal mapping point, and the host computer connects to the mapping point to obtain the information mapping result.

[0068] Step M33: Send the information mapping result to the host computer for display and obtain the communication test result.

[0069] It is understood that, in some embodiments, to reduce the amount of data displayed for communication detection results, different display and storage processes can be applied to communication detection results under different circumstances. For example, the communication test results generated corresponding to IO request commands can be sent to a host computer for display, thereby reducing the amount of data that server users need to view. Furthermore, when users have a need to view the execution results of IO request commands, they can also view them through the host computer.

[0070] Furthermore, based on the processing and classification results, corresponding point test operations are performed to obtain communication test results, including: when the processing and classification result is the third category, the read / write request information is sent to the host computer for display to obtain the communication test results.

[0071] It is understood that in some embodiments, when processing a classification result of the third category, the read / write request information corresponds to a read request instruction. Furthermore, because the number of read requests involved in 3D printing equipment is extremely large—for example, a read request frequency at the millisecond level—it can cause the server to overload, thus increasing the difficulty of communication testing. Therefore, it is necessary to send the read request information to the host computer for display.

[0072] Furthermore, after performing corresponding point-to-point test operations based on the processing and classification results to obtain the communication test results, the process also includes: when the communication test results are unqualified, re-acquiring the corresponding read / write request information based on the PLC data port and performing subsequent test operations to obtain the secondary communication test results.

[0073] It is understood that in some embodiments, if the communication test result is unqualified, it indicates that the data point corresponding to the current read / write request information is incorrect, such as configuration error, communication error, data quality error, or logical error. Therefore, after correcting the error, it is necessary to re-acquire the corresponding read / write request information and perform subsequent test operations to complete all communication tests.

[0074] Reference Figure 7 , Figure 7 This is a structural block diagram of the S7 protocol communication testing device provided in an embodiment of this application. Figure 7 As shown, the S7 protocol communication test device includes an information acquisition module 10, an information classification module 20, and a result output module 30. The information acquisition module 10 is used to acquire the corresponding read / write request information based on the PLC data port.

[0075] The information classification module 20 is used to process and classify the read and write request information to obtain the processing and classification results.

[0076] The result output module 30 is used to perform corresponding point test operations based on the processing and classification results to obtain communication test results.

[0077] This embodiment provides an S7 protocol communication testing method, apparatus, device, and storage medium. It acquires corresponding read / write request information based on the PLC data port; then processes and classifies the read / write request information to obtain processing and classification results; finally, it performs corresponding point-based testing operations based on the processing and classification results to obtain communication test results. This embodiment identifies and distinguishes the source of read / write requests through the PLC data port, processes and classifies them, and finally obtains the corresponding communication test results based on the processing and classification results. This achieves result visualization and improves the efficiency and reliability of communication testing.

[0078] In addition, refer to Figure 8 , Figure 8 This is another structural block diagram of the S7 protocol communication test device provided in this application embodiment. The S7 protocol communication test device 2000 includes a processor 1001 and a memory 1005. The memory 1005 stores programs, instructions, or code for executing the aforementioned S7 protocol communication test method. The processor 1001 executes the programs, instructions, or code stored in the memory 1005. The programs, instructions, or code stored in the memory 1005 are executable. Figures 2 to 6 The embodiments shown include some or all of the steps of the S7 protocol communication test method.

[0079] Since this storage medium adopts all the technical solutions of all the above embodiments, it has at least all the beneficial effects brought about by the technical solutions of the above embodiments, which will not be repeated here.

[0080] Furthermore, embodiments of this application also propose a computer-readable storage medium storing a computer program, wherein the storage medium stores an S7 protocol communication test program, and when the S7 protocol communication test program is executed by a processor, it implements the steps of the S7 protocol communication test method described above.

[0081] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solution of this application. In specific applications, those skilled in the art can make settings as needed, and this application does not impose any restrictions on this.

[0082] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this application. In practical applications, those skilled in the art can select some or all of it to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0083] In addition, for technical details not described in detail in this embodiment, please refer to the S7 protocol communication test method provided in any embodiment of this application, which will not be repeated here.

[0084] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0085] The sequence numbers of the embodiments in this application are for description only and do not represent the superiority or inferiority of the embodiments.

[0086] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0087] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for testing S7 protocol communication, characterized in that, The method comprises: obtaining corresponding read-write request information based on a PLC data port; processing and classifying according to the read-write request information to obtain a processing classification result; performing a corresponding point position test operation according to the processing classification result to obtain a communication test result.

2. The S7 protocol communication test method according to claim 1, wherein, The method comprises: obtaining corresponding read-write request information based on a PLC data port; obtaining device configuration information; setting a corresponding PLC data port according to the device configuration information; 3. The S7 protocol communication test method of claim 1, wherein, obtaining corresponding read-write request information based on a PLC data port. The method comprises: performing instruction analysis on the read-write request information to obtain an instruction analysis result; obtaining a first type of processing classification result when the instruction analysis result is a write request instruction; obtaining a second type of processing classification result when the instruction analysis result is an IO request instruction; 4. The S7 protocol communication test method according to claim 3, wherein, obtaining a third type of processing classification result when the instruction analysis result is a read request instruction. The method comprises: performing information filtering on the read-write request information when the processing classification result is the first type of processing classification result to obtain filtered read-write request information; 5. The S7 protocol communication test method according to claim 3, wherein, sending the filtered read-write request information to a server for data display to obtain the communication test result. The method comprises: writing the read-write request information into a control point position when the processing classification result is the second type of processing classification result to obtain an information writing result; performing data mapping according to the information writing result to obtain an information mapping result; 6. The S7 protocol communication test method according to claim 3, wherein, sending the information mapping result to an upper computer for display to obtain the communication test result. The method comprises:

7. The S7 protocol communication test method according to any one of claims 1 to 6, characterized in that, sending the read-write request information to an upper computer for display when the processing classification result is the third type of processing classification result to obtain the communication test result. The method further comprises:

8. A communication test device for S7 protocol, characterized in that, re-obtaining corresponding read-write request information based on the PLC data port and performing subsequent test operations to obtain a second communication test result when the communication test result is unqualified. The device comprises: an information obtaining module that obtains corresponding read-write request information based on a PLC data port; an information classification module that processes and classifies according to the read-write request information to obtain a processing classification result; 9. An electronic device, comprising: a result output module that performs a corresponding point position test operation according to the processing classification result to obtain a communication test result. The electronic device comprises a memory, a processor, and one or more computer programs stored in the memory, the one or more computer programs comprising instructions that, when executed by the processor, can implement the S7 protocol communication test method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises instructions which, when executed by a processor, enable the S7 protocol communication test method according to any one of claims 1 to 7 to be implemented.

Citation Information

Patent Citations

  • Communication link testing method and system

    CN105553782A

  • Compatibility test method based on S7 industrial protocol compatible industrial gateway

    CN110535729A