Servo function testing method, device, equipment and computer storage medium

By displaying the servo system's test command knowledge base and automatically assembling the test script, the existing servo function test efficiency and accuracy problems are solved, and a more efficient and accurate test process is achieved.

CN118584895BActive Publication Date: 2024-12-20FRECON ELECTRIC SHENZHEN
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411066038.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-05
Publication Date
2024-12-20
Estimated Expiration
2044-08-05

AI Technical Summary

Technical Problem

Existing servo function tests rely on manual operation, resulting in high professional knowledge requirements, low efficiency and accuracy that cannot be guaranteed.

Method used

By displaying the test command knowledge base of the target servo system, obtain the test command orchestration information entered by the user, assemble the target test script and execute it to automatically perform functional testing.

Benefits of technology

It reduces users' requirements for professional knowledge, improves the efficiency and accuracy of servo function testing, and avoids errors introduced by manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118584895B_ABST
    Figure CN118584895B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer data processing technology, and discloses a servo function test method, device, equipment and computer storage medium, the method comprising: displaying a test instruction knowledge base corresponding to a target servo system; the test instruction knowledge base includes the instruction function type of multiple optional instructions and information on parameters to be filled in; an optional instruction corresponds to a preset instruction implementation function; obtaining test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each target instruction, and the execution order between multiple target instructions; assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script; executing the target test script to obtain the functional test result of the target servo system. In the above manner, the present invention realizes a servo function test with higher efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the technical field of computer data processing, and in particular to a servo function testing method, device, equipment and computer storage medium. Background Art

[0002] Servo control refers to the effective control of the position, speed, acceleration and other changes of an object's motion. A general servo system can include the following parts: 1. Command part: an output device for action command signals, such as a host computer; 2. Drive part: a device that receives the output of the command part and drives the actuator to move; 3. Feedback part: a device that detects the state of the actuator structure or load; 4. Actuator: receives the output signal of the drive part to generate torque, position and other states, such as a motor.

[0003] In order to ensure the accuracy of servo control, it is necessary to perform functional tests on the servo system, such as whether the signal input and output of the drive part are normal, whether the speed of the actuator meets the preset conditions, etc.

[0004] In the process of implementing the embodiments of the present invention, the inventors found that the existing servo functionality test is generally implemented manually, requiring manual operation of instruments and equipment, manual initiation of signals, manual observation and recording of test phenomena, manual judgment, and organization of test cases. The existing solutions for manual testing of servo functions have at least the following problems: First, manual testing has high requirements for testers, requiring operators to have a relatively deep understanding and knowledge of the servo industry and be familiar with a variety of test equipment in order to understand and fully execute test cases. Second, the efficiency of manual testing is low, and the accuracy of manual operation cannot be guaranteed.

[0005] Therefore, a servo function testing solution is needed that requires less professional knowledge and has higher efficiency and accuracy. Summary of the invention

[0006] In view of the above problems, the embodiments of the present invention provide a servo function test method, device, equipment and computer storage medium to solve the problems of low servo function test efficiency and accuracy in the prior art.

[0007] According to one aspect of an embodiment of the present invention, a servo function testing method is provided, the method comprising:

[0008] Displaying a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on required parameters of multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function;

[0009] Acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions;

[0010] Assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script;

[0011] Execute the target test script to obtain the functional test result of the target servo system.

[0012] In an optional manner, the instruction function type of one of the optional instructions is one of a communication function, a calculation function, and a script execution logic control function;

[0013] The required parameter information corresponding to the optional instruction of the communication function includes communication operation type, communication address, communication content information and communication time control information;

[0014] The required parameter information corresponding to the optional instruction of the calculation function includes the calculation type and the storage location of the calculation result;

[0015] The required parameter information corresponding to the optional instruction of the script execution logic control function includes the script execution logic control type and the script execution logic control parameters.

[0016] In an optional manner, the script execution logic control function includes delayed execution, marking position, and jumping to the marked position;

[0017] Among them, the delayed execution is used to indicate the length of time to wait for the script execution logic control parameter before executing the next instruction; the marking instruction is used to mark the position where the script execution logic control parameter is executed; the jump to the marked instruction position is used to instruct the current program to jump to the position specified by the script execution logic control parameter to continue execution.

[0018] In an optional manner, the method further includes:

[0019] Searching the preset instruction-function correspondence relationship according to the target instruction to obtain the target instruction implementation function corresponding to each target instruction;

[0020] Filling parameters of each target instruction implementation function according to the instruction parameters to obtain multiple functions to be assembled;

[0021] The multiple functions to be assembled are assembled according to the execution order to obtain the target test script.

[0022] In an optional manner, the target servo system includes a target servo driver, a target servo motor and a load servo motor; the target servo driver is used to drive the target servo motor, and the target servo motor is loaded with a load servo motor;

[0023] The method is based on a host computer; the host computer is respectively connected to a preset universal controller, a target detection device, the target servo driver and the load servo motor through a preset type of bus; the universal controller is used to control the target servo driver; the target detection device is used to detect the state of the target servo motor;

[0024] The universal controller is integrated with a plurality of optional communication interfaces corresponding to the optional servo drive types; the target servo drive is connected to the target communication interface via a communication cable.

[0025] In an optional manner, a human-computer interaction module is also provided in the universal controller;

