A probe function testing system and a testing method

The motor rotation is triggered at the same point at a time by dragging the platform and signal adapter board. Combined with the hardware delay compensation of the upper computer and the software algorithm, the problems of low probe function testing efficiency and difficulty in error evaluation in the existing technology are solved, and the probe is realized Automatic testing and error measurement of functions.

CN114047439BActive Publication Date: 2024-12-24NANJING ESTUN AUTOMATION CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111225299.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2024-12-24
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

The probe function testing method in the prior art is inefficient, and it is impossible to trigger the same point in the motor rotation around, and it is impossible to accurately evaluate the error between the probe latch position and the actual value.

Method used

The drag platform and signal adapter board are used to achieve the same trigger on the motor rotation at the same point. Through the hardware delay compensation and data acquisition of the upper computer, the differential signal driver chip and switching circuit are used to convert the Z-phase differential signal into the switching signal, and the position deviation is calculated by combining the software algorithm. , realize automated testing of probe functions.

Benefits of technology

Improve the testing efficiency and realize automated testing of probe functions, accurately measure and correct probe latch position errors, ensuring the accuracy and efficiency of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114047439B_ABST
    Figure CN114047439B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of motor testing technology, and in particular to a test system and test method for a probe function, wherein the test system comprises a towing platform, a signal adapter board and a host computer; the towing platform comprises a coupling for coaxially connecting the moving axes of the motor under test and the towed motor; the signal adapter board is used to collect the Z-phase differential signal of the motor under test and convert it into a switch signal, which is provided to the motor under test as an external trigger signal for the probe function; the host computer is used to perform hardware delay compensation on the signal adapter board; and is used to collect and compare the latched data of the motor under test to obtain the probe latched position error. The present invention realizes the triggering at the same point of a motor rotation, realizes the automated test of the latched position error, and improves the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor testing, and in particular to a system and method for testing probe functions. Background Art

[0002] The probe function (Touch Probe) is the position latch function. When the motion unit meets the trigger condition (EXT1 / EXT2 / Z phase), its probe function is triggered immediately, and the motor encoder position at the time of the condition triggering is latched. If the trigger position is at the same point in one rotation of the motor, the difference between two consecutive latched probe positions should theoretically be the number of pulses emitted by the motor encoder in one rotation. However, since it takes a certain amount of time from the generation of the external trigger signal to the motion unit receiving this signal and performing the motor position latch operation, there must be a certain error between the value latched by the probe function and the position value triggered by the actual signal. The size of this error is related to the motor running speed, hardware performance and internal software processing of the driver, so a test method is needed to measure this error.

[0003] Problems and shortcomings in the prior art:

[0004] 1. The current test method is mainly aimed at the basic functions of the probe function, that is, the external signal is generated (signal rising edge or falling edge), triggering the driver latch position, and observing whether the value of the latch position data 60BAh / 60BBh / 60BCh / 60BDh changes. This test method is completed through manual testing, which takes a long time and has low efficiency;

[0005] 2. The trigger signal generated by this test method is random, and it is impossible to achieve position triggering at the same point when the motor rotates one circle. Therefore, it is impossible to evaluate the error between the probe latch position and the actual true value. Summary of the invention

[0006] The purpose of the present invention is to provide a test system and a test method for probe function, so as to realize triggering at the same point of a motor rotation, realize automatic test of latch position error and improve test efficiency.

[0007] In order to solve the above technical problems, the technical solution of the present invention is: a probe function testing system, comprising:

[0008] The towing platform includes a coupling for coaxially connecting the moving shafts of the motor under test and the towed motor;

[0009] The signal adapter board is used to collect the Z-phase differential signal of the towed motor and convert it into a switch signal, which is provided to the motor under test as an external trigger signal for the probe function;

[0010] The host computer is used to perform hardware delay compensation on the signal transfer board and to collect and compare the latch data of the motor under test to obtain the probe latch position error.

