Fault positioning method and device, storage medium and computer program product
By collecting and analyzing operation data in the servo drive, sending abnormal data to the main station to obtain the fault operation time period, and using the data of this time period for fault location, the problem of inaccurate fault location of the servo drive is solved and more efficient fault analysis and troubleshooting.
Patent Information
- Application Number
- CN202311037797.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-16
- Publication Date
- 2025-02-21
AI Technical Summary
In the prior art, the fault location of the servo drive is inaccurate, which leads to difficulty in analyzing and troubleshooting.
By collecting running data in the servo drive and storing it to the storage unit, it is sent to the main station when abnormal data is detected. The main station determines the fault running time period based on the abnormal data and returns it to the controller to obtain the faulty servo running data, and then performs accurate results fault location.
Accurate fault location of servo drives is achieved, the time and manpower required to troubleshoot faults is reduced, and the efficiency of fault analysis is improved.
Smart Images

Figure CN119493411A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of servo drives, and in particular to a fault location method, device, storage medium and computer program product. Background Art
[0002] With the continuous development of automation control technology, servo drives are widely used in automation equipment.
[0003] Servo drives usually use a three-loop control algorithm based on vector control: current, speed, and position. The control process is computationally intensive and complex in design, and data in each computational link may experience input errors, overflows, or configuration errors.
[0004] In the related art, in the process of controlling an AC servo drive, the control position where the servo drive has a fault is mainly analyzed through some important servo operation data.
[0005] However, in the related art, there is a problem of inaccurate fault location of the servo drive. Summary of the invention
[0006] Based on this, it is necessary to provide a fault location method, device, storage medium and computer program product to address the above technical problems, which can accurately locate the fault of the servo drive.
[0007] In a first aspect, the present application provides a fault location method, the method comprising:
[0008] In the process of storing the collected servo operation data of the servo driver into the storage unit, if it is detected that the servo driver generates abnormal servo operation data, the abnormal servo operation data is sent to the master station, and the collection is stopped after a preset time interval;
[0009] Receiving the fault operation time period sent by the master station according to the abnormal servo operation data;
[0010] The fault servo operation data corresponding to the fault operation time period is sent to the master station to instruct the master station to locate the fault of the servo drive according to the fault servo operation data.
[0011] In one embodiment, the process of storing the collected servo operation data of the servo drive into a storage unit includes:
[0012] Obtain the storage address of the storage unit where the servo operation data is written;
[0013] The servo operation data in the plurality of registers in the controller are stored in the storage unit based on the storage address.
[0014] In one embodiment, obtaining a storage address of a storage unit where servo operation data is written includes:
[0015] Counting all control loops in the servo operation data, and determining the storage offset address of each control loop;
[0016] The servo operation data in each control loop is counted, and a storage sub-address of each servo operation data in each control loop in the storage offset address is determined.
[0017] In one embodiment, based on the storage address, storing the servo operation data in the plurality of registers in the controller into the storage unit comprises:
[0018] Based on the mapping relationship and storage addresses between the plurality of registers and the storage units, the servo operation data in each register is stored in the storage unit.
[0019] In one embodiment, stopping the collection after a preset time interval includes:
[0020] The servo operation data of the servo drive collected within a preset time period is stored in the storage unit according to the abnormal data writing mode;
[0021] After the preset time, stop writing servo operation data.
[0022] In one embodiment, storing the servo operation data of the servo drive collected within a preset time period into a storage unit according to an abnormal data writing mode includes:
[0023] Receive abnormal data writing mode sent by the master station;
[0024] If the abnormal data writing mode is the continuous writing mode, the collected servo operation data of the servo driver is continuously stored in the storage unit according to the continuous writing mode;
[0025] If the abnormal data writing mode is the interval writing mode, the collected servo operation data of the servo driver is stored in the storage unit at preset intervals according to the interval writing mode.
[0026] In a second aspect, the present application also provides a fault location method, the method comprising:
[0027] receiving abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit;
[0028] Sending the fault operation time period corresponding to the abnormal servo operation data to the controller;
[0029] receiving the fault servo operation data corresponding to the fault operation time period sent by the controller;
[0030] The servo drive fault is located based on the faulty servo operation data.
[0031] In a third aspect, the present application further provides a fault location device, the device comprising:
[0032] A processing module, used for, in the process of storing the collected servo operation data of the servo drive in the storage unit, if it is detected that the servo drive generates abnormal servo operation data, sending the abnormal servo operation data to the master station, and stopping the collection after a preset time interval;
[0033] A first receiving module is used to receive the fault operation time period sent by the master station according to the abnormal servo operation data;
[0034] The first sending module is used to send the fault servo operation data corresponding to the fault operation time period to the master station, so as to instruct the master station to locate the fault of the servo driver according to the fault servo operation data.
[0035] In a fourth aspect, the present application further provides a fault location device, the device comprising:
[0036] The second receiving module is used to receive abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit;
[0037] A second sending module is used to send the fault operation time period corresponding to the abnormal servo operation data to the controller;
[0038] A third receiving module is used to receive the fault servo operation data corresponding to the fault operation time period sent by the controller;
[0039] The positioning module is used to locate the fault of the servo drive according to the faulty servo operation data.
[0040] In a fifth aspect, the present application further provides a computer device, which includes a storage unit and a processor, wherein the storage unit stores a computer program, and when the processor executes the computer program, the content of any one of the fault location method embodiments in the first aspect is implemented.
[0041] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the content of any one of the fault location method embodiments in the first aspect when the computer program is executed by a processor.
[0042] In a seventh aspect, the present application further provides a computer program product, including a computer program, which implements the content of any one of the fault location method embodiments in the first aspect when executed by a processor.
[0043] The above-mentioned fault location method, device, storage medium and computer program product, in the process of storing the collected servo operation data of the servo drive into the storage unit, if it is detected that the servo drive generates abnormal servo operation data, then the abnormal servo operation data is sent to the main station, and the collection is stopped after a preset interval, and the fault operation time period sent by the main station according to the abnormal servo operation data is received, and the fault servo operation data corresponding to the fault operation time period is sent to the main station to instruct the main station to locate the fault of the servo drive according to the fault servo operation data. The controller in the method is internally provided with a storage unit to store part of the data in the servo operation process. After abnormal data appears in the servo operation data, the collection is stopped after a preset interval, so that the main station can obtain the data of a period of time before and after the abnormal servo operation data, that is, the fault servo operation data, and when analyzing the abnormal cause, the fault position and the fault cause can be more accurately located. In addition, in the present application, the data sent by the controller to the main station only includes the data of a period of time before and after the abnormal servo operation data, and the amount of data is much smaller than the important data in the entire control process, so the communication speed of the communication interface between the controller and the main station is also relatively fast. In addition, the data stored in the master station only includes data for a period of time before and after the abnormal servo operation data, and the amount of data is greatly reduced, which also improves the storage speed of the master station. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram of a control method in a related art in an embodiment;
[0045] Figure 2 An application environment diagram of a fault location method in an embodiment;
[0046] Figure 3 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0047] Figure 4 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0048] Figure 5 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0049] Figure 6 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0050] Figure 7 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0051] Figure 8 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0052] Fig. 9 is a schematic diagram of a controller and a master station in one embodiment;
[0053] Fig.10 A schematic diagram of a flow chart of a fault location method in an embodiment;
[0054] Fig.11 is a schematic diagram of the structure of a fault location device in one embodiment;
[0055] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] Before introducing the technical solution in the application in detail, a brief introduction to the background technology in this application is first given.
[0058] Servo drives are an important part of modern motion control and are widely used in automation equipment such as industrial robots and CNC machining centers. In particular, servo drives that control AC permanent magnet synchronous motors have become a hot research topic at home and abroad. The three-loop control algorithm of current, speed and position based on vector control is commonly used in the current AC servo drive design. Whether the speed closed-loop design in the algorithm is reasonable or not plays a key role in the entire servo control system, especially the speed control performance.
[0059] In the three-loop control design based on Field Programmable Gate Array (FPGA), due to the large amount of calculation and complexity, and the lack of historical experience, there is a certain probability that the data in each calculation link will have input errors, overflows, or configuration errors. If there is no effective means to analyze the problem, it will lead to a problem that cannot be analyzed and located after it occurs, or it will take a huge amount of manpower and material resources to make temporary versions, oscilloscope measurements, or increase manpower for joint discussions and other inefficient attempts.
[0060] In the related art, the servo drive generates servo operation data during the control process. The controller can select some more important servo operation data from the data and report them to the main station at regular intervals through the database usage interface (PHP DataObjects, PDO) in PHP. The main station reversely deduce the cause of the abnormal data based on the more important servo operation data reported at regular intervals. Figure 1 The flowchart of the control method in the related art includes: S101: obtaining the target data of each servo operating parameter; S102: obtaining the error value between the target data of each servo operating parameter and the current data; S103: judging whether the error value is greater than the preset error value, if not, ending the control process; if yes, executing step S104; S104: based on the error value between the target data of each servo operating parameter and the current data, adjusting the current data of each servo operating parameter by using the proportional, integral and differential control methods, obtaining the adjusted data, and using the adjusted data as the current data, continuing to execute the process of step S102 until the error value between the target data and the current data is less than or equal to the preset error value. The servo operating parameters can be relatively critical operating parameters such as speed, position, and current.
[0061] The related art method only uploads relatively important servo operation data, while the servo operation parameters are far more than Figure 1 In the three places in the figure, the amount of data obtained by the master station is extremely limited. On the other hand, in the process of reporting data, the data of the entire process is reported to the master station, so the amount of data passing through PDO is large, resulting in the limited communication speed of PDO. On this basis, after the master station receives a large amount of data, its storage speed will also be limited. In addition, since some abnormal servo operation data are sporadic, the data at the time of the sporadic problem cannot be traced back.
[0062] In view of the problems of the above-mentioned related technologies, the present application proposes a fault location method, through which the technical problems existing in the related technologies are solved. The fault location method is introduced in detail below.
[0063] The fault location method provided in the embodiment of the present application can be applied to Figure 2In the application environment shown. The controller 101 communicates with the master station 102 through the network. After the controller 101 obtains the abnormal servo operation data, it sends the abnormal servo operation data to the master station 102. The master station 102 sends the fault operation time period corresponding to the abnormal servo operation data to the controller 101. The controller 101 sends the fault servo operation data to the master station 102 based on the fault operation time period. The controller 101 can be a microcontroller unit (MCU), a central processing unit (CPU), a digital signal processor (DSP), a programmable logic device (Field Programmable Gate Array, FPGA), a single-chip microcomputer and other control devices.
[0064] In one embodiment, Figure 3 As shown, a fault location method is provided, which is applied to Figure 1 The controller in the example is used to illustrate the following steps:
[0065] S201, in the process of storing the collected servo operation data of the servo driver into the storage unit, if it is detected that the servo driver generates abnormal servo operation data, the abnormal servo operation data is sent to the master station, and the collection is stopped after a preset time interval.
[0066] The storage unit refers to a component in the controller used to store servo operation data. The size of the storage space of the storage unit can be set according to actual conditions. The storage unit includes two ports A / B. Port A is used to write servo operation data, and port B is used to provide servo operation data to the master station. When the controller sends servo operation data to the master station, it sends the data in the storage unit to the master station. For example, sending abnormal servo operation data to the master station actually sends the abnormal servo operation data in the storage unit to the master station. For example, the storage unit can be a semiconductor memory, a magnetic surface memory, or an optical memory.
[0067] In this embodiment, the process of storing the servo operation data of the servo driver into the storage unit is briefly introduced. The servo operation data of the servo driver is temporarily stored in multiple registers in the controller, and storing the servo operation data in the storage unit means determining the servo operation data to be stored from the multiple registers, and storing the servo operation data from the registers into the storage unit.
[0068] When the controller stores the servo operation data from the register to the storage unit, if it is determined that there is abnormal servo operation data in the servo operation data, the controller sends the abnormal servo operation data in the storage unit to the master station. The master station can preliminarily determine the abnormal cause of the abnormal servo operation data based on the abnormal servo operation data, and determine the fault operation time period required for troubleshooting the abnormal cause.
[0069] At the same time, the controller continues to obtain subsequent servo operation data from the register and stores it in the storage unit while sending the abnormal servo operation data to the master station. In this way, the servo operation data within a preset time period after the abnormal servo operation data appears is obtained. After the preset time period, the servo operation data in the memory is stopped from being stored in the storage unit.
[0070] S202, receiving the fault operation time period sent by the master station according to the abnormal servo operation data.
[0071] In this embodiment, after the controller sends the abnormal servo operation data in the storage unit to the main station, the main station can perform a preliminary analysis on the abnormal servo operation data. In order to further determine the cause of the abnormality, the main station determines the fault operation time period based on the results of the preliminary analysis. The controller receives the fault operation time period sent by the main station. It should be noted that the fault operation time period includes the time and the front and back time periods corresponding to the abnormal servo operation data, and the lengths of the front and back time periods of the abnormal servo operation data can be the same or different. The fault operation time period can also only include the time period and the front time period corresponding to the abnormal servo operation data, or can also include the time period and the back time period corresponding to the abnormal servo operation data. For example, the time corresponding to the abnormal servo operation data is 8:00, and the fault operation time period can be 7:55-8:05, or 7:50-8:03, or 7:58-8:10.
[0072] S203, sending the faulty servo operation data corresponding to the faulty operation time period to the master station, so as to instruct the master station to locate the fault of the servo driver according to the faulty servo operation data.
[0073] In this embodiment, the controller receives the faulty operation time period, and can determine the faulty servo operation data from the servo operation data stored in the storage unit based on the faulty operation time period, and send the faulty servo operation data to the master station, which can further analyze the abnormal cause according to the faulty servo operation data to accurately locate the fault and analyze the cause of the fault.
[0074] In the above fault location method, in the process of storing the collected servo operation data of the servo drive into the storage unit, if it is detected that the servo drive generates abnormal servo operation data, the abnormal servo operation data is sent to the master station, and the collection is stopped after a preset time interval, the fault operation time period sent by the master station according to the abnormal servo operation data is received, and the fault servo operation data corresponding to the fault operation time period is sent to the master station to instruct the master station to locate the fault of the servo drive according to the fault servo operation data. The controller in this method is internally provided with a storage unit to store part of the data in the servo operation process. After abnormal data appears in the servo operation data, the collection is stopped after a preset time interval, so that the master station can obtain the data of a period of time before and after the abnormal servo operation data, that is, the fault servo operation data, and when analyzing the abnormal cause, the fault position and the fault cause can be more accurately located. In addition, in the present application, the data sent by the controller to the master station only includes the data of a period of time before and after the abnormal servo operation data, and the amount of data is much smaller than the important data in the entire control process, so the communication speed of the communication interface between the controller and the master station is also relatively fast. In addition, the data stored in the master station only includes data for a period of time before and after the abnormal servo operation data, and the amount of data is greatly reduced, which also improves the storage speed of the master station.
[0075] Based on the above embodiment, this embodiment introduces and explains the relevant contents of "storing the collected servo operation data of the servo drive into the storage unit" in the above step S201. Figure 4 As shown, as a non-limiting example, the above step S201 may include the following content:
[0076] S301, obtaining a storage address where servo operation data is written into a storage unit.
[0077] The storage address refers to the storage location of the servo operation data in the storage unit. The storage address of each servo operation data is planned in order to better manage the servo operation data in the storage unit.
[0078] In this embodiment, the controller can divide the storage unit into multiple sub-units according to the space size of the storage unit and the size of the memory occupied by the servo operation data, and the amount of storage data in each sub-unit can be the same or different. In the case where the amount of storage data in each sub-unit is the same, the controller can determine the storage location of the next servo operation data to be stored according to the storage location of the servo operation data stored in the storage unit. In the case where the amount of storage data in each sub-unit is different, the controller can allocate a corresponding storage sub-unit to the servo operation data according to the size of the memory occupied by each servo operation data, and use the address of the storage sub-unit as the storage address of the servo operation data written into the storage unit. This embodiment does not limit the method for obtaining the storage address of the servo operation data written into the storage unit.
[0079] S302, based on the storage address, storing the servo operation data in the plurality of registers in the controller into the storage unit.
[0080] In this embodiment, after the storage address of the servo operation data is determined, the servo operation data in the register can be stored in the corresponding storage address in the storage unit based on the storage address. It should be noted that the storage space of the storage unit is limited, and the storage unit stores new data while clearing old data during the storage process. In other words, the amount of data stored in the storage unit is limited.
[0081] In the above fault location method, the storage address of the servo operation data written into the storage unit is obtained, and based on the storage address, the servo operation data in the multiple registers in the controller are stored in the storage unit. By obtaining the storage address of each servo operation data, the method can accurately obtain the storage position of each servo operation data in the storage unit, so that the servo operation data in the multiple registers can be accurately stored in the storage unit based on the storage address.
[0082] Based on the above embodiment, this embodiment introduces and explains the relevant contents of "obtaining the storage address of the servo operation data written into the storage unit" in the above step S301. Figure 5 As shown, as a non-limiting example, the above step S301 may include the following content:
[0083] S401, counting all control loops in the servo operation data, and determining the storage offset address of each control loop.
[0084] The control loop refers to multiple negative feedback processes in the process of proportional, integral and differential control of the servo drive.
[0085] In this embodiment, the controller can calculate the number of multiple control loops of the servo driver, and can determine the storage offset address of the servo operation data in each control loop in the storage unit.
[0086] S402, counting the servo operation data in each control loop, and determining a storage sub-address of each servo operation data in each control loop in the storage offset address.
[0087] In this embodiment, each control loop includes multiple servo operation data. The controller can calculate the data volume of the servo operation data in each control loop, and determine the storage sub-address of each servo operation data in the storage offset address based on the data volume in each control loop.
[0088] In the above fault location method, all control loops in the servo operation data are counted to determine the storage offset address of each control loop, and the servo operation data in each control loop are counted to determine the storage sub-address of each servo operation data in each control loop in the storage offset address. This method can accurately allocate a storage offset address to each control loop by calculating the number of all control loops of the servo operation data; and by calculating the number of servo operation data in each control loop, a storage sub-address can be accurately allocated to each servo operation data in the control loop.
[0089] Based on the above embodiment, this embodiment introduces and explains the relevant contents of "storing the servo operation data in the plurality of registers in the controller into the storage unit based on the storage address" in the above step S302. As a non-limiting example, the above step S302 may include the following contents:
[0090] Based on the mapping relationship and storage addresses between the plurality of registers and the storage units, the servo operation data in each register is stored in the storage unit.
[0091] In this embodiment, each register stores a plurality of servo operation data. During the process of writing each servo operation data into the storage unit, each servo operation data has a storage address. Thus, the servo operation data in a register need to be written into the storage unit one by one, resulting in a long writing time and low efficiency. In view of this situation, the controller can access all the servo operation data in the register through the read-write bus. Each time, it only needs to obtain the mapping relationship and storage address between the register and the storage unit, and all the servo operation data in each register can be stored in the storage unit.
[0092] In the above fault location method, based on the mapping relationship and storage address between multiple registers and storage units, the servo operation data in each register is stored in the storage unit. By obtaining the mapping relationship between each register and the storage unit, the method can write all the servo operation data in the entire register into the storage unit at one time, so that the speed of storing the servo operation data in the storage unit can be improved.
[0093] Based on the above embodiment, this embodiment introduces and explains the relevant content of "stopping collection after a preset time interval" in the above step S201. Figure 6 As shown, as a non-limiting example, the above step S201 may include the following content:
[0094] S501 , storing the servo operation data of the servo driver collected within a preset time period into a storage unit according to an abnormal data writing mode.
[0095] Among them, the abnormal data writing mode refers to a writing method of writing from multiple registers to a storage unit after abnormal servo operation data appears. The writing method may include a continuous writing mode and an interval writing mode. It should be noted that the writing mode can be applied not only after abnormal servo operation data appears, but also when abnormal servo operation data does not appear. In another case, the staff of the main station needs to obtain the servo operation data within a certain time period in a determined writing mode, and the controller can write the servo operation data in multiple registers into the storage unit according to the writing mode. Afterwards, the controller transmits the servo operation data within this period of time to the main station.
[0096] In this embodiment, when the register stores servo operation data collected within a preset time period, the controller can write all or part of the servo operation data within the preset time period in the register into the storage unit based on the abnormal data writing mode.
[0097] S502, after a preset time period, stop writing servo operation data.
[0098] In this embodiment, when the servo operation data within a preset time period is written into the storage unit, the controller stops writing the servo operation data from the register into the storage unit.
[0099] In the above fault location method, the servo operation data of the servo drive collected within a preset time length is stored in the storage unit according to the abnormal data writing mode, and the writing of the servo operation data is stopped after the preset time length. Through the abnormal data writing model, the method can flexibly write the servo operation data of the servo drive collected within a preset time length in the register into the storage unit, and stop writing the servo operation data after the preset time length, thereby ensuring that the servo operation data after the abnormal servo operation data is stored in the storage unit.
[0100] Based on the above embodiment, this embodiment introduces and explains the relevant contents of "storing the servo operation data of the servo drive collected within a preset time period into the storage unit according to the abnormal data writing mode" in the above step S501. Figure 7 As shown, as a non-limiting example, the above step S501 may include the following content:
[0101] S601, receiving an abnormal data writing mode sent by a master station.
[0102] In this embodiment, the abnormal data writing mode is determined by the master station according to the preliminary analysis result of the abnormal servo operation data. After the controller sends the abnormal servo operation data to the master station, it can receive the abnormal data writing mode sent by the master station within a period of time.
[0103] S602: If the abnormal data writing mode is the continuous writing mode, the collected servo operation data of the servo driver is continuously stored in the storage unit according to the continuous writing mode.
[0104] The continuous writing mode refers to a mode in which the servo operation data is written into the storage unit in real time.
[0105] In this embodiment, the controller determines that the abnormal data writing mode sent by the master station is the continuous writing mode, and then writes the servo operation data of the servo driver collected in the register into the storage unit in real time in a continuous writing manner.
[0106] S603: If the abnormal data writing mode is the interval writing mode, the collected servo operation data of the servo driver is stored in the storage unit at preset intervals according to the interval writing mode.
[0107] The interval writing mode refers to a mode in which the servo operation data is written into the storage unit at a certain time interval, and the time interval can be determined according to actual conditions.
[0108] In this embodiment, the controller determines that the abnormal data writing mode sent by the master station is the interval writing mode, then obtains the time interval from the interval writing mode, and then writes the servo operation data of the servo drive collected in the register into the storage unit according to the time interval in the interval writing mode.
[0109] In the above fault location method, the abnormal data writing mode sent by the master station is received. If the abnormal data writing mode is a continuous writing mode, the collected servo operation data of the servo drive is continuously stored in the storage unit according to the continuous writing mode. If the abnormal data writing mode is an interval writing mode, the collected servo operation data of the servo drive is stored in the storage unit according to the interval writing mode at preset intervals. The method divides the abnormal data writing mode into continuous writing and interval writing, and writes the servo operation data into the storage unit according to different writing modes sent by the master station, so that the writing method of other servo operation data after the abnormal servo operation data is more flexible.
[0110] As a specific embodiment of the present application, Figure 8 As shown, the fault location method includes:
[0111] S701, counting all control loops in the servo operation data, and determining the storage offset address of each control loop;
[0112] S702, counting the servo operation data in each control loop, and determining a storage sub-address of each servo operation data in each control loop in the storage offset address;
[0113] S703, based on the mapping relationship and storage addresses between the plurality of registers and the storage units, storing the servo operation data in each register into the storage unit;
[0114] S704, if it is detected that the servo driver generates abnormal servo operation data, the abnormal servo operation data is sent to the master station, and the abnormal data writing mode sent by the master station is received;
[0115] S705, if the abnormal data writing mode is the continuous writing mode, continuously storing the collected servo operation data of the servo driver into the storage unit according to the continuous writing mode;
[0116] S706, if the abnormal data writing mode is the interval writing mode, storing the collected servo operation data of the servo driver in the storage unit at preset intervals according to the interval writing mode;
[0117] S707, after a preset time, stop writing servo operation data.
[0118] Fig. 9The diagram is a schematic diagram of the controller and the master station in one embodiment. The controller 101 and the master station 102 can interact through any one of the communication bus (EtherCat), the high-level communication protocol on the Controller Area Network (CAN), the custom industrial communication system, and the local bus (LocalBus) communication interface. The controller 101 includes a register 103 and a storage unit 104. The storage unit 104 includes an address generator 105, a read / write driver 106, a data stream generator 107, and a storage body 108. The address generator 105 is used to generate an address for each servo operation data to be written into the storage body 108; the read / write driver 106 is used to control the reading or writing of the servo operation data; the data stream generator 107 is used to generate a data stream from the servo operation data in the register, and store the data stream in the storage body 108; the storage body 108 is used to store the servo operation data. Fig. 9 S1-S3 in the figure represent control signals, S1 represents the number of control loops of the servo operation data and the number of servo operation data in each control loop, and the address generator generates the storage address of each servo operation data according to the number of control loops and the number of servo operation data in each control loop. S2 represents a stop write signal sent to the read / write driver 106 when a servo operation data failure occurs. S3 represents an abnormal data write mode sent by the master station, and the abnormal data write mode includes a continuous write mode and an interval write mode.
[0119] In one embodiment, Fig.10 As shown, a fault location method is provided, which is applied to Figure 1 The master station in the example is used as an example to illustrate, including the following steps:
[0120] S801, receiving abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit.
[0121] In this embodiment, since this embodiment is Figure 3 The embodiment in the embodiment corresponds to the master station side embodiment, so no redundant explanation is given for the previously introduced content in this embodiment. When abnormal servo operation data is detected in the controller, the master station can receive the abnormal servo operation data sent by the controller.
[0122] S802, sending the fault operation time period corresponding to the abnormal servo operation data to the controller.
[0123] In this embodiment, when the main station receives the abnormal servo operation data sent by the controller, it can perform a preliminary analysis of the abnormal servo operation data, roughly determine the possible cause of the abnormal servo operation data, and based on the cause, determine the faulty operation time period corresponding to the required faulty servo operation data, and send the faulty operation time period to the controller.
[0124] S803, receiving fault servo operation data corresponding to the fault operation time period sent by the controller.
[0125] In this embodiment, after the master station sends the faulty operation time period to the controller, it can receive the faulty servo operation data corresponding to the faulty operation time period sent by the controller after a period of time.
[0126] S804: locating the fault of the servo driver according to the faulty servo operation data.
[0127] In this embodiment, after the main station receives the faulty servo operation data, it can further analyze the faulty servo operation data. Since the faulty servo operation data contains the abnormal servo operation data and the corresponding servo operation data within a period of time before and after, the fault location and cause of the abnormal servo operation data can be accurately obtained.
[0128] In the above fault location method, abnormal servo operation data generated by the servo drive is received; the abnormal servo operation data is sent by the controller when it detects that the servo drive generates abnormal servo operation data in the process of storing the collected servo operation data of the servo drive in the storage unit, and the fault operation time period corresponding to the abnormal servo operation data is sent to the controller, and the fault servo operation data corresponding to the fault operation time period sent by the controller is received, and the servo drive is fault located according to the fault servo operation data. This method can preliminarily determine the fault operation time period based on the abnormal servo operation data, and accurately obtain the data of the time period before and after the abnormal servo operation data according to the fault operation time period, that is, the fault servo operation data. Afterwards, the servo drive is accurately fault located by the fault servo operation data. In addition, the data stored in the master station also only contains data of a period of time before and after the abnormal servo operation data, and its data volume is greatly reduced, which also improves the storage speed of the master station.
[0129] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0130] Based on the same inventive concept, the embodiment of the present application also provides a fault location device for implementing the above-mentioned fault location method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more fault location device embodiments provided below can refer to the limitations of the fault location method above, and will not be repeated here.
[0131] In one embodiment, Fig.11 As shown, a fault location device is provided, comprising: a processing module 11, a first receiving module 12 and a first sending module 13, wherein:
[0132] The processing module 11 is used for sending the abnormal servo operation data to the master station if it is detected that the servo drive generates abnormal servo operation data during the process of storing the collected servo operation data of the servo drive in the storage unit, and stopping the collection after a preset time interval;
[0133] The first receiving module 12 is used to receive the fault operation time period sent by the master station according to the abnormal servo operation data;
[0134] The first sending module 13 is used to send the faulty servo operation data corresponding to the faulty operation time period to the master station, so as to instruct the master station to locate the fault of the servo driver according to the faulty servo operation data.
[0135] In one embodiment, the above device further includes: an acquisition module and a storage module, wherein:
[0136] An acquisition module, used for acquiring a storage address where servo operation data is written into a storage unit;
[0137] The storage module is used for storing the servo operation data in a plurality of registers in the controller into the storage unit based on the storage address.
[0138] In one embodiment, the acquisition module includes: a first determination unit and a second determination unit, wherein:
[0139] A first determining unit is used to count all control loops in the servo operation data and determine a storage offset address of each control loop;
[0140] The second determining unit is used to count the servo operation data in each control loop and determine the storage sub-address of each servo operation data in each control loop in the storage offset address.
[0141] In one embodiment, the storage module comprises a first storage unit, wherein:
[0142] The first storage unit is used to store the servo operation data in each register into the storage unit based on the mapping relationship between the plurality of registers and the storage unit and the storage address.
[0143] In one embodiment, the first processing module comprises: a second storage unit and a stop writing unit, wherein:
[0144] A second storage unit is used to store the servo operation data of the servo drive collected within a preset time period into the storage unit according to an abnormal data writing mode;
[0145] The stop writing unit is used to stop writing the servo operation data after a preset time.
[0146] In one embodiment, the above-mentioned second storage unit is also used to receive the abnormal data writing mode sent by the master station; if the abnormal data writing mode is a continuous writing mode, the collected servo operation data of the servo drive is continuously stored in the storage unit according to the continuous writing mode; if the abnormal data writing mode is an interval writing mode, the collected servo operation data of the servo drive is stored in the storage unit according to the interval writing mode at preset intervals.
[0147] In one embodiment, a fault location device is provided, comprising: a second receiving module, a second sending module, a third receiving module and a location module, wherein:
[0148] The second receiving module is used to receive abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit;
[0149] A second sending module is used to send the fault operation time period corresponding to the abnormal servo operation data to the controller;
[0150] A third receiving module is used to receive the fault servo operation data corresponding to the fault operation time period sent by the controller;
[0151] The positioning module is used to locate the fault of the servo drive according to the faulty servo operation data.
[0152] Each module in the above-mentioned fault location device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a storage unit in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0153] In one embodiment, a computer device is provided. The computer device may be a controller, and its internal structure diagram may be as follows: Fig.12 As shown. The computer device includes a processor, a storage unit and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The storage unit of the computer device includes a non-volatile storage medium and an internal storage unit. The non-volatile storage medium stores an operating system, a computer program and a database. The internal storage unit provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store fault location data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a fault location method is implemented.
[0154] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0155] In one embodiment, a computer device is provided, including a storage unit and a processor. The storage unit stores a computer program. When the processor executes the computer program, the content of any one embodiment of the above-mentioned fault location method is implemented.
[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the content of any one embodiment of the above-mentioned fault location method is implemented.
[0157] In one embodiment, a computer program product is provided, including a computer program, which implements the content of any one embodiment of the above-mentioned fault location method when executed by a processor.
[0158] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0159] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to a storage unit, a database or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and a volatile storage unit. The non-volatile storage unit may include a read-only memory unit (ROM), a magnetic tape, a floppy disk, a flash memory, an optical storage unit, a high-density embedded non-volatile storage unit, a resistive memory unit (ReRAM), a magnetoresistive random access memory unit (MRAM), a ferroelectric memory unit (FRAM), a phase change memory unit (PCM), a graphene memory unit, etc. The volatile storage unit may include a random access memory unit (RAM) or an external cache memory unit, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0160] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0161] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A fault location method, characterized in that: The method comprises: In the process of storing the collected servo operation data of the servo driver into the storage unit, if it is detected that the servo driver generates abnormal servo operation data, the abnormal servo operation data is sent to the master station, and the collection is stopped after a preset time interval; receiving a fault operation time period sent by the master station according to the abnormal servo operation data; The fault servo operation data corresponding to the fault operation time period is sent to the master station to instruct the master station to perform fault location on the servo drive according to the fault servo operation data.
2. The method according to claim 1, characterized in that The process of storing the collected servo operation data of the servo drive into the storage unit comprises: Acquire the storage address where the servo operation data is written into the storage unit; Based on the storage address, the servo operation data in a plurality of registers in the controller are stored in the storage unit.
3. The method according to claim 2, characterized in that The acquiring the storage address of the servo operation data and writing it into the storage unit comprises: Counting all control loops in the servo operation data to determine a storage offset address of each control loop; The servo operation data in each of the control loops are counted, and a storage sub-address of each servo operation data in each of the control loops in the storage offset address is determined.
4. The method according to claim 2, characterized in that: Based on the storage address, storing the servo operation data in the plurality of registers in the controller into the storage unit comprises: Based on the mapping relationship between the plurality of registers and the storage unit and the storage address, the servo operation data in each of the registers is stored in the storage unit.
5. The method according to any one of claims 1 to 4, characterized in that: The step of stopping the collection after a preset time interval includes: The servo operation data of the servo drive collected within the preset time period is stored in the storage unit according to the abnormal data writing mode; After the preset time period, the writing of the servo operation data is stopped.
6. The method according to claim 5, characterized in that The storing of the servo operation data of the servo drive collected within the preset time period into the storage unit according to the abnormal data writing mode includes: Receiving the abnormal data writing mode sent by the master station; If the abnormal data writing mode is a continuous writing mode, the collected servo operation data of the servo driver is continuously stored in the storage unit according to the continuous writing mode; If the abnormal data writing mode is the interval writing mode, the collected servo operation data of the servo driver is stored in the storage unit at preset intervals according to the interval writing mode.
7. A fault location method, characterized in that: The method comprises: receiving abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit; Sending the fault operation time period corresponding to the abnormal servo operation data to the controller; receiving the fault servo operation data corresponding to the fault operation time period sent by the controller; The servo drive is fault located according to the faulty servo operation data.
8. A fault location device, characterized in that: The device comprises: A processing module, used for, in the process of storing the collected servo operation data of the servo driver in the storage unit, if it is detected that the servo driver generates abnormal servo operation data, sending the abnormal servo operation data to the main station, and stopping the collection after a preset time interval; A first receiving module, configured to receive a fault operation time period sent by the master station according to the abnormal servo operation data; The first sending module is used to send the fault servo operation data corresponding to the fault operation time period to the master station, so as to instruct the master station to locate the fault of the servo driver according to the fault servo operation data.
9. A fault location device, characterized in that: The device comprises: A second receiving module is used to receive abnormal servo operation data generated by the servo driver; the abnormal servo operation data is sent when the controller detects that the servo driver generates abnormal servo operation data during the process of storing the collected servo operation data of the servo driver into the storage unit; A second sending module, configured to send a fault operation time period corresponding to the abnormal servo operation data to the controller; A third receiving module, used for receiving the fault servo operation data corresponding to the fault operation time period sent by the controller; A positioning module is used to locate the fault of the servo drive according to the faulty servo operation data.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.