[0026] The universal controller is also connected to the target detection device, the target servo driver and the load servo motor through the bus;

[0027] The human-computer interaction module is used by the user to manually control the target detection device, the target servo driver and the load servo motor.

[0028] In an optional manner, the method further includes:

[0029] Displaying the test instruction arrangement information based on a preset visual interface;

[0030] detecting a control operation on the test instruction arrangement information;

[0031] Triggering execution of the target test script according to the control operation to obtain the functional test result;

[0032] The functional test results are displayed on the visual interface.

[0033] According to another aspect of an embodiment of the present invention, there is provided a servo function testing device, comprising:

[0034] A display module is used to display a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on parameters to be filled in for multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function;

[0035] An acquisition module, used to acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions;

[0036] An assembling module, used for assembling a target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script;

[0037] The execution module is used to execute the target test script to obtain the functional test result of the target servo system.

[0038] According to another aspect of an embodiment of the present invention, a servo function test device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus;

[0039] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of any one of the servo function testing methods described above.

[0040] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the storage medium stores at least one executable instruction, wherein the executable instruction enables a servo function test device to perform the operation of any one of the servo function test methods described above.

[0041] The embodiment of the present invention displays a test instruction knowledge base corresponding to a target servo system; the test instruction knowledge base includes instruction function types of multiple optional instructions and information on parameters that need to be filled in; one of the optional instructions corresponds to a preset instruction implementation function; then the test instruction arrangement information input by the user based on the instruction knowledge base is obtained; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each of the target instructions, and the execution order between the multiple target instructions; the target instruction implementation functions corresponding to the target instructions are assembled according to the test instruction arrangement information to obtain a target test script; finally, the target test script is executed to obtain the functional test result of the target servo system. This is different from the existing servo function test that requires users to have relatively professional relevant knowledge and the problem that the accuracy and efficiency of manual testing cannot be guaranteed. The present invention is like a strength that displays the instruction function type of optional instructions and the parameters that need to be filled in as test reference knowledge, so that users can more efficiently select and arrange test instructions, and generate a target test script that can be automatically executed according to the test instruction arrangement information input by the user. The servo test of the embodiment of the present invention has lower requirements on the user's professional knowledge. The user only needs to understand the information provided by the test instruction knowledge base, and by executing the target test script, no manual participation is required, which can improve the accuracy and efficiency of the servo test.

[0042] The above description is only an overview of the technical solution of the embodiment of the present invention. In order to more clearly understand the technical means of the embodiment of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings are only used to illustrate the embodiments and are not to be considered as limiting the present invention. In addition, the same reference symbols are used to represent the same components throughout the accompanying drawings. In the accompanying drawings:

[0044] Figure 1 A schematic diagram showing a flow chart of a servo function testing method provided by an embodiment of the present invention;

[0045] Figure 2 A schematic diagram showing the structure of a target servo system to which the servo function testing method provided by an embodiment of the present invention is applied;

[0046] Figure 3 A schematic diagram showing the structure of a universal controller in a target servo system to which the servo function testing method provided by an embodiment of the present invention is applied;

[0047] Figure 4 A schematic diagram of a visualization interface in a servo function testing method provided by an embodiment of the present invention is shown;

[0048] Figure 5 A schematic diagram showing the structure of a servo function test device provided by an embodiment of the present invention is shown;

[0049] Figure 6 A schematic structural diagram of a servo function testing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0050] Exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary 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 limited to the embodiments set forth herein.

[0051] Related terms:

[0052] Programmable Logic Controller (PLC) is a digital computing controller with a microprocessor for automated control. It can load control instructions into memory at any time for storage and execution. The programmable controller consists of functional units such as CPU, instruction and data memory, input / output interface, power supply, digital-to-analog conversion, etc.

[0053] The Modbus protocol is a universal language used in electronic controllers. Through this protocol, controllers can communicate with each other and with other devices via a network (such as Ethernet), and it has become a universal industrial standard. Through the Modbus protocol, control devices produced by different manufacturers can be connected to an industrial network for centralized monitoring. When communicating on a Modbus network, this protocol determines that each controller needs to know their device address, identify the message sent by the address, and decide what action to take. If a response is required, the controller will generate feedback information and send it using the Modbus protocol. On other networks, messages containing the Modbus protocol are converted to the frame or packet structure used on this network. This conversion also expands the method of resolving node addresses, routing paths, and error detection according to the specific network. The protocol uses a reply-type connection (half-duplex) on a communication line, which means that signals are transmitted in opposite directions on a single communication line.

[0054] CAN bus is called Controller Area Network, which is one of the most widely used field buses in the world. It has been widely used in automobile manufacturing, machinery manufacturing, packaging machinery, tobacco and other industries. CAN bus is a serial data communication protocol developed by BOSCH in Germany in the early 1980s to solve the data exchange between many control and test instruments in modern automobiles. It is a multi-master bus, and the communication medium can be twisted pair, coaxial cable or optical fiber. The communication rate can reach 1MBPS. The CAN bus communication interface integrates the physical layer and data link layer functions of the CAN protocol, which can complete the framing of communication data, including bit filling, data block encoding, cyclic redundancy check, priority determination and other tasks.

[0055] CANopen is an application layer protocol based on the CAN bus that is even more suitable for standard industrial components by defining device profiles.