[0011] Preferably, the towing platform further comprises a base, and the base is used to mount the motor under test and the motor under tow so that the motion axes of the motor under test and the motor under tow are aligned.

[0012] Preferably, the signal adapter board includes a differential signal driver chip and a switching circuit; the differential signal driver chip is used to convert the Z-phase differential signal of the towed motor into a single-ended signal and then output it; the switching circuit is used to output a switching signal for probe triggering according to the high and low levels of the single-ended signal; the switching circuit uses a transistor, the base of the transistor is connected to the output end of the differential signal driver chip, the collector of the transistor is connected to the power supply through a pull-up resistor, and the emitter of the transistor is grounded; the collector output voltage of the transistor is used as a switching signal.

[0013] Preferably, the differential signal driving chip is a 26LS32 chip.

[0014] Preferably, the signal adapter board also includes a power conversion module for converting the 24V voltage into 5V to power the differential signal driver chip.

[0015] Preferably, the delay compensation method in the host computer is:

[0016] S1, collects the delay time Tdelay between the input signal and the output signal of the signal adapter board;

[0017] S2, collect the speed value velocity of the motor when the external signal triggers the probe function;

[0018] S3. Calculate position deviation:

[0019] Position_offset=Tdelay*N*velocity / 60;

[0020] N represents the number of pulses per turn of the motor encoder; since the positions latched by the probe function are all integers, the position deviation is defined as an integer type;

[0021] S4. Delay compensation of the hardware interface circuit is achieved by subtracting the position deviation from the position value latched by the probe function.

[0022] A method for testing the function of a probe adopts the above-mentioned testing system, and the steps of the testing method are as follows:

[0023] Step 1: Get the servo motion axis parameters;

[0024] Step 2: Set the probe function parameters;

[0025] Step 3: Determine whether the rotation speed of the servo motion axis is stable;

[0026] Step 4: Collect probe latch data to compare probe latch position errors.

[0027] Preferably, in step 1, TwinCAT software of Beckhoff is used to identify different types of servo motion axes and obtain servo motion axis parameters.

[0028] Preferably, in step 3, the judgment method is: collect the actual speed value of the servo motion axis of the motor under test, subtract it from the set speed target value, then take the absolute value of the difference through the internal function ABS, and compare it with the revolutions per minute 20rpm. If this absolute value is less than 20, accumulate the value of the variable uv_counter. When the value of uv_counter is greater than or equal to 100, it indicates that the speed of the servo motion axis is stable. Otherwise, it is considered that the speed is not stable and continue to wait.

[0029] Preferably, in step 4, by judging whether bit 6 (i.e., probe channel 1 status bit) and bit 14 (i.e., probe channel 2 status bit) of status word 60B9h have changed, the latched data is collected. Since the latched data is a 32-bit signed integer, which is greater than the number of pulses in one circle of the encoder, in order to obtain the position corresponding to one circle of the encoder, the MOD remainder function is used, as shown in the following formula:

[0030] temp_pos=Pos_1MOD(MAIN.single_plus / factor)(1)

[0031] Where temp_pos is a local variable, Pos_1 is the latched data of the probe function, MAIN.single_plus is the number of pulses in one revolution of the encoder, factor is the proportional factor, and the value is set to 1 in the test; since the position of the servo motion axis may be a negative number, when it is a negative number, the latched data range is controlled between 0 and the number of pulses in one revolution of the encoder. Therefore, based on the above formula (1), the variable temp_pos is added with the number of pulses in one revolution of the encoder, and the negative variable temp_pos is assigned as shown in the following formula (2) to obtain the positive variable temp_pos, thereby ensuring that the collected data are all positive values:

[0032] temp_pos=MAIN.single_plus / factor+temp_pos (2)

[0033] Through the loop, the value of the local variable temp_pos is written into an array of 500, thereby completing the collection of 500 sets of data. Finally, through the loop comparison algorithm, the maximum and minimum values ​​in the 500 sets of data are obtained, and the two values ​​are subtracted to obtain the maximum error value.

