Control devices and industrial machinery
By designing the analysis unit and the cache control instruction addition unit in the numerical control device, determining and pre-reading the instructions with low operation load, and efficiently deploying the subroutine, the problem of low cache memory usage efficiency is solved, and faster response time and higher processing efficiency are achieved.
Patent Information
- Application Number
- CN202011403536.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-05
- Filing Date
- 2020-12-02
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2040-12-02
AI Technical Summary
In the numerical control device, the expansion and deletion processing of programs in the cache memory takes time, and there are frequent processing of calling other programs through processing instructions in the program, resulting in low efficiency in the use of cache memory.
A control device is designed, including a storage area, a cache memory and a parsing unit for storing an action program. After the analysis unit judges and confirms the operation load judgment unit, the call confirmation unit, the cache control instruction addition unit and the cache control request unit, the analysis unit determines and confirms the operation load low command, reads and expands the subroutine in the cache memory, and adds the cache control instructions to optimize the use of the cache.
By efficiently expanding and managing programs in cache memory, response time on calls is reduced, overall processing efficiency is improved, and the impact on processing is reduced.
Smart Images

Figure CN112925262B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a control device and an industrial machine. Background Art
[0002] Industrial machines including machine tools and industrial robots operate based on signals from control devices such as computerized numerical control (CNC) devices and robot controllers. For example, the control device is incorporated into the industrial machine and provided together with the industrial machine.
[0003] The control device for controlling the industrial machinery stores the action program related to the action of the industrial machinery. The action program is, for example, a machining program in the case of a numerical control device, and is a robot program for controlling a robot in the case of a robot controller. In the case of a machining program, it includes instructions and numerical calculations for causing the axis to move, and the workpiece is machined by executing the machining program. In addition, the machining program is stored in a storage area such as a storage medium, and during machining, the numerical control device expands and executes the machining program in a cache memory. In the case of a robot program, it includes, for example, instructions related to a joint axis, and the robot is moved by executing the robot program. Similar to the machining program, the robot program is also stored in a storage area such as a storage medium, and during robot control, the robot controller expands and executes the robot program in a cache memory.
[0004] As an example of expanding a program in a cache memory, a command cache system is known, which fetches command data of a program executed by a central processing unit from a main storage program memory into a command cache in advance, and transmits the command data from the command cache to the central processing unit, characterized in that the command cache system has a unit that configures the command cache as a two-sided structure, and alternately switches between one side and the other side of the command cache while repeating the following actions: in parallel with the action of the central processing unit taking out command data from one side of the command cache and executing it, the command data of the next program is transmitted from the main storage program memory to the other side of the command cache; A cache, after the execution of the command data taken out from the command cache on one side is completed, switches the connection between the command cache on the one side and the command cache on the other side, and in parallel with the action of the central processing unit taking out the command data from the command cache on the other side and executing it, transfers the command data of the next program from the main storage program memory to the command cache on the one side, divides the program into program fragments that converge within the capacity of one side of the command cache, and sets a program structure in which the execution of the program in each program fragment is completed without crossing other program fragments, and transfers the program fragment as a unit to the command cache (refer to patent document 1).
[0005] Prior art literature
[0006] Patent Literature
[0007] Patent Document 1: Japanese Patent Application Publication No. 2005-266997 Summary of the invention
[0008] Problems to be solved by the invention
[0009] The process of expanding a program in a cache memory or deleting a program from a cache memory takes time, so a structure that can efficiently use the cache memory is required.
[0010] In particular, in control devices for controlling industrial machinery such as numerical controllers, there are many processes for calling other programs through instructions in a machining program. As an example, in an automatic disk, subroutines are frequently called. Therefore, a structure for efficiently developing machining programs and the like in a cache memory is required under the current hardware structure.
[0011] Means for solving problems
[0012] One embodiment of the present disclosure is a control device for controlling an industrial machine, comprising: a storage area storing an action program related to an action of the industrial machine; a cache memory storing the action program read from the storage area; a cache control unit controlling writing to and discarding of the cache memory; and a parsing unit parsing the action program deployed in the cache memory, the parsing unit comprising: an operation load determination unit determining whether an operation load related to a CPU of an instruction included in the action program is lower than a specified value; and a call confirmation unit pre-reading the instructions included in the action program deployed in the cache memory when the operation load determination unit determines that the operation load is lower than a specified value. instruction after the instruction, confirming whether there is a calling instruction of a subroutine; a cache control instruction adding unit, which, when the calling instruction of the subroutine is confirmed by the calling confirmation unit, adds a cache control instruction related to expanding the subroutine to the cache memory to the instruction according to specified conditions; and a cache control request unit, which makes a cache control request for the cache memory corresponding to the cache control instruction added by the cache control instruction adding unit, the cache control unit comprising: a cache control request processing unit, which expands the subroutine in the cache memory based on the cache control request made by the cache control request unit.
[0013] Effects of the Invention
[0014] According to one embodiment, a control device and an industrial machine capable of efficiently performing processing using a cache memory can be provided. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is an overall configuration diagram of the production system and a functional block diagram of the numerical control device in this embodiment.
[0016] Figure 2 1 is a flowchart showing a control process in the numerical control device in the present embodiment.
[0017] Figure 3 This is a flowchart showing a subroutine call instruction search process in the numerical controller according to the present embodiment.
[0018] Figure 4A It is a diagram showing an example of a processing program in this embodiment.
[0019] Figure 4B It is a diagram showing an example of a processing program in this embodiment.
[0020] Figure 5The figure shows an example of the expansion process to the cache memory in this embodiment.
[0021] Figure 6 The figure shows another example of the expansion process to the cache memory in this embodiment.
[0022] Description of Reference Numerals
[0023] 1 numerical control device; 4 machine tool; 10 CPU; 11 cache control unit; 12 cache control request processing unit; 13 analysis unit; 14 operation load judgment unit; 15 call confirmation unit; 16 control instruction adding unit (cache control instruction adding unit); 17 cache control request unit; 18 operation unit; 20 storage device; 21 ROM; 22 program storage unit; 23 load information storage unit; 25 RAM; 26 cache memory; 100 production system. DETAILED DESCRIPTION
[0024] (Implementation Method)
[0025] First, an embodiment of one mode will be described in outline. In this embodiment, a machine tool is exemplified as an industrial machine. In addition, in this embodiment, a control device is exemplified as a numerical control device, and an action program is exemplified as a machining program.
[0026] This embodiment relates to automatically adding a command for developing the subroutine in a cache memory to a command with a low operating load when a machining program is executed in a numerical controller and a subroutine is called in the machining program.
[0027] Next, refer to Figure 1 The configuration of a production system 100 according to the present embodiment will be described.
[0028] Figure 1 The production system 100 shown includes a numerical control device 1 and a machine tool 4. The numerical control device 1 is a control device that controls various actions performed by the machine tool 4, such as for machining a workpiece. The numerical control device 1 and the machine tool 4 are connected to each other in a communicative manner via a communication line N. The communication line N only needs to be able to transmit and receive signals.
[0029] Here, in this embodiment, a configuration is exemplified in which the numerical controller 1 and the machine tool 4 are separate bodies. However, the present invention is not limited thereto, and the numerical controller 1 and the machine tool 4 may be integrated and included in the machine tool 4 .
[0030] The numerical control device 1 controls the machine tool 4 .
[0031] The numerical controller 1 includes a CPU 10, a storage device 20, and a communication IF (interface) 29. The numerical controller 1 is also connected to an input device 31 and a display device 32 in a communicable manner.
[0032] The CPU 10 is a processor that controls the entire numerical controller 1 . The CPU 10 expands a machining program stored in the program storage unit 22 of the storage device 20 in the cache memory 26 , and executes the machining program in the cache memory 26 to control the entire numerical controller 1 .
[0033] The storage device 20 includes a ROM (Read Only Memory) 21 and a RAM (Random Access Memory) 25 .
[0034] The ROM 21 includes a program storage unit 22 and a load information storage unit 23 .
[0035] The program storage unit 22 is a storage area for storing various programs such as machining programs, subroutines called by machining programs, and other various system programs. The CPU 10 may store machining programs and the like in advance from a storage medium in the program storage unit 22 via an external device (not shown).
[0036] The load information storage unit 23 stores the operation load on the CPU 10 for each command of the machining program. The operation load on the CPU 10 for each command will be described in detail in the functional description of the operation load determination unit 14 to be described later.
[0037] The RAM 25 includes a cache memory 26 .
[0038] The cache memory 26 is a high-speed storage device that stores the machining program read from the program storage unit 22. The cache memory 26 can relatively reduce access to the low-speed ROM 21 and speed up processing by pre-expanding (caching) the program.
[0039] As described later, the cache memory 26 is composed of a plurality of divided areas.
[0040] The CPU 10 includes a cache control unit 11 , an analysis unit 13 , and an operation unit 18 . The cache control unit 11 , the analysis unit 13 , and the operation unit 18 are functional units in the CPU 10 .
[0041] The cache control unit 11 develops the machining program in the cache memory 26. The cache control unit 11 includes a cache control request processing unit 12.
[0042] The cache control request processing unit 12 develops a subroutine called from a machining program in accordance with a cache control request described later in the cache memory 26. In addition, the cache control request processing unit 12 deletes unnecessary subroutines from the cache memory 26.
[0043] The analyzing unit 13 analyzes the machining program developed in the cache memory 26. The analyzing unit 13 includes an operation load determining unit 14, a call confirming unit 15, a control instruction adding unit 16 (cache control instruction adding unit), and a cache control requesting unit 17.
[0044] The operation load determination unit 14 determines whether the operation load on the CPU 10 of the instructions included in the machining program is lower than a predetermined value. Here, the predetermined value is a preset value, for example, it can also be set by an operator. More specifically, the operation load determination unit 14 can also refer to the load information storage unit 23 to determine whether the operation load on the CPU 10 of the instructions included in the machining program is lower than a predetermined value.
[0045] The operation load determination unit 14 can determine the operation load related to the CPU 10 by, for example, using the utilization rate of the CPU 10. For example, the load information storage unit 23 may store the measured values such as the time taken from the start to the end and the CPU utilization rate information for each instruction, and the operation load determination unit 14 determines that the operation load is low when the instruction has a CPU utilization rate of a% or less or when the CPU utilization rate is b% or less and the processing time is c milliseconds or more. In addition, a, b, and c are all predetermined values and are preset values.
[0046] In addition, the operation load judgment unit 14 can also use the feed speed of the axis movement instruction contained in the machining program, etc. If it is the feed speed of the axis movement instruction, if the feed speed is a small value, the operation load becomes low. Specifically, when the instruction being analyzed by the analysis unit 13 is "G01X100.0F1000", the X axis is a linear axis, the unit of the movement amount is "mm", and 1000 represents the movement speed "mm / min". If the movement speed is d (d is a specified value) or less, it can be judged that the operation load is low. In addition, when the instruction involves a rotating axis, the unit of the movement amount is "deg" and the speed is "deg / min".
[0047] In addition, the presence or absence of a dwell instruction (dwell) and the waiting time (milliseconds) of the dwell instruction may be used to determine the operating load of the CPU 10. If a dwell instruction is present, the operating load is naturally low.
[0048] In general, if a machining program is composed of a series of small blocks, a large number of calculation processes using the CPU 10 are performed, so that the operation load tends to increase.
[0049] When the operation load determination unit 14 determines that the operation load of a command included in the machining program expanded in the cache memory 26 is lower than a predetermined value, the call confirmation unit 15 determines whether there is a subroutine call command following the command included in the machining program expanded in the cache memory 26 .
[0050] When the call confirmation unit 15 confirms the call instruction of the subroutine, the control instruction adding unit 16 adds a cache control instruction related to the expansion of the subroutine into the cache memory 26 to the instruction according to a predetermined condition.
[0051] Here, when the call confirmation unit 15 confirms the call instruction of the subroutine, the control instruction adding unit 16 does not necessarily add the cache control instruction related to the expansion of the subroutine to the cache memory 26. For example, when there is a resolution suppression instruction (mask buffer) before the call instruction of the subroutine, the cache control instruction is not added.
[0052] In addition, the control instruction adding unit 16 determines whether the designated subroutine has been expanded in the cache memory 26. If the subroutine has not been expanded, the control instruction adding unit 16 adds a cache control instruction related to the subroutine expanded from the head data to the cache memory 26 to the instruction. Furthermore, the control instruction adding unit 16 determines whether the designated subroutine has been expanded in the cache memory 26. If the subroutine has been expanded, based on the content of the subroutine's call instruction, the control instruction adding unit 16 adds a cache control instruction related to the subroutine expanded from the call position (specified position) to the cache memory 26 to the instruction. Here, the control instruction adding unit 16 usually expands the head data. However, if the call position is specified, the control instruction adding unit 16 only needs to expand the subroutine after the call position in the cache memory 26.
[0053] The cache control request unit 17 makes a cache control request (security request) for the cache memory 26 corresponding to the cache control instruction added by the control instruction adding unit 16 to the cache control unit 11. Specifically, in order to deploy a subroutine to the cache memory 26, the cache control request unit 17 makes a security request to the cache control unit 11 to the cache memory 26. In addition, when the cache control instruction is a cache deletion request, the cache control request unit 17 makes a cache deletion request from the cache memory 26 to the cache control unit 11.
[0054] The operation unit 18 operates the machine tool 4 by performing axis control based on the analyzed command transmitted from the analysis unit 13 .
[0055] The communication IF 29 is constituted by a predetermined connector such as an RS232C connector, for example, and is a communication control device for directly connecting to the machine tool 4 .
[0056] The input device 31 and the display device 32 are, for example, a display / MDI unit. The display / MDI unit is a manual data input device including a display device, a keyboard, and the like.
[0057] [Control Processing]
[0058] Next, the control process in the numerical control device 1 of the present embodiment will be described.
[0059] Figure 2 and Figure 3 This is a flowchart related to the control process in the numerical control device 1 .
[0060] For example, the operator turns on a power source (not shown) of the numerical controller 1 to start the numerical controller 1. Figure 2 In step S (hereinafter, “step S” will be referred to as “S” for short) 11 , the CPU 10 (cache control unit 11 ) of the numerical controller 1 expands the machining program stored in the program storage unit 22 into the cache memory 26 .
[0061] In S12 , the CPU 10 (analyzing unit 13 ) analyzes the machining program developed in the cache memory 26 in S11 .
[0062] Furthermore, the CPU 10 (analyzing unit 13 ) transmits the command analyzed in S12 to the operating unit 18 .
[0063] In addition, the CPU 10 (operation load determination unit 14) may store the operation load related to the CPU 10 when executing the command transmitted to the operation unit 18 in association with the command in the load information storage unit 23. By this process, the load information storage unit 23 accumulates the measured value of the operation load for each command.
[0064] In S13, the CPU 10 (operation load determination unit 14) determines whether the operation load on the CPU 10 of the instructions included in the machining program expanded in the cache memory 26 is below a predetermined value. If it is below the predetermined value (S13: Yes), the CPU 10 transfers the process to S14. On the other hand, if it is not below the predetermined value (S13: No), the CPU 10 transfers the process to S15.
[0065] In S14 , the CPU 10 pre-reads the instruction after the instruction, and performs a subroutine calling instruction search process to search for the subroutine calling instruction.
[0066] Here, based on Figure 3 Describes the search process for subroutine call instructions.
[0067] exist Figure 3 In S21 of the above, the CPU 10 (analyzer 13) performs a pre-reading of the instruction. In addition, the numerical controller 1 sets in advance which block destination is to be pre-read.
[0068] In S22, the CPU 10 (call confirmation unit 15) determines whether there is a call instruction for the subroutine. If there is a call instruction for the subroutine (S22: Yes), the CPU 10 transfers the processing to S23. On the other hand, if there is no call instruction for the subroutine (S22: No), the CPU 10 transfers the processing to S24. Figure 2 S15.
[0069] In S23, the CPU 10 (control instruction adding unit 16) determines whether there is a resolution suppression instruction before the call instruction of the subroutine. If there is a resolution suppression instruction (S23: Yes), the CPU 10 transfers the processing to Figure 2 On the other hand, when there is no analysis suppression instruction (S23: No), the CPU 10 shifts the process to S24.
[0070] In S24, the CPU 10 (control instruction adding unit 16) determines whether the subroutine has been developed in the cache memory 26. If it has been developed in the cache memory 26 (S24: Yes), the CPU 10 transfers the process to S25. On the other hand, if it has not been developed in the cache memory 26 (S24: No), the CPU 10 transfers the process to S26.
[0071] In S25, the CPU 10 (control instruction adding unit 16) adds a cache control instruction (security request) related to the subroutine from the designated position to the cache memory 26. Here, if the designated position is specified, it is the subroutine from the designated position, and if the designated position is not specified, it is the subroutine from the beginning. Thereafter, the CPU 10 transfers the processing to S27.
[0072] In S26 , the CPU 10 (control instruction adding unit 16 ) adds a cache control instruction (reservation request) related to the subroutine to be expanded from the head position to the cache memory 26 , to the instruction.
[0073] In step S27, the CPU 10 (cache control request unit 17) issues a cache control request to the cache memory 26 corresponding to the added cache control instruction (security request) to the cache control unit 11. Then, the CPU 10 (cache control request processing unit 12) performs a cache process to expand the subroutine in the cache memory 26 according to the cache control request. Thereafter, the CPU 10 transfers the process to the next step. Figure 2 S15.
[0074] exist Figure 2 In S15, the CPU 10 determines whether to terminate the machining program. For example, the operator performs a reset operation (not shown) of the numerical control device 1, whereby the CPU 10 determines that the machining program is terminated. In the case of terminating the machining program (S15: Yes), the CPU 10 terminates the present processing. On the other hand, in the case of not terminating the machining program (S15: No), the CPU 10 transfers the processing to S12.
[0075] (Specific example 1)
[0076] Next, the additional processing of the cache control instruction will be described based on a specific example.
[0077] Figure 4A An example of a machining program PG01 called “O0001” is shown.
[0078] The machining program PG01 is a program that processes one instruction as one line and is processed in program blocks. Here, the program block B03 indicates that the operating load associated with the CPU 10 is below a specified value and the operating load is low. In addition, "M08" is an instruction indicating that the coolant (cooling water) is turned on. In this case, the CPU 10 sends Figure 4A The CPU 10 reads the machining program PG01 in the direction of the arrow (downward). Then, the CPU 10 recognizes the calling instruction of the subroutine "O0002", that is, the program block B06. Then, Figure 4B As shown in the machining program PG01-A, the CPU 10 returns to the original program block B03 ( Figure 4A ) adds a cache control instruction (secure request) "CACHE O2" related to the subroutine "O0002" to the cache memory 26, thereby setting the program block B03 to the program block B03-A.
[0079] Thus, the CPU 10 makes a cache control request to the cache memory 26 corresponding to the cache control instruction (secure request) added to the instruction, and performs cache processing to expand the subroutine in the cache memory 26 based on the cache control request. Therefore, when the instruction reaches the program block B06, the subroutine has already been expanded in the cache memory 26, so that the processing can be performed efficiently.
[0080] (Specific example 2)
[0081] Next, the expansion process to the cache memory 26 will be described.
[0082] Figure 5 This is an example of a case where no subroutine is cached (expanded) in the cache memory 26 .
[0083] In this case, the parsing unit 13 confirms the cache memory 26 (S1), and makes a cache control request (S2) corresponding to the cache control instruction (ensure request) to the cache control unit 11. When receiving the cache control request, the cache control unit 11 reads the corresponding subroutine from the program storage unit 22 (S3). In addition, the cache control unit 11 expands the read subroutine in the cache memory 26 (S4). In the cache memory 26, since no subroutine is cached before this processing, the read subroutine is expanded to the beginning segment area 27-1. In addition, when the subroutine is larger than a certain size, the data is divided into a certain size and then expanded into a plurality of segment areas 27-n (n is a natural number).
[0084] On the other hand, based on Figure 6 A case where the data is already cached in the cache memory 26 will be described.
[0085] In this case, the analysis unit 13 confirms the cache memory 26 (S5), and makes a cache control request (S6) corresponding to the cache control instruction (ensure request) to the cache control unit 11. Here, although the subroutine has been expanded in the divided areas 27-11 to 27-16, there is no head data. Therefore, the cache control request corresponding to the cache control instruction (ensure request) is a request related to the expansion of the subroutine starting from the head data. When receiving the cache control request, the cache control unit 11 reads the corresponding processing program from the program storage unit 22 (S7). In addition, the cache control unit 11 expands the read processing program in the cache memory 26 (S8). At this time, since no caching is performed in the head divided area 27-1 of the cache memory 26, the read processing program is expanded to the head divided area 27-1. In addition, the already expanded subroutine can also be deleted before expansion.
[0086] Various types of non-transitory computer-readable media (non-transitory computer-readable medium) can be used to store the programs used in each embodiment and provide them to the computer. Non-transitory computer-readable media include various types of tangible storage media (tangible storage medium). Examples of non-transitory computer-readable media include magnetic recording media (e.g., floppy disks, magnetic tapes, hard disk drives), optical magnetic recording media (e.g., optical magnetic disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, RAMs (random access memory)). In addition, the program can also be provided to the computer via various types of transitory computer-readable media (transitory computer-readable medium). Examples of transitory computer-readable media include electrical signals, optical signals, and electromagnetic waves. Transitory computer-readable media can provide the program to the computer via a wired communication path such as an electric wire or an optical fiber, or a wireless communication path.
[0087] The above-described embodiment is one of the preferred embodiments of the present invention, but the scope of the present invention is not limited to the above-described embodiment, and the present invention can be implemented in various modified forms without departing from the gist of the present invention.
[0088] (Variant 1)
[0089] In the above-mentioned embodiment, a machine tool is exemplified as an industrial machine, and the machine tool and the control device are described as different devices, but the present invention is not limited to this. As described above, the machine tool and the control device may be an integrated device.
[0090] In addition, as a control device, for example, a robot controller for controlling an industrial robot may be used instead of a numerical controller. Furthermore, as an industrial machine, for example, an industrial robot may be used instead of a machine tool.
[0091] (Variant 2)
[0092] In the above-mentioned embodiment, there is no particular reference to a system (operation unit), and for example, the present invention can be used even when a machine tool has multiple systems. In the case where there are multiple systems, the machining program uses different programs for each system. Even in such a case, the processing can be performed independently in each system.
[0093] Specifically, consider a case where, for example, a machine tool has two systems and different machining programs are executed in each system. In this case, the machining programs can be executed independently in each system, for example, each system also has a waiting instruction and an operating load. For example, if a waiting instruction exists in the first system, the second system can continue to operate independently of the cache control of the first system during the cache control. In addition, if a waiting instruction is also found in the second system during the cache control of the first system, the cache control can also be performed in the second system.
[0094] (Variant 3)
[0095] In the above-mentioned embodiment, the case where a cache control instruction of a subroutine is added to the instruction with a low operation load is described as an example (see Figure 4B ), but is not limited to this. For example, a subroutine cache control instruction may be added immediately before an instruction with a low operating load. Even in this case, since the subroutine is cached when an instruction with a low operating load is executed, the influence of the processing can be suppressed.
[0096] As described above, according to the present embodiment, for example, the following effects can be obtained.
[0097] Technical solution (1): A numerical control device 1 for controlling a machine tool 4 comprises: a program storage unit 22 for storing a machining program related to an operation of the machine tool 4; a cache memory 26 for storing a machining program read from the program storage unit 22; a cache control unit 11 for controlling writing and discarding of the cache memory 26; and an analysis unit 13 for analyzing the machining program expanded in the cache memory 26, the analysis unit 13 comprising: an operation load determination unit 14 for determining whether an operation load related to a CPU 10 of an instruction included in the machining program is lower than a prescribed value; and a call confirmation unit 15 for pre-reading the instructions expanded in the cache memory 26 when the operation load determination unit 14 determines that the operation load is lower than a prescribed value. The instructions after the instruction included in the processing program are confirmed whether there is a subroutine calling instruction; a control instruction adding unit 16, which, when the subroutine calling instruction is confirmed by the call confirmation unit 15, adds the cache control instruction related to the expansion of the subroutine to the cache memory 26 to the instruction according to the specified conditions; and a cache control request unit 17, which makes a cache control request for the cache memory 26 corresponding to the cache control instruction added by the control instruction adding unit 16 to the cache control unit 11, and the cache control unit 11 has: a cache control request processing unit 12, which expands the subroutine in the cache memory 26 based on the cache control request of the cache control request unit 17.
[0098] Thus, the numerical control device 1 can develop the subroutine in the cache memory 26 before the subroutine call instruction. As a result, the response time at the time of calling can be shortened.
[0099] Furthermore, the numerical controller 1 can reduce the influence on the processing by setting the timing of the cache control to the time of the instruction with a low operating load.
[0100] Furthermore, for example, if all data are cached in the cache memory 26 at startup, the startup time is affected. However, by performing the cache during the processing of the machining program, the startup time is not affected and unnecessary caching can be suppressed.
[0101] Technical solution (2): It is also possible that the numerical control device 1 described in the technical solution (1) has a load information storage unit 23 that stores the operating load related to the CPU 10 for each instruction, and the operating load judgment unit 14 refers to the load information storage unit 23 to judge whether the operating load related to the CPU 10 is lower than a specified value.
[0102] This makes it possible to determine a command for a low operating load based on actual measurement values obtained from past operating histories.
[0103] Technical solution (3): It may also be that in the numerical control device 1 described in technical solution (1) or technical solution (2), when a subroutine calling instruction is confirmed by the calling confirmation unit 15, the control instruction adding unit 16 appends the cache control instruction to the instruction only when there is no parsing suppression instruction before the subroutine calling instruction.
[0104] Thus, when there is an analysis suppression instruction, pre-reading is prohibited, so that this situation can be eliminated. In addition, if there is no analysis suppression instruction, the subroutine can be developed in the cache memory 26.
[0105] Technical solution (4): It may also be that in the numerical control device 1 described in any one of technical solutions (1) to technical solution (3), the control instruction adding unit 16 determines whether the specified subroutine has been expanded in the cache memory 26, and if the subroutine has not been expanded, a cache control instruction related to expanding the subroutine from the beginning data into the cache memory 26 is added to the instruction; if the subroutine has been expanded, based on the content of the subroutine calling instruction, a cache control instruction related to expanding the subroutine from the specified position into the cache memory 26 is added to the instruction.
[0106] Thus, when the subroutine is not developed in the cache memory 26 , the subroutine can be developed in the cache memory 26 .
[0107] Even when a subroutine is already expanded in the cache memory 26, the program from the designated position can be expanded in the cache memory 26. Even when a subroutine is already expanded in the cache memory 26, for example, the subroutine from the designated position (including the beginning) may not be in the cache memory 26, or the expanded information may not be the latest due to editing during the process. Even in this case, since the program from the designated position is expanded in the cache memory 26, it is possible to perform the processing accurately.
[0108] Technical solution (5): It may also be that in the numerical control device 1 described in any one of technical solutions (1) to technical solution (4), the machining program is executed in each system respectively, and processing based on the cache control unit 11 and the analysis unit 13 is performed for each system.
[0109] This enables independent processing in each system.
Claims
1. A control device for controlling industrial machinery, characterized in that: The control device has: a storage area storing an action program involved in the action of the industrial machine; a cache memory storing the action program read from the storage area; a cache control unit that controls writing and discarding of data to the cache memory; and an analyzing unit that analyzes the action program developed in the cache memory, The analysis unit comprises: an operation load determination unit for determining whether the operation load on the CPU of the instructions included in the operation program is lower than a predetermined value, a call confirmation unit for pre-reading instructions subsequent to the instruction included in the action program expanded in the cache memory to confirm whether there is a call instruction of a subroutine when the operation load determination unit determines that the operation load is lower than a predetermined value; a cache control instruction adding unit for adding, when the call confirmation unit confirms the call instruction of the subroutine, a cache control instruction related to the expansion of the subroutine into the cache memory to the instruction according to a predetermined condition; as well as a cache control request unit configured to make a cache control request to the cache memory corresponding to the cache control instruction added by the cache control instruction adding unit, The cache control unit includes a cache control request processing unit configured to develop the subroutine in the cache memory based on the cache control request issued by the cache control request unit.
2. The control device according to claim 1, characterized in that: The control device includes a load information storage unit for storing an operation load related to a CPU for each instruction. The operation load determination unit refers to the load information storage unit to determine whether the operation load associated with the CPU is lower than a predetermined value.
3. The control device according to claim 1 or 2, characterized in that: When the call confirmation unit confirms the call instruction of the subroutine, the cache control instruction adding unit adds the cache control instruction to the instruction only when there is no resolution suppression instruction before the call instruction of the subroutine.
4. The control device according to claim 1 or 2, characterized in that: The cache control instruction appending unit determines whether the specified subroutine has been expanded in the cache memory. If the subroutine has not been expanded, the cache control instruction related to expanding the subroutine from the beginning data into the cache memory is added to the instruction. If the subroutine has been expanded, based on the content of the calling instruction of the subroutine, the cache control instruction related to expanding the subroutine from the specified position into the cache memory is added to the instruction.
5. The control device according to claim 1 or 2, characterized in that: The action program is a program executed in each system. The cache control unit and the analysis unit perform processing for each system.
6. An industrial machine, characterized in that: A control device comprising any one of claims 1 to 5.
Citation Information
Patent Citations
Instruction cache system
JP2005266997A
Expedited and low power command sequence servicing
US20060015653A1
Processor, information processing apparatus, and power consumption management method
US20140068299A1