Industrial channel testing method and system based on serial communication protocol

Through the industrial channel testing system and method that supports adaptive switching between Modbus RTU and TCP/IP, the problems of single connection method, complex deployment and high manpower dependence in traditional tests are solved, and the full process automation testing of single-person operations is achieved.

CN120528848APending Publication Date: 2025-08-22SUPCON TECH CO LTD

Patent Information

Application Number
CN202510439220.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-08-22

AI Technical Summary

Technical Problem

The existing industrial channel testing technology has problems such as single connection mode, complex deployment, high manpower dependence and low testing efficiency. In particular, it is not compatible with both Modbus RTU and TCP/IP dual protocols, and the lack of wireless connection and real-time feedback mechanisms, resulting in a lengthy test process.

Method used

It provides an industrial channel testing system and method that integrates multi-mode communication and intelligent interaction, supports adaptive switching between RTU mode and TCP/IP mode, and directly connects to a wireless router through a 485-to-USB converter, and combines the spreadsheet driver test logic and voice real-time broadcast function to realize full-process automated testing of single-person operations.

Benefits of technology

It significantly improves the convenience and efficiency of testing deployment, reduces labor costs, and reduces error rates. It is suitable for high-frequency and high-precision industrial control system channel testing scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120528848A_ABST
    Figure CN120528848A_ABST
Patent Text Reader

Abstract

The invention discloses an industrial channel test method and system based on a serial port communication protocol, relates to the field of industrial control, and aims to solve the problems that an existing channel test system is single in connection mode, complex in deployment and low in efficiency due to dependence on manpower. According to the invention, the deployment process is simplified by supporting dual-protocol adaptive switching between an RTU mode (direct connection through a 485-to-USB converter) and a TCP / IP mode (wired / wireless network access); driving test logic by using a spreadsheet, pre-defining a Modbus address, a measuring range and a precision threshold value, automatically generating an instruction and acquiring data; and the integrated voice broadcast module feeds back a test result in real time, and prompts an abnormal channel and a processing suggestion when the precision exceeds the limit, so that single-person closed-loop operation is realized. The test result is automatically recorded to the spreadsheet, a structured report is generated, historical tracing and cross-platform data integration are supported, the test efficiency and reliability are remarkably improved, and the method is suitable for high-frequency channel verification of the industrial control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data exchange networks, and in particular to an industrial channel testing method and system based on a serial communication protocol. Background Art

[0002] Current channel testing of industrial control systems mainly relies on traditional wired connections and manual operation modes. Test tools usually only support a single communication protocol (such as Modbus RTU or TCP / IP) and require connection to the control station through dedicated conversion equipment or complex wiring. Existing automated testing solutions mostly use fixed deployment. Testers need to repeatedly confirm data between the operation station and on-site equipment, and compare test results through manual recording tables or basic software interfaces. This is inefficient and prone to errors. Some technologies attempt to introduce automated scripts or dedicated test equipment, but they still rely on the collaboration of multiple people (such as one person operating the signal input and another person recording the data). In addition, the deployment is limited by the physical connection method and cannot adapt to the flexible testing needs of complex industrial scenarios.

[0003] Chinese patent CN117041114B discloses an automated testing method and apparatus for terminal communication protocol security testing. However, this method focuses on protocol security vulnerability detection and lacks targeted design for functional testing of industrial channels. Furthermore, it only supports fixed wired connection modes and lacks the flexibility to switch between Modbus RTU and TCP / IP protocols, resulting in complex test deployment and poor scenario adaptability. Prior art testing tools commonly suffer from the following deficiencies: For example, they only support either serial (RTU) or network (TCP / IP) modes, making it impossible to simplify wiring via wireless networks; they rely on manual visual data comparison, requiring two people to collaborate to complete the test, resulting in high labor costs and the risk of missing anomalies; and they have rigid test parameters, making it impossible to adapt to different devices or accuracy requirements in real time through open configuration. Summary of the Invention