[0034] The present invention has the following beneficial effects:

[0035] 1. The present invention uses a towing platform to realize the same position triggering probe function, uses a signal adapter board to convert the differential signal of the Z-phase signal of the towed motor encoder into a 24V switch signal, and provides it to the driver under test as a probe trigger signal of the probe to realize the triggering of the same point of the motor rotation;

[0036] 2. Use the host computer to realize the hardware delay compensation function of the signal transfer board, as well as the collection and processing of probe function data. Use the remainder algorithm to compare the probe latch position error, confirm the probe function error, and automatically complete the probe function test;

[0037] 3. The present invention improves the testing method, realizes automated testing, and improves testing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a structural schematic diagram of the motor under test and the motor to be towed installed on the towing platform in an embodiment of the present invention;

[0039] Figure 2 1 is a circuit schematic diagram of a signal adapter board in an embodiment of the present invention;

[0040] Figure 3 Flow chart of the testing method in this embodiment.

[0041] Figure numerals: 1, towing platform; 101, coupling; 102, base; 2, motor under test; 3, towed motor; 4, signal adapter board. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0043] Please refer to Figure 1 and Figure 2 The present invention is a probe function testing system, which includes a dragging platform 1, a signal adapter board 4 and a host computer.

[0044] The towing platform 1 includes a coupling 101 and a base 102. The base 102 is used to install the motor 2 under test and the towed motor 3 so that the moving axes of the motor 2 under test and the towed motor 3 are aligned. The coupling 101 is used to connect the moving axes of the motor 2 under test and the towed motor 3 coaxially. By using the towing platform 1, the axes of the towed motor 3 and the motor 2 under test are aligned, see the attachment Figure 1 As shown, it is ensured that the Z-phase signal of the motor 3 can accurately correspond to a certain position of the motor 2 under test. Since the motor encoder generates a Z-phase signal every time it rotates one circle, it can be ensured that the Z-phase signal will not jump during the operation of the motor.

[0045] The signal adapter board 4 is used to collect the Z-phase differential signal of the towed motor 3 and convert it into a switch signal, which is provided to the motor 2 under test as an external trigger signal of the probe function; since the collected Z-phase signal of the towed motor 3 is a differential signal, and the external trigger signal of the probe function of the driver under test is a 24V switch signal, the signal adapter board 4 is required to realize the conversion function from the differential signal to the 24V switch signal, such as Figure 2 As shown, by using the 26LS32 chip, the Z-phase differential signal is converted into a single-ended signal, and then the transistor is driven to generate a 24V switching signal.

[0046] The signal adapter board 4 includes a differential signal driver chip, a switch circuit and a power conversion module;

[0047] The differential signal driving chip is used to convert the Z-phase differential signal of the towed motor 3 into a single-ended signal and then output it; the differential signal driving chip uses a 26LS32 chip; the two input ends of the 26LS32 chip are respectively connected to common-mode inductors L1 and L2, and the common-mode inductors L1 and L2 are used to suppress common-mode noise. A filter resistor R1 is connected between the two input ends of the 26LS32 chip for anti-interference.

[0048] The switch circuit is used to output a switch signal to trigger the probe according to the high or low level of the single-ended signal; the switch circuit uses a transistor J1, the base of the transistor J1 is connected to the output end of the differential signal driver chip, the collector of the transistor is connected to the 24V power supply through the pull-up resistor R3, and the emitter of the transistor J1 is grounded; the output voltage of the transistor collector is used as a 24V switch signal;

[0049] When the output signal of the differential signal driver chip is high level, the transistor J1 is in saturation state, and the output switching signal is the transistor saturation voltage drop, that is, low level;

[0050] When the output signal of the differential signal driver chip is at a low level, the transistor J1 is in a cut-off state, and the output switch signal is pulled up by the collector resistor R1 to a power supply of 24V, that is, a high level.