[0056] EtherCat is a fieldbus protocol for real-time Ethernet communication. Its design goal is to achieve high-performance real-time communication while maintaining low cost and simple network structure. It achieves low latency and high bandwidth by transmitting and processing data in real time in data frames. This makes EtherCat suitable for applications that require fast response and high-precision control, such as industrial automation, robot control, and test measurement. EtherCat adopts a master-slave structure, in which a master (Master) is responsible for controlling and synchronizing the slaves (Slave) in the network. The master sends control commands and data, and the slaves receive and execute these commands. The EtherCat network can support up to 1,000 slaves, each with its own network address and unique identifier. Input and output signals such as sensor data, actuator status, and control commands can be transmitted in real time through EtherCat slaves. This enables the system to be highly distributed and flexible, thus adapting to various application requirements.

[0057] Before describing the embodiments of the present invention, the prior art and the problems existing therein are further described:

[0058] Currently, servo drives have multiple functional versions: pulse type, CanOpen bus type, EtherCat bus type, etc. Each version has its own application function logic, which is complex and diverse.

[0059] At the same time, the demand for customization of servo drives is increasing, so the drive function logic is frequently modified.

[0060] Correspondingly, the demand for functional testing of servo drives has increased dramatically and the time nodes are urgent; in particular, functional parts that may interfere need to be retested and verified.

[0061] However, the inventors found that the current servo functional test still relies on manual work, such as manually operating instruments and equipment, manually initiating signals, manually observing and recording test phenomena, manually judging, and organizing test cases. The existing problems include at least:

[0062] Manual servo function testing places high demands on test operators. Operators need to have a deep understanding of the servo industry and be familiar with a variety of test equipment in order to understand and fully execute test cases. In addition, manual operation details and repeated test consistency are difficult to control and will be affected by environmental factors. In addition, the time node is urgent, and manual efficiency cannot meet the drastic increase in functional testing needs, and there is an urgent need to shorten the test time. Finally, different testers often have different test results, and time must be invested in test difference analysis.

[0063] In summary, the existing servo function test has the problems of high requirements on user knowledge and unsatisfactory efficiency and accuracy.

[0064] Figure 1 The flowchart of the servo function test method provided by the embodiment of the present invention is shown, and the method is executed by a computer processing device. The computer processing device may include a mobile phone, a notebook computer, etc. Figure 1 As shown, the method comprises the following steps:

[0065] Step 10: Display the test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on required parameters of multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function.

[0066] The target servo system is a system where the target servo controller to be tested is located.

[0067] Specifically, the target servo system may include a target servo driver, a target servo motor and a load servo motor; the target servo driver is used to drive the target servo motor, and the target servo motor is loaded with a load servo motor. The load servo motor may be optional and is used to add a load to the target servo motor to test the working condition of the target servo motor under load.

[0068] The servo function test method provided in the embodiment of the present invention is implemented based on a host computer such as a PC; the host computer is respectively connected to a preset universal controller, a target detection device, the aforementioned target servo motor, and a load servo motor through a preset type of bus. Among them, the protocol type of the bus can be selected as needed, such as a Modbus-RTU protocol based on a 485 bus. Figure 2 The schematic diagram shows the structure of the target servo system to which the servo function testing method according to the embodiment of the present invention is applied. Figure 2 The target servo drive is the drive under test, the control box is the universal controller, the load servo motor is the loading servo, the target servo motor is the driving servo, the inertia disk is the disk-shaped part used to adjust the rotational inertia of the driving servo, and the towing platform is the platform for the servo motor towing test. Figure 2 As shown, the assembled test script is input into the PC for running, so that the PC controls the control box, the drive under test, the speed / torque sensor and other target detection devices and the loading servo according to the script parsing results.

[0069] Furthermore, the universal controller is used to control the target servo driver; the target detection device is used to detect the state of the target servo motor. The target detection device is the equipment required for the existing servo function test, such as a speed / torque sensor, a pulse generator, an oscilloscope, an Ethercat master station, a CANOPEN master station, etc. Specifically, the control box controls the driver under test through the control cable. At the same time, the PC can also communicate and control the driver under test and the target detection devices such as the speed / torque sensor and the loading servo through the RS485 control line in a bus control manner.

[0070] Figure 3 The structure diagram of the universal controller in the target servo system to which the servo function test method provided by the embodiment of the present invention is applied is shown. Considering that in order to perform comprehensive and relatively complete functional tests on the servo controller, it is generally necessary to use a variety of target detection devices of different communication types. Therefore, in order to be compatible with a variety of target detection devices at the same time, such as Figure 3 As shown, the universal controller in the embodiment of the present invention integrates multiple optional communication interfaces corresponding to the optional servo drive types; the target servo drive is one of the optional servo drives; the target servo drive is connected to the target communication interface via a communication cable. Figure 3 As shown, the optional communication interface may include commonly used servo drive interfaces such as 485 interface, CAN interface, EtherCat interface, pulse interface, analog interface, DIDO interface, etc.

[0071] An optional command is used to perform a specific action on a specific module in the target servo system.