[0004] The present invention aims to solve the problems of single connection mode, complex deployment, high manpower dependence and low test efficiency in existing industrial channel testing technology, especially the traditional solution cannot be compatible with Modbus RTU and TCP / IP dual protocols at the same time and flexibly switch, and lacks wireless connection and real-time feedback mechanism, resulting in a lengthy test process. The present invention provides an industrial channel testing system and method integrating multi-mode communication and intelligent interaction, which breaks through the limitations of traditional physical wiring and significantly improves the convenience of test deployment by supporting RTU mode (direct connection via 485 to USB converter) and TCP / IP mode (supporting direct connection via wired network cable and wireless connection via wireless router) dual protocol adaptive switching; at the same time, it introduces spreadsheet-driven test logic and voice real-time broadcast function, integrates test item configuration, data acquisition, accuracy comparison and result feedback into an automated closed-loop process, so that test personnel can complete the full steps of signal input, abnormal monitoring and report generation in a single on-site operation, and thoroughly solves the problems of low efficiency and high error rate in the traditional two-person collaboration mode, and is particularly suitable for industrial control system channel testing scenarios that require high-frequency and high-precision verification.

[0005] The present invention proposes an industrial channel testing method based on a serial communication protocol. The method comprises: selecting a communication mode according to a protocol type configured by an operator, and establishing a communication link with a control station; generating corresponding read instructions based on predefined test items in a spreadsheet, and sending the corresponding read instructions to the control station via the established communication link; after receiving the measurement value returned by the control station, dynamically comparing it with the range and accuracy threshold preset in the spreadsheet; if the comparison result exceeds the accuracy threshold, triggering a real-time alarm in a voice broadcast module to prompt the operator of the abnormal channel and error type; and generating a test report in real time based on the test results recorded in the spreadsheet and the voice alarm log.

[0006] Preferably, the method receives communication parameters and test items configured by the operator through a human-computer interaction interface; automatically loads the corresponding communication module according to the configured protocol type, and generates test instructions by parsing the bit number, Modbus address and accuracy threshold preset in the spreadsheet; after the operator completes the configuration, the test process is started, Modbus instructions are sent in the order of the rows in the spreadsheet, and the measurement values ​​returned by the control station are collected.

[0007] Preferably, the method establishes a communication link with the control station according to the configured protocol type, and in Modbus TCP / IP mode, sends a read instruction containing the Modbus address corresponding to the bit number in the electronic table to the control station through the control system switch, and receives the channel measurement value returned by the control station.

[0008] Preferably, the method establishes a communication link with the control station according to the configured protocol type, directly sends instructions to the control station through a 485 to USB converter in Modbus RTU mode, and parses the returned serial port data.

[0009] Preferably, the method compares the received measurement value with the accuracy threshold preset in the spreadsheet. If the difference is within the allowable range, the test is marked as passed and recorded in the spreadsheet; if it exceeds the limit, a voice alarm is triggered and the test is marked as failed.

[0010] Preferably, when the method detects a communication anomaly or data exceeds a limit, it is marked as a communication failure, and the test tool records the error type and occurrence time in a spreadsheet and generates an exception handling suggestion for the operator's reference.

[0011] Preferably, the method generates corresponding Modbus instructions in sequence according to the row order of the test items in the spreadsheet and sends them to the control station; for analog signals, the test tool converts the original data returned by the control station into engineering values ​​and compares them with the range in the spreadsheet; for digital signals, the test tool directly parses the binary state returned by the control station to verify whether it is consistent with the preset state in the spreadsheet; after the test tool completes all test items, it generates a channel test coverage report, marking the uncovered items and potential risks.

[0012] Preferably, the method drives the test process by parsing the predefined test items in the spreadsheet, generates corresponding Modbus instructions according to the row order traversal and sends them to the control station; after receiving the measurement value returned by the control station, the original data is converted into engineering unit value and dynamically compared with the accuracy threshold in the spreadsheet. If the difference exceeds the limit, the test failure is marked and a voice alarm is triggered; after the operator modifies the parameters in the spreadsheet, the test tool loads the updated configuration in real time and automatically retests the failed items, and generates a test report containing channel coverage and abnormal statistics in real time based on the records in the spreadsheet.

