Test method of APL control system and APL instrument simulation tester
Patent Information
- Application Number
- CN202610781305.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-02
- Publication Date
- 2026-08-18
AI Technical Summary
但由于真实仪表测试需要频繁连接和配置多台仪表,测试效率极低,且真实仪表价格昂贵,大量配置会显著增加测试成本;同时,通用网络测试仪仅能验证网络连通性,无法覆盖供电质量、数据交换完整性等关键指标,测试覆盖不全面
[0016]The testing method for the APL control system and the APL instrument simulation tester of this invention eliminate the significant non-testing time caused by frequent instrument replacements, independent wiring, and separate configurations in related technologies by using a simulation tester to replace multiple distributed real APL instruments. The simulation tester, through direct connection to the switch, achieves plug-and-play testing, minimizing test preparation time and thus improving testing efficiency. Furthermore, by establishing a precise and controllable bidirectional data verification channel, test accuracy is ensured. A reliable and traceable bidirectional data channel is formed through a standardized communication link established with the APL switch. Downlink, this channel carries precise instructions from the control system for the tester to parse and verify; uplink, this channel transmits precisely generated PV data by the tester for the control system to compare and confirm. This closed-loop data exchange based on a standard communication link lays the necessary technical foundation for implementing high-precision application-layer data verification.
Smart Images