[0072] Command name Instruction function type Required parameter 1 Parameter 2 is required Parameter 3 is required Parameter 4 is required Parameter 5 is required Parameter 6 is required start Test Start Read PLC Read PLC registers address Word length (byte) Value storage register Sign bit Timeout (ms) Writing PLC Write to PLC register address Word length (byte) Numeric Sign bit Timeout (ms) Writing Ethercat Writing to the Ethercat dictionary Primary Index Sub-index Word length Write value Sign bit Timeout (ms) Read Ethercat Read Ehercat dictionary Primary Index Sub-index Word length Value storage register Sign bit Timeout (ms)

[0073] The function type is used to indicate to the user the function that the optional instruction can realize after execution, such as "read PLC register", "write PLC register", "sum", "take absolute value", "delay", etc. The information of the required parameters corresponding to the optional instruction is used to characterize the parameters that need to be input when the optional instruction is executed, and / or the parameters required by the optional instruction when making judgments and outputting results. One of the optional instructions corresponds to a preset instruction implementation function. The language of the instruction implementation function is not limited, such as C# language. Specifically, a structure is declared, which contains the name of the optional instruction of string type and the instruction implementation function corresponding to the optional instruction of function pointer type. It should be noted that Chinese is used as the instruction name in the embodiment of the present invention, which is convenient for testers to understand and use. In addition, it can be understood that the instruction implementation function is insensitive to testers. Testers only need to master basic test case knowledge so that they can understand and use the knowledge provided by the test instruction knowledge base, thereby reducing the requirements for professional knowledge of testers and improving the efficiency of functional testing for the target servo system.

[0074] Specifically, the information of the test instruction knowledge base provided by the embodiment of the present invention can be referred to as shown in Table 1.

[0075] Read Servo Read servo registers address Word length (byte) Value storage register Sign bit Timeout (ms) Write Servo Write to servo register address Word length (byte) Numeric Sign bit Timeout (ms) Delay Delay Time (ms) Label Label Label Name Compare Jump Compare Jump Word length (byte) Value 1 Value 2 When value 1> value 2, jump to label When value 1 = value 2, jump to label When value 1 < value 2, jump to label Comparison of results Comparison of results The value to compare Upper limit of comparison result The lower limit of the comparison result add addition Addend 1 Addend 2 and registers reduce Subtraction Minuend Subtrahend Difference Register take multiplication Multiplier 1 Multiplier 2 Product Register remove division Dividend divisor Business Register Remain Find the remainder Dividend divisor Remainder register Shift Shift Number of shifted Shift Number Result Register and With operation With number 1 With number 2 Result Register or Or Operation or number 1 or number 2 Result Register Tokenization Convert to symbolic number Input value Maximum Result Register Take the absolute value Take the absolute value Absolute value Result Register Assignment Assignment value register Jump Jump Label Name Finish End of test

[0076] Table 1 Information table of the test instruction knowledge base

[0077] Specifically, considering that during the servo function test, the main actions include data reading and writing, data calculation, and execution logic control of the above two types of data processing actions, therefore, in one embodiment of the present invention, the instruction function type of the optional instruction is one of the communication function, the calculation function and the script execution logic control function.

[0078] The communication function instructions are used to realize the reading and writing of data, and are explained in conjunction with Table 1. The communication function instructions include "read PLC", "write PLC", "write Ethercat", "read Ethercat", "write server" and "read server" in Table 1. Specifically, as shown in Table 1, the required parameter information corresponding to the optional instructions of the communication function includes the communication operation type, communication address, communication content information and communication time control information.

[0079] The communication operation type indicates whether the communication is for data reading or writing, and the communication content information indicates the characteristics of the content transmitted by the communication, such as data type, length, etc. The communication time control information includes a timeout, which is used to control the communication duration to avoid an infinite loop or long waiting during the script execution process.

[0080] The instructions of the calculation function are used to calculate data and output the calculation results, which may include "result comparison", "addition", "subtraction", "multiplication", "division", "remainder", "shift", "and", "or", "symbolization", "absolute value" and "assignment" in Table 1. The required parameter information corresponding to the optional instructions of the calculation function includes the calculation type and the storage location of the calculation result. The storage location of the calculation result may be the information of a specific value storage register.

[0081] The instructions of the script execution logic control function are used to control the logic of script execution, including "start", "jump", "label", "compare jump" and "end" in Table 1. The required parameter information corresponding to the optional instructions of the script execution logic control function includes the script execution logic control type and the script execution logic control parameters. The script execution logic control type is used to characterize the control of the current instruction logic, such as whether to start or end, whether to jump to the specified instruction line for execution, whether to wait for a preset time before execution, etc. The script execution logic control parameters include the waiting time before executing the instruction, the line number of the instruction to be jumped to, etc.

[0082] Specifically, in order to achieve more accurate and flexible automated servo function testing, the script execution logic control functions include delayed execution, marking position, and jumping to the marked position;

[0083] Among them, the delayed execution is used to indicate the length of time to wait for the script execution logic control parameter before executing the next instruction; the marking instruction is used to mark the position where the script execution logic control parameter is executed; the jump to the marked instruction position is used to instruct the current program to jump to the position specified by the script execution logic control parameter to continue execution.

[0084] Continuing to explain in conjunction with Table 1, the "delay" instruction is used to delay execution, and the "time" in the instruction parameter is the specified waiting time. The "label" instruction is used to mark the instruction, and the "label name" is the location of the instruction to be jumped to.