[0013] The present invention proposes an industrial channel testing system based on a serial communication protocol. The system is applied to the above-mentioned industrial channel testing method based on a serial communication protocol. The system includes: a test tool, which sends Modbus instructions to a control station through a control system switch in Modbus TCP / IP mode, and is directly connected to the control station through a 485-to-USB converter in Modbus RTU mode; the control station responds to the Modbus instructions transmitted by the test tool and returns serial port data; and a spreadsheet, which saves the results transmitted by the test tool to corresponding columns after the control station returns the data.

[0014] Preferably, the test tool receives the protocol type set by the operator and the test items in the electronic form; and instantly prompts the operator with the test results through voice broadcast.

[0015] The present invention significantly improves the efficiency and reliability of industrial channel testing by integrating multi-protocol compatibility, intelligent interaction mechanism and automated testing process. Its beneficial effects are:

[0016] 1. Supports adaptive switching between Modbus RTU and TCP / IP protocols. It can realize direct serial port connection through a 485-to-USB converter, or complete remote communication based on a network cable or wireless network (via a wireless router), greatly reducing deployment complexity and hardware costs.

[0017] 2. Customize Modbus data addresses and test parameters through spreadsheets to flexibly adapt to different master station requirements. Combined with real-time monitoring, the Modbus address, card address, and measurement value of the test tag are synchronously displayed to ensure a transparent and controllable test process.

[0018] 3. The innovative introduction of a voice broadcast module instantly notifies testers when analog signals exceed limits or communication anomalies occur. Combined with automated error detection (such as accuracy deviation alarms and automatic repair of communication interruptions), it enables full-process closed-loop testing that can be performed by a single person independently, completely replacing the traditional two-person collaboration mode.

[0019] 4. Test results are automatically recorded in a spreadsheet and a structured report is generated, supporting historical data traceability and multi-dimensional analysis. A user-friendly graphical interface is provided, and through an intuitive parameter configuration panel and status visualization design, operators of different technical levels can quickly master the system, comprehensively improving the standardization and intelligence level of industrial field testing. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a schematic flow chart of the method of the present invention;

[0021] Figure 2 It is a schematic diagram of system interaction of the present invention. DETAILED DESCRIPTION

[0022] Example 1

[0023] according to Figure 1As shown, the present invention proposes an industrial channel testing method based on the serial communication protocol, and its specific implementation method realizes the full process automation of industrial channel testing through the deep integration of protocol adaptation, data drive and intelligent feedback. The operator selects the target communication protocol type through the human-computer interaction interface of the test tool, and the system automatically triggers the corresponding communication module initialization process according to the protocol type: for Modbus TCP / IP mode, the test tool establishes a network connection with the control system switch based on the preset IP address and port number. After verifying the link stability through the three-way handshake protocol, the switch forwards the communication request to the control station to form an end-to-end data transmission channel; for Modbus RTU mode, the test tool establishes a physical layer direct connection with the 485 to USB converter through the specified COM port number and serial port parameters (baud rate, data bits, check bits, stop bits), sends specific handshake instructions to the control station and parses the response data to ensure the real-time and reliability of serial communication. This dual-protocol dynamic switching mechanism effectively solves the deployment complexity problem caused by the single communication mode of the traditional test system, and is particularly suitable for industrial sites with mixed network environments.

[0024] After the test process is initiated, the system loads the predefined test script from the spreadsheet and analyzes key parameters, such as bit identifiers, Modbus address mapping relationships, and accuracy requirements, line by line. The bit identifier, serving as a unique label for the channel being tested, corresponds one-to-one with the logical points defined in the control station hardware configuration. The Modbus address mapping module converts the logical addresses in the spreadsheet into actual register addresses based on the control station's register allocation rules, ensuring the accuracy of command generation. The range and accuracy threshold parameters define the engineering value range and allowable deviation for the signal type, which the test tool uses to establish dynamic judgment criteria. During the analysis process, the system automatically skips channels marked as passed and generates a command queue in row order, laying the foundation for subsequent test execution.

[0025] Based on the test item configuration in the spreadsheet, the test tool dynamically generates function codes and data frames that comply with the Modbus protocol specification. For analog signals (AI), the system calls the Read Holding Register instruction (function code 0x03) to obtain the original AD conversion value returned by the control station. For digital signals (DI), the Read Input Status instruction (function code 0x02) is generated to interpret the binary switch state. Control signals (DO) are verified using the Force Single Coil instruction (function code 0x05). After sending control instructions, the test tool monitors the control station's response status to confirm execution validity. All instructions are sent to the control station via an established communication link. The system monitors the response data in real time, parses the data frame, and extracts valid measurement values, completing the key tasks of the data acquisition phase.

