numerical control device
By performing condition determination and reducing parsing processing during the reading of condition waiting program blocks in the CNC device, the problem of excessive parsing processing load is solved, thereby improving processing capacity and ensuring real-time performance, and enhancing the readability and flexibility of CNC programs.
Patent Information
- Application Number
- CN202380074021.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2043-03-14
AI Technical Summary
Existing CNC devices suffer from excessive processing load in condition waiting programs, and the use of condition waiting programs is limited, resulting in insufficient processing capacity and difficulty in ensuring real-time performance and readability.
The parsing processing unit repeatedly checks the success or failure of the condition while the condition waiting block is being read, until the condition is met. The parsing processing ends when the condition is not met, reducing the number and frequency of parsing blocks and allowing other processing to be performed during the condition waiting period.
It reduces the load of parsing and processing, improves the processing capability of CNC devices, ensures real-time performance and readability, can handle various complex conditions, and is not limited by condition waiting programs.
Smart Images

Figure CN120077336B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a numerical control device that controls a control object by execution of a numerical control program. BACKGROUND
[0002] A numerical control device that controls a drive section of a machine tool by execution of a numerical control program sometimes interrupts the execution of the numerical control program until a condition is established. The condition is, for example, the input of an external signal from the outside of the numerical control device, or the end of an operation of another system other than a system including the machine tool. The condition waiting for the establishment of the condition is, for example, realized by a condition waiting program having an infinite loop. The condition waiting program having the infinite loop is, for example, a program that repeats a designated process until a prescribed condition is established.
[0003] In the condition waiting program having the infinite loop, in a case where a program block in the program does not move a shaft of the drive section, for example, the analysis of the program block not moving the shaft is sometimes repeatedly executed between one cycle, for example, a cycle in which an interrupt signal is input. In this case, the following problem occurs. The time of the analysis process between one cycle in the numerical control device becomes long, and the time in which processes other than the analysis process can be executed is limited.
[0004] In view of the above problem, a numerical control device is disclosed in Patent Literature 1, which analyzes the contents of a process of a condition waiting program block and stores the analysis result, and then performs an execution process of the condition waiting program block based on the stored analysis result.
[0005] Patent Literature 1: Japanese Patent Application Laid-Open (kokai) No. 2003-108209 SUMMARY
[0006] However, in the case of the technology disclosed in the above Patent Literature 1, during the execution of the condition not being established, the analysis result obtained by the analysis process once must be repeatedly and continuously used in the execution process of the condition waiting program block thereafter, and therefore the conditions in which the condition waiting program can be used are limited. For example, as in the case of comparing a plurality of external signals, or the case of comparing the result of a calculation formula including a variable value, a condition that requires an operation each time cannot be processed.
[0007] The present application has been made in view of the above circumstances, and has an object to provide a numerical control device that reduces the load of the analysis process and does not limit the conditions in which a condition waiting program can be used.
[0008] To solve the above problems and achieve the object, the numerically controlled device according to the present application has: a parsing processing section that parses a program block indicated by a program counter from a numerical control program; and a control processing section that generates an instruction for driving a control object based on a result of the parsing in the parsing processing section. The parsing processing section, in a case where a conditional wait program block in which a conditional expression indicating a condition for executing the numerical control program is described is read in, repeatedly performs a determination of success or failure of the condition until the condition is established, and parses the conditional wait program block until the condition is established, before the determinations of success or failure of the condition at the first time and the second time and thereafter.
[0009] Effects of the Invention
[0010] The numerically controlled device according to the present application has the effect of reducing the load of the parsing processing and not restricting the use condition of the conditional wait program. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a diagram showing a configuration example of a machine tool having the numerically controlled device according to Embodiment 1.
[0012] Figure 2 is a flowchart showing a processing sequence performed by the parsing processing section of the numerically controlled device according to Embodiment 1.
[0013] Figure 3 is a diagram for explaining an example of a processing time in the numerically controlled device according to Embodiment 1.
[0014] Figure 4 is a diagram for explaining an example of a processing time in the numerically controlled device according to Embodiment 1.
[0015] Figure 5 is a flowchart showing a processing sequence performed by the parsing processing section in a case where a limited time is described in the conditional wait program block in Embodiment 1.
[0016] Figure 6 is a diagram showing a configuration example of a control circuit according to Embodiment 1.
[0017] Figure 7 is a diagram showing a configuration example of a dedicated hardware circuit according to Embodiment 1. DETAILED DESCRIPTION
[0018] The numerically controlled device according to Embodiment 1 will be described in detail below based on the drawings.
[0019] Embodiment 1.
[0020] Figure 1is a view showing a configuration example of a machine tool 20 having the numerical control device 1 according to Embodiment 1. The machine tool 20 has the numerical control device 1, an operation panel 2, a monitor 3, and a drive section 4. The operation panel 2, the monitor 3, and the drive section 4 are connected to the numerical control device 1, respectively. The numerical control device 1 performs communication with the operation panel 2 and the monitor 3, and sends an instruction to the drive section 4 according to a description of a numerical control program.
[0021] The operation panel 2 has, for example, a keyboard, a mouse, a key pad, or a touch panel, or the like. The operation panel 2 receives an operation by a user of the machine tool 20, and sends information indicating the operation content to the numerical control device 1. The monitor 3 is, for example, an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) display, or the like. The monitor 3 displays information processed by the numerical control device 1 on a screen.
[0022] The drive section 4 has a motor drive section 11 and a servo motor 12. The motor drive section 11 drives the servo motor 12 based on an instruction from the numerical control device 1. In Figure 1 In the present embodiment, two sets of the motor drive section 11 and the servo motor 12 are shown, but the number of sets of the motor drive section 11 and the servo motor 12 provided in the drive section 4 is arbitrary.
[0023] The numerical control device 1 has a program memory 5, a parsing processing section 6, a control processing section 7, a drive processing section 8, an input / output processing section 9, and a display processing section 10. A numerical control program is stored in the program memory 5. The numerical control program is composed of a plurality of program blocks.
[0024] The parsing processing section 6 sequentially parses the numerical control program for each program block. The parsing processing section 6 reads a program block indicated by a program counter into the program block, and parses the program block. The program counter is a register that stores an address indicating a position of a program block to be executed next. The parsing processing section 6 reads the program block from a position indicated by the address stored in the program counter.
[0025] In a case where the program block read into the parsing processing section 6 is a program block not accompanied by a shaft movement, the parsing processing section 6 performs reading and parsing of a next program block next. In a case where the program block read into the parsing processing section 6 is a program block accompanied by a shaft movement, the parsing processing section 6 sends a result of the parsing to the control processing section 7.
[0026] The control processing section 7 generates an instruction to cause the drive section 4, which is a control target, to drive, based on the result of the analysis by the analysis processing section 6. The control processing section 7, for example, generates an instruction of a coordinate, which is a target of movement by the drive of the drive section 4, or a moving speed, or the like. The control processing section 7 transmits the generated instruction to the drive processing section 8. The drive processing section 8 generates an instruction to control each servo motor 12, based on the instruction generated by the control processing section 7. The drive processing section 8 transmits the generated instruction to each motor drive section 11.
[0027] The input / output processing section 9 performs processing when information is input from the operation panel 2 and processing when information is output to the operation panel 2. The display processing section 10 performs processing when information processed by the numerical control device 1 is displayed on the monitor 3. The display processing section 10 outputs information for display to the monitor 3 and inputs information from the monitor 3. When the analysis processing section 6, the control processing section 7, and the drive processing section 8 do not perform processing, the processing of the input / output processing section 9 or the display processing section 10 is performed.
[0028] The analysis processing section 6, in a case where a conditional wait program block, which contains a description of a condition to perform the execution of the numerical control program, is read in, repeatedly performs determination of success or failure of the condition until the condition is established. A condition to perform the execution of the numerical control program is described in the conditional wait program block. A condition expression, which indicates the condition to perform the execution of the numerical control program, is described in the conditional wait program block. The analysis processing section 6, until the condition is established, analyzes the program block in which the condition expression is described, that is, the conditional wait program block, before the determination of success or failure of the condition at the first time and the second time and thereafter.
[0029] For example, the analysis processing section 6 analyzes the program block in which the condition expression is described before the determination of the condition at the first time, and then analyzes the program block in which the condition expression is described before the determination of the condition at the second time and thereafter. At this time, the analysis processing section 6 can analyze the program block in which the condition expression is described each time before the determination of the condition at the second time and thereafter, or can analyze the program block in which the condition expression is described at least one time or more. In addition, the analysis processing section 6 can analyze only the program block in which the condition expression is described, or can analyze only the condition expression. The analysis processing section 6, in a case where the conditional wait program block is read in, does not update the program counter but performs the next determination if the condition is not established, and updates the program counter if the condition is established.
[0030] An operator can be included in the condition expression. In this case, the analysis processing section 6 performs an operation on the condition expression including the operator. An example of the format of the conditional wait program block in which the condition expression is described and an example of the conditional wait program block including the operator are shown below.
[0031] WAIT [conditional expression]
[0032] (Example) WAIT [#3013 EQ 1] (waits until #3013 becomes 1)
[0033] Next, the processing performed by the analysis processing section 6 will be described. Figure 2 is a flowchart showing the processing sequence performed by the analysis processing section 6 of the numerical control device 1 according to Embodiment 1.
[0034] In step S1, the analysis processing section 6 reads in the program block indicated by the program counter. In step S2, the analysis processing section 6 analyzes the program block read in step S1. The analysis processing section 6 analyzes the content of the command indicated by the program block. In the case where the conditional expression contains an operator, the analysis processing section 6 acquires the operation result of the conditional expression by analysis.
[0035] In step S3, the analysis processing section 6 determines whether the content of the command analyzed in step S2 is a conditional wait. That is, the analysis processing section 6 determines whether the program block read in step S1 is a conditional wait program block. Here, it is assumed that the conditional wait program block is the WAIT program block shown in the above format. The analysis processing section 6 determines that the read-in program block is a conditional wait program block in the case where the read-in program block is a WAIT program block. In the case where the content of the command is a conditional wait (step S3, Yes), the analysis processing section 6 causes the sequence to proceed to step S4. On the other hand, in the case where the content of the command is not a conditional wait (step S3, No), the analysis processing section 6 causes the sequence to proceed to step S5.
[0036] In step S4, the analysis processing section 6 determines whether the conditional expression is true. That is, the analysis processing section 6 performs conditional determination. In the case where the conditional expression is true (step S4, Yes), the analysis processing section 6 causes the sequence to proceed to step S6. On the other hand, in the case where the conditional expression is not true (step S4, No), the analysis processing section 6 ends the processing according to the sequence shown in Figure 2 In the case where the conditional expression is not true, the analysis processing section 6 ends the analysis processing without updating the program counter, and performs the analysis of the conditional expression again through the next analysis processing.
[0037] In step S5, the analysis processing section 6 performs the processing indicated in the command with respect to the program block determined not to be a conditional wait program block. If step S5 is ended, the analysis processing section 6 causes the sequence to proceed to step S6.
[0038] In step S6, the analysis processing section 6 updates the program counter with respect to the program block to be executed next. Next, in step S7, the analysis processing section 6 determines whether the command for the axis movement is reached or the number of times of analysis reaches the maximum number. The maximum number of times of analysis is a number of times set in advance.
[0039] In a case where the command for the axis movement is not reached and the number of times of analysis does not reach the maximum number (step S7, No), the analysis processing section 6 returns the sequence to step S1. The analysis processing section 6 performs the read and analysis of the next program block. On the other hand, in a case where the command for the axis movement is reached or the number of times of analysis reaches the maximum number (step S7, Yes), the analysis processing section 6 ends the analysis processing. Figure 2 the processing involved in the sequence illustrated.
[0040] In a case where the numerical control device 1 is to perform the analysis processing a plurality of times until the condition is established, since the time during which the processing other than the analysis processing can be performed is limited, it is difficult to ensure the real-time performance at the time of the update of the screen display, for example. Or, it is difficult to ensure the real-time performance at the time of the communication with the external device.
[0041] According to Embodiment 1, the analysis processing section 6 does not update the program counter in a case where the condition is not established, but ends the analysis processing. The program block which the analysis processing section 6 analyzes in one analysis processing is only one program block, so the load of the analysis processing can be reduced compared to a case where the numerical control device 1 needs to analyze a plurality of program blocks in one analysis processing. The numerical control device 1 can reduce the load of the analysis processing, so it can avoid a case where almost all of the processing capacity of the numerical control device 1 is consumed by the analysis processing. Thus, the numerical control device 1 can sufficiently ensure the processing capacity for the processing other than the analysis processing.
[0042] Figure 3 is a diagram for describing an example of the processing time in the numerical control device involved in the comparative example of Embodiment 1. Figure 4 is a diagram for describing an example of the processing time in the numerical control device 1 involved in Embodiment 1. In Figure 3 and Figure 4 , the horizontal axis indicates time. In Figure 3 and Figure 4 , the length of the time during which the processing is performed is indicated by a hatched rectangle. In Figure 3 and Figure 4 , it is assumed that the analysis processing, the control processing, or the drive processing and other processing are performed in one cycle. One cycle is, for example, a cycle in which an interrupt signal is input.
[0043] In Figure 4Examples of the time when the analysis processing is executed, the time when the control processing or the drive processing is executed, and the time when other processing is executed are shown in FIG. 1. The analysis processing is processing executed by the analysis processing section 6. The control processing is processing executed by the control processing section 7. The drive processing is processing executed by the drive processing section 8. The other processing is processing other than the analysis processing, the control processing, and the drive processing among the processing executed by the numerical control device 1. Among the other processing, there are the input / output processing executed by the input / output processing section 9 and the display processing executed by the display processing section 10.
[0044] In Figure 3 Examples in a case where all the program blocks from the WHILE program block to the END program block in one analysis processing are analyzed are shown in FIG. 2. In Figure 3 Examples of the time when the analysis processing is executed, the time when the control processing or the drive processing is executed, and the time when other processing is executed are shown in FIG. 1. The analysis processing is processing executed by the analysis processing section 6. The control processing is processing executed by the control processing section 7. The drive processing is processing executed by the drive processing section 8. The other processing is processing other than the analysis processing, the control processing, and the drive processing among the processing executed by the numerical control device 1. Among the other processing, there are the input / output processing executed by the input / output processing section 9 and the display processing executed by the display processing section 10.
[0045] In Figure 3 In the comparative example shown in FIG. 3, the analysis processing occupies most of the processing time taken by the numerical control device. Therefore, the processing time when the other processing is executed is significantly shorter than the processing time when the analysis processing is executed. On the other hand, in the embodiment 1 shown in FIG. 4, the processing time when the analysis processing is executed is significantly shortened compared to the comparative example shown in FIG. 3. Therefore, in the embodiment 1 shown in FIG. 4, the processing time when the other processing is executed can be increased compared to the comparative example shown in FIG. 3. Figure 4 Figure 3 In the comparative example shown in FIG. 3, the analysis processing occupies most of the processing time taken by the numerical control device. Therefore, the processing time when the other processing is executed is significantly shorter than the processing time when the analysis processing is executed. On the other hand, in the embodiment 1 shown in FIG. 4, the processing time when the analysis processing is executed is significantly shortened compared to the comparative example shown in FIG. 3. Therefore, in the embodiment 1 shown in FIG. 4, the processing time when the other processing is executed can be increased compared to the comparative example shown in FIG. 3. Figure 4 Figure 3 In the comparative example shown in FIG. 3, the analysis processing occupies most of the processing time taken by the numerical control device. Therefore, the processing time when the other processing is executed is significantly shorter than the processing time when the analysis processing is executed. On the other hand, in the embodiment 1 shown in FIG. 4, the processing time when the analysis processing is executed is significantly shortened compared to the comparative example shown in FIG. 3. Therefore, in the embodiment 1 shown in FIG. 4, the processing time when the other processing is executed can be increased compared to the comparative example shown in FIG. 3.
[0046] As described above, according to the embodiment 1, the numerical control device 1 can reduce the load of the analysis processing, and thereby can sufficiently secure the processing capacity for the other processing. The numerical control device 1 can secure the real-time property with respect to the other processing by securing the processing capacity. For example, the numerical control device 1 can secure the real-time property at the time of updating the screen display, or the real-time property at the time of communication with the external device.
[0047] According to Embodiment 1, the analysis processing section 6 analyzes the content of the command indicated by the condition wait program block before a condition determination, for example, a determination of whether to continue an infinite loop, is read in. The analysis processing section 6 analyzes the conditional expression described in the condition wait program block before the condition determination, and thus can perform the condition determination regarding the condition that needs to be calculated each time. Thus, the NC device 1 can implement condition waiting regarding various conditions. Also, only the program block in which the conditional expression is described or only the conditional expression is analyzed before the condition determination, and thus the number of program blocks described in the condition wait program is reduced. With the reduction in the number of program blocks, the readability of the NC program and the maintainability of the NC program can be improved.
[0048] A limit time of a time at which the wait condition is established can also be described in the condition wait program block. As shown below, an argument of the limit time can be added to the condition wait program block.
[0049] WAIT [conditional expression, limit time]
[0050] The analysis processing section 6 ends the wait for the establishment of the condition when the limit time elapses from the start of the wait for the establishment of the condition.
[0051] The NC device 1 can notify the outside of the NC device 1 that the condition is not established in the limit time. Alternatively, the NC device 1 can instruct the drive section 4 to move the axes to a safe position when the condition is not established in the limit time. In order to be able to perform the above-described actions, the analysis processing section 6 can execute a program specified in advance when the condition is not established in the limit time. The user can specify an arbitrary program as the program executed when the condition is not established in the limit time. Thus, the NC device 1 can be caused to perform an arbitrary action when the condition is not established in the limit time.
[0052] Alternatively, the analysis processing section 6 can execute a program specified in advance when the condition is established. The user can specify an arbitrary program as the program executed when the condition is established. Thus, the NC device 1 can be caused to perform an arbitrary action when the condition is established. As described above, the analysis processing section 6 can execute a program specified in advance in at least one of when the condition is established and when the condition is not established in the limit time.
[0053] The following shows an example of the format of a conditional wait program block in which a limited time is described and an example of a conditional wait program block in which a limited time is described. In the following example, both the instruction executed when the condition is true and the instruction executed when the limited time elapses are described. The instruction executed when the condition is true is an instruction indicating a program specified in advance as a program executed in the case where the condition is true. The instruction executed when the limited time elapses is an instruction indicating a program specified in advance as a program executed in the case where the condition is not true in the limited time.
[0054] WAITIF [condition, limited time]
[0055] THEN instruction executed when condition is true
[0056] ELSE instruction executed when limited time elapses
[0057] (Example) WAITIF [[#1031 EQ 1] AND [#1032 EQ 1], 1000]
[0058] THEN GOTO 210
[0059] ELSE GOTO 999
[0060] N210 :
[0062] N999
[0063] (Wait for 1000 seconds until #1031 and #1032 become 1, jump to the N210 program block when the condition is true, jump to the N999 program block when the limited time elapses)
[0064] Next, the processing performed by the parsing processing section 6 in the case where a limited time is described in the conditional wait program block will be described. Figure 5 is a flowchart showing the processing sequence performed by the parsing processing section 6 in the case where a limited time is described in the conditional wait program block in Embodiment 1. In Figure 5 an example of the sequence added in the sequence shown in Figure 2 in the case where a limited time is described in the conditional wait program block. In this case, both the program executed when the condition is true and the program executed when the condition is not true in the limited time are specified.
[0065] In step S11, the parsing processing section 6 determines whether the condition is true. Step S11 corresponds to step S4 shown in Figure 2 In the case where the condition is true (step S11, Yes), the parsing processing section 6 updates the program counter to the program block executed when the condition is true in step S12. If step S12 is ended, the parsing processing section 6 endsFigure 5 The processing involved in the order shown. The program block executed in the case where the condition is true is the above-described THEN program block. The analysis processing section 6 executes the program block after the THEN program block after the execution of the THEN program block.
[0066] On the other hand, in the case where the condition is not true (step Sll, No), the analysis processing section 6 determines whether the present conditional wait is a first conditional wait after the conditional wait program block is read in (step S13). In the case where the present conditional wait is a first conditional wait (step S13, Yes), the analysis processing section 6 starts measurement of time (step S14). If the step S14 is ended, the analysis processing section 6 ends the processing involved in the order shown. Figure 5 The processing involved in the order shown. The analysis processing section 6 repeats the analysis of the program block and the condition determination while continuing the measurement of time.
[0067] On the other hand, in the case where the present conditional wait is not a first conditional wait (step S13, No), the analysis processing section 6 determines whether the limited time has elapsed after the start of the measurement of time (step S15). In the case where the limited time has elapsed after the start of the measurement of time (step S15, Yes), the analysis processing section 6 updates the program counter to the program block executed in the case where the condition is not true in the limited time (step S16). The program block executed in the case where the condition is not true in the limited time is the above-described ELSE program block.
[0068] On the other hand, in the case where the limited time has not elapsed after the start of the measurement of time (step S15, No), the analysis processing section 6 ends the processing involved in the order shown. Figure 5 The processing involved in the order shown. The analysis processing section 6 repeats the analysis of the program block and the condition determination while continuing the measurement of time.
[0069] Further, the instruction in the case where the conditional expression is true and the instruction at the time when the limited time elapses can be recorded in the same line as the conditional wait program block as shown below. In this case, when the NC program is displayed on the screen, it is possible to increase the number of program blocks that can be displayed at the same time.
[0070] WAITIF [conditional expression, limited time] THEN instruction in the case where the conditional expression is true ELSE instruction at the time when the limited time elapses
[0071] The instruction in the case where the conditional expression is true and the instruction at the time when the limited time elapses can each be recorded in a plurality of program blocks as shown below. That is, the analysis processing section 6 can execute the conditional wait program block including at least one of a plurality of program blocks executed in the case where the condition is true and a plurality of program blocks executed in the case where the condition is not true in the limited time. In this case, the analysis processing section 6 can execute the conditional wait program that can cope with various usage conditions.
[0072] WAITIF[condition, time constraint] THEN
[0073] Instruction 1 when the condition is true :
[0075] Instruction n when the condition is true
[0076] ELSE
[0077] Instruction 1 for limiting the elapsed time :
[0079] Instruction m for limiting the elapsed time
[0080] ENDIF
[0081] According to Embodiment 1, when a condition-waiting program block is read, the parsing processing unit 6 repeatedly determines the success or failure of the condition until the condition is met. Until the condition is met, the parsing processing unit 6 parses program blocks that only describe conditional expressions or only conditional expressions before condition determination. Compared to the case where the CNC device 1 needs to parse multiple program blocks in one parsing process, the parsing processing load can be reduced. Furthermore, the CNC device 1 can perform condition determinations related to conditions requiring computation, thereby eliminating the need to set restrictions on the conditions under which condition-waiting programs can be used. That is, the CNC device 1 can implement condition waiting related to a wide variety of conditions. In summary, the CNC device 1 has the effect of reducing the parsing processing load and not restricting the conditions under which condition-waiting programs can be used.
[0082] Next, the hardware of the numerical control device 1 according to Embodiment 1 will be described. The parsing processing unit 6, control processing unit 7, drive processing unit 8, input / output processing unit 9, and display processing unit 10, which are the processing units of the numerical control device 1, are implemented by a processing circuit. The processing circuit can be a circuit that executes software by a processor, or it can be a dedicated circuit.
[0083] When the processing circuit is implemented in software, the processing circuit is, for example, Figure 6 The control circuit shown. Figure 6 This diagram illustrates a structural example of the control circuit 30 according to Embodiment 1. The control circuit 30 includes an input unit 31, a processor 32, a memory 33, and an output unit 34. The input unit 31 is an interface circuit that receives data input from outside the control circuit 30 and provides it to the processor 32. Information from the operation panel 2 and the monitor 3 is input to the input unit 31. The output unit 34 is an interface circuit that transmits data from the processor 32 or the memory 33 to outside the control circuit 30. The output unit 34 outputs information to the operation panel 2 and the monitor 3, respectively.
[0084] In the processing circuit Figure 6 In the case of the control circuit 30 shown, the processing unit of the CNC device 1 is implemented by software, firmware, or a combination of software and firmware. The software or firmware is described as a program and stored in memory 33. In the processing circuit, the program stored in memory 33 is read from processor 32 and executed, thereby realizing various functions. That is, the processing circuit has memory 33, which is used to store the program that the processing of the CNC device 1 ultimately executes. Furthermore, these programs can be described as the sequence and method by which the computer executes the CNC device 1. The program counter is set in processor 32.
[0085] Processor 32 is a CPU (Central Processing Unit), processing device, arithmetic device, microprocessor, microcomputer, processor, or DSP (Digital Signal Processor). Memory 33 is, for example, non-volatile or volatile semiconductor memory such as RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), disk, floppy disk, optical disk, compact disk, mini-disk, or DVD (Digital Versatile Disc). Program memory 5 is implemented through memory 33.
[0086] Figure 6 This is an example of hardware in which the various structural elements are implemented using a general-purpose processor 32 and memory 33. The various structural elements can also be implemented using dedicated hardware circuits.
[0087] Figure 7 This is a diagram illustrating a structural example of the dedicated hardware circuit 35 involved in Embodiment 1.
[0088] The dedicated hardware circuit 35 has an input 31, an output 34, and a processing circuit 36. The processing circuit 36 is a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or a circuit combining them. Each function of the numerical control device 1 can be implemented by the processing circuit 36 by function, or each function can be aggregated and implemented by the processing circuit 36. Further, each structural element can be implemented by combining the control circuit 30 and the hardware circuit 35.
[0089] The structure shown in the above embodiments shows one example of the gist of the present application. The structure of the embodiments can be combined with other known techniques. Part of the structure of the embodiments can be omitted or changed within a range not departing from the gist of the present application.
[0090] Explanation of Reference Signs
[0091] 1 numerical control device, 2 operation panel, 3 monitor, 4 drive unit, 5 program memory, 6 analysis processing unit, 7 control processing unit, 8 drive processing unit, 9 input / output processing unit, 10 display processing unit, 11 motor drive unit, 12 servo motor, 20 work machine, 30 control circuit, 31 input, 32 processor, 33 memory, 34 output, 35 hardware circuit, 36 processing circuit.
Claims
1. A numerical control device characterized by comprising: Having: a parsing processing section that parses a program block indicated by a program counter from a numerical control program; and a control processing section that generates an instruction for driving a control object based on a result of the parsing in the parsing processing section, the parsing processing section, in a case where a conditional wait program block in which a conditional expression indicating a condition for executing the numerical control program is described is read in, repeatedly performs determination of success or failure of the condition until the condition is established, and parses the conditional wait program block until the condition is established before determination of success or failure of the condition at a first time and a second time and thereafter, the parsing processing section, in one parsing processing, parses only the conditional wait program block, that is, one program block, the parsing processing section performs an operation on the conditional expression including an operator.
2. The numerical control device according to claim 1, characterized in that a limit time indicating a time for waiting for establishment of the condition is described in the conditional wait program block, the parsing processing section ends waiting for establishment of the condition in a case where the limit time elapses after starting waiting for establishment of the condition.
3. The numerical control device according to claim 2, characterized in that the parsing processing section executes a program that is specified in advance in at least one of a case where the condition is established and a case where the condition is not established in the limit time.
4. The numerical control device according to claim 3, characterized in that the parsing processing section executes the conditional wait program block including at least one of a plurality of program blocks that are executed in a case where the condition is established and a plurality of program blocks that are executed in a case where the condition is not established in the limit time.
Citation Information
Patent Citations
Graphic instruction analysis design method
CN108121566A
Numerical control device
JP2003108209A