[0085] Furthermore, considering that the host computer may not be available in some scenarios, or the user has a need to manually control the test process, therefore, in order to improve the availability and flexibility of the servo function test method provided in the embodiment of the present invention, a human-computer interaction module is also provided in the universal controller;

[0086] The universal controller is also connected to the target detection device, the target servo driver and the load servo motor through the bus;

[0087] The human-computer interaction module is used by the user to manually control the target detection device, the target servo driver and the load servo motor.

[0088] Specifically, Figure 3 As shown, the human-machine interaction module is HMI (Human Machine Interface). Considering that manual testing requires manual operation of various instruments and is clear about various technical details, it has relatively high professional requirements for testers. Although existing comprehensive PLCs already have these interfaces, such as Huichuan's H5U, it is considered that PLC programming also has a certain technical threshold, and it is also inconvenient to modify parameters directly in the PLC program, which affects the efficiency of servo function testing. Therefore, in an embodiment of the present invention, this part of the interface is fully configured and can be written by the human-machine interaction module. Testers can directly operate the human-machine interaction module without having to understand PLC programming, which greatly reduces the professional requirements for testers.

[0089] In particular, when the host computer exists, the HMI is a slave on the 485 bus and fully responds to the operation of the PC; when the host computer does not exist, the HMI will become the host on the 485 bus and have access to the torque\speed sensor and the loading servo, which provides great convenience for simple manual testing. The servo power interface reserves three relays to meet the single-phase or three-phase power supply requirements of the current servos on the market. Power off and restart is a common link in the test process, which can be achieved by PLC through control relays without manual power off operation. In addition, considering that the current mainstream PLCs are single-ended signals, a single-ended to differential module needs to be connected in series to be compatible with the differential pulse input and output functions in the servo.

[0090] Step 20: Acquire test instruction arrangement information input by the user based on the instruction knowledge base; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each of the target instructions, and the execution order between the multiple target instructions.

[0091] The instruction knowledge base is displayed to users, and the knowledge of writing test cases that are easy to read and use and decomposed into optional instructions is improved for users, which can effectively lower the threshold of servo function testing for users and improve the efficiency of servo function testing. Specifically, a visual interactive interface can be provided for users to select optional instructions, input parameters, and arrange the sequence, and the edited test instruction arrangement information can be displayed in real time, effectively improving the user's servo test experience and efficiency.

[0092] Step 30: Assemble the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script.

[0093] According to the test instruction arrangement information, the target instruction implementation function corresponding to the corresponding target instruction is selected and the function parameters are imported, and the target instruction implementation function is assembled according to the execution order specified by the user to obtain the target test script.

[0094] Specifically, step 30 also includes:

[0095] Step 301: Search the preset instruction-function correspondence relationship according to the target instruction to obtain the target instruction implementation function corresponding to each target instruction.

[0096] In order to improve the generation efficiency and accuracy of the target test script, the correspondence between the preset instructions and functions can be stored. Specifically, a List type is defined using the structure corresponding to the instruction in the aforementioned step 10, and the instruction names and corresponding functions in Table 1 are added to the List in sequence. When the target test script selected and arranged by the user according to the test instruction knowledge base is subsequently run, the corresponding function can be quickly called by comparing the instruction name, thereby improving the generation accuracy and efficiency of the target test script.

[0097] Step 302: Fill in parameters of each target instruction implementation function according to the instruction parameters to obtain multiple functions to be assembled.

[0098] Import the instruction parameters corresponding to each instruction into the corresponding target instruction implementation function to obtain the to-be-assembled function corresponding to each target instruction.

[0099] Step 303: Assemble the multiple functions to be assembled according to the execution order to obtain the target test script.

[0100] After assembling the target test script, the tester only needs to load the script file on the host computer to start the test, wait for the test to be completed, save the test results and then analyze them in a unified manner. There is no need to deeply understand the underlying implementation logic of the test case, which reduces the professional requirements for testers.

[0101] Step 40: Execute the target test script to obtain the functional test result of the target servo system.

[0102] This is different from the existing method that requires manual debugging of each device one by one, inputting instructions, and analyzing the results. The present invention implements the function test results of the target servo system by executing the target test script. While improving the efficiency of the servo function test, it also effectively avoids the errors introduced by manual test operations.

[0103] According to the test instruction arrangement information input by the user based on the relevant information of the optional instructions provided in Table 1, the host computer configures the status of each component in the target servo system to create a suitable test environment for the servo drive. For example, the load size, digital signal input, parameter table configuration, etc. are uniquely specified by the test script and can be changed in an orderly manner without human negligence. After the environment configuration is completed, the target test script is executed to read the status of the servo or sensor at the specified time (consistency and accuracy of repeated tests can be guaranteed) and compared with the set target value to obtain the result of whether the servo function is normal.

[0104] Furthermore, in order to improve the user experience of the servo function test and help the tester to better edit the test instruction arrangement information, so as to obtain a target test script with guaranteed usability, step 40 also includes:

[0105] Step 401: Displaying the test instruction arrangement information based on a preset visual interface.