[0051] In this embodiment, the switch circuit also includes a base current limiting resistor R2 and a filter capacitor C1, wherein the base current limiting resistor R2 is connected to the base of the transistor and the output end of the 26LS32 chip to prevent the input voltage amplitude from being too high, resulting in excessive base current and damaging the transistor; the filter capacitor C1 is connected to the base of the transistor and then grounded to play a filtering role.

[0052] The power conversion module is used to convert the 24V voltage into 5V to power the differential signal driver chip 26LS32. In order to let the tester know that the adapter board is powered on, a LED light display circuit is specially designed to light up the LED light to inform the tester that the signal adapter board 4 is powered on.

[0053] The host computer is used to perform hardware delay compensation on the signal transfer board 4; and is used to collect and compare the latched data of the motor 2 under test to obtain the probe latched position error.

[0054] Since the use of the signal adapter board 4 will cause signal delay, the delay is compensated by software design; the delay compensation method in the host computer is:

[0055] S1, the host computer collects the delay time Tdelay between the input signal and the output signal of the signal adapter board 4 through an oscilloscope;

[0056] S2, when the number of single-turn pulses N of the motor encoder is known, the upper computer collects the motor speed value velocity when the external signal triggers the probe function;

[0057] S3. Calculate position deviation:

[0058] Position_offset=Tdelay*N*velocity / 60;

[0059] Since the motor speed unit is rpm (revolutions per minute), the formula needs to be divided by 60. In addition, since the positions latched by the probe function are all integers, the position deviation needs to be defined as an integer type.

[0060] S4. Delay compensation of the hardware interface circuit is achieved by subtracting the position deviation from the position value latched by the probe function.

[0061] The present invention also provides a test method for performing a probe function test using the above-mentioned test system, wherein the probe function is set on a host computer interface, such as enabling of the probe function, single triggering or continuous triggering, whether it is triggered by an external signal, a rising edge or a falling edge of the signal, etc., and the running speed of the motor under test can be directly set on the host computer interface to test the latch position deviation of the probe function at different speeds, and the latch data of the motor position triggered by the probe function is also displayed on the interface.

[0062] The test method steps are:

[0063] Step 1: Get the servo motion axis parameters;

[0064] Step 2: Set the probe function parameters;

[0065] Step 3: Determine whether the rotation speed of the servo motion axis is stable;

[0066] Step 4: Collect probe latch data to compare probe latch position errors.

[0067] In step 1, the servo motion axis parameters are obtained by using the function blocks of the host computer software TwinCAT, such as IOF_DeviceReset, IOF_GetDeviceNetId, IOF_GetDeviceName, FB_EcCoESdoRead, and FB_EcCoESdoWrite, to automatically identify different types of servo motion axes. The host computer software is the existing technology on the market, using TwinCAT of Beckhoff; the EtherCAT slave service data object (SDO) is used to read the function block FB_EcCoESdoRead and write the function block FB_EcCoESdoWrite. Rite designed the FB_ADS_Read_Write function block to facilitate the reading of parameters such as servo drive type, motor type, and encoder type; the IOF_DeviceReset function block allows resetting an IO device, which can be set as a fieldbus board; the IOF_GetDeviceNetId function block is used to read the AMSNetID assigned to the IO device by the system manager of the host computer so that the program can identify a specific IO device; the IOF_GetDeviceName function block is used to obtain the name assigned to the IO device by the system manager of the host computer to determine whether it is an EtherCAT slave.

[0068] In step 2, when setting the probe function parameters, by mapping the probe function parameters of the EtherCAT slave to the process data object PDO and setting the parameters on the PLC of the host computer to associate them with it, the probe function parameters can be set very conveniently and the data latched by the probe function can be collected in real time.

[0069] In step 3, in judging the speed stability function, the actual speed value of the servo axis is collected and subtracted from the set speed target value, and then the absolute value of the difference is taken through the internal function ABS and compared with 20rpm (rotations per minute). If this absolute value is less than 20, the value of the variable uv_counter is accumulated. When the value of uv_counter is greater than or equal to 100, it means that the speed of the servo motion axis is stable. Otherwise, it is considered that the speed is not stable and continue to wait.

