Printer motor test method, verification device, motor controller and printer
By generating and executing multi-dimensional testing instructions, the problem of single motor test dimensions in the prior art is solved, and the accurate evaluation of motor performance and the improvement of printer printing effect is achieved.
Patent Information
- Application Number
- CN202510411348.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the motor test dimension is single, and the motor performance cannot be accurately evaluated, which affects the printing effect of the printer.
A test method for printer motor is proposed. By generating test instructions, sending test instructions to the motor controller, controlling the motor to be tested to execute test cases, receiving and verifying test data, and obtaining the test results of each item to be tested.
By testing the motor to be tested from different dimensions, the motor performance can be accurately evaluated, the printer's printing effect can be improved, and the test efficiency can be improved through automated processes.
Smart Images

Figure CN120064974A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of printers, and particularly to a test method for the motor of a printer, a calibration device, a motor controller, and a printer. Background Art
[0002] Currently, as the core driving component of a printing device, the performance of the motor directly affects printing accuracy and stability. Currently, printers mainly adopt two types of driving schemes: stepper motors and DC servo motors. Stepper motors are widely used in scenarios such as paper feeding mechanisms and printhead movement due to their low-cost positioning characteristics under open-loop control, while servo motors achieve higher-precision position control in high-end models through a closed-loop feedback system. A small deviation in motor performance will be amplified into significant printing defects through the mechanical transmission system. Therefore, it is crucial to test and calibrate the motor of a printer. However, in related technologies, the test dimensions of the motor are relatively single, and the motor performance cannot be accurately evaluated, thereby affecting the printing effect of the printer. Summary of the Invention
[0003] The main purpose of this application is to provide a test method for the motor of a printer, a calibration device, a motor controller, and a printer, aiming to solve the technical problem that the single test dimension of the motor affects the printing effect of the printer.
[0004] To achieve the above object, this application proposes a test method for the motor of a printer, which is applied to a calibration device. The calibration device is electrically connected to the motor controller of the printer, and includes:
[0005] Generating test instructions according to each test item of the motor to be tested, and sending the test instructions to the motor controller, where the test items include at least one of: electrical zero position calibration item, motor power supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item. The motor controller generates corresponding test cases based on the test instructions and controls the motor to be tested to execute the test cases corresponding to the test items;
[0006] Receiving the test data fed back by the motor controller, and performing calibration according to the test data to obtain the test results corresponding to each test item;
[0007] Obtaining the test result of the motor to be tested according to the test results corresponding to each test item.
[0008] In one embodiment, generating test instructions according to each test item of the motor to be tested includes:
[0009] Determine the motor under test according to the currently set baud rate. Among them, for different baud rates, the device objects driven by the motor under test are different. The device objects include the extruder of the printer or the XYZ axes of the printer. The extruder is used to control the extrusion of the printing material, and the XYZ axes are used to control the movement of the print head;
[0010] Determine the test items of the motor under test according to the test requirements;
[0011] Generate test instructions according to the test items.
[0012] In one embodiment, if the test item is the electrical zero position calibration item, receive the test data fed back by the motor controller, and perform verification according to the test data to obtain the test results corresponding to each test item, including:
[0013] Receive the first electrical zero position values corresponding to each pole pair measured during the rotation of the motor under test of the extruder fed back by the motor controller;
[0014] Convert each first electrical zero position value to obtain the first angle value corresponding to each electrical zero position value;
[0015] Perform a consumable material quantity conversion on each first angle value to obtain the actual consumable material quantity extruded by the extruder;
[0016] If the actual consumable material quantity is the same as the preset consumable material quantity, determine that the test result corresponding to the electrical zero position calibration item is a successful test;
[0017] If the actual consumable material quantity is different from the preset consumable material quantity, determine that the test result corresponding to the electrical zero position calibration item is a failed test.
[0018] In one embodiment, if the test item is the electrical zero position calibration item, receive the test data fed back by the motor controller, and perform verification according to the test data to obtain the test results corresponding to each test item, including:
[0019] Receive the second electrical zero position values corresponding to each pole pair measured during the rotation of the motor under test of the XYZ axes fed back by the motor controller;
[0020] Convert each second electrical zero position value to obtain the second angle value corresponding to each second electrical zero position value;
[0021] Perform a rotation angle conversion on each second angle value to obtain the actual rotation angle of the XYZ axes;
[0022] If the actual rotation angle is different from the preset rotation angle, determine that the test result corresponding to the electrical zero position calibration item is a successful test;
[0023] If the actual rotation angle is the same as the preset rotation angle, determine that the test result corresponding to the electrical zero position calibration item is a failed test.
[0024] In one embodiment, if the item to be measured is the motor supply voltage detection item, receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be measured, including:
[0025] Receive the supply voltage of the motor under test fed back by the motor controller;
[0026] If the supply voltage is greater than the preset supply voltage, determine that the test result corresponding to the motor supply voltage detection item is a successful test;
[0027] If the supply voltage is greater than or equal to the preset supply voltage, determine that the test result corresponding to the motor supply voltage detection item is a failed test.
[0028] In one embodiment, if the item to be measured is the encoder eccentricity calibration item, receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be measured, including:
[0029] Receive the calibration result fed back by the motor controller;
[0030] If the calibration result is the same as the preset calibration result, determine that the test result corresponding to the encoder eccentricity calibration item is a successful test;
[0031] If the calibration result is different from the preset calibration result, determine that the test result corresponding to the encoder eccentricity calibration item is a failed test.
[0032] In one embodiment, if the item to be measured is the motor operation condition detection item, receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be measured, including:
[0033] Send a restart command for the motor under test to the motor controller, where the motor controller performs a restart operation on the motor under test based on the restart command;
[0034] Detect whether the first feedback data from the motor controller is received;
[0035] If so, determine that the test result of the motor operation condition detection item is a successful test;
[0036] If not, determine that the test result of the motor operation condition detection item is a failed test.
[0037] In one embodiment, if the item to be measured is the motor speed fluctuation detection item, receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be measured, including:
[0038] Receive the maximum operating speed and the minimum operating speed of the motor under test fed back by the motor controller, and query the protection code;
[0039] Determine the speed difference between the maximum operating speed and the minimum operating speed;
[0040] If the speed difference is less than the preset difference and the protection code is the preset protection code, determine that the test result corresponding to the motor speed fluctuation detection item is a successful test;
[0041] If the speed difference is greater than or equal to the preset difference, or the protection code is not the preset protection code, determine that the test result corresponding to the motor speed fluctuation detection item is a failed test.
[0042] In one embodiment, if the item to be tested is the motor abnormal protection detection item, receive the test data fed back by the motor controller, and perform verification according to the test data, and the test results corresponding to each item to be tested include:
[0043] Detect whether the second feedback data from the motor controller is received;
[0044] If so, determine that the test result of the motor abnormal protection detection item is a successful test;
[0045] If not, determine that the test result of the motor abnormal protection detection item is a failed test.
[0046] To achieve the above object, the present application proposes a test method for a motor of a printer, which is applied to a motor controller. The motor controller is connected to a calibration device and a motor to be tested of the printer, and includes:
[0047] Receive the test instruction sent by the calibration device, and parse the test instruction to obtain the item to be tested;
[0048] Generate a test case corresponding to the item to be tested, and determine the motor control parameters corresponding to the item to be tested according to the test case;
[0049] Control the motor to be tested to operate based on the motor control parameters, and obtain the test data corresponding to the item to be tested;
[0050] Feed back the test data to the calibration device, where the calibration device determines the test result of the motor to be tested according to the test data.
[0051] In addition, to achieve the above object, the present application also proposes a calibration device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the test method for the motor of the printer as described above.
[0052] In addition, to achieve the above object, the present application also proposes a motor controller, including: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the test method for the motor of the printer as described above.
[0053] In addition, to achieve the above object, the present application further provides a printer, which includes a calibration device, a motor controller, and a motor to be tested. The motor controller is electrically connected to the calibration device and the motor to be tested.
[0054] The present application generates test instructions according to each test item that the motor to be tested needs to be tested, and sends the test instructions to the motor controller. The test items include at least one of the following: electrical zero position calibration item, motor power supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item. The motor controller generates corresponding test cases based on the test instructions, and controls the motor to be tested to execute the test cases corresponding to the test items to obtain test data corresponding to each test item. Then, the calibration device performs calibration according to the test data corresponding to each test item to obtain test results corresponding to each test item. Finally, the test result of the motor to be tested is obtained according to the test results corresponding to each test item. Compared with the related art, the present application can simultaneously set multiple test items in different dimensions, control the motor to be tested to automatically execute each test item, and accurately evaluate the motor performance by testing the motor to be tested from different dimensions, thereby improving the printing effect of the printer. Description of the Drawings
[0055] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0056] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0057] Figure 1 It is a schematic flowchart provided for an embodiment of the method for testing the motor of the printer of the present application;
[0058] Figure 2 It is a schematic detailed flowchart provided for step S10 of the method for testing the motor of the printer of the present application;
[0059] Figure 3 It is a schematic flowchart provided for another embodiment of the method for testing the motor of the printer of the present application.
[0060] The implementation, functional features, and advantages of the object of the present application will be further described in conjunction with the embodiments with reference to the drawings. Detailed Embodiments
[0061] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0062] To better understand the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific embodiments.
[0063] Currently, as the core driving component of a printing device, the performance of the motor directly affects the printing accuracy and stability. Currently, printers mainly adopt two types of driving schemes: stepper motors and DC servo motors. Stepper motors are widely used in scenarios such as paper feeding mechanisms and printhead movement due to their low-cost positioning characteristics under open-loop control, while servo motors achieve higher-precision position control in high-end models through a closed-loop feedback system. A small deviation in the motor performance will be amplified into significant printing defects through the mechanical transmission system. Therefore, it is crucial to test and calibrate the motors of printers. However, in the related art, the test dimensions of the motors are relatively single, unable to accurately evaluate the motor performance, thereby affecting the printing effect of the printer. In addition, during the motor testing process in the related art, manual intervention is required to judge the test results of the motor, which affects the test efficiency.
[0064] In view of the above defects, the present application proposes a method for testing the motors of a printer. The main technical solutions include: generating test instructions according to each test item of the motor to be tested, and sending the test instructions to the motor controller, where the test items include at least one of the following: electrical zero position calibration item, motor power supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item; the motor controller generates corresponding test cases based on the test instructions, and controls the motor to be tested to execute the test cases corresponding to the test items; receiving the test data fed back by the motor controller, and performing verification based on the test data to obtain the test results corresponding to each test item; and obtaining the test result of the motor to be tested according to the test results corresponding to each test item.
[0065] The present application generates test instructions according to each test item that the motor to be tested needs to be tested, and sends the test instructions to the motor controller; enables the motor controller to generate corresponding test cases based on the test instructions, and controls the motor to be tested to execute the test cases corresponding to the test items to obtain the test data corresponding to each test item; then the verification device performs verification based on the test data corresponding to each test item to obtain the test results corresponding to each test item; finally, obtains the test result of the motor to be tested according to the test results corresponding to each test item. Compared with the related art, the present application can simultaneously set multiple test items with different dimensions, control the motor to be tested to automatically execute each test item, and accurately evaluate the motor performance by testing the motor to be tested from different dimensions, thereby improving the printing effect of the printer.
[0066] In addition, after obtaining the test data corresponding to each item to be tested, the calibration device can automatically perform calibration based on the test data corresponding to each item to be tested to obtain the test results corresponding to each item to be tested; finally, the test result of the motor to be tested is obtained based on the test results corresponding to each item to be tested. The entire process can be automatically completed by the calibration device, that is, the calibration device can simultaneously control the motor controller to execute multiple items to be tested and automatically calibrate the multiple items to be tested, improving the test efficiency of the motor.
[0067] In one embodiment, the present application provides a printer, which includes a calibration device, a motor controller, and a motor to be tested. The calibration device is connected to the motor controller, and the motor controller is connected to the motor to be tested. When there are multiple motors to be tested, each motor to be tested is respectively connected to a motor controller, and each motor controller is then connected to the calibration device; alternatively, multiple motors to be tested can be simultaneously connected to a motor controller, and the motor controller is then connected to the calibration device. The corresponding connection method can be selected according to the specific scenario.
[0068] Among them, the calibration device is used to generate test instructions according to each item to be tested of the motor to be tested and send the test instructions to the motor controller; receive the test data fed back by the motor controller, and perform calibration according to the test data to obtain the test results corresponding to each item to be tested; obtain the test result of the motor to be tested according to the test results corresponding to each item to be tested.
[0069] Among them, the motor controller is used to control the motor to be tested to execute the test cases corresponding to the items to be tested based on the test instructions to obtain the test data corresponding to each item to be tested.
[0070] It should be noted that the type of the printer mentioned in the present application is not limited, and it can be a dot matrix printer, an inkjet printer, a laser printer, a thermal printer, a 3D printer, etc. The present application takes a 3D printer as an example.
[0071] It should be noted that the motor to be tested mentioned in the present application can be a motor for driving the printer extruder, or a motor for driving the XYZ axis of the printer, or a motor with other uses and functions on the printer. The number of the motors to be tested can be multiple, and each motor to be tested can be tested in sequence based on the test method of the motor of the printer in the present application, or each motor to be tested can be synchronously tested based on the test method of the motor of the printer in the present application to improve the motor test efficiency. Among them, the type of the motor to be tested mentioned in the present application depends on the type of the printer, and it can be a stepper motor, a brushless DC motor, a servo motor, etc. For example, for a dot matrix printer, a stepper motor is used, while a laser or inkjet printer may use a brushless DC or servo motor.
[0072] It should be noted that the testing method for the motor of the printer in this application can be applied in the self-check stage after the printer is powered on, or in any stage after the printer is powered on, including the working stage, standby stage, etc. Through the testing method for the motor of the printer in this application, the performance of the motor of the printer can be verified, thereby improving the printing effect of the printer.
[0073] Based on this, an embodiment of this application provides a testing method for the motor of a printer applied to a calibration device. Referring to Figure 1 , Figure 1 is a schematic flowchart of an embodiment of the testing method for the motor of the printer in this application. In this embodiment, the testing method for the motor of the printer includes steps S10 to S30:
[0074] Step S10, generate a test instruction according to each test item of the motor to be tested, and send the test instruction to the motor controller. Among them, the test items include at least one of the following: electrical zero position calibration item, motor supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item. The motor controller generates a corresponding test case based on the test instruction and controls the motor to be tested to execute the test case corresponding to the test item.
[0075] Among them, the test item refers to the specific function or performance index that needs to be tested for the motor of the printer. It clarifies the test objective, ensures that the test process is targeted, and can comprehensively evaluate whether the performance and function of the motor meet the requirements. The test items include at least one of the electrical zero position calibration item, motor supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item. The test items can also include the noise level of the motor, etc.
[0076] Among them, the test instruction is an instruction generated by the calibration device and sent to the motor controller, used to instruct the motor controller to execute a specific test task. It serves as the start signal of the test process to ensure that the motor can operate according to the predetermined test case. The test instruction can be an instruction sent in the form of binary code, containing the number of the test item and test parameters. The test instruction can also be a text command sent to the motor controller through a specific communication protocol such as serial communication.
[0077] Among them, electrical zero - point calibration refers to precisely calibrating the initial position of the motor; it ensures that the motor can accurately return to the predetermined position when starting or resetting, improving the motion accuracy and stability. Motor supply voltage detection refers to monitoring and recording the motor supply voltage; it ensures that the motor operates within the rated voltage range, avoiding the impact of voltage fluctuations on the motor performance and lifespan. Encoder eccentricity calibration refers to calibrating the relative position between the motor encoder and the motor shaft; it ensures that the encoder can accurately reflect the rotation position and speed of the motor, improving the accuracy and reliability of motion control. Motor operation condition detection refers to real - time monitoring and recording of the motor operation state; it can promptly detect abnormalities or faults during motor operation, ensuring the continuous and stable operation of the motor. Motor speed fluctuation detection refers to monitoring and evaluating the stability of the motor speed; it ensures that the motor can operate stably at the set speed, reducing the impact of speed fluctuations on printing accuracy. Motor abnormal protection detection refers to detecting and alarming abnormal situations such as overload and overheating of the motor; it is used to prevent the motor from being damaged due to abnormal operation, improving the safety and reliability of the system.
[0078] Among them, a test case is a specific set of test steps and conditions designed for each item to be tested, used to guide the motor controller on how to execute the test. It ensures the consistency and repeatability of the test process, improving the accuracy of the test results. The test case can include the starting conditions of the motor, operating parameters such as speed, load, test time, etc. The test case can also include specific fault simulation conditions for testing the motor's fault response and recovery capabilities.
[0079] In a feasible implementation, test instructions are generated according to each item to be tested of the motor to be tested, and sending the test instructions to the motor controller includes: selecting the item to be tested through the software interface of the calibration device, automatically generating the corresponding test instructions, and sending them to the motor controller through serial communication. Or, using a preset script file, automatically loading and sending the test instructions to the motor controller according to the item to be tested.
[0080] In a feasible implementation, the motor controller generates corresponding test cases based on the test instructions and controls the motor to be tested to execute the test cases corresponding to the items to be tested, including: the motor controller parses the test instructions, generates corresponding test cases according to the test instructions, sets the operating parameters of the motor according to the test cases, and records the real - time data of the motor as test data. Or, when the motor controller executes the test case, it real - time collects the operating data of the motor through built - in sensors and measuring devices as test data.
[0081] Step S20: Receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be tested.
[0082] Among them, the test data is the data generated by the motor during the execution of test cases, including the operating status, performance parameters, etc. of the motor. It serves as the basis for evaluating whether the performance and functions of the motor are qualified. The test data can include the real-time speed, current consumption, temperature, etc. of the motor. The test data can also include the response time, stabilization time, etc. of the motor under specific conditions.
[0083] Among them, the test results corresponding to each item to be tested are the conclusions drawn after verifying the test data of each item to be tested. It is used to judge whether the performance of the motor in each item to be tested is qualified. The test results can be a simple pass / fail judgment. The test results can also include specific performance parameter values and the degree of deviation from the standard values.
[0084] In a feasible implementation, receiving the test data fed back by the motor controller and verifying according to the test data, the test results corresponding to each item to be tested obtained include: the verification device receives the test data sent by the motor controller through serial communication and evaluates the test data using a preset verification rule such as threshold judgment.
[0085] In another feasible implementation, receiving the test data fed back by the motor controller and verifying according to the test data, the test results corresponding to each item to be tested obtained include: the verification device compares the received test data with the standard value, calculates the deviation value, and judges the test results based on the deviation value.
[0086] Step S30, obtaining the test results of the motor to be tested according to the test results corresponding to each item to be tested.
[0087] Among them, the test results of the motor to be tested are the conclusions drawn after comprehensively evaluating the test results of all items to be tested. It is used to comprehensively evaluate whether the performance and functions of the motor meet the requirements. The test results of the motor to be tested can be an overall pass / fail judgment. The test results of the motor to be tested can also include a detailed test report listing the test results and comprehensive evaluations of each item to be tested.
[0088] In a feasible implementation, obtaining the test results of the motor to be tested according to the test results corresponding to each item to be tested includes: statistically analyzing the test results of all items to be tested. If all items are qualified, the test results of the motor to be tested are qualified; otherwise, they are unqualified.
[0089] In another feasible implementation, obtaining the test results of the motor to be tested according to the test results corresponding to each item to be tested includes: generating a detailed test report listing the test results and comprehensive evaluations of each item to be tested, and obtaining the test results of the motor to be tested based on the comprehensive evaluation.
[0090] In another feasible implementation manner, obtaining the test result of the motor to be tested according to the test results corresponding to each item to be tested includes: allocating corresponding weights according to the importance corresponding to each item to be tested, and performing weighted summation according to the weights corresponding to each item to be tested and the test results corresponding to each item to be tested to obtain the test result of the motor to be tested.
[0091] In this embodiment, test instructions are generated according to each item to be tested of the motor to be tested, and the test instructions are sent to the motor controller. Among them, the items to be tested include at least one of the following: electric zero position calibration item, motor power supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item; so that the motor controller generates corresponding test cases based on the test instructions, and controls the motor to be tested to execute the test cases corresponding to the items to be tested to obtain the test data corresponding to each item to be tested; then the verification device verifies according to the test data corresponding to each item to be tested to obtain the test results corresponding to each item to be tested; finally, the test result of the motor to be tested is obtained according to the test results corresponding to each item to be tested. Compared with the related technology, the present application can simultaneously set multiple items to be tested in different dimensions, control the motor to be tested to automatically execute each item to be tested, and accurately evaluate the motor performance by testing the motor to be tested from different dimensions, thereby improving the printing effect of the printer.
[0092] Refer to Figure 2 , further, generating test instructions according to each item to be tested of the motor to be tested includes:
[0093] Step S11, determining the motor to be tested according to the currently set baud rate. Among them, for motors with different baud rates, the device objects they drive are different. The device objects include the extruder of the printer or the XYZ axis of the printer. The extruder is used to control the extrusion of the printing material, and the XYZ axis is used to control the movement of the print head.
[0094] Among them, the baud rate refers to the number of bits transmitted per second and is used to measure the speed of serial communication. In a communication system, the baud rate determines the data transmission rate and affects the communication efficiency and stability. In the present application, setting the communication baud rate to the baud rate used by the bootloader can ensure that the bootloader can correctly receive and identify the test instruction when the system sends a jump instruction. Different device objects, such as the XYZ axis and the extruder, have different communication requirements, so the corresponding baud rate needs to be set according to the device object type. For example, the baud rate of the XYZ axis is set to 230400, and the baud rate of the extruder is set to 115200.
[0095] Among them, the device object refers to the specific device entity to be controlled or tested. In a test or control system, the device object can be an extruder or XYZ axes in a printer, or other device objects in the printer that need to be driven by the motor under test.
[0096] Among them, the extruder is a component in a 3D printer used to extrude molten materials such as plastics to form printed objects. By precisely controlling the extrusion amount and speed, the extruder can build objects layer by layer along the designed path. The XYZ axes are the three-dimensional movement system in a 3D printer, representing the horizontal plane (X and Y axes) and the vertical direction (Z axis) respectively. The XYZ axes work together to enable the print head to move in three-dimensional space along a predetermined trajectory, thus completing the printing task.
[0097] In a feasible implementation, determining the motor under test according to the currently set baud rate includes: reading the currently set baud rate through a communication interface such as RS-232, USB, etc., and determining whether the motor under test is an extruder or XYZ axes according to the preset correspondence table between the baud rate and the device object.
[0098] In another feasible implementation, determining the motor under test according to the currently set baud rate includes: using specialized test software or tools, scanning the communication port and identifying the baud rate, automatically matching the corresponding device object, and displaying it on the user interface for the user to select.
[0099] Step S12, determining the test items of the motor under test according to the test requirements.
[0100] Among them, the test requirements refer to the specific requirements and objectives for testing a device or system. The test requirements are the basis for formulating the test plan and test scheme, ensuring that the test activities can cover all key functions and performance indicators.
[0101] In a feasible implementation, determining the test items of the motor under test according to the test requirements includes: manually selecting the test items according to the test outline or test plan and inputting them into the test system.
[0102] In another feasible implementation, determining the test items of the motor under test according to the test requirements includes: using test management software, automatically generating a list of test items according to the preset test template or test scheme, and displaying it on the user interface for the user to confirm.
[0103] It should be noted that when the device objects are different, the test items of the motor under test corresponding to the device object can also be set differently. For example, for the XYZ axes, the corresponding test items include encoder eccentricity calibration, speed fluctuation detection, etc. For the extruder, the corresponding test items include motor power supply voltage detection, abnormal protection detection, etc.
[0104] Step S13: Generate a test instruction according to the item to be tested.
[0105] In a feasible embodiment, generating a test instruction according to the item to be tested includes: manually writing a test instruction according to the specific requirements of the item to be tested, and sending it to the motor to be tested through a communication interface.
[0106] In another feasible embodiment, generating a test instruction according to the item to be tested includes: using a test script or a test automation tool to automatically generate a test instruction sequence according to the item to be tested and a preset test process, and automatically execute the test task. Meanwhile, the test results can be recorded in real time and a test report can be generated.
[0107] In this embodiment, by setting the communication baud rate to the baud rate used by the bootloader, it can be ensured that when the system sends a jump instruction, the bootloader can correctly receive and recognize the test instruction; in addition, the item to be tested of the motor to be tested is determined according to different test requirements, and test instructions that meet different test requirements are obtained, making the test process of the motor more flexible and targeted.
[0108] Further, if the item to be tested is an electrical zero position calibration item, receiving the test data fed back by the motor controller, and performing verification according to the test data, the test results corresponding to each item to be tested include:
[0109] Step A21: Receive the first electrical zero position values corresponding to each pole pair measured during the rotation of the motor to be tested of the extruder fed back by the motor controller.
[0110] Among them, in a motor, a pole pair refers to the number of pole pairs required for a complete magnetic pole cycle of the motor. For example, a four-pole motor has two pole pairs. The number of pole pairs is related to the rotational speed and torque characteristics of the motor. In motor control and calibration, understanding the number of pole pairs is crucial for accurately controlling the rotational position of the motor. Determine the number of pole pairs through the design specifications of the motor or information provided by the manufacturer. Or, use a motor parameter measurement device such as a motor parameter tester to directly measure the number of pole pairs of the motor.
[0111] Among them, the first electrical zero position value refers to the electrical signal value measured by an electrical system such as an encoder or a Hall sensor when the motor is at a certain specific position, usually the initial position or the reference position. The first electrical zero position value is used to determine the absolute position of the motor and is the basis for motor control and calibration. The electrical zero position value can be read using an encoder or a Hall sensor built into the motor. Or, indirectly measure the electrical zero position value through an external position sensor such as a laser rangefinder or a magnetic encoder.
[0112] In a feasible implementation, during the rotation of the motor to be measured of the extruder while receiving the feedback from the motor controller, the measured first electrical zero position values corresponding to each pole pair include: using the encoder or Hall sensor built in the motor controller to measure the electrical zero position values corresponding to each pole pair in real time and feeding these values back to the control system.
[0113] In another feasible implementation, during the rotation of the motor to be measured of the extruder while receiving the feedback from the motor controller, the measured first electrical zero position values corresponding to each pole pair include: indirectly measuring the electrical zero position values corresponding to each pole pair through an external position sensor such as a laser rangefinder and inputting the measurement data into the control system.
[0114] Step A22: Convert each first electrical zero position value to obtain the first angle value corresponding to each electrical zero position value.
[0115] Among them, the first angle value is to convert the electrical zero position value into the angle representation of the motor rotation. This usually involves converting the electrical signal into the mechanical angle. The first angle value is used to accurately control the rotation position of the motor and is the basis for realizing accurate position control and feedback. The conversion algorithm inside the motor controller can be used to convert the electrical zero position value into the first angle value. Or, the conversion from the electrical zero position value to the first angle value is realized through an external computing device such as a microprocessor or a PLC.
[0116] In a feasible implementation, converting each first electrical zero position value to obtain the first angle value corresponding to each electrical zero position value includes: using the conversion algorithm inside the motor controller to convert the electrical zero position value into an angle value. For example, calculate the total angle of a single turn (360° / number of pole pairs) according to the number of pole pairs and linearly convert the angle value according to the number of pulses.
[0117] In another feasible implementation, converting each first electrical zero position value to obtain the first angle value corresponding to each electrical zero position value includes: realizing the conversion from the electrical zero position value to the angle value through an external computing device such as a microprocessor and inputting the conversion result into the control system.
[0118] Step A23: Perform a conversion of the consumable material amount for each first angle value to obtain the actual consumable material amount extruded by the extruder.
[0119] Among them, in the application of the extruder, the actual consumable material amount refers to the amount of material actually consumed during the rotation of the motor, such as plastic filaments, molten metal, etc. The actual consumable material amount is an important indicator for measuring the motor control and the performance of the extruder and is used to ensure the accuracy and consistency of the extrusion process. The actual consumable material amount can be calculated by measuring the material flow rate at the outlet of the extruder. Or, a mass sensor or a volume sensor is used to directly measure the amount of material consumed by the extruder.
[0120] In a feasible implementation, converting the respective first angle values into the actual consumable material amount extruded by the extruder includes: establishing a conversion relationship between the angle value and the consumable material amount according to the design specifications and process requirements of the extruder, and using this relationship to calculate the actual consumable material amount.
[0121] In another feasible implementation, converting the respective first angle values into the actual consumable material amount extruded by the extruder includes: using a mass sensor or a volume sensor to directly measure the amount of material consumed by the extruder, and calculating the actual consumable material amount based on the measurement results. For example, calculating the volume according to the screw pitch (such as 0.5 mm / revolution) and the angle conversion relationship: actual consumable material amount = (angle / 360°) × pitch × cross-sectional area.
[0122] Step A24, if the actual consumable material amount is the same as the preset consumable material amount, determine that the test result corresponding to the electrical zero position calibration item is a successful test.
[0123] Among them, the preset consumable material amount is the amount of material expected to be consumed during the extrusion process, and is usually set according to the design specifications and process requirements of the extruder. The preset consumable material amount is used to compare with the actual consumable material amount to evaluate the accuracy and consistency of the extrusion process. The preset consumable material amount can be manually set according to the design specifications and process requirements of the extruder. Or use an automated control system such as PLC or DCS to dynamically set and adjust the preset consumable material amount.
[0124] In a feasible implementation, if the actual consumable material amount is the same as the preset consumable material amount, determining that the test result corresponding to the electrical zero position calibration item is a successful test includes: setting a comparator in the control system, comparing the actual consumable material amount with the preset consumable material amount, and if the two are equal or the difference is within the preset range, determining that the test is successful.
[0125] In another feasible implementation, if the actual consumable material amount is the same as the preset consumable material amount, determining that the test result corresponding to the electrical zero position calibration item is a successful test includes: using an automated control system such as PLC or DCS to dynamically compare the actual consumable material amount with the preset consumable material amount, and determining whether the test is successful based on the comparison result.
[0126] Step A25, if the actual consumable material amount is different from the preset consumable material amount, determine that the test result corresponding to the electrical zero position calibration item is a failed test.
[0127] In a feasible implementation, if the actual consumable material amount is different from the preset consumable material amount, determining that the test result corresponding to the electrical zero position calibration item is a failed test includes: setting an alarm mechanism in the control system, and when the actual consumable material amount is not equal to the preset consumable material amount, triggering an alarm and determining that the test is failed.
[0128] In another feasible implementation, if the actual consumption amount of the consumables is different from the preset consumption amount, determining that the test result corresponding to the electrical zero position calibration item is a test failure includes: using an automated control system such as a PLC or DCS to record the test data and generating a test report based on the test result. If the actual consumption amount of the consumables is not equal to the preset consumption amount, it is marked as a test failure in the test report.
[0129] In this embodiment, during the operation of the extruder, the electrical zero position values corresponding to each pole pair are converted to obtain angle values; then, based on the angle values, the actual consumption amount of the consumables extruded by the extruder is determined; finally, according to the comparison result between the actual consumption amount and the preset consumption amount, the test result corresponding to the electrical zero position calibration item is determined, which can accurately calibrate the electrical zero position of the motor to be tested of the printer's extruder, accurately control the consumption amount of the consumables extruded by the printer's extruder in the future, and avoid waste of the consumption amount.
[0130] Further, if the item to be tested is an electrical zero position calibration item, receiving the test data fed back by the motor controller and performing verification based on the test data to obtain the test results corresponding to each item to be tested includes:
[0131] Step B21, receiving the second electrical zero position values corresponding to each pole pair measured during the rotation of the motor to be tested on the XYZ axes fed back by the motor controller.
[0132] Among them, the second electrical zero position value refers to the electrical zero position value of the motor measured under each pole pair during the rotation of the motor to be tested on the XYZ axes. These values reflect the electrical state of the motor at a specific position. The second electrical zero position value is used to determine the absolute position of the motor and is the benchmark for motor control and calibration.
[0133] In a feasible implementation, receiving the second electrical zero position values corresponding to each pole pair measured during the rotation of the motor to be tested on the XYZ axes fed back by the motor controller includes: using an encoder or Hall sensor built into the motor to measure the electrical zero position values of the XYZ-axis motor under each pole pair in real time and feeding these values back to the control system.
[0134] In another feasible implementation, receiving the second electrical zero position values corresponding to each pole pair measured during the rotation of the motor to be tested on the XYZ axes fed back by the motor controller includes: indirectly measuring the electrical zero position values of the XYZ-axis motor under each pole pair through an external position sensor such as a laser rangefinder or a magnetic encoder and inputting the measurement data into the control system.
[0135] Step B22, converting each second electrical zero position value to obtain the second angle value corresponding to each second electrical zero position value.
[0136] Among them, the second angle value is obtained by converting the second electrical zero position value into the corresponding second angle value. This usually involves the process of converting an electrical signal into a mechanical angle. The second angle value is used to precisely control the rotation position of the motor and is the basis for achieving precise motor control.
[0137] In a feasible implementation, converting each second electrical zero position value to obtain the corresponding second angle value of each second electrical zero position value includes: using the conversion algorithm inside the motor controller to convert the second electrical zero position value into the second angle value. These algorithms are usually developed based on the design specifications and electrical characteristics of the motor. For example, the motor controller can pre-store a look-up table that contains the correspondence between the electrical zero position value and the second angle value. During the actual conversion process, the motor controller only needs to look up the corresponding second angle value in the look-up table according to the sampled electrical zero position value. Alternatively, the motor controller can use a mathematical model to describe the relationship between the electrical zero position value and the second angle value. This model may involve multiple parameters and variables, and parameter identification and calibration need to be carried out through experiments or simulations. During the actual conversion process, the motor controller substitutes the sampled electrical zero position value into the mathematical model for calculation to obtain the corresponding second angle value.
[0138] In another feasible implementation, converting each second electrical zero position value to obtain the corresponding second angle value of each second electrical zero position value includes: implementing the conversion from the second electrical zero position value to the angle value through an external computing device such as a microprocessor or a PLC. This requires writing the corresponding conversion program and considering the electrical and mechanical characteristics of the motor.
[0139] Step B23: Perform rotational angle conversion on each second angle value to obtain the actual rotational angles of the X, Y, and Z axes.
[0140] Among them, the actual rotational angles of the X, Y, and Z axes refer to the angles that the motor actually rotates in the three directions of X, Y, and Z. These angles reflect the motion state of the motor in three-dimensional space. The actual rotational angles of the X, Y, and Z axes are used to evaluate the motion accuracy and consistency of the motor and are important indicators for motor control and calibration.
[0141] In a feasible implementation, performing rotational angle conversion on each second angle value to obtain the actual rotational angles of the X, Y, and Z axes includes: establishing a conversion relationship between the second angle value and the actual rotational angles of the X, Y, and Z axes according to the design specifications and mechanical characteristics of the motor to calculate the actual rotational angles.
[0142] Step B24: If the actual rotational angle is different from the preset rotational angle, determine that the test result corresponding to the electrical zero position calibration item is a test success.
[0143] Among them, the preset rotation angle is the target rotation angle that the motor is expected to reach during the motor calibration process. These angles are usually set according to the design specifications and process requirements of the motor. The preset rotation angle is used to compare with the actual rotation angle to evaluate the rotation accuracy and consistency of the motor.
[0144] In a feasible implementation, if the actual rotation angle is different from the preset rotation angle, determining that the test result corresponding to the electrical zero position calibration item is a successful test includes: setting a comparator in the control system to compare the actual rotation angle with the preset rotation angle. If the two are not equal, it is determined that the test is successful. This usually means that the electrical zero position calibration of the motor is accurate because the motor can rotate at the expected angle.
[0145] In another feasible implementation, if the actual rotation angle is different from the preset rotation angle, determining that the test result corresponding to the electrical zero position calibration item is a successful test includes: using an automated test system to record and analyze the difference between the actual rotation angle and the preset rotation angle. If the difference is within an acceptable range, it is determined that the test is successful.
[0146] Step B25, if the actual rotation angle is the same as the preset rotation angle, determine that the test result corresponding to the electrical zero position calibration item is a failed test.
[0147] In a feasible implementation, if the actual rotation angle is the same as the preset rotation angle, determining that the test result corresponding to the electrical zero position calibration item is a failed test includes: setting an alarm mechanism in the control system, and when the actual rotation angle is exactly the same as the preset rotation angle, triggering an alarm and determining that the test is failed. This usually means that the electrical zero position calibration of the motor is inaccurate because the motor fails to rotate at the expected angle.
[0148] In another feasible implementation, if the actual rotation angle is the same as the preset rotation angle, determining that the test result corresponding to the electrical zero position calibration item is a failed test includes: using data analysis software to compare the difference between the actual rotation angle and the preset rotation angle. If the two are exactly the same or within a very small error range, it is determined that the test is failed and a corresponding test report is generated. This helps to identify and solve problems existing in the motor calibration process.
[0149] In this embodiment, during the working process of the XYZ axes, the electrical zero position values corresponding to each pole pair are converted to obtain angle values; then, the actual rotation angles of the XYZ axes are determined according to the angle values; finally, the test result corresponding to the electrical zero position calibration item is determined based on the comparison result between the actual rotation angles of the XYZ axes and the preset rotation angles, which can accurately calibrate the electrical zero positions of the motors to be tested on the XYZ axes of the printer, precisely control the rotation angles of the XYZ axes of the subsequent printer, and improve the printing effect of the printer.
[0150] Further, if the item to be tested is the motor supply voltage detection item, receive the test data fed back by the motor controller, and perform verification based on the test data to obtain the test results corresponding to each item to be tested, including:
[0151] Step C21, receive the supply voltage of the motor to be tested fed back by the motor controller.
[0152] Among them, the supply voltage refers to the power supply voltage received by the motor during operation. This voltage value is crucial for the normal operation of the motor. Too high or too low voltage may cause the performance of the motor to decline or be damaged. The stability of the supply voltage directly affects key performance indicators such as the output power, speed, and torque of the motor. Therefore, in the process of motor detection and calibration, the accurate measurement and control of the supply voltage are essential.
[0153] In a feasible implementation, receiving the supply voltage of the motor to be tested fed back by the motor controller includes: directly measuring the supply voltage of the motor using a voltage sensor, and transmitting the measurement result to the motor controller through an analog signal or a digital signal. The motor controller then transmits this data to the detection system for further analysis and judgment.
[0154] In another feasible implementation, receiving the supply voltage of the motor to be tested fed back by the motor controller includes: a voltage monitoring module is integrated inside the motor controller, which can monitor the supply voltage of the motor in real time. When performing the supply voltage detection item, the detection system reads the real-time supply voltage data from the motor controller through a communication interface such as CAN bus, RS485, etc.
[0155] Step C22, if the supply voltage is greater than the preset supply voltage, determine that the test result corresponding to the motor supply voltage detection item is a successful test.
[0156] Among them, the preset supply voltage refers to the standard power supply voltage value specified in the motor design or application. This value is usually determined according to the type, specification, and application scenario of the motor. The preset supply voltage is used as the reference value for motor performance testing to evaluate the performance of the motor under the standard voltage. For example, the preset supply voltage can be set to 20V.
[0157] In a feasible implementation, if the supply voltage is greater than the preset supply voltage, determining that the test result corresponding to the motor supply voltage detection item is a successful test includes: presetting a voltage threshold, that is, the preset supply voltage, and comparing the real-time measured supply voltage with this threshold. If the supply voltage is greater than the preset threshold, display the result of a successful test through the detection system interface and generate a corresponding test report.
[0158] In another feasible implementation, when the supply voltage is greater than the preset supply voltage, determining that the test result corresponding to the motor supply voltage detection item is a successful test includes: using an intelligent judgment algorithm to dynamically adjust the value of the preset supply voltage according to the type, specifications, and application scenario of the motor. When comparing the real-time supply voltage with the preset value, if the supply voltage exceeds the allowable range of the preset value and is a positive excess, it is determined that the test is successful.
[0159] Step C23, if the supply voltage is greater than or equal to the preset supply voltage, determine that the test result corresponding to the motor supply voltage detection item is a failed test.
[0160] In a feasible implementation, when the supply voltage is greater than or equal to the preset supply voltage, determining that the test result corresponding to the motor supply voltage detection item is a failed test includes: setting a voltage safety range, and if the real-time measured supply voltage exceeds this range, it is determined that the test is failed. The detection system prompts the user through the interface and generates a test report including the reason for failure.
[0161] In another feasible implementation, when the supply voltage is greater than or equal to the preset supply voltage, determining that the test result corresponding to the motor supply voltage detection item is a failed test includes: adopting a stricter judgment criterion, such as only allowing the supply voltage to fluctuate within the range of ±5% of the preset value. If it exceeds this range, it is immediately determined that the test is failed, and the user is reminded to pay attention through means such as sound and light alarms. At the same time, the detection system records the failure information for subsequent analysis and improvement.
[0162] It should be noted that if it is detected that the supply voltage is greater than or equal to the preset supply voltage, it means that the supply voltage is within the normal range, and the next step can be entered to continue the subsequent test process to ensure that the motor can perform subsequent operations under appropriate voltage conditions. If the supply voltage does not meet the standard, an abnormality is prompted.
[0163] In this embodiment, by comparing the supply voltage of the motor under test fed back by the motor controller with the preset supply voltage to determine the test result of the motor supply voltage detection item, the problem of voltage instability caused by hardware failures can be measured.
[0164] Furthermore, if the item to be tested is the encoder eccentricity calibration item, receiving the test data fed back by the motor controller and performing verification according to the test data to obtain the test results corresponding to each item to be tested includes:
[0165] Step D21, receiving the calibration result fed back by the motor controller.
[0166] Among them, the calibration result refers to the parameters or indicators of the current state of the encoder obtained through measurement or calculation after the calibration process, which is used to evaluate whether the encoder meets the predetermined performance requirements or standards. The calibration result is an important basis for judging whether the encoder is eccentric and the degree of eccentricity, and helps to determine whether the encoder needs adjustment or repair.
[0167] In a feasible implementation, the calibration results received from the motor controller include: using a dedicated encoder calibration device, connecting it to the motor controller, and starting the encoder eccentricity calibration program. After the calibration program is executed, the calibration result data sent by the motor controller is received through serial communication such as RS-485 or CAN bus.
[0168] In another feasible implementation, the calibration results received from the motor controller include: using an embedded system such as a microcontroller or DSP to complete the calibration function, and performing encoder eccentricity calibration through software algorithms. After calibration is completed, the calibration results stored in the non-volatile memory are read through interfaces such as I2C or SPI, or the results are sent to a remote receiving end through wireless communication such as Bluetooth or Wi-Fi.
[0169] Step D22, if the calibration result is the same as the preset calibration result, determine that the test result corresponding to the encoder eccentricity calibration item is a successful test.
[0170] Among them, the preset calibration result refers to the ideal state or parameter value that the encoder should achieve, set according to the design specifications, usage requirements or industry standards of the encoder before the calibration starts. The preset calibration result serves as a reference benchmark for calibration, used to compare with the actual calibration result, so as to judge whether the encoder meets the expected performance requirements.
[0171] In a feasible implementation, if the calibration result is the same as the preset calibration result, determining that the test result corresponding to the encoder eccentricity calibration item is a successful test includes: setting a comparison function in the calibration program to compare the received calibration result with the preset calibration result item by item. If all parameters match or the error is within the allowable range, the test success information is displayed through a display device such as an LED indicator or an LCD screen.
[0172] In another feasible implementation, if the calibration result is the same as the preset calibration result, determining that the test result corresponding to the encoder eccentricity calibration item is a successful test includes: writing a calibration verification script to automatically read the calibration result file and the preset calibration result file. Through the logical judgment in the script, if the two are consistent, a test success report is generated and sent to the user through email or cloud storage service.
[0173] Step D23, if the calibration result is different from the preset calibration result, determine that the test result corresponding to the encoder eccentricity calibration item is a failed test.
[0174] In a feasible embodiment, if the calibration result is different from the preset calibration result, determining that the test result corresponding to the encoder eccentricity calibration item is a test failure includes: in the comparison function of the calibration program, if it is detected that there is a difference between the calibration result and the preset calibration result and the difference exceeds the allowable range, an alarm mechanism is triggered. The alarm mechanism can remind the user by means of sound prompts, light flashes, etc., and display specific error messages or recommended adjustment measures on the display screen.
[0175] In another feasible embodiment, if the calibration result is different from the preset calibration result, determining that the test result corresponding to the encoder eccentricity calibration item is a test failure includes: in the calibration verification script, if the comparison result shows that the calibration result is inconsistent with the preset calibration result, the script automatically records the error message and generates a test failure report. The test failure report can include a detailed difference analysis, possible failure causes, and recommended solution steps, and is sent to the tester via email or SMS service.
[0176] In this embodiment, the test result corresponding to the encoder eccentricity calibration item is determined by comparing the calibration result fed back by the motor controller with the preset calibration result, realizing the encoder eccentricity calibration.
[0177] Further, if the item to be tested is a motor operation condition detection item, receiving the test data fed back by the motor controller and performing verification according to the test data to obtain the test results corresponding to each item to be tested includes:
[0178] Step E21, sending a restart command for the motor to be tested to the motor controller, where the motor controller performs a restart operation on the motor to be tested based on the restart command.
[0179] Among them, the restart command refers to a signal or command sent by the test system or an external device to the motor controller, used to instruct the motor controller to restart or reset the motor to be tested. The restart command is usually used after a motor operation test or calibration to restore the initial state of the motor for the next round of testing or to ensure the motor operates under specific conditions. This helps to verify the control ability of the motor controller over the motor and the stability and response speed of the motor after restart.
[0180] In a feasible embodiment, sending a restart command for the motor to be tested to the motor controller includes: establishing a communication connection between the test system and the motor controller using a serial communication protocol such as RS-232, RS-485 or a network communication protocol such as TCP / IP. Compiling and sending a communication data packet containing the restart command to the motor controller, and the data packet may contain information such as specific command codes, check codes, and motor identifiers.
[0181] In another feasible implementation, sending a restart command for the motor to be tested to the motor controller includes: directly connecting the restart signal line of the motor controller using the I / O interface of the test system, such as a digital output port. By setting the level state of the I / O interface, such as high level or low level, the restart function of the motor controller is triggered, thereby realizing the restart operation of the motor.
[0182] Step E22, detect whether the first feedback data from the motor controller is received.
[0183] Among them, the first feedback data refers to the confirmation information or status data sent by the motor controller to the test system or external device after receiving the restart command and executing the restart operation. The first feedback data is used to confirm whether the motor controller has correctly executed the restart command, and whether the motor has been successfully restarted and is in the expected operating state. This helps the test system evaluate the responsiveness and reliability of the motor controller, as well as the performance of the motor after restart.
[0184] In a feasible implementation, detecting whether the first feedback data from the motor controller is received includes: setting a communication listener or receiving buffer in the test system to receive communication data packets from the motor controller. Analyze the received data packets to check whether they contain the expected confirmation information or status data, such as restart success, motor ready, etc.
[0185] In another feasible implementation, detecting whether the first feedback data from the motor controller is received includes: connecting the status feedback line of the motor controller using the I / O interface of the test system, such as a digital input port. By detecting the change in the level state of the I / O interface, such as from low level to high level, it is judged whether the motor controller has sent the first feedback data, which usually means that the motor has been successfully restarted and is in the operating state.
[0186] If so, step E23, determine that the test result of the motor operation condition detection item is test success.
[0187] In a feasible implementation, determining that the test result of the motor operation condition detection item is test success includes: displaying the test result on the user interface of the test system, such as using text prompts like green light or test success. Record the test result in the test log or database for subsequent analysis and reporting.
[0188] In another feasible implementation, determining that the test result of the motor operation condition detection item is test success includes: through the internal logic judgment of the test system, if the first feedback data is received, automatically trigger the next test step or enter the standby state. At the same time, the test result notification can be sent to external devices such as the upper computer, printer, etc. through the communication interface of the test system.
[0189] Otherwise, in step E24, determine that the test result of the motor operation condition detection item is a test failure.
[0190] In a feasible implementation manner, determining that the test result of the motor operation condition detection item is a test failure includes: displaying an error message on the user interface of the test system, such as text prompts like "using a red light" or "test failure". Provide detailed error information or fault prompts to help users quickly locate the cause of the problem.
[0191] In another feasible implementation manner, determining that the test result of the motor operation condition detection item is a test failure includes: if the first feedback data is not received, the test system can automatically trigger a fault handling process, such as restarting the test system, sending a fault alarm, etc. At the same time, record the test failure result in the test log or database, and generate a corresponding test report or fault analysis report.
[0192] In this embodiment, by detecting whether to receive the first feedback data of the motor controller, and then determining the test result of the motor operation condition detection item, the detection of the motor operation condition is realized.
[0193] Furthermore, if the item to be tested is the motor speed fluctuation detection item, receive the test data fed back by the motor controller, and perform verification according to the test data to obtain the test results corresponding to each item to be tested, including:
[0194] Step F21, receive the maximum operating speed and the minimum operating speed of the motor to be tested fed back by the motor controller, and query the protection code.
[0195] Among them, the maximum operating speed refers to the highest speed that the motor to be tested can reach under normal operating conditions. It is used to evaluate the performance limit of the motor to ensure that the motor can still maintain stability and efficiency during high-speed operation. The minimum operating speed refers to the lowest speed that the motor to be tested can maintain under normal operating conditions. It is used to test the stability and response ability of the motor during low-speed operation to ensure that the motor can still maintain stable low-speed operation when the load changes. The protection code is a set of codes used by the motor controller to indicate the current state or fault type of the motor. By reading the protection code, the operating state or fault information of the motor can be quickly understood, and corresponding maintenance measures can be taken.
[0196] In a feasible implementation manner, receive a data packet containing the maximum operating speed and the minimum operating speed from the motor controller through a serial communication or network communication protocol. Use a specific query command or read function to obtain the current protection code from the motor controller.
[0197] In another feasible implementation, an analog voltage or current signal representing the maximum operating speed and the minimum operating speed is read from the motor controller using an I / O interface or an analog signal interface, and conversion calculations are performed. The protection code is queried by directly accessing the memory or registers of the motor controller or using a dedicated diagnostic tool.
[0198] Step F22: Determine the speed difference between the maximum operating speed and the minimum operating speed.
[0199] Step F23: If the speed difference is less than the preset difference and the protection code is the preset protection code, determine that the test result corresponding to the motor speed fluctuation detection item is a successful test.
[0200] Among them, the preset protection code refers to the protection code set before the test, which represents the protection code that the motor under test should have during normal operation or under specific test conditions. It is used to compare with the actually read protection code to verify whether the motor under test is in the expected operating state. For example, the preset protection code can be set to 0.
[0201] Step F24: If the speed difference is greater than or equal to the preset difference, or the protection code is not the preset protection code, determine that the test result corresponding to the motor speed fluctuation detection item is a failed test.
[0202] In this embodiment, the test result corresponding to the motor speed fluctuation detection item is jointly determined by the comparison result between the speed difference between the maximum operating speed and the minimum operating speed and the preset difference, and the comparison result between the protection code and the preset protection code, improving the accuracy of the test result corresponding to the motor speed fluctuation detection item.
[0203] Furthermore, if the item under test is the motor abnormal protection detection item, receive the test data fed back by the motor controller, and perform verification based on the test data. The test results corresponding to each item under test include:
[0204] Step G21: Detect whether the second feedback data from the motor controller is received.
[0205] Among them, the second feedback data refers to the specific data or signal sent by the motor controller to the test system when the motor controller detects motor abnormalities such as overheating, overcurrent, short circuit, etc. These data usually contain information such as the type of abnormality, the level of abnormality, and the timestamp of the occurrence of the abnormality. The second feedback data is an important basis for evaluating the effectiveness of the motor abnormal protection mechanism. By receiving and analyzing these data, the test system can determine whether the motor controller can respond in a timely manner when detecting an abnormality and take appropriate protection measures such as cutting off the power supply, reducing the speed, etc., thereby ensuring the safe operation of the motor.
[0206] In a feasible embodiment, a dedicated listening thread or callback function is set in the test system to detect the data input from the motor controller in real time. When data is received, the data content is parsed to determine whether it is the second feedback data (according to the data format, specific fields, etc.).
[0207] In another feasible embodiment, using the communication protocol between the test system and the motor controller, query commands are sent regularly to request the motor controller to send the current status or abnormal information. The query results are analyzed. If they contain relevant information of the second feedback data, it is confirmed that the second feedback data has been received.
[0208] If so, in step G22, it is determined that the test result of the motor abnormal protection detection item is a successful test.
[0209] In a feasible embodiment, a status flag bit or variable is set in the test system to record whether the second feedback data has been received. When it is confirmed that the second feedback data has been received, the status flag bit is set to successful, and the result is recorded in the test report.
[0210] In another feasible embodiment, the user interface or log system of the test system is used to display the test progress and results in real time. When the second feedback data is received, a prompt message indicating a successful test is displayed through the user interface, and the test result is saved to the log file.
[0211] If not, in step G23, it is determined that the test result of the motor abnormal protection detection item is a failed test.
[0212] In a feasible embodiment, a timeout mechanism is set in the test system. If the second feedback data is not received within the specified time, a timeout event is triggered. When the timeout event occurs, the test status is set to failed, and the reason for failure such as not receiving the abnormal protection feedback is recorded in the test report.
[0213] In another feasible embodiment, using the error handling mechanism of the test system, when the second feedback data is not received, an error code or abnormal information is generated. According to the error code or abnormal information, the test result is determined to be failed, and the corresponding error information is displayed through the user interface or log system. At the same time, the error information can be sent to the tester for further troubleshooting and repair.
[0214] In this embodiment, by detecting whether the second feedback data of the motor controller is received, and then determining the test result of the motor abnormal protection detection item, the motor abnormal protection is realized.
[0215] Based on the same inventive concept, an embodiment of the present application provides a test method for a motor of a printer applied to a motor controller, referring to Figure 3 ,Figure 3 It is a schematic flowchart of another embodiment of the test method for the motor of the printer in this application. In this embodiment, the test method for the motor of the printer includes steps S110 to S140:
[0216] Step S110, receive the test instruction sent by the calibration device, and parse the test instruction to obtain the item to be tested.
[0217] Among them, the calibration device generates a test instruction according to each item to be tested of the motor to be tested, and sends the test instruction to the motor controller. Further, the calibration device determines the motor to be tested according to the currently set baud rate. Among them, the device objects driven by the motors to be tested with different baud rates are different, and the device objects include the extruder of the printer or the XYZ axis of the printer; determine the items to be tested of the motor to be tested according to the test requirements, where the items to be tested include at least one of the following: electrical zero position calibration item, motor power supply voltage detection item, encoder eccentricity calibration item, motor operation condition detection item, motor speed fluctuation detection item, and motor abnormal protection detection item; generate a test instruction according to the item to be tested.
[0218] Step S120, generate a test case corresponding to the item to be tested, and determine the motor control parameters corresponding to the item to be tested according to the test case.
[0219] Step S130, control the motor to be tested to run based on the motor control parameters, and obtain the test data corresponding to the item to be tested.
[0220] In a feasible embodiment, if the item to be tested is the encoder eccentricity calibration item, determine the rotation time of the motor to be tested; control the motor to be tested to run based on the rotation time, and obtain the test data corresponding to the encoder eccentricity calibration item.
[0221] In another feasible embodiment, if the item to be tested is the electrical zero position calibration item, determine the rotation direction of the motor to be tested and the number of rotations in each rotation direction; control the motor to be tested to run based on the rotation direction and the number of rotations, and obtain the test data corresponding to the electrical zero position calibration item.
[0222] Step S140, feedback the test data to the calibration device, where the calibration device determines the test result of the motor to be tested according to the test data.
[0223] Among them, the calibration device receives the test data fed back by the motor controller, and performs calibration according to the test data to obtain the test results corresponding to each item to be tested; obtain the test result of the motor to be tested according to the test results corresponding to each item to be tested. The specific steps for the calibration device to receive the test data fed back by the motor controller and perform calibration according to the test data to obtain the test results corresponding to each item to be tested can refer to the above embodiment and will not be elaborated here.
[0224] In this embodiment, the motor controller receives a test instruction sent by a verification device to obtain a test item, and controls the motor under test to operate based on motor control parameters to obtain test data corresponding to the test item, enabling the motor controller to control the motor under test to automatically execute each test item and control the motor under test to be tested from different dimensions, so as to accurately evaluate the motor performance and improve the printing effect of the printer.
[0225] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the test method of the motor of the printer in this application. Based on this technical concept, more forms of simple transformation are within the protection scope of this application.
[0226] Based on the same inventive concept, this application provides a verification device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the test method of the motor of the printer in the above embodiment.
[0227] The verification device provided by this application adopts the test method of the motor of the printer in the above embodiment, and can solve the technical problem that the single dimension of motor testing affects the printing effect of the printer. Compared with the prior art, the beneficial effects of the verification device provided by this application are the same as those of the test method of the motor of the printer provided in the above embodiment, and other technical features in this verification device are the same as those disclosed in the method of the above embodiment, which will not be elaborated here.
[0228] Based on the same inventive concept, this application provides a motor controller, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the test method of the motor of the printer in the above embodiment.
[0229] The motor controller provided by this application adopts the test method of the motor of the printer in the above embodiment, and can solve the technical problem that the single dimension of motor testing affects the printing effect of the printer. Compared with the prior art, the beneficial effects of the motor controller provided by this application are the same as those of the test method of the motor of the printer provided in the above embodiment, and other technical features in this motor controller are the same as those disclosed in the method of the above embodiment, which will not be elaborated here.
[0230] Based on the same inventive concept, this application provides a printer, which includes a verification device, a motor controller, and a motor under test, wherein the motor controller is electrically connected to the verification device and the motor under test.
[0231] The printer provided by this application adopts the testing method for the motor of the printer in the above embodiment, which can solve the technical problem that the single dimension of motor testing affects the printing effect of the printer. Compared with the prior art, the beneficial effects of the printer provided by this application are the same as those of the testing method for the motor of the printer provided in the above embodiment, and other technical features in this printer are the same as those disclosed in the above embodiment method, which will not be elaborated here.
[0232] The above are only partial embodiments of this application, and thus do not limit the patent scope of this application. Any equivalent structural transformation made under the technical concept of this application by using the content of the specification and drawings of this application, or any direct / indirect application in other related technical fields, is included in the patent protection scope of this application.
Claims
1. A method for testing a motor of a printer, characterized in that: Applied to a calibration device, the calibration device is electrically connected to a motor controller of the printer, and the testing method of the motor of the printer includes: Generate a test instruction according to each test item of the motor to be tested, and send the test instruction to the motor controller, wherein the test items include: at least one of an electrical zero position calibration item, a motor power supply voltage detection item, an encoder eccentricity calibration item, a motor operation condition detection item, a motor speed fluctuation detection item, and a motor abnormal protection detection item, and the motor controller generates a corresponding test case based on the test instruction, and controls the motor to be tested to execute the test case corresponding to the test item; Receive the test data fed back by the motor controller, and perform verification according to the test data to obtain the test results corresponding to each of the items to be tested; The test result of the motor to be tested is obtained according to the test results corresponding to each of the items to be tested.
2. The method for testing a motor of a printer as claimed in claim 1, characterized in that: The step of generating a test instruction according to each test item of the motor to be tested comprises: Determine the motor to be tested according to the currently set baud rate, wherein different baud rates drive different device objects of the motor to be tested, and the device object includes an extruder of the printer or an XYZ axis of the printer, the extruder is used to control the extrusion of printing materials, and the XYZ axis is used to control the movement of the print head; Determine the test items of the motor to be tested according to the test requirements; A test instruction is generated according to the item to be tested.
3. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is an electrical zero calibration item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each of the items to be tested includes: Receiving the first electrical zero position value corresponding to each pole pair measured during the rotation of the motor to be tested of the extruder fed back by the motor controller; Convert each of the first electrical zero position values to obtain a first angle value corresponding to each of the electrical zero position values; Convert the consumable amount for each of the first angle values to obtain the actual consumable amount extruded by the extruder; If the actual consumable amount is the same as the preset consumable amount, determining that the test result corresponding to the electrical zero calibration item is a successful test; If the actual consumable amount is different from the preset consumable amount, it is determined that the test result corresponding to the electrical zero calibration item is a test failure.
4. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is an electrical zero calibration item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each of the items to be tested includes: Receiving the second electrical zero position value corresponding to each pole pair during the rotation of the motor to be tested of the XYZ axis fed back by the motor controller; Convert each of the second electrical zero position values to obtain a second angle value corresponding to each of the second electrical zero position values; Convert each of the second angle values into a rotation angle to obtain an actual rotation angle of the XYZ axis; If the actual rotation angle is different from the preset rotation angle, determining that the test result corresponding to the electrical zero position calibration item is a successful test; If the actual rotation angle is the same as the preset rotation angle, it is determined that the test result corresponding to the electrical zero position calibration item is a test failure.
5. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is a motor power supply voltage detection item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each of the items to be tested includes: Receiving the power supply voltage of the motor to be tested fed back by the motor controller; If the power supply voltage is greater than the preset power supply voltage, determining that the test result corresponding to the motor power supply voltage detection item is a test success; If the power supply voltage is greater than or equal to the preset power supply voltage, it is determined that the test result corresponding to the motor power supply voltage detection item is a test failure.
6. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is an encoder eccentricity calibration item, the receiving of the test data fed back by the motor controller and the verification according to the test data to obtain the test results corresponding to each of the items to be tested include: Receiving a calibration result fed back by the motor controller; If the calibration result is the same as the preset calibration result, determining that the test result corresponding to the encoder eccentricity calibration item is a successful test; If the calibration result is different from the preset calibration result, it is determined that the test result corresponding to the encoder eccentricity calibration item is a test failure.
7. The method for testing a motor of a printer as claimed in claim 6, characterized in that: If the item to be tested is a motor operation condition detection item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each item to be tested includes: Sending a restart instruction of the motor to be tested to the motor controller, wherein the motor controller restarts the motor to be tested based on the restart instruction; detecting whether first feedback data of the motor controller is received; If yes, determine that the test result of the motor operation condition detection item is a successful test; If not, it is determined that the test result of the motor operation condition detection item is a test failure.
8. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is a motor speed fluctuation detection item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each of the items to be tested includes: Receive the maximum operating speed and the minimum operating speed of the motor to be tested fed back by the motor controller, and query the protection code; determining a speed difference between the maximum operating speed and the minimum operating speed; If the speed difference is less than the preset difference and the protection code is the preset protection code, determining that the test result corresponding to the motor speed fluctuation detection item is a test success; If the speed difference is greater than or equal to the preset difference, or the protection code is not the preset protection code, it is determined that the test result corresponding to the motor speed fluctuation detection item is a test failure.
9. The method for testing a motor of a printer as claimed in claim 1 or 2, characterized in that: If the item to be tested is a motor abnormal protection detection item, the receiving of the test data fed back by the motor controller and verification according to the test data to obtain the test results corresponding to each item to be tested includes: detecting whether second feedback data of the motor controller is received; If yes, determine that the test result of the motor abnormality protection detection item is a successful test; If not, it is determined that the test result of the motor abnormality protection detection item is a test failure.
10. A method for testing a motor of a printer, characterized in that: Applied to a motor controller, the motor controller is connected to a calibration device and a motor to be tested of the printer, and the testing method of the motor of the printer includes: Receiving a test instruction sent by the verification device, parsing the test instruction to obtain an item to be tested; Generate a test case corresponding to the item to be tested, and determine the motor control parameters corresponding to the item to be tested according to the test case; Controlling the motor to be tested to run based on the motor control parameters to obtain test data corresponding to the item to be tested; The test data is fed back to the verification device, wherein the verification device determines the test result of the motor to be tested according to the test data.
11. A calibration device, characterized in that: The verification device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for testing a motor of a printer as claimed in any one of claims 1 to 9.
12. A motor controller, characterized in that: The motor controller comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for testing a motor of a printer according to claim 10 .
13. A printer, characterized in that: The printer comprises the calibration device as claimed in claim 11, the motor controller as claimed in claim 12, and a motor to be tested, wherein the motor controller is electrically connected to the calibration device and the motor to be tested.