Figure CN122593230A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation testing technology, and more specifically, to a testing method for an APL control system and an APL instrument simulation tester. Background Technology
[0002] As industrial automation moves towards full IP integration, APL (Ethernet-APL, Advanced Physical Layer) technology, with its advantage of achieving power supply and Ethernet communication via a single pair of twisted-pair cables, has been rapidly adopted in process industries, significantly simplifying field cabling. As a fully digital communication architecture, the field ports of APL control systems not only need to achieve connectivity similar to traditional networks, but also simultaneously meet multiple technical requirements such as power supply stability, protocol compatibility, and data exchange integrity. Therefore, before an APL control system leaves the factory, standardized acceptance tests must be conducted on all functions of its switch ports to ensure reliable connection and management of various APL devices in actual field environments.
[0003] In related technologies, two common testing methods are employed: one is to connect real APL instruments to each switch port and observe whether communication is normal through the control system's HMI interface; the other is to use devices such as FLUCK network analyzers to verify network connectivity. However, real instrument testing requires frequent connection and configuration of multiple instruments, resulting in extremely low testing efficiency. Furthermore, real instruments are expensive, and large-scale configuration significantly increases testing costs. Additionally, general-purpose network testers can only verify network connectivity and cannot cover key indicators such as power quality and data exchange integrity, resulting in incomplete test coverage. This makes it difficult for existing technologies to comprehensively verify key indicators, and also leads to low testing efficiency. Summary of the Invention
[0004] The problem addressed by this invention is how to improve the testing accuracy and efficiency of APL control systems.
[0005] To address the above problems, this invention provides a testing method for an APL control system and an APL instrument simulation tester.
[0006] In a first aspect, the present invention provides a testing method for an APL control system, comprising: performing testing based on a simulation tester, wherein the simulation tester is communicatively connected to an APL switch in the APL control system via a single-pair twisted-pair cable, and the testing method for the APL control system includes: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch to obtain power from the APL switch and establish physical and link layer communication. In response to receiving an AO command issued by the APL control system through the APL switch, the AO command is parsed to obtain the corresponding AO value. By comparing the parsed AO value with the expected AO value carried by the AO command, a downlink verification result is obtained. The PV setting value is determined and sent to the APL control system, so that the APL control system can obtain the uplink verification result by comparing the received PV value with the PV setting value; Based on the downlink verification results and the uplink verification results, the acceptance test conclusion of the APL control system is generated.
[0007] Optionally, after connecting the simulation tester to the port under test of the APL switch, the testing method for the APL control system further includes: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch. Based on the data link layer connection, and using the APL communication protocol and a preset address allocation strategy, device registration with the APL control system is completed. Based on the device registration information, complete the network address configuration; A communication link is established with the application layer of the APL control system based on the configured network address.
[0008] Optionally, the testing method for the APL control system further includes: The target instrument configuration definition information is obtained from the APL control system through the communication link. The target instrument configuration definition information is parsed to obtain the device type, device identifier, measurement range, and engineering units. Based on the parsed device type, device identifier, measurement range, and engineering unit, determine the device simulation parameters and execute the steps in response to receiving the AO command issued by the APL control system through the APL switch.
[0009] Optionally, the step of responding to receiving an AO command from the APL control system and parsing the AO command to obtain the corresponding AO value includes: Receive the downlink data frame in the AO command; The downlink data frame is parsed to obtain the AO value.
[0010] Optionally, the downlink verification result obtained by comparing the AO value obtained through parsing with the expected AO value carried by the AO command includes: The expected AO value carried by the AO instruction is extracted from the downlink data frame as the first reference value, and the AO value is used as the first measured value. Based on the first measured value and the first benchmark value, a first error value is obtained, and the first error value is compared with a first preset tolerance threshold to obtain a first comparison result; Based on the first comparison result, the downlink verification result is generated.
[0011] Optionally, sending the PV setting value to the APL control system includes: An uplink data frame generated based on the PV setting value is sent to the APL control system, so that the APL control system can parse the uplink data frame to obtain the PV value.
[0012] Optionally, the APL control system is used for: The PV set value is extracted from the uplink data frame as the second reference value, and the PV value is used as the second measured value; Based on the second measured value and the second benchmark value, a second error value is obtained, and the second error value is compared with a second preset tolerance threshold to obtain a second comparison result; The uplink verification result is obtained based on the second comparison result.
[0013] Optionally, generating the acceptance test conclusion of the APL control system based on the downlink verification results and the uplink verification results includes: Obtain the downlink communication function status of the downlink verification result and the uplink communication function status of the uplink verification result; Determine whether the downlink communication function status and the uplink communication function status both meet the corresponding preset qualification standards; If all conditions are met, the acceptance test conclusion that the APL control system is functioning normally is generated.
[0014] Optionally, the testing method for the APL control system further includes: If any item fails to meet the preset qualification standard, an acceptance test conclusion indicating that the APL control system is malfunctioning will be generated, and the type of malfunction will be recorded.
[0015] In a second aspect, the present invention provides an APL instrument simulation tester, comprising: a processor and a memory, wherein the memory is used to store computer programs; When the computer program is loaded by the processor, it causes the processor to execute the aforementioned test method for the APL control system.
[0016] The testing method for the APL control system and the APL instrument simulation tester of this invention eliminate the significant non-testing time caused by frequent instrument replacements, independent wiring, and separate configurations in related technologies by using a simulation tester to replace multiple distributed real APL instruments. The simulation tester, through direct connection to the switch, achieves plug-and-play testing, minimizing test preparation time and thus improving testing efficiency. Furthermore, by establishing a precise and controllable bidirectional data verification channel, test accuracy is ensured. A reliable and traceable bidirectional data channel is formed through a standardized communication link established with the APL switch. Downlink, this channel carries precise instructions from the control system for the tester to parse and verify; uplink, this channel transmits precisely generated PV data by the tester for the control system to compare and confirm. This closed-loop data exchange based on a standard communication link lays the necessary technical foundation for implementing high-precision application-layer data verification.
[0017] Meanwhile, from an operational perspective, testers only need to operate a single device, such as a simulation tester, and can complete all tests through a standard interface, such as an APL port. This greatly simplifies the operation process and reduces the skill requirements and risk of misoperation. From an economic perspective, the purchase and long-term maintenance costs of a reprogrammable, robust, and durable dedicated tester are far lower than those of high-value industrial instruments requiring multiple configurations. Furthermore, efficient testing shortens project cycles, further reducing labor and time costs. This invention ensures the consistency of physical connections and communication infrastructure across different testing scenarios and with different operators, providing hardware-level guarantees for the standardization of testing procedures and the objective comparability of test results.
[0018] In summary, this invention ensures test depth and accuracy through bidirectional closed-loop verification, and significantly improves test speed and efficiency through integrated automatic execution. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the testing method for the APL control system in an embodiment of the present invention. Figure 2 This is a schematic diagram of the network topology of the APL control system and the connection of the test instrument in an embodiment of the present invention; Figure 3 This is a schematic diagram of the FAT test process for the APL control system in an embodiment of the present invention. Figure 4 This is a detailed timing diagram of the single-port AO test process in an embodiment of the present invention; Figure 5 This is a detailed timing diagram of the single-port PV test process in an embodiment of the present invention; Figure 6 This is a schematic diagram of the architecture of the APL instrument simulation tester in an embodiment of the present invention. Detailed Implementation
[0020] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0021] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.
[0022] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to"; the term "based on" means "at least partially based on"; the term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; and the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first," "second," etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0023] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0024] The names of the messages or information exchanged between the multiple devices in the embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0025] Combination Figure 1 As shown, this embodiment of the invention provides a testing method for an APL control system, which is based on a simulation tester. The simulation tester is connected to the APL switch in the APL control system via a single-pair twisted-pair cable.
[0026] The testing method for the APL control system in this embodiment is applied to industrial automation systems based on APL (Advanced Physical Layer) technology, such as... Figure 2The diagram illustrates the network topology connection between the simulation tester and the APL control system. It should be noted that the APL field switch ports establish a temporary test connection with the portable instrument simulation tester in this embodiment; this connection only exists during FAT testing. Specifically, the network includes: a control and upper-layer application layer, including the control system (executing core process control logic such as DCS, PLC); device management (providing configuration, monitoring, and maintenance functions for APL devices in the network); predictive maintenance and other applications (enabling data-driven operation and optimization); a network power supply and aggregation layer, including an APL power switch for data exchange, providing APL-compliant DC power (PoDL - Power over Data Line) to the downstream APL field switches and field devices via single-pair twisted-pair cables, achieving deep integration and centralized supply of data and power; and a field access layer, including APL field switches that directly connect various APL field instruments, such as sensors and actuators, via their ports using single-pair twisted-pair cables, forming edge access points connecting field devices to the upper-layer network.
[0027] Combination Figure 3 As shown, the first stage is the test preparation phase, including: APL system setup: establishing the test environment for the APL control system; tester initialization: configuring the tester in preparation for testing; and system-side preparation: ensuring that the system conditions required for testing are ready. Next is the single-port loop test, involving testing individual ports, including: connecting the tester to the port: connecting the tester to the port under test on the APL switch; power link test: checking whether the tester can obtain power from the APL switch and establish a link; downlink or uplink communication test: performing downlink or uplink communication tests according to test requirements. Then, the test results are recorded and the status is marked: after completing the test for each port, the test results are recorded and the status of the port is marked. Next, it continues to determine if there are any untested ports to determine if more ports need to be tested. If there are still untested ports, the process returns to the next port selection step; if all ports have been tested, the test concludes, including generating a detailed test report based on the test results. Specifically: The testing methods for the APL control system include: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch to obtain power from the APL switch and establish physical and link layer communication. In response to receiving an AO command issued by the APL control system through the APL switch, the AO command is parsed to obtain the corresponding AO value. By comparing the parsed AO value with the expected AO value carried by the AO command, a downlink verification result is obtained.
[0028] Specifically, when the APL control system issues an AO command through the APL switch, the APL network interface module of the tester can capture the AO command via a single pair of twisted-pair cables. Specifically, the HMI issues an AO command containing a specific percentage (e.g., 50%) or engineering value to the designated port under test. This command is encapsulated in an industrial Ethernet protocol (e.g., EtherNet / IP) message and transmitted via the APL network. The simulation tester receives this message, and the core processing unit parses the protocol stack to extract the expected AO value from the AO command. Simultaneously, the tester can also display the received value as the measured value on the OLED screen of its local HMI module. The embedded software then automatically calculates the error between the measured value and the expected AO value and compares it with a pre-stored tolerance threshold, thereby automatically generating a PASS / FAIL downlink verification result, completing the closed-loop verification of downlink channel functionality and data accuracy.
[0029] In a preferred embodiment of the present invention, combined with Figure 4 The diagram illustrates the interaction sequence between the operator, test instrument, APL switch, and control system during the testing process of an APL control system. The following is a description of each component in the diagram: Operator: Represents the personnel executing the test procedure, responsible for initiating the test, setting test parameters, connecting the test instrument, and monitoring test results. Test Instrument: A portable instrument emulator used to simulate the behavior of the APL instrument, receiving AO values from the control system and uploading PV values. The test instrument communicates with the APL switch and control system during the test. APL Switch: Used to forward data between the test instrument and the control system. It provides power to the test instrument and establishes a data link layer connection. Control System: Responsible for sending AO values to the test instrument and receiving PV values from the test instrument. The control system also monitors and records the test results. Specifically, the complete interactive sequence of the single-port downlink communication test in this embodiment is as follows: The operator first connects the tester to the port under test, triggering the APL switch to power the port and establish a data link. The control system then completes device discovery and confirmation. Subsequently, the control system actively sends an AO command containing the expected AO value. The tester receives the command, parses the AO value, and performs internal verification and comparison while displaying it in real time on the local interface. Finally, the tester records the verification result, thus completing a complete downlink communication test closed loop from physical connection, command issuance to local verification and result archiving.
[0030] The PV setting value is determined and sent to the APL control system, so that the APL control system can obtain the uplink verification result by comparing the received PV value with the PV setting value.
[0031] Specifically, the operator sets a specific PV value, such as 75.5%, using the function keys on the simulation tester. This set value serves as the test stimulus. Subsequently, the tester's core processing unit (MCU) runs embedded software to package the PV value according to a predetermined industrial Ethernet application layer protocol, such as EtherNet / IP. That is, the PV value is filled into the input assembly data area of the simulated instrument object, such as a pressure transmitter, according to the protocol specifications, constructing a complete application layer protocol data unit. The packaged data is converted into physical frames conforming to the IEEE 802.3cg standard through the APL network interface module, which contains an APL PHY chip. The frames are then sent to the APL switch via the established APL link and finally uploaded to the APL control system. The tester or the system's automatic comparison logic compares the displayed value with the PV value initially set by the tester and generates an uplink verification result based on the consistency between the two (within the allowable error). Specifically, after receiving and parsing the data, the control system compares the displayed PV value with the PV value originally set by the tester, or within the allowable display error, to verify the accuracy of the uplink communication, thereby obtaining the uplink verification result. If they match, the uplink communication function of the port is determined to be normal; if they do not match, it is determined to be abnormal, and this result is recorded and the port status is marked. In one embodiment, the corresponding PV value can also be displayed on its human-machine interface (HMI); the operator verifies the accuracy of the uplink communication by manually comparing the displayed PV value on the control system HMI with the PV value originally set by the tester (within the allowable display error), thereby obtaining the uplink verification result.
[0032] In a preferred embodiment of the present invention, combined with Figure 5 As shown, the complete interactive sequence of a single-port uplink communication test is as follows: After the operator connects to the tester, the APL switch and the control system work together to complete device discovery and confirmation; subsequently, the tester, as the data initiator, actively sends a preset PV value; the control system, as the receiver, successfully receives and parses the PV value and displays it on the monitoring interface, while performing internal verification and comparison to check the consistency between the displayed value and the value sent by the tester; finally, the control system generates an uplink verification conclusion based on the comparison result and records it, thus completing a complete uplink communication test loop from device registration, data upload to remote verification, and result archiving.
[0033] Based on the downlink verification results and the uplink verification results, the acceptance test conclusion of the APL control system is generated.
[0034] Specifically, after the single-port test cycle of all APL switch ports is completed, the tester records the test results for each port, including downlink verification results generated through local automated comparison, such as PASS / FAIL, and uplink test status verified and recorded through the control system HMI. If both indicate PASS, the test port is automatically considered to be functioning normally. If either result is FAIL, a functional abnormality is generated, and the abnormality type (such as downlink out-of-tolerance, uplink out-of-tolerance, communication interruption, etc.) can be recorded. The core processing unit of the tester summarizes and analyzes the test result data of all ports, automatically generating a detailed test report containing port pass rate, problem analysis, etc. Based on preset acceptance criteria, if all tested ports function normally, a final acceptance test conclusion is formed; if all ports pass the test, the system is deemed to have passed acceptance; if any ports fail, the system is deemed to have failed acceptance and requires troubleshooting and retesting. Finally, this conclusion and the complete test report are archived together, completing the acceptance test process. In this embodiment, the test results of all ports are systematically recorded and finally summarized to generate a structured test report, which includes port pass rate, problem list, etc., providing direct and quantitative decision-making basis for the factory acceptance of APL control system.
[0035] In a preferred embodiment of the present invention, the testing method of the APL control system is executed in a cyclical manner to complete the traversal testing of all ports of an APL switch: after generating the acceptance test conclusion for one port, the connection is disconnected and the simulation tester is connected to the next port to be tested, and the aforementioned steps are repeated until all ports have been tested; finally, the system summarizes the test results of all ports and automatically generates a standardized factory acceptance test report containing port pass rate statistics and problem item analysis. Furthermore, the simulation tester can also be configured to simulate sending equipment diagnostic information, such as communication error counters or health status bits, thereby verifying the control system's ability to receive and process advanced diagnostic data from APL equipment, achieving more comprehensive equipment status management testing.
[0036] The testing method for the APL control system in this embodiment eliminates the significant non-testing time caused by frequent instrument replacements, independent wiring, and separate configurations in related technologies by using a simulated tester instead of multiple distributed real APL instruments. The simulated tester connects directly to the switch, enabling plug-and-play testing and minimizing test preparation time, thereby improving testing efficiency. Furthermore, a precise and controllable bidirectional data verification channel ensures test accuracy. A reliable and traceable bidirectional data channel is formed through a standardized communication link with the APL switch. Downlink, this channel carries precise commands from the control system for the tester to analyze and verify; uplink, it transmits precisely generated PV data from the tester for the control system to compare and confirm. This closed-loop data exchange based on a standard communication link lays the necessary technical foundation for implementing high-precision application-layer data verification.
[0037] Meanwhile, from an operational perspective, testers only need to operate a single device, such as a simulation tester, and can complete all tests through a standard interface, such as an APL port. This greatly simplifies the operation process and reduces the skill requirements and risk of misoperation. From an economic perspective, the purchase and long-term maintenance costs of a reprogrammable, robust, and durable dedicated tester are far lower than those of high-value industrial instruments requiring multiple configurations. Furthermore, efficient testing shortens project cycles, further reducing labor and time costs. This invention ensures the consistency of physical connections and communication infrastructure across different testing scenarios and with different operators, providing hardware-level guarantees for the standardization of testing procedures and the objective comparability of test results.
[0038] In summary, this embodiment ensures test depth and accuracy through bidirectional closed-loop verification, and significantly improves test speed and efficiency through integrated automatic execution.
[0039] Optionally, after connecting the analog tester to the port under test of the APL switch, the system further includes: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch. Based on the data link layer connection, and using the APL communication protocol and a preset address allocation strategy, device registration with the APL control system is completed. Based on the device registration information, complete the network address configuration; A communication link is established with the application layer of the APL control system based on the configured network address.
[0040] Specifically, by connecting the standardized APL port (integrating an APL PHY chip and signal isolation protection circuit compliant with the IEEE 802.3cg standard) on the backplane of the analog tester to the port under test of the switch using a single-pair twisted-pair cable, the dual-purpose nature of APL technology can be directly utilized to obtain the 12V DC power output from the switch port. This power is converted, regulated, and distributed by the highly integrated power management module inside the tester, reliably powering all circuits, including the core processing unit and the human-machine interface module, thus completing the basic verification of the APL port's power supply capability and polarity protection function at the beginning of the test. Through the tester's ARM CortexM4-based processing unit, the embedded driver program runs immediately after power-on initialization, precisely driving the APL PHY chip to perform physical layer signal modulation, link pulse negotiation, and adaptive equalization with the switch port in accordance with the IEEE 802.3cg / 10BASET1L standard. This successfully establishes a stable 10 Mbps data link layer connection with noise tolerance, meeting the requirements of factory automation environments, providing a reliable and standard physical transmission channel for subsequent transmission of data frames for higher-level protocols such as EtherNet / IP.
[0041] After the underlying link is ready, the core processing unit calls and runs its fixed APL protocol stack and embedded real-time operating system. Based on the address allocation strategy preset during the test preparation phase—supporting automatic acquisition via Dynamic Host Configuration Protocol (DHCP) or manual setting of a static IP address according to the project network plan—it proactively initiates a device announcement and registration request to the control system in the network. Upon receiving the request message containing device capability information, the control system, such as an engineer's workstation, identifies the device as a newly online APL device (e.g., a pressure transmitter) in its network management interface, completes logical discovery, and updates the online device list, thus achieving formal registration and logical association of the device in the control system. After successful device registration, the control system automatically assigns or confirms a unique network identifier to the tester based on its network architecture, such as through an integrated DHCP server or a pre-entered static address table. The tester's core processing unit receives this configuration message, parses and applies the key parameters contained within, such as the IP address, subnet mask, and default gateway, to obtain a legal and unique logical address at the network layer. This ensures that the tester can be accurately addressed by the network in all subsequent test interactions, a prerequisite for achieving precise IP-based communication.
[0042] Finally, through the application layer software of the tester, based on the obtained network address and the device simulation parameters configured in advance according to the configuration information, such as the device type being a PT1001 pressure transmitter with a range of 1.6MPa, the corresponding application object and data structure are instantiated, and a session connection based on industrial Ethernet application layer protocols such as CIP is established with the pre-configured monitoring point in the control system that points to the same TAG number. The two parties complete the application layer handshake and parameter synchronization, marking that an application layer communication link supporting bidirectional and real-time exchange of specific control data such as process variable (PV) uplink and analog output (AO) downlink is fully established and ready to be immediately put into the subsequent closed-loop testing process.
[0043] In a preferred embodiment of the present invention, the process of establishing a communication link includes a network address allocation step, supporting both dynamic and static configuration modes. As the default plug-and-play mode, the simulation tester acts as a DHCP client to request an automatic IP address from the network after powering on. In specific test scenarios, a static IP address in the same network segment as the test network can also be manually set through its human-machine interface. This design ensures that the tester can flexibly adapt to different APL network planning and test environments.
[0044] In this optional embodiment, thanks to the plug-and-play power supply and automated protocol interaction design of the simulation tester, the cumbersome physical connection and independent configuration of multiple real instruments are completely avoided, thereby significantly improving testing efficiency and reducing the traditional manual testing time for a single port from 10 to 30 minutes to a few seconds. Secondly, it ensures the comprehensiveness and depth of test verification. The process systematically covers the complete communication stack from physical power supply, data link establishment, network addressing to application sessions. It not only verifies connectivity but also confirms device compatibility and network manageability at the protocol level, thus enabling the discovery of configuration errors or protocol inconsistencies that cannot be detected by a simple network tester. Finally, the testing process in this embodiment is more standardized and cost-effective. The standardized steps eliminate excessive reliance on operator experience, and the replacement of multiple expensive real instruments by the integrated tester significantly reduces equipment purchase and maintenance costs.
[0045] Optionally, the testing method for the APL control system further includes: The target instrument configuration definition information is obtained from the APL control system through the communication link. The target instrument configuration definition information is parsed to obtain the device type, device identifier, measurement range, and engineering units. Based on the parsed device type, device identifier, measurement range, and engineering unit, determine the device simulation parameters and execute the steps in response to receiving the AO command issued by the APL control system through the APL switch.
[0046] Specifically, after the application layer communication link is ready, the tester actively sends a configuration information query request for the port under test to the control system, such as the engineering station. Utilizing its identity as a legally registered APL device, it can directly obtain the pre-configured detailed definition file or data block of the target instrument, strictly bound to the physical port, from the control system's engineering database or network management module. This process ensures consistency between the test configuration and the control system engineering design from the source. The tester's core processing unit runs a dedicated configuration parsing engine to decode the obtained target instrument configuration definition information. This accurately extracts the device type code defined in the file, such as the specific object class identifier corresponding to the pressure transmitter, the unique device identifier (e.g., workstation number TAG: PT1001), the specific upper and lower limits of the measurement range (e.g., 0.0MPa to 1.6MPa), and the legal engineering unit (MPa). The parsing process in this embodiment follows industry-standard device description languages, such as EDDL / FDI, or control protocols, such as the CIP object model specification. By writing key parameters such as device type, identifier, range, and unit output by the parsing engine into a specific configuration area of the tester's internal non-volatile memory and loading them into the real-time instrument simulation logic and data conversion module, the dynamic setting of the device simulation parameters can be completed. After this adaptive configuration is completed, the tester enters a ready state and can then execute the response, parsing, and verification steps for AO commands issued by the APL control system through the switch. This ensures that the tester's data generation, parsing, and response behavior in all subsequent communications is completely consistent with the actual instrument expected by the control system, thus laying the foundation for accurate closed-loop testing.
[0047] In a preferred embodiment of the present invention, the device simulation parameters are set on the simulation tester, wherein the selected device type, such as pressure transmitter or control valve, must be strictly consistent with the instrument type defined in the engineering configuration of the control system for the port under test. This ensures that the behavior and data format of the simulation tester in the network can be correctly parsed by the control system, thereby verifying the port's real support capability for different types of APL devices and the correctness of the system configuration.
[0048] In this optional embodiment, by dynamically synchronizing the real-time configuration information of the control system and accurately parsing and injecting equipment parameters, the authenticity and accuracy of the test are fundamentally guaranteed. This ensures that the identity and behavior of the simulated tester in the network, including equipment type, range, unit, and engineering design expectations, are completely consistent. This guarantees that all subsequent uplink and downlink data tests are verifications of the correct target, avoiding invalid tests or misjudgments caused by manual parameter configuration errors or inconsistencies with the configuration. Secondly, this process achieves a high degree of automation and speed in test preparation, replacing the tedious and error-prone steps of manually reviewing drawings and manually inputting a large number of parameters in traditional methods. Configuration is automatically acquired and completed solely through the communication link, significantly shortening the test preparation time for each port. Finally, this provides a technological foundation for the large-scale standardized reproduction of the test process. Regardless of changes in test personnel or projects, as long as the control system configuration is determined, the tester can automatically acquire and load unique and accurate parameters, ensuring the uniformity of benchmarks and the comparability of results between different tests, strongly supporting the operation of an efficient and reliable automated test pipeline.
[0049] Optionally, the step of responding to receiving an AO command from the APL control system and parsing the AO command to obtain the corresponding AO value includes: Receive the downlink data frame in the AO command; The downlink data frame is parsed to obtain the AO value.
[0050] Specifically, through the engineering workstation or test management software of the control system, pre-compiled Factory Acceptance Test (FAT) case scripts are run. Based on the test plan, expected AO values containing specific engineering values are generated, such as valve opening of 58% or the corresponding value of 12mA for a range of 4mA to 20mA. These values are then structured and encapsulated according to industrial Ethernet application layer protocols, such as EtherNet / IP CIP Assembly objects, forming application layer messages. These messages are then converted into physical frames conforming to the IEEE 802.3cg standard by the TCP / IP protocol stack and APL switch, and finally accurately sent to the designated physical port under test via a single-pair twisted-pair network. Through the application layer communication link established by the simulation tester, its APL network interface module receives physical frames from the switch. The protocol stack software running in the core processing unit sequentially performs MAC layer filtering, IP layer routing judgment, and transport layer port identification before delivering them to the application layer protocol parsing module (such as the CIP protocol stack). The parsing module locates and decapsulates the target Assembly object instance data area in the message based on the pre-loaded device description information, extracts the original expected AO data, and then converts it into an engineering value that can be processed by the local processor according to the format defined in the protocol, such as 16-bit signed integer or 32-bit floating-point number. Finally, the core processing unit calls the display driver service to format the parsed engineering value according to the engineering units (such as %, MPa, mA) set in the device simulation parameters and the human-machine interface layout requirements, such as rounding the value and concatenating units, generating graphical instructions that can be rendered on OLED or LCD screens. Finally, the display controller drives the pixel array to display the corresponding AO value in real time and clearly on the local interface of the tester, for example, AO: 58.0%, providing operators with intuitive feedback on downlink data reception and serving as the first measured value input for subsequent automated comparisons.
[0051] In this optional embodiment, the serial process that relies on manual observation of HMI interface feedback in traditional methods is compressed into a millisecond-level automated closed loop through automated instruction generation, network transmission, protocol parsing, and display refresh, enabling a single downlink verification to be completed within seconds. Secondly, it significantly enhances the objectivity and accuracy of the test, replacing manual reading with precise protocol parsing, eliminating visual misjudgment and subjective errors. At the same time, the local display provides an independent verification node that does not rely on the control system, which can immediately detect anomalies in data transmission or parsing. Finally, it lays the foundation for the traceability and standardization of the test process. The expected AO value obtained from parsing and the measured value displayed locally are both recorded by the system, providing a precise data source for performance analysis and problem localization. The standardized protocol processing flow ensures the consistency of results across different ports and different test rounds.
[0052] Optionally, the downlink verification result obtained by comparing the AO value obtained through parsing with the expected AO value carried by the AO command includes: The expected AO value carried by the AO instruction is extracted from the downlink data frame as the first reference value, and the AO value is used as the first measured value. Based on the first measured value and the first benchmark value, a first error value is obtained, and the first error value is compared with a first preset tolerance threshold to obtain a first comparison result; Based on the first comparison result, the downlink verification result is generated.
[0053] Specifically, the core processing unit embedded in the simulation tester, such as an ARM Cortex-M4 MCU, runs embedded software to continuously monitor all Ethernet data frames captured by its APL network interface. Based on the Ethernet type (EtherType) or target port number in the frame header, it identifies the message carrying a predetermined industrial Ethernet application layer protocol, such as EtherNet / IP CIP. Then, it decapsulates the message layer by layer according to the protocol's publicly available specifications. Finally, it accurately extracts the data fields carried by the AO command from the application layer data area based on the simulated instrument's TAG number or I / O point index. Then, according to the data format defined by the protocol (such as IEEE 754 floating-point numbers), it converts the data into engineering unit values, thus obtaining the first benchmark value used as a comparison reference. The AO value, parsed and converted from the downlink data frames by the core processing unit, is displayed in real time through the simulation tester's human-machine interface module (such as an OLED display). This displayed value is directly refreshed by the display driver circuit driven by the core processing unit, presented in an intuitive numerical or percentage format. This displayed value is then collected by the system and defined as the second measured value used for comparison.
[0054] The core processing unit invokes a preset comparison algorithm, such as `first error value = abs(first measured value - first reference value)`, to calculate the first error value. This error value is then compared with a first preset tolerance threshold pre-stored in non-volatile memory. This tolerance threshold is not a fixed value but is determined comprehensively based on multiple engineering parameters, including the control accuracy, sensor resolution, and inherent jitter of the APL communication system, as required by the specific APL control system project. Based on the comparison result, the core processing unit executes preset judgment logic: if the first error value is less than or equal to the first preset tolerance threshold, a binary verification result indicating normal downlink communication is generated, typically set in the internal status register and highlighted on the display as "PASS"; if the error exceeds the threshold, a verification result indicating abnormal downlink communication is generated, displaying "FAIL". Simultaneously, the system automatically packages the timestamp, port identifier, reference value, measured value, error value, and judgment result into a structured record, storing it in non-volatile memory or preparing for uploading, forming a complete technical file of the port's downlink communication performance.
[0055] Optionally, sending the PV setting value to the APL control system includes: An uplink data frame generated based on the PV setting value is sent to the APL control system, so that the APL control system can parse the uplink data frame to obtain the PV value.
[0056] Specifically, after the operator sets the PV value through the human-machine interface module of the tester, the core processing unit uses this set value as engineering data. Based on the simulated instrument type, such as a pressure transmitter, and the preset industrial Ethernet application layer protocol specification, it encapsulates the data to generate an uplink data frame. The encapsulation process includes organizing the data according to the protocol structure, such as the CIP layer of EtherNet / IP, filling the PV value into the corresponding input Assembly object instance data area, and adding the necessary protocol header information. The encapsulated application layer data unit is transmitted to the APL network interface module, which converts it into a physical layer frame that can be transmitted over a single twisted pair according to the IEEE 802.3cg standard. Then, it is sent to the APL switch through the established APL communication link, and then transmitted uplink to the APL control system. After receiving the uplink data frame, the control system decapsulates and parses it layer by layer through its communication protocol stack, finally extracting the corresponding PV value from the application layer data and displaying it on its human-machine interface for operator verification.
[0057] In this optional embodiment, by simulating the core behavior of field instruments uploading process variables (PV) and verifying whether they can be accurately received, parsed, and displayed by the control system, the testing scope of this embodiment is expanded from simple downlink command verification to full-duplex communication testing, meeting the evaluation requirements of the bidirectional data exchange capability of the APL port. Secondly, since the PV values sent by the tester are encapsulated based on the same device parameters (range, unit) as the real instruments, and the control system performs real protocol parsing and interface display, this process can effectively expose deep-seated problems that may occur in actual deployment, such as protocol incompatibility, data format errors, or abnormal HMI configuration mapping, rather than just performing network connectivity tests. Furthermore, operators only need to input values on the portable tester to automatically trigger all subsequent complex network communication and system processing flows, and directly observe the verification results on the remote monitoring interface, avoiding the inefficient links of traditional methods that require operators to coordinate and record between multiple devices, providing key support for realizing a fast and standardized automated testing pipeline.
[0058] Optionally, the APL control system is used for: The PV set value is extracted from the uplink data frame as the second reference value, and the PV value is used as the second measured value; Based on the second measured value and the second benchmark value, a second error value is obtained, and the second error value is compared with a second preset tolerance threshold to obtain a second comparison result; The uplink verification result is obtained based on the second comparison result.
[0059] Specifically, the control system, such as the engineering workstation or controller's network communication protocol stack, receives Ethernet data frames from the IP address of the analog test instrument. Embedded protocol parsing software, such as the EtherNet / IP protocol stack, decapsulates the data frames layer by layer according to standard message formats, locating the application layer object instance carrying the process variable PV data. Based on the object's data structure definition (e.g., floating-point data type and associated engineering units), the raw byte data is precisely converted into a physically meaningful PV engineering value, thus obtaining a second benchmark value used as a verification benchmark. The control system's HMI software reads the PV values uploaded and updated by the network communication layer from the real-time database or data buffer, and calls the graphical interface rendering engine to dynamically refresh and display the values at a pre-configured location on the device monitoring screen, such as the PV display frame of the corresponding instrument. The stable value displayed on this screen is collected as the second measured value for comparison. The core processing unit invokes a preset comparison algorithm, such as second error value = abs(second measured value - second baseline value), to calculate the second error value. This error value is then compared with a second preset tolerance threshold, pre-set based on project communication performance indicators, HMI display accuracy, and the system's allowed cumulative error. The control system's judgment logic unit performs a judgment based on the comparison result: if the second error value does not exceed the second preset tolerance threshold, the uplink communication channel is deemed functionally normal, and an uplink communication normal status flag is generated internally. This result can be recorded and may be visually reflected on the HMI as a green indicator light; if the error exceeds the threshold, it is deemed functionally abnormal, an uplink communication abnormality flag is generated, and detailed abnormal data, such as time, port, baseline value, measured value, and error value, can be recorded for subsequent problem diagnosis and analysis.
[0060] In a preferred embodiment of the present invention, the comparison process is automated by software within the testing instrument or control system. The technical mechanism includes: first, decapsulating the received data frame according to the industrial Ethernet protocol specification, accurately extracting the target data and converting it into an engineering value; then, calculating the absolute error between the measured value and a preset benchmark value; finally, comparing this error with a preset tolerance threshold, wherein the tolerance threshold is determined based on the control accuracy required by the project, the sensor resolution, and the inherent jitter of the communication system, thereby automatically generating a binary verification result of pass or fail.
[0061] In this optional embodiment, by setting transmission parsing and display comparison logic that is completely equivalent to downlink verification, the bidirectional data exchange capability of the APL port is tested with the same rigorousness, making up for the shortcomings of traditional methods that only verify one-way communication or only test connectivity. Secondly, by automatically comparing the parsed value of the received data (second benchmark value) with the displayed value (second measured value) of the independent monitoring interface based on a tolerance threshold, the traditional subjective judgment that relies on human observation of consistency is transformed into a quantitative objective judgment executed by the system, effectively eliminating interference factors such as human eye misjudgment and HMI display delay. Finally, when uplink verification fails, the system can clearly record which link—network transmission error, control system parsing error, or HMI display error—caused the data deviation, providing accurate data basis for quickly locating specific fault points in the communication link, thereby significantly improving the depth and reliability of the APL system's factory acceptance test.
[0062] Optionally, generating the acceptance test conclusion of the APL control system based on the downlink verification results and the uplink verification results includes: Obtain the downlink communication function status of the downlink verification result and the uplink communication function status of the uplink verification result; Determine whether the downlink communication function status and the uplink communication function status both meet the corresponding preset qualification standards; If all conditions are met, the acceptance test conclusion that the APL control system is functioning normally is generated.
[0063] Specifically, the core processing unit of the simulation tester reads the downlink verification result flag, such as PASS or FAIL, stored in its internal non-volatile memory or status register. Simultaneously, it receives the uplink verification result status message from the control system via the communication link, or the operator manually inputs the status after confirming it on the HMI display on the tester. This process aggregates a complete binary status set representing the functional status of the port's two independent communication channels: downlink and uplink. The tester's built-in judgment logic unit then performs AND logic operations on the aggregated binary status set. The judgment condition is only met when both the downlink and uplink communication function statuses are equal to a preset qualified status flag, such as both being PASS. If either status is FAIL or unknown, the judgment condition is not met. Finally, when the condition is met, the judgment logic unit drives the tester's display module to highlight "port test passed" or a similar prompt, and automatically generates a structured record in the test log database. This record includes at least the port identifier, test timestamp, and conclusion "functionally normal." It can also trigger an audible prompt or indicator light change, thus completing the automated and standardized generation and archiving of a qualified port's conclusion.
[0064] In this optional embodiment, by mandating that both uplink and downlink bidirectional communication functions meet the qualification standards, the risk of a single-direction test passing while masking potential defects in the other direction is completely eliminated. This ensures that the conclusion that the port functions of the APL control system are normal has complete data support, significantly raising the quality threshold for factory acceptance. Secondly, this embodiment greatly improves testing efficiency and standardizes conclusion generation. The cumbersome process of relying on manual comprehensive judgment of two independent test results and writing reports is compressed into instantaneous logical judgment and structured recording automatically executed by the system. This not only shortens the conclusion generation time to the millisecond level but also completely eliminates the subjective bias and format inconsistencies that may be caused by manual summarization. Finally, this mechanism provides core support for large-scale, automated test management. The standardized binary judgment logic and structured conclusion output enable the test results to be directly collected, statistically analyzed, and processed by the test management system, thereby quickly generating macro-quality reports such as port pass rate and fault distribution. This provides an efficient and reliable data foundation for the batch acceptance and quality traceability of APL switches.
[0065] Optionally, the testing method for the APL control system further includes: If any item fails to meet the preset qualification standard, an acceptance test conclusion indicating that the APL control system is malfunctioning will be generated, and the type of malfunction will be recorded.
[0066] Specifically, when the judgment logic unit detects that the status flag of either the downlink or uplink verification result is FAIL, it immediately triggers the exception handling process, generates a test record with the conclusion of functional abnormality, and at the same time matches and associates the corresponding fault categories from the predefined exception type library based on the specific source of the failure result, such as the downlink channel, the uplink channel, or both, as well as the specific error exceeding the limit information, communication interruption status, etc., such as downlink data exceeding the tolerance, uplink communication interruption, protocol parsing error, etc., and writes this classification information into the test conclusion record, thereby completing the accurate conclusion judgment and preliminary fault classification of the unqualified port, generating an acceptance test conclusion indicating that the APL control system has a functional abnormality, and recording the exception type.
[0067] In this optional embodiment, by automatically associating the FAIL status with specific anomaly types, such as data deviation or communication interruption, a clear direction for troubleshooting is provided to on-site maintenance personnel. This avoids the predicament of traditional black-box testing, which can only report non-compliance without being able to locate the specific fault, significantly shortening the time for problem investigation and repair. Secondly, the systematically recorded anomaly types and associated data, such as error values, constitute a rich quality database, enabling manufacturers to analyze the patterns and distribution of port failures from a macro perspective, thereby making targeted and continuous improvements to manufacturing processes, component selection, or design specifications. Finally, this mechanism ensures the integrity and traceability of the testing process, ensuring that every non-conforming port has detailed and standardized documentation. This not only meets the high-standard documentation requirements for factory acceptance but also provides an immutable original data evidence chain for potential product recalls, repair services, or quality disputes, thereby comprehensively improving the reliability of product delivery and the company's quality reputation.
[0068] This invention also provides an APL instrument simulation tester, comprising: a processor and a memory, wherein the memory is used to store computer programs; When the computer program is loaded by the processor, it causes the processor to execute the test method of the APL control system described above.
[0069] In a preferred embodiment of the present invention, combined with Figure 6 As shown, the APL instrument simulation tester is a portable dedicated device. Its system architecture includes: a human-machine interface module, which includes a display screen, buttons, and indicator lights to provide localized operation and real-time feedback interfaces for local operation and status display; a core processing unit, based on an MCU, integrating memory and a protocol stack, forming the center for executing protocol parsing, data comparison, and test logic control; an APL network interface module, integrating an APL PHY chip and protection circuit, which is key to realizing physical connection, communication, and power supply access with the APL switch via single-pair twisted-pair cable; and a power management module that converts APL 12V to system voltages such as 3.3V / 5V through a DC-DC converter, converting the power obtained from the APL line to the operating voltage required by the system. These four modules work collaboratively through an internal bus, highly integrating power supply, communication, data processing, and human-machine interaction into a single portable device. This provides a solid physical platform for rapid, comprehensive, and automated APL port function verification. The modules are interconnected and work collaboratively through the internal bus.
[0070] The advantages of the APL instrument simulation tester of the present invention compared with the prior art are the same as the advantages of the above-mentioned APL control system test method compared with the prior art, and will not be repeated here.
[0071] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention, and all such changes and modifications will fall within the scope of protection of the present invention.
Claims
1. A test method for an APL control system, characterized in that, Testing is conducted using a simulation tester, which is connected to the APL switch in the APL control system via a single-pair twisted-pair cable. The testing method for the APL control system includes: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch to obtain power from the APL switch and establish physical and link layer communication. In response to receiving an AO command issued by the APL control system through the APL switch, the AO command is parsed to obtain the corresponding AO value. By comparing the parsed AO value with the expected AO value carried by the AO command, a downlink verification result is obtained. The PV setting value is determined and sent to the APL control system, so that the APL control system can obtain the uplink verification result by comparing the received PV value with the PV setting value; Based on the downlink verification results and the uplink verification results, the acceptance test conclusion of the APL control system is generated.
2. The test method for the APL control system according to claim 1, characterized in that, After connecting the analog tester to the port under test of the APL switch, the system further includes: After connecting the simulation tester to the port under test of the APL switch, a data link layer connection conforming to the APL standard is established with the APL switch. Based on the data link layer connection, and using the APL communication protocol and a preset address allocation strategy, device registration with the APL control system is completed. Based on the device registration information, complete the network address configuration; A communication link is established with the application layer of the APL control system based on the configured network address.
3. The test method for the APL control system according to claim 2, characterized in that, Also includes: The target instrument configuration definition information is obtained from the APL control system through the communication link. The target instrument configuration definition information is parsed to obtain the device type, device identifier, measurement range, and engineering units. Based on the parsed device type, device identifier, measurement range, and engineering unit, determine the device simulation parameters and execute the steps in response to receiving the AO command issued by the APL control system through the APL switch.
4. The test method for the APL control system according to claim 1, characterized in that, The step of responding to receiving an AO command from the APL control system and parsing the AO command to obtain the corresponding AO value includes: Receive the downlink data frame in the AO command; The downlink data frame is parsed to obtain the AO value.
5. The test method for the APL control system according to claim 4, characterized in that, The downlink verification result is obtained by comparing the AO value obtained through parsing with the expected AO value carried by the AO command, including: The expected AO value carried by the AO instruction is extracted from the downlink data frame as the first reference value, and the AO value is used as the first measured value. Based on the first measured value and the first benchmark value, a first error value is obtained, and the first error value is compared with a first preset tolerance threshold to obtain a first comparison result; Based on the first comparison result, the downlink verification result is generated.
6. The test method for the APL control system according to claim 1, characterized in that, Sending the PV setting value to the APL control system includes: An uplink data frame generated based on the PV setting value is sent to the APL control system, so that the APL control system can parse the uplink data frame to obtain the PV value.
7. The test method for the APL control system according to claim 6, characterized in that, The APL control system is used for: The PV set value is extracted from the uplink data frame as the second reference value, and the PV value is used as the second measured value; Based on the second measured value and the second benchmark value, a second error value is obtained, and the second error value is compared with a second preset tolerance threshold to obtain a second comparison result; The uplink verification result is obtained based on the second comparison result.
8. The test method for the APL control system according to claim 1, characterized in that, The step of generating the acceptance test conclusion of the APL control system based on the downlink verification results and the uplink verification results includes: Obtain the downlink communication function status of the downlink verification result and the uplink communication function status of the uplink verification result; Determine whether the downlink communication function status and the uplink communication function status both meet the corresponding preset qualification standards; If all conditions are met, the acceptance test conclusion that the APL control system is functioning normally is generated.
9. The test method for the APL control system according to claim 8, characterized in that, Also includes: If any item fails to meet the preset acceptance criteria, an acceptance test conclusion indicating that the APL control system is malfunctioning is generated, and the type of malfunction is recorded.
10. An APL instrument simulation tester, characterized in that, include: Processor and memory, the memory being used to store computer programs; When the computer program is loaded by the processor, it causes the processor to execute the test method of the APL control system as described in any one of claims 1-9.