[0070] In step 4, when collecting probe latch data, the latch data is collected by judging whether bit 6 of status word 60B9h, i.e., probe channel 1 status bit, and bit 14, i.e., probe channel 2 status bit, have changed. Since the latched data is a 32-bit signed integer, which is much larger than the number of pulses in one circle of the encoder, in order to obtain the position corresponding to one circle of the encoder, the MOD remainder function is used, as shown in the following formula:

[0071] temp_pos=Pos_1 MOD(MAIN.single_plus / factor) (1)

[0072] Where temp_pos is a local variable, Pos_1 is the latched data of the probe function, MAIN.single_plus is the number of pulses in one revolution of the encoder, factor is the proportional factor, and the value is set to 1 in the test; since the position of the servo motion axis may be a negative number, when it is a negative number, the latched data range is controlled between 0 and the number of pulses in one revolution of the encoder. Therefore, based on the above formula (1), the variable temp_pos is added with the number of pulses in one revolution of the encoder, and the negative variable temp_pos is assigned as shown in the following formula (2) to obtain the positive variable temp_pos, thereby ensuring that the collected data are all positive values:

[0073] temp_pos=MAIN.single_plus / factor+temp_pos (2)

[0074] Through the loop, the value of the local variable temp_pos is written into an array of 500, thereby completing the collection of 500 sets of data. Finally, through the loop comparison algorithm, the maximum and minimum values ​​in the 500 sets of data are obtained, and the two values ​​are subtracted to obtain the maximum error value.

[0075] The present invention realizes triggering at the same point of one rotation of the motor by using the Z-phase signal of the encoder of the towed motor as the probe signal of the motion unit through a towing platform and a signal adapter board; secondly, a host computer and a software platform are used to realize the compensation of the hardware delay of the probe function and the automation of the test, and can test the probe position deviation under different rotation speeds and different trigger signals (the rising edge or falling edge of EXT1 / EXT2).

[0076] Before using this test system to perform probe function test, first follow Figure 1 As shown, two motors need to be fixed to the towing platform, and the shafts of the two motors need to be connected together using a coupling. The towed motor only needs to connect the encoder cable to the towed servo drive, and the power cable and encoder cable of the tested motor need to be connected to the tested servo drive. Then follow the Figure 2 , respectively connect the plug on the signal adapter board to the IO port of the towed servo drive and the IO port of the tested servo drive, and finally power the servo drive, and then provide 24V power to the signal adapter board. Turn on the corresponding host computer respectively, and then switch the running state of the host computer software project from the configuration state (config) to the running state (run), set the relevant parameters of the probe function on the host computer, and then operate according to the software design process to automatically complete the test of the probe function.

[0077] The parts not involved in the present invention are the same as the prior art or are implemented by using the prior art.

[0078] The above contents are further detailed descriptions of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A probe function testing system, characterized in that: include The towing platform includes a coupling for coaxially connecting the moving shafts of the motor under test and the towed motor; The signal adapter board is used to collect the Z-phase differential signal of the towed motor and convert it into a switch signal, which is provided to the motor under test as an external trigger signal for the probe function; The host computer is used to perform hardware delay compensation on the signal transfer board; it is used to collect and compare the latch data of the motor under test to obtain the probe latch position error; the delay compensation method in the host computer is: S1, collects the delay time Tdelay between the input signal and the output signal of the signal adapter board; S2, collect the speed value velocity of the motor when the external signal triggers the probe function; S3. Calculate position deviation: Position_offset=Tdelay*N*velocity / 60; N represents the number of pulses per turn of the motor encoder; since the positions latched by the probe function are all integers, the position deviation is defined as an integer type; S4. By subtracting the position deviation from the position value latched by the probe function, the probe trigger signal is triggered at the same point when the motor rotates one circle, thereby realizing the delay compensation of the hardware interface circuit.