[0106] in, Figure 4 FIG. 1 is a schematic diagram showing an interface of a visualization interface in a servo function test method provided by an embodiment of the present invention. Figure 4 As shown, the visual interface includes a module for displaying each target instruction in the test instruction arrangement information in the order of instruction execution, a module for controlling the test instruction arrangement information, and may also include information for configuring the script running environment. Among them, in the module displaying each target instruction, "line number" is used to identify the execution sequence number of the target instruction, "comment" is used to identify the function and type of the target instruction, "continue" is used to identify whether to continue to execute the next line of instructions when an error occurs in the execution of the instruction of this line, "instruction" is used to represent the name of the target instruction, "result" is used to fill in the instruction execution result of the current line of instructions, and "parameter" is used to represent the required parameters of the target instruction.

[0107] Step 402: Detect a control operation on the test instruction arrangement information.

[0108] Specifically, Figure 4 As shown, the control operation may include at least one of opening a script, saving results, clearing results, starting a test, and aborting a test.

[0109] Step 403: Trigger execution of the target test script according to the control operation to obtain the functional test result.

[0110] When it is detected that the control operation represents the execution of the target test script, the target test script is executed to obtain the execution result of the script as the function test result. For example, the function test result can be information such as pass or fail that can directly represent the servo function.

[0111] Step 404: Display the functional test results on the visual interface.

[0112] In an embodiment of the present invention, the user only needs to input the test instruction arrangement information according to the test instruction knowledge base, and then directly obtain the functional test results. There is no need to manually transfer and operate between multiple inspection devices and read the results as in the existing method, which greatly improves the accuracy and efficiency of servo function testing.

[0113] The servo function testing method provided by the embodiment of the present invention displays a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types of multiple optional instructions and information on parameters that need to be filled in; one of the optional instructions corresponds to a preset instruction implementation function; then the test instruction arrangement information input by the user based on the instruction knowledge base is obtained; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each of the target instructions, and the execution order between the multiple target instructions; the target instruction implementation functions corresponding to the target instructions are assembled according to the test instruction arrangement information to obtain a target test script; finally, the target test script is executed to obtain the functional test result of the target servo system. This is different from the existing servo function test that requires users to have relatively professional relevant knowledge and the problem that the accuracy and efficiency of manual testing cannot be guaranteed. The present invention is like a strength that displays the instruction function type of optional instructions and the parameters that need to be filled in as test reference knowledge, so that users can more efficiently select and arrange test instructions, and generate a target test script that can be automatically executed according to the test instruction arrangement information input by the user. The servo test of the embodiment of the present invention has lower requirements on the user's professional knowledge. The user only needs to understand the information provided by the test instruction knowledge base, and by executing the target test script, no manual participation is required, which can improve the accuracy and efficiency of the servo test.

[0114] Figure 5 FIG. 2 shows a schematic diagram of the structure of a servo function test device provided by an embodiment of the present invention. Figure 5 As shown, the device 50 includes: a display module 501, an acquisition module 502, an assembly module 503 and an execution module 504.

[0115] A display module is used to display a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on parameters to be filled in for multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function;

[0116] An acquisition module, used to acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions;

[0117] An assembling module, used for assembling a target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script;

[0118] The execution module is used to execute the target test script to obtain the functional test result of the target servo system.

[0119] The operation process of the servo function test device provided in the embodiment of the present invention is substantially the same as that of the aforementioned method embodiment, and will not be described in detail.

[0120] The servo function testing device provided by the embodiment of the present invention displays a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types of multiple optional instructions and information on parameters that need to be filled in; one of the optional instructions corresponds to a preset instruction implementation function; then the test instruction arrangement information input by the user based on the instruction knowledge base is obtained; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each of the target instructions, and the execution order between the multiple target instructions; the target instruction implementation functions corresponding to the target instructions are assembled according to the test instruction arrangement information to obtain a target test script; finally, the target test script is executed to obtain the functional test result of the target servo system. This is different from the existing servo function test that requires users to have relatively professional relevant knowledge and the problem that the accuracy and efficiency of manual testing cannot be guaranteed. The present invention is like a strength that displays the instruction function type of optional instructions and the parameters that need to be filled in as test reference knowledge, so that users can more efficiently select and arrange test instructions, and generate a target test script that can be automatically executed according to the test instruction arrangement information input by the user. The servo test of the embodiment of the present invention has lower requirements on the user's professional knowledge. The user only needs to understand the information provided by the test instruction knowledge base, and by executing the target test script, no manual participation is required, which can improve the accuracy and efficiency of the servo test.

[0121] Figure 6The schematic diagram of the structure of the servo function test device provided by the embodiment of the present invention is shown. The specific embodiment of the present invention does not limit the specific implementation of the servo function test device.

[0122] like Figure 6 As shown, the servo function test device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .

[0123] The processor 602, the communication interface 604, and the memory 606 communicate with each other via a communication bus 608. The communication interface 604 is used to communicate with other devices such as a client or other server network elements. The processor 602 is used to execute a program 610, which can specifically execute the relevant steps in the above-mentioned embodiment of the servo function test method.

[0124] Specifically, the program 610 may include program code including computer executable instructions.

[0125] The processor 602 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. The one or more processors included in the servo function test device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0126] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0127] The program 610 can be specifically called by the processor 602 to enable the servo function test device to perform the following operations:

[0128] Displaying a test instruction knowledge base corresponding to a target servo system; the test instruction knowledge base includes instruction function types and information on parameters to be filled in for a plurality of optional instructions; one of the optional instructions corresponds to a preset instruction implementation function; obtaining test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions;

[0129] Assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script;

[0130] Execute the target test script to obtain the functional test result of the target servo system.