[0026] During the data conversion phase, the test tool converts the raw collected values ​​into readable engineering units. Analog signals are linearly scaled based on the upper and lower limits of the range defined in the spreadsheet, for example, mapping a hexadecimal value of 0-65535 to a current range of 0-10mA. Digital signals directly extract the bit state (0 / 1) and perform a logical comparison with the preset state. After the conversion is complete, the system calculates the percentage deviation between the measured value and the preset value. If the deviation exceeds the accuracy threshold set in the spreadsheet, the test is deemed a failure, triggering the exception handling process. This dynamic comparison mechanism ensures the real-time and accurate test results, avoiding the subjective errors associated with traditional manual interpretation.

[0027] The test tool achieves real-time feedback through an integrated voice broadcast module, building a closed loop of exception handling for human-machine collaboration. When the channel test passes, the system broadcasts the channel number and the "pass" prompt tone, and updates the result status in the spreadsheet; if an accuracy limit or communication anomaly is detected, the specific channel number, deviation direction (such as "AI channel 3 exceeds the upper limit by 2.5%) and recommended treatment measures (such as checking the sensor power supply circuit) will be broadcast, and the abnormal timestamp and error code will be recorded in the spreadsheet. In the event of communication interruption or data verification error, the system will mark the channel as "communication abnormality" and generate an alarm log to guide the operator to conduct targeted troubleshooting of hardware failures.

[0028] After exception handling is complete, the operator can modify test parameters based on voice prompts or exception records in a spreadsheet. Adjusting measurement ranges and relaxing accuracy thresholds can be done directly in the spreadsheet. The test tool loads the updated configuration in real time and automatically initiates local retest requests for failed items. During the retest, the system only re-executes the test instructions for the abnormal channel, skipping past items to save testing time, until all channels meet the passing criteria or are marked as requiring manual intervention. This dynamic adjustment capability significantly improves the flexibility and fault tolerance of the test process, making it particularly suitable for industrial scenarios with changing field conditions.

[0029] The system automatically summarizes historical data in spreadsheets and generates structured test reports in real time for testers to save and export. The report includes a test summary (protocol type, time, operator information), result statistics (total number of channels, pass rate, and distribution of anomaly types), trend analysis (analog signal fluctuation curve comparison), and anomaly details (failed channel address, measured value, and handling suggestions). Reports can be exported to PDF, Excel, and CSV formats and automatically uploaded to management platforms such as MES and ERP via enterprise-level data interfaces, enabling standardized archiving and cross-system sharing of test data, providing data support for equipment maintenance decisions.

[0030] The method achieves multi-scenario expansion and functional upgrades through the open architecture of the spreadsheet. When adding new protocol support, users can add a protocol configuration page to the spreadsheet to define instruction generation rules and data parsing logic. The test tool can seamlessly adapt to the new protocol after dynamic loading. Multi-device compatibility is achieved by modifying the address mapping table. For example, when adapting to the Siemens S7 series PLC, only the register address offset needs to be adjusted. Customized test logic is achieved by embedding conditional judgment formulas (such as IF functions) in the spreadsheet to achieve branch process control. For example, the associated analog test items are triggered only when a specific digital signal is activated. This highly flexible expansion design enables the system to quickly respond to the diverse testing needs of industrial sites and reduce secondary development costs.

[0031] In order to achieve deep intelligence in the testing process, the system introduces a self-learning optimization mechanism based on historical data. The testing tool builds a channel health assessment model and dynamically adjusts the testing strategy by analyzing the long-term test records accumulated in the spreadsheet (such as channel deviation trends and abnormal event frequencies). For example, for channels with frequent accuracy drift, the system automatically shortens the retest interval and increases the sampling density; for channels with higher stability, the test cycle is extended to reduce resource consumption. At the same time, the testing tool combines machine learning algorithms to identify abnormal patterns (such as periodic noise interference and sensor aging characteristics) and generates predictive maintenance recommendations in the spreadsheet (such as "It is recommended to replace the AI ​​channel 2 sensor within 3 months") to provide data support for preventive maintenance. This capability leap from "passive response" to "active prediction" has greatly improved the level of refinement in the management of the entire life cycle of equipment.

[0032] At the cross-platform collaboration level, the system seamlessly connects with the enterprise-level Industrial Internet of Things (IIoT) platform through an open API interface. The test tool can push the real-time collected channel data (such as analog waveforms, communication quality indicators) to the cloud, and perform multi-dimensional correlation analysis with the equipment operating status and environmental parameters (temperature, vibration). For example, when the signal fluctuation of a certain channel shows a strong correlation with the vibration data of the equipment, the IIoT platform automatically triggers an alarm and generates a fault diagnosis report to guide on-site personnel to investigate mechanical structure abnormalities. In addition, the test tool supports interaction with third-party simulation software (such as MATLAB / Simulink), imports measured data into the simulation model for reverse verification, and optimizes the control algorithm parameters. This cross-system collaborative capability makes the present invention a key data node in the industrial digital twin system.

[0033] In response to the real-time monitoring needs of complex test scenarios, the system has developed a mobile remote collaboration function. After the operator accesses the corporate intranet through a secure tunnel, he can view the test progress, voice alarm information and spreadsheet update status in real time on his mobile phone or tablet, and remotely adjust the test parameters or trigger an emergency termination command. The test tool synchronously records the remote operation log to ensure the traceability of the operation. In multi-person collaboration mode, different roles (such as test engineers and equipment maintainers) can process tasks (such as parameter configuration and exception review) in parallel based on the same spreadsheet, and the system uses conflict detection mechanisms (such as cell locking and version merging) to ensure data consistency. This mobile and collaborative design has greatly enhanced the multi-point parallel testing capabilities of large industrial sites.

[0034] Through the above-mentioned implementation methods, the present invention integrates traditional discrete test actions into an intelligent end-to-end process, combines multi-protocol compatibility, real-time voice feedback and dynamic parameter adjustment capabilities, realizes the coordinated optimization of industrial channel testing efficiency and reliability, and provides innovative methodological support for equipment verification and quality control in the field of industrial automation.

[0035] Example 2

[0036] according to Figure 2 As shown, the present invention proposes an industrial channel testing system based on the serial communication protocol, and its specific implementation method realizes full-process automated testing through deep coupling of hardware architecture and software functions. The system hardware part is composed of a test tool, a control station, a communication conversion device and a network switching module, wherein the test tool is deployed on a general-purpose laptop computer, and realizes multi-mode access capability to the industrial control station by integrating a self-developed communication protocol stack and a data parsing engine. As the object under test, the control station has a built-in communication card that supports the Modbus protocol, and the register address mapping rules are predefined by the hardware configuration software to ensure the instruction interaction compatibility with the test tool. In terms of communication link design, the system adopts a dual-channel redundancy mechanism: in Modbus TCP / IP mode, the test tool is connected to the control system switch through a standard network cable or a wireless network (relayed by a wireless router) to form an IP protocol-based data transmission channel; in Modbus RTU mode, a 485-to-USB converter is used to establish a direct physical layer connection, bypassing the network device restrictions and interacting directly with the control station through the serial port protocol. This hybrid communication architecture retains the stability of traditional serial communication and incorporates the flexibility of modern network technology, and can adapt to the testing needs of different topology environments in complex industrial sites.

[0037] At the software level, the test tool is built based on a modular design philosophy, with core functions including a human-computer interaction interface, a protocol adaptation engine, a data processing unit, and a voice feedback module. The human-computer interaction interface utilizes a graphical design, simplifying operational logic through hierarchical menus and visual controls, allowing operators to quickly select protocol types, configure communication parameters, and manage test items. The protocol adaptation engine dynamically loads Modbus TCP / IP or RTU communication drivers, automatically converting the data frame structure based on the current mode to ensure the accuracy of instruction generation and parsing. The data processing unit is responsible for converting raw acquired values ​​into engineering units and performing real-time comparisons based on the accuracy thresholds preset in the spreadsheet. Deviation calculation results are immediately fed back to the voice module and logging system. As the central controller of the test process, the spreadsheet not only stores static parameters such as bit numbers, address mappings, and range definitions, but also dynamically records test results, abnormal events, and operation records, forming a complete test data chain.

[0038] After the test process is started, the system first completes the communication link self-test and parameter verification. The operator selects the target protocol type and configures the corresponding parameters (such as IP address, serial port number) through the interface. The test tool automatically loads the test script in the spreadsheet and generates a Modbus command queue in a predetermined order. During the data acquisition phase, the test tool parses the raw data returned by the control station, performs linear conversion on the analog signal, and outputs the engineering value based on the range definition in the spreadsheet; the digital signal directly extracts the binary state for logical verification. All test results are broadcast in real time through the voice module. The operator does not need to be distracted by watching the screen when operating on the cabinet side. The operator can grasp the test progress and abnormal information only by voice prompts, which significantly reduces the risk of human negligence.

[0039] The exception handling mechanism runs through the entire test cycle, and the system ensures process continuity through a multi-level fault-tolerant design. When an accuracy limit is exceeded or a communication failure is detected, the voice module immediately broadcasts the specific channel number and error type, and the spreadsheet synchronously records the exception timestamp and recommended handling measures. After the operator troubleshoots the problem on site, he can directly modify the parameter settings in the spreadsheet (such as adjusting the range coefficient or relaxing the accuracy tolerance). The test tool dynamically loads the updated configuration and starts a local retest, re-executing the test instructions only for the abnormal channel to avoid wasting resources from global repeated testing. After the test is completed, the system automatically summarizes the historical data in the spreadsheet and generates a structured test report, which covers channel coverage, pass rate statistics, abnormal item details and trend analysis charts. It supports one-click export to a standardized format and remote archiving and sharing through an enterprise-level data platform.

[0040] In-depth analysis and cross-system integration of test data further enhance the application value of the present invention. The generated test report not only contains basic statistical information, but also constructs a signal trend curve by comparing historical data, which intuitively reflects the long-term changes in channel performance (such as sensor drift and signal noise accumulation). For example, for multiple test data of the same AI channel, the system automatically draws a line graph of the fluctuation of the measurement value over time, combined with the operating condition information recorded in the spreadsheet (such as ambient temperature, equipment operation time), to assist the operator in locating potential fault causes. The abnormality details module in the report is associated with the enterprise knowledge base, and generates customized maintenance recommendations based on the preset rule base (such as "it is recommended to calibrate the sensor when the deviation exceeds 2%) to provide decision support for on-site personnel. After the test data is uploaded to the enterprise data management platform through a standardized interface (such as RESTful API), it can be linked with the equipment lifecycle management system (such as EAM) to automatically trigger the maintenance work order or spare parts procurement process, forming a complete closed loop from testing to maintenance.

[0041] In addition, the system ensures the security of test information through permission grading and data encryption mechanisms. Operators must pass identity authentication when logging in, and different roles (such as engineers and inspectors) are granted differentiated data access and operation permissions; the test report uses the AES encryption algorithm during export and transmission to prevent the leakage of sensitive information. The spreadsheet's version management function supports iterative updates of test scripts. Each modification records the operator, timestamp, and change content to ensure the traceability of the test logic. This data security and version control design enables the system to meet the compliance requirements of high-confidentiality industrial scenarios (such as nuclear power and military industry).

[0042] In terms of system scalability design, the spreadsheet-based open architecture allows users to flexibly adapt to diverse industrial scenarios. By expanding the table field definitions and parsing rules, it is compatible with other industrial communication protocols (such as Profibus and CANopen), and only the address mapping table needs to be adjusted to adapt to devices from different manufacturers. When upgrading functions, users can add new test dimensions (such as signal response time and noise suppression capability) to the table. The test tool automatically recognizes and incorporates them into the test logic through the script engine without modifying the underlying code. This open design of human-machine collaboration greatly reduces the system's maintenance costs and learning threshold, enabling it to quickly respond to the ever-changing testing needs of industrial sites.

[0043] Example 3

[0044] The present invention proposes an industrial channel testing system based on a serial communication protocol. The core of the system is to achieve efficient automation of industrial channel testing through the deep integration of dual-protocol compatibility, spreadsheet drive and intelligent voice feedback. The system hardware architecture consists of a control station (such as the TCS-900 system), a control system switch, a test laptop and a communication conversion device. The control station serves as the test object and supports Modbus TCP / IP and RTU protocols through the SCM9041 card. The test laptop serves as the control center and has a built-in test tool developed based on Visual Basic 6.0, integrating a human-computer interaction interface, a communication protocol stack and a voice broadcast module. In terms of communication link design, the system supports flexible switching between two modes: in Modbus TCP / IP mode, the test tool is directly connected to the control station via an ordinary network cable or relayed via a wireless router to achieve wireless communication, significantly reducing the complexity of on-site wiring; in Modbus RTU mode, a physical layer direct connection is established through a 485 to USB converter to ensure the stability of serial communication. This hybrid communication architecture takes into account the convenience of modern network technology and the reliability of traditional serial port protocols, and can adapt to the testing needs of different industrial environments.

[0045] At the software level, the test tool uses a spreadsheet as its core driving engine, and implements parameter configuration and process control through a human-computer interaction interface. The operator selects the communication protocol type (TCP / IP or RTU) through a graphical interface. If it is TCP / IP mode, the target IP address and port number need to be configured; if it is RTU mode, the COM port number and serial port parameters (baud rate, data bits, check bits, stop bits) need to be specified. The predefined test scripts in the spreadsheet contain bit number identification, Modbus address mapping relationship, range and accuracy threshold. The test tool generates an instruction queue after parsing by line, and dynamically calls the Modbus function code (such as 0x03 to read the holding register and 0x02 to read the input status) to send a request to the control station. For analog signals, the raw data returned by the control station is converted into engineering values ​​(such as mA, V) through linear conversion, and dynamically compared with the preset accuracy in the spreadsheet; digital signals are directly parsed into binary states for logical verification.

[0046] During the test, the voice broadcast module provides real-time feedback on the results: when the measured value meets the accuracy requirements, the channel number and the "pass" prompt tone are broadcast; if an over-limit or communication abnormality is detected, the specific channel number, deviation direction (such as "AI channel 1 exceeds the upper limit by 2.3%") and processing suggestions (such as checking the sensor power supply) are broadcast, and the spreadsheet automatically records the abnormal timestamp and error code. For communication interruptions or verification errors, the system will mark the channel as abnormal and generate an alarm log. After the operator handles the fault on site, he can modify the parameters in the spreadsheet (such as adjusting the range coefficient, relaxing the tolerance threshold), and the test tool dynamically loads the new configuration and starts a local retest, re-executing the instructions only for the abnormal channel to avoid wasting resources from global repeated testing.

[0047] After the test is completed, the system summarizes the historical data in the spreadsheet and generates a structured report, which includes channel coverage, pass rate statistics, abnormal item details and signal trend analysis charts. The report can be exported to formats such as PDF and Excel, and uploaded to management systems such as MES and ERP through the enterprise data interface to achieve standardized archiving and cross-platform sharing of test data. In terms of scalability design, the open architecture of the spreadsheet allows users to add protocol configuration pages (such as compatible with Profibus and CANopen) or modify the address mapping table (adaptive to Siemens PLC and ABB DCS). The test tool can be dynamically loaded and seamlessly adapted to new scenarios; customized test logic can achieve branch process control by embedding conditional formulas (such as IF functions), for example, triggering associated test items only when specific digital signals are activated.

[0048] Through the above implementation, the present invention upgrades the traditional discrete testing process that relies on two-person collaboration to an intelligent end-to-end closed-loop system. Combined with wireless connection, voice interaction and dynamic parameter adjustment capabilities, it significantly reduces manpower investment and deployment complexity, and provides an efficient and reliable solution for channel verification and quality management of industrial control systems.

Claims

1. An industrial channel testing method based on serial communication protocol, characterized in that: The method comprises: Select the communication mode according to the protocol type configured by the operator and establish a communication link with the control station; Based on the predefined test items in the spreadsheet, the corresponding read instructions are generated and sent to the control station via the established communication link; After receiving the measurement value returned by the control station, it is dynamically compared with the range and accuracy threshold preset in the spreadsheet; If the comparison result exceeds the accuracy threshold, the voice broadcast module will be triggered to issue a real-time alarm, notifying the operator of the abnormal channel and error type; Generate test reports in real time based on test results recorded in spreadsheets and voice alarm logs.

2. The industrial channel testing method based on the serial communication protocol according to claim 1, characterized in that: The method receives communication parameters and test items configured by an operator through a human-computer interaction interface; automatically loads a corresponding communication module according to the configured protocol type, and generates test instructions by parsing the bit number, Modbus address, and accuracy threshold preset in an electronic spreadsheet; after the operator completes the configuration, the test process is started, Modbus instructions are sent in the order of rows in the electronic spreadsheet, and measurement values ​​returned by the control station are collected.

3. The industrial channel testing method based on serial communication protocol according to claim 1, characterized in that: The method establishes a communication link with a control station according to the configured protocol type. In Modbus TCP / IP mode, a read instruction containing a Modbus address corresponding to a bit number in a spreadsheet is sent to the control station via a control system switch, and channel measurement values ​​returned by the control station are received.

4. The industrial channel testing method based on serial communication protocol according to claim 1, characterized in that: The method establishes a communication link with the control station according to the configured protocol type, sends instructions directly to the control station through a 485 to USB converter in Modbus RTU mode, and parses the returned serial port data.

5. An industrial channel testing method based on serial communication protocol according to claim 1, 3 or 4, characterized in that: The method compares the received measurement value with the accuracy threshold preset in the spreadsheet. If the difference is within the allowable range, the test is marked as passed and recorded in the spreadsheet; if it exceeds the limit, a voice alarm is triggered and the test is marked as failed.

6. An industrial channel testing method based on serial communication protocol according to claim 1, 3 or 4, characterized in that: When the method detects a communication anomaly or data exceeds the limit, it marks it as a communication failure. The test tool records the error type and occurrence time in a spreadsheet and generates an exception handling suggestion for the operator's reference.

7. The industrial channel testing method based on serial communication protocol according to claim 6, characterized in that: The method generates corresponding Modbus commands in sequence according to the row order of test items in a spreadsheet and sends them to a control station. For analog signals, the test tool converts the raw data returned by the control station into engineering values ​​and compares them with the range in the spreadsheet. For digital signals, the test tool directly parses the binary state returned by the control station to verify whether it is consistent with the preset state in the spreadsheet. After completing all test items, the test tool generates a channel test coverage report, marking uncovered items and potential risks.

8. The industrial channel testing method based on serial communication protocol according to claim 1, characterized in that: The method drives the test process by parsing predefined test items in a spreadsheet, generates corresponding Modbus instructions based on row-by-row traversal, and sends them to a control station. After receiving the measurement values ​​returned by the control station, the original data is converted into engineering unit values ​​and dynamically compared with the accuracy threshold in the spreadsheet. If the difference exceeds the limit, the test is marked as failed and a voice alarm is triggered. After the operator modifies the parameters in the spreadsheet, the test tool loads the updated configuration in real time and automatically retests the failed items. A test report containing channel coverage and abnormal statistics is generated in real time based on the records in the spreadsheet.

9. An industrial channel testing system based on a serial communication protocol, the system being applied to an industrial channel testing method based on a serial communication protocol according to any one of claims 1 to 8, characterized in that: The system comprises: The test tool, in Modbus TCP / IP mode, sends Modbus commands to the control station through the control system switch. In Modbus RTU mode, it directly connects to the control station through a 485 to USB converter. The control station responds to the Modbus commands transmitted by the test tool and returns serial port data; The spreadsheet saves the results transmitted by the test tool into the corresponding columns after the control station returns the data.

10. The industrial channel testing system based on serial communication protocol according to claim 9, characterized in that: The test tool receives the protocol type set by the operator and the test items in the electronic form; and instantly prompts the operator with the test result through voice broadcast.

Citation Information

Patent Citations

  • An automated testing method and device for terminal communication protocol security testing

    CN117041114B

Cited By

  • Automatic test system for detecting IO (Input / Output) port on MCU (Microprogrammed Control Unit) controller

    CN121209481A

  • Motor controller online debugging system and method based on extended Modbus protocol

    CN121657523A

  • Equipment state acquisition and management method supporting multiple transmission modes

    CN122137775A