2. The probe function testing system according to claim 1, characterized in that: The towing platform also includes a base, which is used to install the motor under test and the towed motor so that the movement axes of the motor under test and the towed motor are aligned.

3. The probe function testing system according to claim 1, characterized in that: The signal adapter board includes a differential signal driving chip and a switch circuit; the differential signal driving chip is used to convert the Z-phase differential signal of the driven motor into a single-ended signal and then output it; The switch circuit is used to output a switch signal to trigger the probe according to the high or low level of the single-ended signal; the switch circuit uses a transistor, the base of the transistor is connected to the output end of the differential signal driver chip, the collector of the transistor is connected to the power supply through a pull-up resistor, and the emitter of the transistor is grounded; the collector output voltage of the transistor is used as the switch signal.

4. The probe function testing system according to claim 3, characterized in that: The differential signal driver chip used is the 26LS32 chip.

5. The probe function testing system according to claim 3, characterized in that: The signal adapter board also includes a power conversion module for converting the 24V voltage into 5V to power the differential signal driver chip.

6. A method for testing probe function, characterized in that: The test system according to any one of claims 1 to 5 is used, and the test method steps are as follows: Step 1: Get the servo motion axis parameters; Step 2: Set the probe function parameters; Step 3: Determine whether the rotation speed of the servo motion axis is stable; Step 4: Collect probe latch data to compare probe latch position errors.

7. The method for testing the probe function according to claim 6, characterized in that: In step 1, TwinCAT software of Beckhoff is used to identify different types of servo motion axes and obtain the servo motion axis parameters.

8. The method for testing the probe function according to claim 6, characterized in that: In the step 3, the judgment method is: collect the actual speed value of the servo motion axis of the motor under test, subtract it from the set speed target value, then take the absolute value of the difference through the internal function ABS, and compare it with the revolutions per minute 20rpm. If this absolute value is less than 20, accumulate the value of the variable uv_counter. When the value of uv_counter is greater than or equal to 100, it indicates that the speed of the servo motion axis is stable. Otherwise, it is considered that the speed is not stable and continue to wait.

9. The method for testing the probe function according to claim 6, characterized in that: In step 4, the latched data is collected by judging whether bit 6 of the status word 60B9h, i.e., the status bit of probe channel 1, and bit 14, i.e., the status bit of probe channel 2, have changed. Since the latched data is a 32-bit signed integer, which is greater than the number of pulses in one circle of the encoder, the MOD remainder function is used to obtain the position corresponding to one circle of the encoder, as shown in the following formula: temp_pos = Pos_1 MOD (MAIN.single_plus / factor) (1) Among them, temp_pos is a local variable, Pos_1 is the latch data of the probe function, MAIN.single_plus is the number of pulses in one circle of the encoder, factor is the proportional factor, and the value is set to 1 in the test; When the position of the servo motion axis is negative, the latched data range is controlled between 0 and the number of encoder pulses per revolution. Therefore, based on the above formula (1), the variable temp_pos is added with the number of encoder pulses per revolution. The negative variable temp_pos is assigned as shown in the following formula (2) to obtain the positive variable temp_pos: temp_pos = MAIN.single_plus / factor + temp_pos (2) Through the loop, the value of the local variable temp_pos is written into an array of 500, thereby completing the collection of 500 sets of data. Finally, through the loop comparison algorithm, the maximum and minimum values ​​in the 500 sets of data are obtained, and the two values ​​are subtracted to obtain the maximum error value.

Citation Information

Patent Citations

  • High speed position capture realizing method and device for motion controller

    CN105159205A

  • An ST test system and method for an alternating current servo system

    CN105699105A

  • Code compensation method and apparatus and servo driver

    CN106020059A

  • Motor shaft position acquisition method and device, and servo driver

    CN107942788A

  • Position latching method, servo driver and storage medium

    CN112803865A