[0131] The operation process of the servo function test device provided in the embodiment of the present invention is substantially the same as that of the aforementioned method embodiment, and will not be described in detail.

[0132] The servo function test device provided by the embodiment of the present invention displays a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types of multiple optional instructions and information on parameters that need to be filled in; one of the optional instructions corresponds to a preset instruction implementation function; then the test instruction arrangement information input by the user based on the instruction knowledge base is obtained; the test instruction arrangement information includes multiple target instructions, instruction parameters corresponding to each of the target instructions, and the execution order between the multiple target instructions; the target instruction implementation functions corresponding to the target instructions are assembled according to the test instruction arrangement information to obtain a target test script; finally, the target test script is executed to obtain the functional test result of the target servo system. Different from the existing servo function test, which requires users to have relatively professional relevant knowledge and cannot guarantee the accuracy and efficiency of manual testing, the present invention is like a demonstration of the instruction function type and required parameters of optional instructions as test reference knowledge, so that users can more efficiently select and arrange test instructions, and generate a target test script that can be automatically executed according to the test instruction arrangement information input by the user. The servo test of the embodiment of the present invention has lower requirements for the user's professional knowledge. The user only needs to understand the information provided by the test instruction knowledge base, and by executing the target test script, no manual participation is required, which can improve the accuracy and efficiency of the servo test. The embodiment of the present invention provides a computer-readable storage medium, the storage medium stores at least one executable instruction, and when the executable instruction is run on a servo function test device, the servo function test device executes the servo function test method in any of the above method embodiments.

[0133] The executable instructions can be specifically used to enable the servo function test device to perform the following operations:

[0134] Displaying a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on required parameters of multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function;

[0135] Acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions;

[0136] Assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script;

[0137] Execute the target test script to obtain the functional test result of the target servo system.

[0138] The operation process of the executable instructions stored in the computer-readable storage medium provided in the embodiment of the present invention is substantially the same as that of the aforementioned method embodiment and will not be described in detail.

[0139] The executable instructions stored in the computer-readable storage medium provided in the embodiment of the present invention are displayed by a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes the instruction function type of multiple optional instructions and the information of the parameters to be filled in; one of the optional instructions corresponds to a preset instruction implementation function; then the test instruction arrangement information input by the user based on the instruction knowledge base is obtained; the test instruction arrangement information includes multiple target instructions, the instruction parameters corresponding to each of the target instructions and the execution order between the multiple target instructions; the target instruction implementation functions corresponding to the target instructions are assembled according to the test instruction arrangement information to obtain a target test script; finally, the target test script is executed to obtain the functional test results of the target servo system. Different from the existing servo function test, which requires users to have relatively professional relevant knowledge and cannot guarantee the accuracy and efficiency of manual testing, the present invention is like a demonstration of the instruction function type of the optional instructions and the parameters to be filled in as test reference knowledge, so that users can more efficiently select and arrange the test instructions, and generate a target test script that can be automatically executed according to the test instruction arrangement information input by the user. The servo test of the embodiment of the present invention has lower requirements for the user's professional knowledge. The user only needs to understand the information provided by the test instruction knowledge base, and by executing the target test script, no manual participation is required, which can improve the accuracy and efficiency of the servo test. The embodiment of the present invention provides a servo function test device for executing the above-mentioned servo function test method.

[0140] An embodiment of the present invention provides a computer program, which can be called by a processor to enable a servo function testing device to execute the servo function testing method in any of the above method embodiments.

[0141] The embodiment of the present invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium, and the computer program includes program instructions. When the program instructions are run on a computer, the computer is caused to execute the servo function test method in any of the above method embodiments. The algorithm or display provided herein is not inherently related to any specific computer, virtual system or other device. Various general systems can also be used together with the teachings based on this. According to the above description, the structure required to construct such a system is obvious. In addition, the embodiment of the present invention is not directed to any specific programming language. It should be understood that the content of the present invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is to disclose the best implementation mode of the present invention.

[0142] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0143] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this method of disclosure should not be interpreted as reflecting an intention that the claimed invention requires more features than those expressly recited in each claim.

[0144] It will be appreciated by those skilled in the art that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and may be divided into a plurality of submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose. It should be noted that the above embodiments illustrate rather than limit the invention, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limiting the order of execution.

Claims

