Control device
The control device facilitates flexible and efficient investigation of complex industrial machinery malfunctions by setting recording conditions and executing investigation programs, enabling remote analysis and maintaining device integrity.
Patent Information
- Application Number
- JP2023551009
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-10-01
- Publication Date
- 2025-05-20
- Estimated Expiration
- 2041-10-01
AI Technical Summary
Industrial machinery malfunctions, particularly those with low reproducibility and infrequent occurrence, are difficult to identify and investigate due to complexity and the need for on-site investigation, which is time-consuming and inflexible, often hindered by environmental conditions and limitations of existing debugging devices.
A control device equipped with a recording condition memory unit, processing data designation information memory unit, and recording processing unit that allows flexible on-site investigation of malfunctions by setting and satisfying specific recording conditions, collecting and processing data, and executing investigation programs to analyze the cause of malfunctions.
Enables flexible and efficient investigation of industrial machinery malfunctions, allowing remote inspection and detailed analysis of internal information, maintaining maintainability and environmental resistance, and reducing the need for on-site intervention.
Smart Images

Figure 0007680555000001 
Figure 0007680555000002 
Figure 0007680555000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a control device. [Background technology]
[0002] For example, in a control device for controlling industrial machines such as machine tools and robots, a technique is known in which log information such as a history of key operations, a history of alarms generated, and a history of the state of a specific signal are recorded in order to investigate the cause of a malfunction of the industrial machines, and the cause of the malfunction is analyzed. For example, see Patent Documents 1 and 2. In this case, when a problem occurs in the operation of industrial machinery and the cause is to be investigated, workers will obtain log information up to the time the malfunction occurred and analyze various histories in chronological order to infer the cause of the malfunction from the operations, signal conditions, and alarm occurrence circumstances at the time the malfunction occurred. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2005-4270 A [Patent Document 2] JP 2007-272545 A Summary of the Invention [Problem to be solved by the invention]
[0004] A control device that controls an industrial machine is incorporated into the industrial machine (for example, a machine tool) by a machine manufacturer together with an I / O device, an industrial PC (IPC), a motor, and the like. Since industrial machinery is a production asset, it is necessary to recover quickly when a malfunction occurs. However, as industrial machinery becomes more multifunctional and sophisticated, it becomes more complex, and the occurrence of malfunctions whose causes are difficult to identify early tends to increase. For example, malfunctions that occur include malfunctions with low reproducibility and malfunctions that occur infrequently. Here, examples of malfunctions with low reproducibility include, for example, malfunctions that depend on the connection state of I / O devices, IPCs, motors, etc., and malfunctions that can only be reproduced in the installed state at the production site (for example, malfunctions that occur during actual processing). In addition, examples of malfunctions that occur infrequently include, for example, malfunctions that occur intermittently (for example, malfunctions that depend on timing / occur between multiple tasks, etc.) and malfunctions that occur only when complex internal conditions are met.
[0005] Because such malfunctions are difficult to reproduce, it may be necessary to investigate existing equipment on-site in order to restore operation as quickly as possible. For example, to conduct an investigation of an existing machine on-site, investigation software is created at a development center such as a machinery manufacturer's research center, and workers go to the site to load the investigation software onto the existing machine and run it. However, in this case, even if it is necessary to re-create the investigation software, workers may not be able to respond flexibly because the development center and the site are physically separated. In addition, the man-hours and time required for an on-site investigation can be significant, which may hinder early recovery.
[0006] For example, when investigating an existing machine on-site using a general-purpose debugging device, an operator must retrofit the debugging device to the control device already built into the existing machine, which creates a problem of poor maintainability. Also, if the environment of the existing machine is adverse, such as high temperature or mist, the debugging device may not be able to withstand such an environment. Also, the debugging device has limitations on the data that can be collected, such as sampling only under simple conditions or the operation during sampling cannot be changed.
[0007] Therefore, it is desirable to be able to flexibly investigate the cause of malfunctions occurring in existing equipment on-site. [Means for solving the problem]
[0008] One aspect of the control device of the present disclosure is a control device that controls industrial machinery, including one or more processors and one or more memories that store instructions to be executed and / or data to be processed by the processors, and is equipped with a recording condition memory unit that stores one or more recording conditions related to recording of the instructions and / or the data, a processing data designation information memory unit that stores processing data designation information that designates, for each of the recording conditions, processing data to be stored in the processing data storage unit among the instructions and / or the data, and a recording processing unit that records, when the recording conditions are satisfied, the processing data designated by the processing data designation information corresponding to the recording conditions in the processing data storage unit. Effect of the Invention
[0009] According to one aspect, when a malfunction occurs in an existing machine on-site, the cause can be flexibly investigated. [Brief description of the drawings]
[0010] [Figure 1] FIG. 2 is a functional block diagram showing an example of a functional configuration of the investigation system according to an embodiment. [Diagram 2] FIG. 13 is a diagram illustrating an example of development in a local memory. [Diagram 3] FIG. 4 illustrates an example of a configuration of a storage unit. [Figure 4] 11 is a flowchart illustrating a processing data collection process of the numerical control device. [Diagram 5] 13 is a flowchart illustrating the survey program execution process in step S7 in the case of sampling only when a condition based on a plurality of data is satisfied (complex condition setting). [Figure 6] 13 is a flowchart illustrating the investigation program execution process in step S7 in the case where the stack of the current task is traced and the address of the caller is collected (advanced data collection). [Figure 7]13 is a flowchart illustrating the investigation program execution process in step S7 in the case of waiting until an external command is received (the operation during sampling is customized to be temporarily stopped). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] A specific embodiment of the control device will be described by taking a numerical control device as an example of the control device. Note that the present invention is not limited to a numerical control device, and can be applied to a robot control device having one or more processors that controls, for example, an industrial robot. Also, the present invention can be applied to a control device having one or more processors that controls any industrial machine. Here, the industrial machine includes various machines such as a machine tool, an industrial robot, a service robot, a forging machine, and an injection molding machine.
[0012] <One embodiment> FIG. 1 is a functional block diagram illustrating an example of the functional configuration of a survey system according to an embodiment. As shown in FIG. 1, the investigation system 1 includes a numerical control device 10 and an information processing device 20 as an external device.
[0013] The numerical control device 10 and the information processing device 20 may be connected to each other via a network (not shown) such as a LAN (Local Area Network) or the Internet. In this case, the numerical control device 10 and the information processing device 20 are provided with a communication unit (not shown) for communicating with each other via such a connection. The numerical control device 10 and the information processing device 20 may also be directly connected to each other via a connection interface (not shown). Although the numerical control device 10 is connected to one information processing device 20, it may be connected to a plurality of information processing devices 20 as described later.
[0014] <Information processing device 20> The information processing device 20 is, for example, a computer or a tablet terminal, and performs, for example, investigation of the cause of a malfunction occurring in the numerical control device 10 described later. Specifically, the information processing device 20 generates recording conditions for recording data of the numerical control device 10, which is necessary for investigating the cause of the malfunction, based on the user's input operation via an input device (not shown) such as a keyboard or a touch panel included in the information processing device 20, and sets the generated recording conditions in the numerical control device 10. The information processing device 20 also generates processing data designation information that designates data of the numerical control device 10, which is to be recorded according to the recording conditions, based on the user's input operation via an input device (not shown) of the information processing device 20, and sets the generated processing data designation information in the numerical control device 10. The information processing device 20 also creates and compiles an investigation program for acquiring data designated by the processing data designation information from the numerical control device 10 when the recording conditions are satisfied, based on the user's input operation via the input device (not shown) of the information processing device 20, and loads the investigation program in an executable form into the numerical control device 10, which will be described later.
[0015] <Numerical control device 10> The numerical control device 10 is a numerical control device known to those skilled in the art, and generates operation commands based on a machining program acquired from, for example, a CAD / CAM device (not shown) and transmits the generated operation commands to a machine tool (not shown). In this way, the numerical control device 10 controls the operation of the machine tool (not shown). Note that if the machine tool (not shown) is a robot or the like, the numerical control device 10 may be a robot control device or the like.
[0016] 1, the numerical control device 10 includes a control module 110 and n processor modules 120-1 to 120-n. The control module 110 and the processor modules 120-1 to 120-n are connected via a bus 140 so as to be able to communicate with each other. The control module 110 includes a CPU 111 and a local memory 112. The CPU 111 also includes a recording condition setting interface (IF) unit 1111, a processing data designation information setting interface (IF) unit 1112, a recording processing unit 1113, an interrupt processing unit 1114, and a program execution unit 1115. The processor modules 120-1 to 120-n also include a CPU 121 and a local memory 122. Hereinafter, when there is no need to distinguish between the processor modules 120-1 to 120-n, they will be collectively referred to as the "processor module 120."
[0017] <Processor module 120> The processor module 120 includes a CPU 121 , a local memory 122 , and a storage unit 123 . For example, when executing an application program that performs axis control, the CPU 121 may control three axes, namely, the X-axis, the Y-axis, and the Z-axis, which change the position and inclination of a spindle or a table included in a machine tool (not shown), or five axes, namely, the X-axis, the Y-axis, the Z-axis, the A-axis, and the B-axis. In other words, the processor module 120 operates as an axis control module. Furthermore, when executing an application program that performs display control, the CPU 121 may control the display of the display device of the numerical control device 10. That is, the processor module 120 operates as a display control module. Furthermore, when executing an application program that performs peripheral device control, the CPU 121 may control peripheral devices arranged around a machine tool (not shown). That is, the processor module 120 operates as a peripheral device control module. The local memory 122 is a RAM (Random Access Memory) or the like, and the application programs executed by the CPU 121 are loaded into the local memory 122. The storage unit 123 is a ROM (Read Only Memory) or the like, and stores application programs such as axis control executed by the CPU 121, data to be processed, and the like.
[0018] <Control Module 110> The control module 110 is a module that controls the entire numerical control device 10 , and includes a CPU 111 , a local memory 112 , and a storage unit 113 .
[0019] <Local Memory 112> The local memory 112 is composed of a RAM or the like. As described below, when the CPU 111 reads out an application program, which is a collection of multiple programs stored in the storage unit 113, loads it into the local memory 112 and executes it, the multiple programs are deployed in program storage areas 1 to m1 as shown in Fig. 2. Furthermore, in the local memory 112, instructions for each of the multiple programs, data to be processed, etc. are stored in data storage areas 1 to m2. Note that m1 and m2 are integers equal to or greater than 2.
[0020] <Storage section 113> The storage unit 113 is a memory such as a ROM. The storage unit 113 may store, together with the system program and the application program, instructions to be executed by the CPU 111, data to be processed, and the like. As shown in Fig. 3, the storage unit 113 includes a processing data storage unit 131, a recording condition storage unit 132, a processing data designation information storage unit 133, and a survey program storage unit 134.
[0021] For example, when any of the recording conditions stored in the recording condition storage unit 132 is satisfied, as described below, the processing data storage unit 131 stores at least one processing data such as internal information of CPU 111 and CPU 121 of processor module 120, data stored in local memory 112 and local memory 122 of processor module 120, instructions to be executed by CPU 111 and CPU 121 of processor module 120, or addresses at which the instructions are stored, which are specified by processing data designation information stored in the processing data designation information storage unit 133 corresponding to the satisfied recording condition.
[0022] The recording condition storage unit 132 receives and stores one or more recording conditions related to the instructions executed by the CPU 111 and the CPU 121 of the processor module 120, and / or the recording of data stored in the local memory 112 and the local memory 122 of the processor module 120 in the processed data storage unit 131 from the information processing device 20. The recording conditions may be generated based on a user's input operation via an input device (not shown) such as a keyboard or a touch panel included in the numerical control device 10, and stored in the recording condition storage unit 132.
[0023] The processing data designation information storage unit 133 receives and stores processing data designation information for setting processing data to be stored in the processing data storage unit 131 for each recording condition from the information processing device 20. Note that the processing data designation information may be generated based on an input operation by a user via an input device (not shown) of the numerical control device 10 and stored in the processing data designation information storage unit 133.
[0024] The investigation program storage unit 134 receives and stores an investigation program in an executable format that is executed to investigate the cause of a malfunction that has occurred in the numerical control device 10 when the recording conditions are satisfied from the information processing device 20. The investigation program may be generated and compiled based on an input operation by a user via an input device (not shown) of the numerical control device 10, and stored in the investigation program storage unit 134.
[0025] <cpu111> The CPU 111 is a processor that performs overall control of the numerical control device 10. The CPU 111 loads the system program and application program stored in the storage unit 113 into the local memory 112, and controls the entire numerical control device 10 in accordance with the system program and the application program. As a result, the CPU 111 is configured to realize the functions of a recording condition setting IF unit 1111, a processing data designation information setting IF unit 1112, a recording processing unit 1113, an interrupt processing unit 1114, and a program execution unit 1115, as shown in FIG. Furthermore, when the application program is a collection of programs constituting a software system including a program (e.g., source code name "safty_function.src") in charge of a safety function of the numerical control device 10, when the CPU 111 loads the application program (collection of programs) in which safety_function.src and the like have been converted into executable instructions by compilation into the local memory 112, the program is expanded in program storage areas 1 to m1 of the local memory 112 by the system program. For example, executable instructions generated from the source code of safety_function.src may be expanded in program storage area 1 of the local memory 112. Also, executable instructions generated from another source code included in the collection of programs may be expanded in program storage area i of the local memory 112 (i is an integer from 2 to m1). By doing so, the CPU 111 can simultaneously execute the instructions stored in each of the program storage areas 1 to m1 of the local memory 112.
[0026] The recording condition setting IF unit 1111 displays a recording condition setting interface (IF) for setting the recording conditions stored in the recording condition storage unit 132 on a display device (not shown) such as an LCD (Liquid Crystal Display) included in the information processing device 20. The recording condition setting IF unit 1111 sets, as recording conditions, conditions that set a state for determining whether the above-mentioned processing data should be recorded when a certain state occurs in the numerical control device 10, via the recording condition setting IF displayed based on an input operation by the user. The recording condition setting IF unit 1111 stores the recording conditions set by the information processing device 20 in the recording condition storage unit 132. For example, the recording condition may be set to "when an instruction stored at address "0x0100 0000" in local memory 112 of control module 110 (or local memory 122 of processor module 120) is executed," "when CPU 111 of control module 110 (or CPU 121 of processor module 120) executes a branch instruction," or "when data stored at address "0x0200 0000" in local memory 112 of control module 110 (or local memory 122 of processor module 120) is read."
[0027] The processing data designation information setting IF unit 1112 displays, for example, on a display device (not shown) of the information processing device 20, a processing data designation information interface (IF) for setting processing data designation information designating processing data (for example, internal CPU information such as a general-purpose register of the CPU, a timer value of the CPU, memory data such as a value of accessed data, a data value at a specified address, binary data of an executed instruction, or an address where the instruction is stored, etc.) to be stored in the processing data storage unit 131 for each recording condition. The processing data designation information setting IF unit 1112 sets processing data designation information designating processing data to be stored in the processing data designation information storage unit 133 described above when the above-mentioned recording condition is satisfied during processing in the numerical control device 10, via the processing data designation information setting IF displayed based on an input operation by the user. The processing data designation information IF unit 1112 stores the processing data designation information set by the information processing device 20 in the processing data designation information storage unit 133. For example, in the case where the above-mentioned recording condition is "when an instruction stored at address "0x0100 0000" of local memory 112 of control module 110 (or local memory 122 of processor module 120) is executed", "data of general-purpose registers "0" to "31" of CPU 111 of control module 110 (or CPU 121 of processor module 120) (internal information of CPU) is acquired" may be set as the processing data designation information. Also, in the case where the recording condition is "when CPU 111 of control module 110 (or CPU 121 of processor module 120) executes a branch instruction", "the address where the executed instruction is stored (program counter) as the storage location of the executed instruction, and the value of the timer inside the CPU (internal information of CPU) are acquired" may be set as the processing data designation information. Furthermore, as the processing data designation information, in the case of a recording condition "when data stored at address "0x0200 0000" of local memory 112 of control module 110 (or local memory 122 of processor module 120) is read", "the value of the internal timer of CPU 111 (or CPU 121) (internal information of the CPU) and 0x10 bytes of data are obtained from address "0x0200 0000" of local memory 112 (or local memory 122)" may be set.
[0028] For example, when any of the recording conditions stored in the recording condition memory unit 132 is satisfied, the recording processing unit 1113 records in the processing data memory unit 131 the processing data specified by the processing data designation information corresponding to the satisfied recording condition.
[0029] The interrupt processing unit 1114 executes an interrupt process when a recording condition is satisfied, for example, suspends the process that was being executed before the execution of the interrupt process, and performs a context switch to save registers, set a stack pointer, etc. After that, when the interrupt processing unit 1114 receives a data recording completion notification indicating that recording of processing data by the recording processing unit 1113 is completed, the interrupt processing unit 1114 completes the interrupt processing by performing a context switch to restore registers, stack pointer, etc. After completing the interrupt processing, the interrupt processing unit 1114 resumes the original process that was being executed before the execution of the interrupt processing.
[0030] For example, when a recording condition is satisfied, the program execution unit 1115 executes the investigation program loaded into the investigation program storage unit 134 in order to record processing data designated by processing data designation information corresponding to the recording condition in the processing data storage unit 131. This enables the program execution unit 1115 to (a) sample only when a condition based on a plurality of data is satisfied (setting complex conditions), (b) trace the stack of the current task and collect the address of the caller (advanced data collection), or (c) wait until an external command is received (customizing the operation during sampling to pause). The operations (a) to (c) of the program execution unit 1115 based on the investigation program will be described later as investigation program execution processing.
[0031] <Processing data collection process of the numerical control device 10> Next, the flow of processing data collection processing of the numerical control device 10 will be described with reference to FIG. 4 is a flowchart illustrating the processing data collection process of the numerical control device 10. The flow shown here is repeatedly executed while the CPU 111 (or the CPU 121 of the processor module 120) executes an instruction.
[0032] In step S1, the CPU 111 (or the CPU 121 of the processor module 120) completes the currently (previously) executed instruction.
[0033] In step S2, the recording processing unit 1113 determines whether or not the command to be executed next after the command completed in step S1 satisfies any of the recording conditions stored in the recording condition storage unit 132. If the command to be executed next satisfies the recording conditions, the process proceeds to step S3. On the other hand, if the command to be executed next does not satisfy the recording conditions, the process proceeds to step S10.
[0034] In step S3, the interrupt processing unit 1114 executes the interrupt processing, suspends the currently executed processing, and performs a context switch to save registers, set a stack pointer, and so on.
[0035] In step S4, the recording processing unit 1113 jumps to a process of recording processed data.
[0036] In step S5, the recording processing unit 1113 refers to the processing data designation information corresponding to the recording conditions.
[0037] In step S 6 , the record processing unit 1113 records in the processing data storage unit 131 the processing data designated by the processing data designation information.
[0038] In step S7, the program execution unit 1115 executes the investigation program loaded into the investigation program storage unit 134, and performs investigation program execution processing. Note that the detailed flow of the investigation program execution processing will be described later.
[0039] In step S8, when the recording of the processed data is completed, the recording processing unit 1113 outputs a processed data recording completion notification.
[0040] In step S9, when the interrupt processing unit 1114 receives the data recording completion notification output in step S8, it performs a context switch to restore the registers, stack pointer, etc., and completes the interrupt processing. After completing the interrupt processing, the interrupt processing unit 1114 resumes the original processing that was being executed before the interrupt processing was executed.
[0041] In step S10, the CPU 111 (or the CPU 121 of the processor module 120) executes the next instruction to be executed, and the numerical control device 10 then returns to step S1.
[0042] Next, the check program execution process in step S7 in FIG. 4 will be described for each of the above-mentioned operations (a) to (c). In the following description, the CPU 111 of the control module 110 executes instructions. However, the CPU 121 of the processor module 120 executes instructions in the same manner as the CPU 111 of the control module 110.
[0043] (a) Sampling only when multiple data conditions are met (complex conditions) Specifically, as an example of the investigation program execution process, a case where the cause of a malfunction is sampled (investigated) when the processing of the program storage area 1 storing the program responsible for the safety functions of the numerical control device 10 is significantly delayed, causing the system to stop due to real-time control being unable to keep up is illustrated. The numerical control device 10 may execute an investigation program execution process for sampling (investigating) the cause of a malfunction other than the case where the processing of the program storage area 1 storing the program responsible for the safety functions is significantly delayed. In this case, it is preferable that the investigation program is created by the information processing device 20 in order to sample (investigate) the cause of the malfunction. When the processing of the program storage area 1 is significantly delayed, it is necessary to confirm how long it took to process the program storage area 1 in which the program responsible for the safety function is stored, and which processing in the program storage area 1 is particularly delayed compared to normal cases. Therefore, the investigation program is created in the information processing device 20 and loaded into the investigation program storage unit 134 so that sampling (investigation) is performed to (1) record the time when the instruction execution of the CPU 111 of the control module 110 branches from the program storage area i (i ≠ 1) to an instruction (function) included in the program storage area 1, and the address of the instruction at the branch destination, (2) record the time when the instruction execution of the CPU 111 of the control module 110 executes each branch instruction in the program storage area 1, and the address of the instruction at the branch destination, and (3) record the time when the instruction execution of the CPU 111 of the control module 110 moves from an instruction (function) in the program storage area 1 to another program storage area i, and the address of the instruction at the branch destination (movement destination). As a result, the investigation program execution process can measure the total execution time of the CPU 111 of the control module 110 executing the command (program) in the program storage area 1 from the time recorded in (1) and the time recorded in (3) by executing the investigation program. The investigation program execution process can also acquire the flow and processing time of each process in the program storage area 1 executed by the CPU 111 based on the time and address recorded in (2). The investigation program execution process can then determine whether or not the measured total execution time of the program storage area 1 has increased significantly compared to normal cases. Furthermore, based on the acquired flow and processing time of each process, if it is found that, for example, a cross-check process, which is a safety function of the program storage area 1, is frequently called and takes a significantly long time, the investigation program execution process can identify that the cross-check process is the cause of the malfunction. The program storage areas 2 to m1 are similar to the program storage area 1, and the description will be omitted.
[0044] FIG. 5 is a flowchart illustrating the survey program execution process in step S7 in the case of sampling only when a condition based on a plurality of data is satisfied (complex condition setting). In this case, the recording condition is set to "execution of a branch instruction" by the recording condition setting IF unit 1111 based on an input operation by the user of the information processing device 20. That is, the instruction to be executed next in step S2 of Fig. 4 is a branch instruction. Also, the processing data designation information is set to "the time when the branch instruction is executed (counter value of a timer in the CPU) and the address of the branch destination instruction" by the processing data designation information setting IF unit 1112 based on an input operation by the user of the information processing device 20. In addition, because branch instructions occur frequently, if processing data were to be recorded every time the above recording conditions were satisfied, the amount of processing data to be recorded would be large, requiring a large amount of memory to store the processing data. In addition, recording processing data for each branch instruction would slow down processing, and since processing would be executed in a different flow from when the malfunction occurred, there would be a problem that the malfunction could not be reproduced. In order to prevent this problem, the program execution unit 1115 executes the investigation program when the recording condition is satisfied, and performs the investigation program execution process of FIG.
[0045] In step S701, the program execution unit 1115 checks data that is set when a malfunction occurs (for example, whether an alarm has occurred or the operating system has stopped, etc.) based on the investigation program, and determines whether a malfunction is occurring. Since it is desired to record processing data up until just before the malfunction occurs, if a malfunction is occurring, the program execution unit 1115 ends the investigation program execution process, skips the processing for recording processing of processing data, and proceeds to step S8 in Fig. 4. Then, in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt processing and returns to the original processing. In this way, the numerical control device 10 can avoid collecting unnecessary information after a malfunction occurs, and there is no need to prepare a large-capacity processing data storage unit 131, and the malfunction to be sampled (investigated) can be reproduced. On the other hand, if no malfunction is occurring, the process proceeds to step S702.
[0046] In step S702, the program execution unit 1115 checks the address where the instruction to be executed next after step S2 in Fig. 4 is stored based on the investigation program, and judges whether it is an instruction (branch instruction) in the program storage area 1. If it is an instruction (branch instruction) in the program storage area 1, the process proceeds to step S707. On the other hand, if it is not an instruction (branch instruction) in the program storage area 1, the process proceeds to step S703.
[0047] In step S703, the program execution unit 1115 disassembles the instruction (branch instruction) to be executed next to step S2 in FIG. 4, based on the investigation program.
[0048] In step S704, the program execution unit 1115 calculates the branch destination address of the instruction (branch instruction) to be executed next to step S2 in Fig. 4 based on the investigation program. The branch destination address calculation can be performed using a known method (for example, in the case of a branch instruction that uses a link register, the branch destination may be obtained from the link register of the CPU, and in the case where the branch destination address is described in the binary data of the instruction, the branch destination address may be extracted from a specific bit of the instruction (for example, the 16th to 32nd bits of a 32-bit instruction may be checked)).
[0049] In step S705, the program execution unit 1115 determines, based on the investigation program, whether or not the branch destination address calculated in step S704 is a memory area in which instructions of the program storage area 1 are stored. If it is a memory area in which instructions of the program storage area 1 are stored, the process proceeds to step S706. On the other hand, if it is not a memory area in which instructions of the program storage area 1 are stored, the program execution unit 1115 ends the investigation program execution process, skips the recording process of the processing data, and proceeds to step S8 in Fig. 4. Then, in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt process and returns to the previous process.
[0050] In step S706, the record processing unit 1113 records the processing data specified by the processing data designation information (i.e., the time when branching to the processing of the program storage area 1, and the address of the instruction at the branch destination) in the processing data storage unit 131. Then, the program execution unit 1115 ends the investigation program execution processing and returns to step S8 in Fig. 4, and in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt processing and returns to the original processing.
[0051] In step S707, the program execution unit 1115 disassembles the instruction (branch instruction) to be executed next to step S2 in FIG. 4, based on the investigation program.
[0052] In step S708, the program execution unit 1115 calculates the branch destination address of the instruction (branch instruction) to be executed next after step S2 in FIG. 4, based on the investigation program.
[0053] In step S709, the record processing unit 1113 records the processing data specified by the processing data designation information (i.e., the time for each branch in the program storage area 1, the address of the instruction at the branch destination, the time when the instruction in the program storage area 1 was transferred to another program storage area i, and the address of the instruction at the branch destination) in the processing data storage unit 131. Then, the program execution unit 1115 ends the investigation program execution process and returns to step S8 in Fig. 4, and in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt process and returns to the original process.
[0054] (b) Tracing the stack of the current task and collecting the caller address (advanced data collection) Specifically, as an example of the investigation program execution process, when processing in the program memory area 1 in which the program responsible for the safety function of the numerical control device 10 is stored is significantly delayed, causing real-time control to be unable to keep up and the system to stop, an example is shown in which detailed sampling (investigation) is performed on the cross-check processing of data in the delayed safety function. For example, in order to understand the process flow, it is possible to investigate the caller of the function containing the command for which the process data was recorded. That is, for example, when collecting process data of the command contained in a function that is called from multiple functions, sampling (investigation) is performed only when it is called from the desired function, and by tracing the callers in order, it is possible to trace the process flow up to the execution of the command. By using this information, it is possible to confirm how the process that caused the problem was executed, and to identify the cause of the problem.
[0055] FIG. 6 is a flowchart illustrating the investigation program execution process in step S7 when tracing the stack of the current task and collecting the caller address (advanced data collection). In this case, the recording condition is set by the recording condition setting IF unit 1111 based on the input operation of the user of the information processing device 20 to "execute an instruction included in a function that performs cross-check processing of data in the safety function of the program storage area 1". Also, the processing data designation information is set by the processing data designation information setting IF unit 1112 based on the input operation of the user of the information processing device 20 to "the address of the executed instruction, the time when the instruction was executed (counter value of a timer in the CPU), and argument information when the function that performs the cross-check processing was called". Note that the argument information can be obtained, for example, from data in a general-purpose register of the CPU 111 of the control module 110 or stack information stored in the local memory 112. For this purpose, the information processing device 20 creates an investigation program that traces the stack of the current task and collects the return addresses stored in the stack in order to collect the address of the caller (advanced data collection). The information processing device 20 compiles the created investigation program and loads the investigation program in an executable format into the investigation program storage unit 134 of the numerical control device 10. The program execution unit 1115 executes the investigation program when the recording condition is satisfied, thereby performing the investigation program execution process of FIG. 6.
[0056] In step S711, the program execution unit 1115 disassembles, based on the investigation program, an instruction for extending the stack at the beginning of the function that includes the instruction to be executed next after step S2 in FIG.
[0057] In step S712, the program execution unit 1115 acquires the number of bytes (for example, m bytes) by which the stack has been extended based on the investigation program (m is an integer equal to or greater than 1). The number of bytes by which the stack has been extended can be calculated, for example, by extracting it from a specific bit of the instruction that extends the stack (for example, by checking the 16th to 32nd bits of a 32-bit instruction).
[0058] In step S713, the program execution unit 1115 acquires a stack pointer indicating the beginning of the stack frame currently being processed based on the investigation program. Note that the stack pointer indicating the beginning of the stack frame currently being processed can be acquired from a register of the CPU 111 of the control module 110 when step S713 is executed for the first time, and can be acquired from step S721 (described later) when step S713 is executed for the second or subsequent times.
[0059] In step S714, the program execution unit 1115 calculates, based on the investigation program, a stack pointer indicating the top of the stack frame in the caller, obtained by rewinding the stack pointer indicating the top of the stack frame currently being processed by the number of bytes obtained in step S712.
[0060] In step S715, the program execution unit 1115 calculates the address where the return address is stored from the stack pointer indicating the beginning of the stack frame in the caller calculated in step S714 based on the investigation program. Note that the address where the return address is stored can be calculated, for example, from the stack pointer indicating the beginning of the stack frame in the caller (for example, the address indicated by the stack pointer indicating the beginning of the stack frame in the caller plus the offset p bytes of the return address storage address can be calculated).
[0061] In step S716, the program execution unit 1115 obtains a return address from the address calculated in step S715 based on the investigation program, and calculates the address of the caller's instruction. The address of the caller's instruction can be obtained, for example, by calculating the address of the previous instruction from the return address (for example, if the instructions executed by the CPU 111 of the control module 110 are all fixed at 32 bits, the address obtained by subtracting 4 bytes (32 bits) from the return address is calculated).
[0062] In step S717, the program execution unit 1115 determines whether the process has been repeated up to the last data in the stack based on the investigation program. If the process has been repeated up to the last data in the stack, the process proceeds to step S718. On the other hand, if the process has not been repeated up to the last data in the stack, the process proceeds to step S719.
[0063] In step S718, the record processing unit 1113 records the address of the caller's instruction calculated in step S716 together with the processing data specified by the processing data specification information in the processing data storage unit 131. Then, the program execution unit 1115 ends the investigation program execution process and returns to step S8 in Fig. 4, and in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt process and returns to the original process.
[0064] In step S719, the program execution unit 1115 searches for the first instruction of the function including the calling instruction from the address of the calling instruction calculated in step S716, based on the investigation program.
[0065] In step S720, the program execution unit 1115 disassembles, based on the investigation program, an instruction that extends the stack of the function that includes the caller's instruction.
[0066] In step S721, the program execution unit 1115 sets the stack frame indicated by the stack pointer indicating the top of the stack frame in the caller calculated in the previously executed step S714 as the stack frame currently being processed. Also, it holds the stack pointer indicated by the newly set stack frame currently being processed. Then, the process returns to step S712.
[0067] In this way, the numerical control device 10 can record meaningful information with a small data capacity, which would take up several hundred to several thousand bytes if the stack itself were saved, by saving only the address of the calling instruction. In addition, although the way the stack is extended and the storage location of the return address in the stack depend on the compiler and hardware, if the hardware or compiler is changed, the caller can be investigated without depending on the hardware or compiler by simply changing the investigation program to match the changed hardware or compiler. Therefore, the numerical control device 10 can continuously provide the same maintenance function even if the hardware or compiler is changed, simply by providing a function to execute the investigation program.
[0068] (c) When waiting for an external command (customizing the operation during sampling to pause) Specifically, as an example of the investigation program execution process, a case will be given in which processing in the program memory area 1 in which the program responsible for the safety function of the numerical control device 10 is stored is significantly delayed, causing real-time control to be unable to keep up and the system to stop, and a process of assigning an invalid argument is found in the processing of a function including the instruction that called the data cross-check process in the safety function. In this case, the numerical control device 10, for example, temporarily suspends the execution of the investigation program at the point where an invalid argument is assigned in the processing of a function including the calling instruction, and checks the data stored in the local memory, internal information of the CPU, etc. at that point in time, thereby making it possible to conduct a more detailed investigation, such as determining from which data the invalid argument was calculated.
[0069] FIG. 7 is a flowchart for explaining the investigation program execution process in step S7 in the case of waiting until an external command is received (the operation during sampling is customized to be temporarily stopped). In this case, the recording condition is set to “execute processing to substitute an invalid argument” by the recording condition setting IF unit 1111 based on the input operation of the user of the information processing device 20. Also, the processing data designation information is set to “not designated” by the processing data designation information setting IF unit 1112 based on the input operation of the user of the information processing device 20. Then, the program execution unit 1115 executes the investigation program when the recording condition is satisfied, and performs the investigation program execution process of FIG.
[0070] In step S731, since the recording condition is satisfied in step S2 of FIG. 4, the program execution unit 1115 temporarily halts the investigation program.
[0071] In step S732, the program execution unit 1115 notifies the information processing device 20 that the investigation program is paused. The information processing device 20 displays the received notification on a display device (not shown) such as an LCD included in the information processing device 20, for example.
[0072] In step S733, the program execution unit 1115 determines whether data instructing the resumption of the investigation program execution is stored in a control variable in a memory area that can be set from the information processing device 20, such as the storage unit 113 or the local memory 112. If data instructing the resumption of the investigation program execution is stored, the process proceeds to step S734. On the other hand, if data instructing the resumption of the investigation program execution is not stored, the process proceeds to step S735.
[0073] In step S734, the program execution unit 1115 resumes the investigation program by using the control variable. Then, the program execution unit 1115 notifies the information processing device 20 that the investigation program has resumed. The program execution unit 1115 ends the investigation program execution process and returns to step S8 in Fig. 4, and in step S9 in Fig. 4, the interrupt processing unit 1114 ends the interrupt processing and returns to the original process.
[0074] In step S735, when the control variable indicates output of the processing data designation information and the processing data, the program execution unit 1115 copies and stores the processing data specified by the processing data designation information in a memory area such as the storage unit 113 or the local memory 112 that can be referenced from the information processing device 20. Then, the process returns to step S733.
[0075] In this way, even if the recording conditions are satisfied and the investigation program is paused, the information processing device 20 can resume the investigation program by setting data instructing the numerical control device 10 to resume execution of the investigation program based on a user's input operation, in the control variable of the numerical control device 10. Furthermore, even if the investigation program is paused, the information processing device 20 can acquire the desired processing data by setting the processing data designation information and the output of the processing data in the control variables of the numerical control device 10 based on the user's input operation, thereby enabling a more detailed investigation to be performed. 7, in order to temporarily suspend the investigation program, if there is a request to execute a process that requires real-time processing (for example, a process that must be executed at a certain control cycle), the program execution unit 1115 may temporarily suspend task A that was executing the investigation program, and transition to task B that executes the process that requires real-time processing. After task B is completed, the program execution unit 1115 can return to task A to continue the investigation.
[0076] As described above, in the numerical control device 10 according to one embodiment, the recording conditions and processing data designation information are set from the information processing device 20 in accordance with the investigation contents, and an investigation program in accordance with the investigation contents is loaded from the information processing device 20, thereby enabling flexibly investigating the cause of a malfunction in existing on-site machines. In addition, the numerical control device 10 enables remote inspection of existing machines and can acquire internal information about the CPU and executed commands, making it possible to investigate defects at the source code level while maintaining the confidentiality of the source code. Furthermore, the numerical control device 10 can be debugged by itself, without impairing maintainability or environmental resistance. Furthermore, the numerical control device 10 can set complex sampling conditions and operations by executing an investigation program, and can realize highly functional failure investigation without relying on hardware.
[0077] Although one embodiment has been described above, the numerical control device 10 is not limited to the above-described embodiment, and includes modifications and improvements within the scope of achieving the object.
[0078] <Variation 1> In one embodiment, the numerical control device 10 samples (investigates) the cause of a malfunction when the processing in the program storage area 1 storing the program responsible for the safety function of the numerical control device 10 is significantly delayed as the investigation program execution process, but is not limited to this. For example, the numerical control device 10 may execute an investigation program execution process that samples (investigates) the cause of a malfunction other than when the processing in the program storage area 1 storing the program responsible for the safety function is significantly delayed.
[0079] <Variation 2> Also, for example, in the above embodiment, the CPU 111 of the control module 110 collects the instructions and processing data executed by the CPU 111 of the control module 110 and the CPU 121 of the processor module 120, but this is not limited to this. For example, the CPU 121 of the processor module 120-i may collect the instructions and processing data executed by the CPU 111 of the control module 110 and the CPU 121 of the processor module 120. In this case, the CPU 121 of the processor module 120-i may be configured to read out an operating system and an application program stored in the storage unit 123, load them into the local memory 122, and realize the functions of the recording condition setting IF unit 1111, the processing data designation information setting IF unit 1112, the recording processing unit 1113, the interrupt processing unit 1114, and the program execution unit 1115 in accordance with the operating system and the application program. When the CPU 121 reads out an application program, which is a collection of a plurality of programs stored in the storage unit 123, loads it into the local memory 122, and executes it, the local memory 122 of the processor module 120-i may be expanded in the program storage areas 1 to m1 for each of the plurality of programs, as shown in FIG. By doing so, the CPU 121 of the processor module 120-i can collect processing data of the program storage area k in which the program responsible for the processing, which is caused by the problem in the axis control or screen display processing, is stored.
[0080] <Modification 3> Also, for example, in the above embodiment, the processing data storage unit 131, the recording condition storage unit 132, the processing data designation information storage unit 133, and the investigation program storage unit 134 are arranged in the storage unit 113 of the control module 110, but this is not limited thereto. For example, the processing data storage unit 131, the recording condition storage unit 132, the processing data designation information storage unit 133, and the investigation program storage unit 134 may be arranged in a storage device connected via the bus 140, different from the control module 110 and the processor module 120. Alternatively, the processing data storage unit 131, the recording condition storage unit 132, the processing data designation information storage unit 133, and the investigation program storage unit 134 may be arranged in a data server or the like connected to the numerical control device 10 via a network. In addition, if the CPU 111 of the control module 110 (and the CPU 121 of the processor module 120) is a multi-core CPU, the processing data storage unit 131, the recording condition storage unit 132, the processing data designation information storage unit 133, and the investigation program storage unit 134 may be arranged for each core. By doing so, the storage unit 113 can set different conditions and process data for each core in one CPU 111 (or CPU 121), and can collect process data independently.
[0081] Each function included in the numerical control device 10 according to an embodiment can be realized by hardware, software, or a combination of these. Here, being realized by software means being realized by a computer reading and executing a program.
[0082] The program can be stored and provided to the computer using various types of non-transitory computer readable media. The non-transitory computer readable media includes various types of tangible storage media. Examples of the non-transitory computer readable media include magnetic recording media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, and RAMs). The program may also be provided to the computer by various types of transitory computer readable media. Examples of the transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The transitory computer readable media can provide the program to the computer via wired communication paths such as electric wires and optical fibers, or wireless communication paths.
[0083] In addition, the steps of writing a program to be recorded on a recording medium include not only processes that are performed chronologically according to the order, but also processes that are not necessarily performed chronologically but are executed in parallel or individually.
[0084] In other words, the control device of the present disclosure can take various forms having the following configurations.
[0085] (1) The numerical control device 10 of the present disclosure is a control device that controls industrial machinery and includes one or more CPUs 111, 121 and one or more local memories 112, 122 that store instructions executed by the CPUs 111, 121 and / or data to be processed, and is equipped with a recording condition memory unit 132 that stores one or more recording conditions related to the recording of instructions and / or data, a processing data designation information memory unit 133 that stores processing data designation information that designates processing data to be stored in the processing data memory unit 131 among the instructions and / or data for each recording condition, and a recording processing unit 1113 that records the processing data designated by the processing data designation information corresponding to the recording condition in the processing data storage unit 131 when the recording condition is satisfied. According to this numerical control device 10, when a malfunction occurs in an existing machine at the site, the cause can be flexibly investigated.
[0086] (2) In the numerical control device 10 described in (1), the processing data may include at least one of internal information of the CPUs 111 and 121, data stored in the local memories 112 and 122, instructions, or storage locations of instructions. This allows the numerical control device 10 to perform defect investigation with high accuracy.
[0087] (3) The numerical control device 10 according to (1) or (2) may further include a recording condition setting interface unit 1111 for setting recording conditions. By doing so, the numerical control device 10 can change the settings of the recording conditions as appropriate, and can investigate defects more flexibly.
[0088] (4) The numerical control device 10 according to any one of (1) to (3) may further include a processing data designation information setting interface unit 1112 for setting processing data designation information. In this way, the numerical control device 10 can specify and store only the necessary data, and can record meaningful information with a small data capacity and processing load.
[0089] (5) The numerical control device 10 described in any one of (1) to (4) may be provided with an investigation program memory unit 134 that stores an investigation program in an executable format that is executed when the recording conditions are satisfied, and a program execution unit 1115 that executes the investigation program when the recording conditions are satisfied. By doing so, the numerical control device 10 can perform a more detailed failure investigation.
[0090] (6) In the numerical control device 10 according to any one of (1) to (4), the recording conditions and / or the processing data designation information may be set and / or referred to from the information processing device 20. This allows the numerical control device 10 to perform more flexible failure investigation.
[0091] (7) In the numerical control device 10 described in (5), at least one of the recording conditions, the processing data designation information, and the investigation program may be set and / or referred to from the information processing device 20. By doing so, the numerical control device 10 can achieve the same effect as (6).
[0092] (8) In the numerical control device 10 according to any one of (1) to (7), the processing data may be accessible from the information processing device 20. This allows the user to conduct a more detailed investigation of the problem.
[0093] (9) In the numerical control device 10 according to any one of (1) to (8), the processing data may be output to the information processing device 20. By doing so, the numerical control device 10 can achieve the same effect as (8).
[0094] (10) The numerical control device 10 described in any one of (1) to (9) may be provided with an interrupt processing unit 1114 that executes an interrupt process when a recording condition is satisfied and, after the interrupt process is completed, resumes the original process that was being executed before the interrupt process was executed. In this way, the numerical control device 10 can record the processing data in the state when the malfunction occurs. [Explanation of symbols]
[0095] 1. Survey System 10 Numerical control device 110 Control Module 111 CPU 1111 Recording condition setting IF section 1112 Processing data specification information setting IF part 1113 Recording processing section 1114 Interrupt Processing Unit 1115 Program Execution Department 112 Local Memory 113 Storage section 131 Processing data storage unit 132 Recording condition memory section 133 Processing data specification information storage unit 134 Investigation program storage unit 120-1~120-n Processor Module 121 CPU 122 Local Memory 123 Storage section 140 Bus 20 Information processing device
Claims
1. A control device for controlling an industrial machine, comprising one or more processors and one or more memories for storing instructions to be executed by the processors and / or data to be processed, a recording condition storage unit that stores one or more recording conditions including at least one of execution of a branch instruction related to recording of the instruction and / or the data, execution of an instruction included in a function that performs a cross-check process of data in a safety function, and execution of a process of substituting an invalid argument; a processing data designation information storage unit that stores processing data designation information that designates, for each of the recording conditions, one of the instructions and / or the data, which is at least the internal information of the processor, the data stored in the memory, or one of the storage locations of the instructions executed by the processor, as processing data; a processing data storage unit that stores processing data designated by the processing data designation information; a recording processing unit that records, when the recording condition is satisfied, processing data designated by the processing data designation information corresponding to the recording condition in the processing data storage unit; A control device comprising:
2. The control device according to claim 1 , further comprising a recording condition setting interface unit for setting the recording conditions.
3. 3. The control device according to claim 1, further comprising a processing data designation information setting interface section that sets the processing data designation information.
4. a survey program storage unit that stores a survey program in an executable format that is executed when the recording condition is satisfied; The control device according to claim 1 , further comprising: a program execution unit that executes the investigation program when the recording condition is satisfied.
5. The control device according to claim 1 , wherein the recording conditions and / or the processing data designation information can be set and / or referenced from an external device.
6. The control device according to claim 4 , wherein at least one of the recording conditions, the processing data designation information, and the investigation program can be set and / or referenced from an external device.
7. The control device according to claim 1 , wherein the processing data can be referenced by an external device.
8. The control device according to claim 1 , wherein the processed data is output to an external device.
9. 9. The control device according to claim 1, further comprising an interrupt processing unit that executes an interrupt process when the recording condition is satisfied, and resumes an original process that was being executed before the interrupt process was executed after the interrupt process is completed.
Citation Information
Patent Citations
Numerical controller
JP1995084625A
Electronic equipment
JP2005004270A
Numerical control device and abnormality processing method by numerical control device
JP2007272545A
Fault data recording device and fault data recording program
JP2009237798A
Robot controller
JP2013054784A