1. A servo function testing method, characterized in that: The method is based on a host computer, and the host computer is respectively connected to a preset universal controller, a target detection device, a target servo driver, and a load servo motor through a preset type of bus; the method includes: Displaying a test instruction knowledge base corresponding to the target servo system; the test instruction knowledge base includes instruction function types and information on required parameters of multiple optional instructions; one optional instruction corresponds to a preset instruction implementation function; Among them, the instruction function type of one of the optional instructions is one of a communication function, a calculation function and a script execution logic control function; the information of the required parameters corresponding to the optional instruction is used to characterize the parameters that need to be input when the optional instruction is executed, and / or the parameters required by the optional instruction when making judgments and outputting results; the required parameter information corresponding to the optional instruction of the communication function includes the communication operation type, the communication address, the communication content information and the communication time control information; the communication operation type characterizes whether the communication is for data reading or writing, and the communication content information characterizes the characteristics of the content of the communication transmission; the communication time control information includes a timeout time, which is used to control the communication duration; the required parameter information corresponding to the optional instruction of the calculation function includes the calculation type and the storage location of the calculation result; the required parameter information corresponding to the optional instruction of the script execution logic control function includes the script execution logic control type and the script execution logic control parameter; The target servo system includes a target servo driver, a target servo motor and a load servo motor; the target servo driver is used to drive the target servo motor, and the target servo motor is loaded with a load servo motor; the universal controller is used to control the target servo driver; the target detection device is used to detect the state of the target servo motor; the target detection device is a device required for servo function testing, including a speed / torque sensor, a pulse generator, an oscilloscope, an Ethercat master station, and a CANOPEN master station; the universal controller is integrated with optional communication interfaces corresponding to multiple optional servo driver types; the target servo driver is one of the optional servo drivers; the target servo driver is connected to the target communication interface through a communication cable; Acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions; Assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script; The host computer configures the status of each component in the target servo system according to the test instruction arrangement information, and creates a corresponding test environment for the servo driver; executes the target test script, and controls the universal controller, target servo driver, target detection equipment and load servo motor respectively according to the script parsing result of the target test script, reads the status of the servo or sensor at a specified time, and obtains the functional test result of the target servo system.

2. The method according to claim 1, characterized in that The script execution logic control functions include delayed execution, marking position and jumping to the marked position; Among them, the delayed execution is used to indicate the length of time to wait for the script execution logic control parameter set before executing the next instruction; the mark position is used to mark the position where the script execution logic control parameter is executed; the jump to the mark position is used to indicate that the current program jumps to the position specified by the script execution logic control parameter to continue execution.

3. The method according to claim 1, characterized in that The step of assembling the target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script includes: Searching the preset instruction-function correspondence relationship according to the target instruction to obtain the target instruction implementation function corresponding to each target instruction; Filling parameters of each target instruction implementation function according to the instruction parameters to obtain multiple functions to be assembled; The multiple functions to be assembled are assembled according to the execution order to obtain the target test script.

4. The method according to claim 1, characterized in that: The universal controller is also provided with a human-computer interaction module; The universal controller is also connected to the target detection device, the target servo driver and the load servo motor through the bus; The human-computer interaction module is used by the user to manually control the target detection device, the target servo driver and the load servo motor.

5. The method according to claim 1, characterized in that The executing the target test script to obtain the functional test result of the target servo drive includes: Displaying the test instruction arrangement information based on a preset visual interface; detecting a control operation on the test instruction arrangement information; Triggering execution of the target test script according to the control operation to obtain the functional test result; The functional test results are displayed on the visual interface.

6. A servo function test device, characterized in that: The device is a host computer, which is respectively connected to a preset universal controller, a target detection device, a target servo driver and a load servo motor through a preset type of bus; the device includes: A display module is used to display a test instruction knowledge base corresponding to a target servo system; the test instruction knowledge base includes instruction function types and information on required parameters of multiple optional instructions; one of the optional instructions corresponds to a preset instruction implementation function; wherein the instruction function type of one of the optional instructions is one of a communication function, a calculation function, and a script execution logic control function; the information on required parameters corresponding to the optional instruction is used to characterize the parameters that need to be input when the optional instruction is executed, and / or the parameters that the optional instruction needs when making judgments and outputting results; the information on required parameters corresponding to the optional instructions of the communication function includes a communication operation type, a communication address, communication content information, and communication time control information; the communication operation type characterizes whether the communication is for data reading or writing, and the communication content information characterizes the characteristics of the content of the communication transmission; the communication time control information includes a timeout time, which is used to control the communication duration; the required parameters corresponding to the optional instructions of the calculation function The information includes the calculation type and the storage location of the calculation result; the required parameter information corresponding to the optional instructions of the script execution logic control function includes the script execution logic control type and the script execution logic control parameters; the target servo system includes a target servo driver, a target servo motor and a load servo motor; the target servo driver is used to drive the target servo motor, and the target servo motor is loaded with a load servo motor; the universal controller is used to control the target servo driver; the target detection device is used to detect the state of the target servo motor; the target detection device is a device required for servo function testing, including a speed / torque sensor, a pulse generator, an oscilloscope, an Ethercat master station, and a CANOPEN master station; the universal controller is integrated with optional communication interfaces corresponding to multiple optional servo driver types; the target servo driver is one of the optional servo drivers; the target servo driver is connected to the target communication interface via a communication cable; An acquisition module, used to acquire test instruction arrangement information input by a user based on the instruction knowledge base; the test instruction arrangement information includes a plurality of target instructions, instruction parameters corresponding to each of the target instructions, and an execution order between the plurality of target instructions; An assembling module, used for assembling a target instruction implementation function corresponding to the target instruction according to the test instruction arrangement information to obtain a target test script; The execution module is used to configure the status of each component in the target servo system according to the test instruction arrangement information, and create a corresponding test environment for the servo driver; execute the target test script, and control the universal controller, the target servo driver, the target detection equipment and the load servo motor according to the script parsing result of the target test script, read the status of the servo or sensor at a specified time, and obtain the functional test result of the target servo system.

7. A servo function test device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute the operation of the servo function testing method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that: The storage medium stores at least one executable instruction. When the executable instruction is executed on the servo function test device, the servo function test device executes the operation of the servo function test method according to any one of claims 1 to 5.