Numerical control device
By performing multiple analysis and condition determination of the condition waiting program block in the analysis processing unit of the CNC device, the problem of large analytical processing load and limited use conditions of the condition waiting program in the prior art is solved, and a lower analytical processing load and wider use conditions of the condition waiting program are achieved, and the readability and maintenance of the CNC program are improved.
Patent Information
- Application Number
- CN202380074021.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2043-03-14
AI Technical Summary
In the conditional waiting program, the existing CNC devices have to reuse the analysis results, resulting in an increase in the analysis processing load. The usage conditions of the conditional waiting program are limited and the complex conditions that require each operation cannot be processed.
In the analysis processing unit, the condition wait-to-be-determined determination is repeated until the condition is established, and the condition wait-to-be-determined block is analyzed before the first and second and subsequent conditions are determined, and an instruction to drive the control object is generated.
Reduce the load on analysis processing, expand the usage conditions of the condition waiting program, no longer be limited by simple condition comparison, can handle complex condition judgments, and improve the readability and maintenance of CNC programs.
Smart Images

Figure CN120077336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a numerical control device that controls a controlled object by executing a numerical control program. Background Art
[0002] A numerical control device that controls a drive unit of a machine tool by executing a numerical control program sometimes interrupts the execution of the numerical control program before a condition is satisfied. The condition is, for example, the input of an external signal, which is a signal from outside the numerical control device, or the end of the operation of another system, which is a system other than the system including the machine tool. The condition waiting for the condition to be satisfied is implemented, for example, by a condition waiting program having an infinite loop. The condition waiting program having an infinite loop is, for example, a program that repeats a specified process until a specified condition is satisfied.
[0003] In the condition waiting program having the infinite loop, in the case of a program block in the program that does not accompany the axis movement of the drive unit, for example, the analysis of the program block that does not accompany the axis movement may be repeatedly executed between one cycle, for example, the cycle in which an interrupt signal is input. In this case, the following problem occurs: the time for the analysis process between one cycle in the numerical control device becomes long, and the time for executing processes other than the analysis process is limited.
[0004] In response to the above-described problem, Patent Document 1 discloses a numerical control device that analyzes the processing content of a condition waiting program block, stores the analysis result, and then performs an execution process based on the stored analysis result when performing the execution process of the condition waiting program block.
[0005] Patent Document 1: Japanese Unexamined Patent Application Publication No. 2003-108209 Summary of the Invention
[0006] However, in the case of the technology disclosed in the above Patent Document 1, during the period when the execution condition is not satisfied, since the analysis result obtained by one analysis process must be repeatedly used continuously in the execution process of the subsequent condition waiting program block, the conditions for using the condition waiting program are limited. For example, in the case of comparing multiple external signals, or comparing the result of a calculation formula including variable values, etc., conditions that require arithmetic operations each time cannot be processed.
[0007] The present invention has been made in view of the above circumstances, and an object thereof is to provide a numerical control device that reduces the load of the analysis process and has unrestricted usage conditions for the condition waiting program.
[0008] In order to solve the above problems and achieve the object, the numerical control device according to the present invention has: an analysis processing unit that reads a program block indicated by a program counter from a numerical control program and analyzes the program block; and a control processing unit that generates an instruction for driving a control object based on the analysis result in the analysis processing unit. When a conditional wait program block in which a conditional expression indicating a condition for executing the numerical control program is described is read, the analysis processing unit repeatedly determines whether the condition is successful until the condition is satisfied, and analyzes the conditional wait program block before the first and second and subsequent determinations of whether the condition is successful until the condition is satisfied.
[0009] Effect of the Invention
[0010] The numerical control device according to the present invention has the following effects, that is, it reduces the load of analysis processing and the usage conditions of the conditional wait program are not restricted. Description of the Drawings
[0011] Figure 1 It is a diagram showing a structural example of a machine tool having the numerical control device according to Embodiment 1.
[0012] Figure 2 It is a flowchart showing the processing sequence executed by the analysis processing unit of the numerical control device according to Embodiment 1.
[0013] Figure 3 It is a diagram for explaining an example of the processing time in the numerical control device according to the comparative example of Embodiment 1.
[0014] Figure 4 It is a diagram for explaining an example of the processing time in the numerical control device according to Embodiment 1.
[0015] Figure 5 It is a flowchart showing the processing sequence executed by the analysis processing unit when a limit time is described in the conditional wait program block in Embodiment 1.
[0016] Figure 6 It is a diagram showing a structural example of the control circuit according to Embodiment 1.
[0017] Figure 7 It is a diagram showing a structural example of a dedicated hardware circuit according to Embodiment 1. Detailed Embodiment
[0018] Hereinafter, the numerical control device according to the embodiment will be described in detail based on the drawings.
[0019] Embodiment 1.
[0020] Figure 1It is a diagram showing a structural example of a machine tool 20 having the numerical control device 1 according to Embodiment 1. The machine tool 20 has a numerical control device 1, an operation panel 2, a monitor 3, and a drive unit 4. The operation panel 2, the monitor 3, and the drive unit 4 are respectively connected to the numerical control device 1. The numerical control device 1 communicates with the operation panel 2 and the monitor 3 while sending instructions to the drive unit 4 according to the description of the numerical control program.
[0021] The operation panel 2 has input devices such as a keyboard, a mouse, a keypad, or a touch panel, for example. The operation panel 2 receives operations performed by the 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. The monitor 3 displays the information processed by the numerical control device 1 on the screen.
[0022] The drive unit 4 has a motor drive unit 11 and a servo motor 12. The motor drive unit 11 drives the servo motor 12 based on the instruction of the numerical control device 1. In Figure 1 it, two sets of the motor drive unit 11 and the servo motor 12 are shown, but the number of sets of the motor drive unit 11 and the servo motor 12 provided in the drive unit 4 is arbitrary.
[0023] The numerical control device 1 has a program memory 5, a parsing processing unit 6, a control processing unit 7, a drive processing unit 8, an input / output processing unit 9, and a display processing unit 10. The 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 unit 6 sequentially parses the numerical control program for each program block. The parsing processing unit 6 reads the program block indicated by the program counter from the numerical control program and parses the program block. The program counter is a register that stores an address indicating the position of the next program block to be executed. The parsing processing unit 6 reads the program block from the position indicated by the address stored in the program counter.
[0025] When the program block read by the parsing processing unit 6 is a program block not accompanied by axis movement, the parsing processing unit 6 then reads and parses the next program block. When the program block read by the parsing processing unit 6 is a program block accompanied by axis movement, the parsing processing unit 6 sends the parsing result to the control processing unit 7.
[0026] The control processing unit 7 generates an instruction for driving the drive unit 4 to be controlled based on the analysis result in the analysis processing unit 6. For example, the control processing unit 7 generates an instruction for coordinates or moving speed, etc., and the coordinates are the target of the movement performed by the drive of the drive unit 4. The control processing unit 7 sends the generated instruction to the drive processing unit 8. The drive processing unit 8 generates an instruction for controlling each servo motor 12 based on the instruction generated by the control processing unit 7. The drive processing unit 8 sends the generated instruction to each motor drive unit 11.
[0027] The input / output processing unit 9 executes the processing when information is input from the operation panel 2 and the processing when information is output to the operation panel 2. The display processing unit 10 executes the processing when the information processed by the numerical control device 1 is displayed on the monitor 3. The display processing unit 10 outputs the information for display to the monitor 3 and receives the information from the monitor 3. When the analysis processing unit 6, the control processing unit 7, and the drive processing unit 8 do not execute processing, the processing of the input / output processing unit 9 or the display processing unit 10 is executed.
[0028] When the analysis processing unit 6 reads in a conditional wait program block, it repeatedly determines whether the condition is satisfied until the condition is satisfied. The conditional wait program block contains a description indicating the condition for executing the numerical control program. In the conditional wait program block, the condition for executing the numerical control program in the program block after the conditional wait program block is described. In the conditional wait program block, a conditional expression indicating the condition for executing the numerical control program is described. The analysis processing unit 6 analyzes the program block with the conditional expression, that is, the conditional wait program block, until the condition is satisfied, before the first and second and subsequent determinations of whether the condition is satisfied.
[0029] For example, the analysis processing unit 6 analyzes the program block with the conditional expression before the first condition determination, and then also analyzes the program block with the conditional expression before the second and subsequent condition determinations. At this time, the analysis processing unit 6 can analyze the program block with the conditional expression each time before the second and subsequent condition determinations, or can analyze the program block with the conditional expression at least once or more. In addition, the analysis processing unit 6 can analyze only the program block with the conditional expression, or can analyze only the conditional expression. When the conditional wait program block is read in, if the condition is not satisfied, the analysis processing unit 6 does not update the program counter but makes the next determination, and if the condition is satisfied, the analysis processing unit 6 updates the program counter.
[0030] An operator can be included in the conditional expression. In this case, the analysis processing unit 6 operates on the conditional expression including the operator. Examples of the format of the conditional wait program block with the conditional expression and examples of the conditional wait program block with the operator are shown below.
[0031] WAIT [conditional expression]
[0032] (Example) WAIT [#3013 EQ 1] (Wait until #3013 becomes 1)
[0033] Next, the processing performed by the parsing processing unit 6 will be described. Figure 2 It is a flowchart showing the processing order executed by the parsing processing unit 6 of the numerical control device 1 according to the first embodiment.
[0034] In step S1, the parsing processing unit 6 reads in the program block indicated by the program counter. In step S2, the parsing processing unit 6 parses the program block read in step S1. The parsing processing unit 6 parses the content of the command indicated by the program block. When the conditional expression includes an operator, the parsing processing unit 6 obtains the operation result of the conditional expression through parsing.
[0035] In step S3, the parsing processing unit 6 determines whether the content of the command parsed in step S2 is a conditional wait. That is, the parsing processing unit 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 in the above format. When the read program block is a WAIT program block, the parsing processing unit 6 determines that the read program block is a conditional wait program block. When the content of the command is a conditional wait (step S3, Yes), the parsing processing unit 6 advances the sequence to step S4. On the other hand, when the content of the command is not a conditional wait (step S3, No), the parsing processing unit 6 advances the sequence to step S5.
[0036] In step S4, the parsing processing unit 6 determines whether the conditional expression holds. That is, the parsing processing unit 6 performs a conditional determination. When the conditional expression holds (step S4, Yes), the parsing processing unit 6 advances the sequence to step S6. On the other hand, when the conditional expression does not hold (step S4, No), the parsing processing unit 6 ends Figure 2 the processing related to the shown sequence. When the conditional expression does not hold, the parsing processing unit 6 ends the parsing processing without updating the program counter and performs the parsing of the conditional expression again through the next parsing processing.
[0037] In step S5, the parsing processing unit 6 executes the processing indicated in the command for the program block determined not to be a conditional wait program block. If step S5 is completed, the parsing processing unit 6 advances the sequence to step S6.
[0038] In step S6, the parsing processing unit 6 updates the program counter for the next program block to be executed. Next, in step S7, the parsing processing unit 6 determines whether a command accompanied by axis movement is reached, or whether the number of parsing times has reached the maximum number. The maximum number of parsing times is a preset number.
[0039] In the case where a command accompanied by axis movement is not reached and the number of parsing times has not reached the maximum number (step S7, No), the parsing processing unit 6 returns the sequence to step S1. The parsing processing unit 6 reads and parses the next program block. On the other hand, in the case where a command accompanied by axis movement is reached or the number of parsing times has reached the maximum number (step S7, Yes), the parsing processing unit 6 ends Figure 2 the processing related to the sequence shown.
[0040] When the numerical control device 1 needs to perform the parsing process multiple times until the condition is satisfied, since the time available to execute processes other than the parsing process is limited, it is difficult to ensure real-time performance during the update of the screen display, for example. Or, it is difficult to ensure real-time performance during communication with an external device.
[0041] According to Embodiment 1, when the condition is not satisfied, the parsing processing unit 6 does not update the program counter but ends the parsing process. Since the parsing processing unit 6 parses only one program block in one parsing process, compared with the case where the numerical control device 1 needs to parse multiple program blocks in one parsing process, the load of the parsing process can be reduced. Since the numerical control device 1 can reduce the load of the parsing process, it is possible to avoid the situation where almost all of the processing power of the numerical control device 1 is consumed by the parsing process. Thus, the numerical control device 1 can sufficiently ensure the processing power for processes other than the parsing process.
[0042] Figure 3 FIG. is for explaining an example of the processing time in the numerical control device related to the comparative example of Embodiment 1. Figure 4 FIG. is for explaining an example of the processing time in the numerical control device 1 related to Embodiment 1. In Figure 3 and Figure 4 the horizontal axis represents time. In Figure 3 and Figure 4 the length of the time for executing the process is represented by a hatched rectangle. In Figure 3 and Figure 4 it is assumed that the parsing process, the control process, or the drive process and other processes are executed in one cycle. One cycle is, for example, the cycle in which an interrupt signal is input.
[0043] In Figure 4Examples of the time when the parsing process is executed, the time when the control process or the driving process is executed, and the time when other processes are executed in Embodiment 1 are shown. The parsing process is the process executed by the parsing unit 6. The control process is the process executed by the control unit 7. The driving process is the process executed by the driving unit 8. Other processes are processes other than the parsing process, the control process, and the driving process among the processes executed by the numerical control device 1. Among the other processes, the process executed by the input / output processing unit 9, that is, the input / output process, and the process executed by the display processing unit 10, that is, the display process, are included.
[0044] In Figure 3 an example is shown in which all the program blocks from the WHILE program block in an infinite loop to the END program block are parsed in one parsing process. In Figure 3 Examples of the time when the parsing process is executed, the time when the control process or the driving process is executed, and the time when other processes are executed are shown.
[0045] In Figure 3 in the case of the comparative example shown, most of the processing time spent by the numerical control device is occupied by the parsing process. Therefore, the processing time during which other processes are executed is significantly shorter than the processing time during which the parsing process is executed. On the other hand, in Figure 4 Embodiment 1 shown, compared with the case of the comparative example shown in Figure 3 the processing time during which the parsing process is executed is significantly shortened. Therefore, in Figure 4 Embodiment 1 shown, compared with the case of the comparative example shown in Figure 3 the processing time during which other processes are executed can be increased.
[0046] As described above, according to Embodiment 1, the numerical control device 1 can reduce the load of the parsing process, and thus can sufficiently ensure the processing power for other processes. By ensuring the processing power, the numerical control device 1 can ensure the real-time performance regarding other processes. For example, the numerical control device 1 can ensure the real-time performance at the time of updating the screen display or the real-time performance at the time of communication with an external device.
[0047] According to Embodiment 1, when the conditional wait program block is read, for example, before the condition determination on whether to continue the infinite loop, the parsing processing unit 6 parses the content of the command indicated by the conditional wait program block. Since the parsing processing unit 6 parses the conditional expression described in the conditional wait program block before the condition determination, it is possible to perform the condition determination related to the conditions that require arithmetic operations each time. Therefore, the numerical control device 1 can implement the conditional wait related to various conditions. Also, only the program block with the conditional expression or only the conditional expression is parsed before the condition determination, so the number of program blocks described in the conditional wait program is reduced. By reducing the number of program blocks, the readability of the numerical control program can be improved and the maintainability of the numerical control program can be enhanced.
[0048] It is also possible to describe the time limit for waiting for the establishment of the wait condition in the conditional wait program block. As shown below, the independent variable of the time limit can be added to the conditional wait program block.
[0049] WAIT[conditional expression, time limit]
[0050] When the parsing processing unit 6 describes the time limit, when the time limit has elapsed since the start of waiting for the establishment of the condition, the waiting for the establishment of the condition ends.
[0051] When the condition does not hold within the time limit in the numerical control device 1, the numerical control device 1 can notify the outside of the numerical control device 1 that the condition does not hold. Or, when the condition does not hold within the time limit in the numerical control device 1, the numerical control device 1 can instruct the drive unit 4 to move the axis to a safe position. In order to be able to perform the above actions, when the condition does not hold within the time limit, the parsing processing unit 6 can execute a pre-specified program. The user can specify any program as the program to be executed when the condition does not hold within the time limit. Thus, when the condition does not hold within the time limit, the numerical control device 1 can perform arbitrary actions.
[0052] Or, when the condition holds, the parsing processing unit 6 can execute a pre-specified program. The user can specify any program as the program to be executed when the condition holds. Thus, when the condition holds, the numerical control device 1 can perform arbitrary actions. As described above, the parsing processing unit 6 can execute a pre-specified program in at least one of the case where the condition holds and the case where the condition does not hold within the time limit.
[0053] Examples of the format for describing a conditional wait block with a time limit and an example of a conditional wait block with a time limit are shown below. In addition, in the following examples, instructions when the conditional expression holds and instructions when the time limit elapses are included. The instruction when the conditional expression holds represents a pre-specified program to be executed when the condition is satisfied. The instruction when the time limit elapses represents a pre-specified program to be executed when the condition does not hold within the time limit.
[0054] WAITIF[conditional expression, time limit]
[0055] THEN instructions when the conditional expression holds
[0056] ELSE instructions when the time limit elapses
[0057] (Example) WAITIF[[#1031 EQ 1] AND [#1032 EQ 1], 1000]
[0058] THEN GOTO210
[0059] ELSE GOTO999
[0060] N210 :
[0062] N999
[0063] (Wait for 1000 seconds until #1031 and #1032 become 1, jump to the N210 program block when the condition holds, and jump to the N999 program block when the time limit elapses)
[0064] Next, the processing performed by the parsing processing unit 6 when a time limit is described in the conditional wait block will be described. Figure 5 It is a flowchart showing the processing sequence executed by the parsing processing unit 6 when a time limit is described in the conditional wait block in Embodiment 1. In Figure 5 Examples of the added sequence in the order shown in Figure 2 are shown when a time limit is described in the conditional wait block. In addition, here, both the program to be executed when the condition holds and the program to be executed when the condition does not hold within the time limit are specified.
[0065] In step S11, the parsing processing unit 6 determines whether the condition holds. Step S11 corresponds to Figure 2 step S4 shown. When the condition holds (step S11, Yes), in step S12, the parsing processing unit 6 updates the program counter to the program block to be executed when the condition holds. If step S12 is completed, the parsing processing unit 6 endsFigure 5 The processing related to the order shown. The program block executed when the condition holds is the above-mentioned THEN program block. After executing the THEN program block, the parsing processing unit 6 executes the program block after the THEN program block.
[0066] On the other hand, when the condition does not hold (step S11, No), in step S13, the parsing processing unit 6 determines whether the current condition wait is the first condition wait after the condition wait program block is read in. When the current condition wait is the first condition wait (step S13, Yes), the parsing processing unit 6 starts measuring time in step S14. If step S14 is completed, the parsing processing unit 6 ends Figure 5 The processing related to the order shown. The parsing processing unit 6 repeats the parsing of the program block and the condition determination while continuing to measure time.
[0067] On the other hand, when the current condition wait is not the first condition wait (step S13, No), in step S15, the parsing processing unit 6 determines whether the restricted time has elapsed after the start of time measurement. When the restricted time has elapsed after the start of time measurement (step S15, Yes), the parsing processing unit 6 updates the program counter to the program block executed when the condition does not hold within the restricted time in step S16. The program block executed when the condition does not hold within the restricted time is the above-mentioned ELSE program block.
[0068] On the other hand, when the restricted time has not elapsed after the start of time measurement (step S15, No), the parsing processing unit 6 ends Figure 5 The processing related to the order shown. The parsing processing unit 6 repeats the parsing of the program block and the condition determination while continuing to measure time.
[0069] In addition, the instruction when the conditional expression holds and the instruction when the restricted time elapses can be recorded on the same line as the condition wait program block as follows. In this case, when the numerical control program is displayed on the screen, the number of program blocks that can be displayed simultaneously can be increased.
[0070] WAITIF[conditional expression, restricted time] THEN instruction when the conditional expression holds ELSE instruction when the restricted time elapses
[0071] The instruction when the conditional expression holds and the instruction when the restricted time elapses can each be recorded in multiple program blocks shown below. That is, the parsing processing unit 6 can execute a condition wait program block including at least one of the multiple program blocks executed when the condition holds and the multiple program blocks executed when the condition does not hold within the restricted time. In this case, the parsing processing unit 6 can execute a condition wait program that can cope with various usage situations.
[0072] WAITIF [condition, time limit] THEN
[0073] Instruction 1 when the condition is met :
[0075] Instruction n when the condition is met
[0076] ELSE
[0077] Instructions 1 when the time limit has passed :
[0079] Instruction m when the time limit has passed
[0080] ENDIF
[0081] According to the first embodiment, when the condition waiting program block is read in, the analysis processing unit 6 repeatedly determines whether the condition is successful or not until the condition is satisfied. The analysis processing unit 6 analyzes the program block that only records the conditional expression or only the conditional expression before the condition is determined until the condition is satisfied. Compared with the case where the numerical control device 1 needs to analyze multiple program blocks in one analysis process, the load of the analysis process can be reduced. In addition, the numerical control device 1 can perform condition determination related to conditions that require calculations, thereby eliminating restrictions on the conditions that can use the condition waiting program. That is, the numerical control device 1 can realize condition waiting related to a variety of conditions. As described above, the numerical control device 1 has the effect of reducing the load of the analysis process and not restricting the use conditions of the condition waiting program.
[0082] Next, the hardware for realizing the numerical control device 1 according to Embodiment 1 is described. The analysis processing unit 6, the control processing unit 7, the drive processing unit 8, the input / output processing unit 9, and the display processing unit 10 as the processing unit of the numerical control device 1 are realized by a processing circuit. The processing circuit may be a circuit in which a processor executes software, or may be a dedicated circuit.
[0083] In the case where the processing circuit is implemented by software, the processing circuit is, for example, Figure 6 The control circuit shown. Figure 6 3 is a diagram showing a configuration example of a 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 the outside of the control circuit 30 and gives the data 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 sends data from the processor 32 or the memory 33 to the outside of the control circuit 30. The output unit 34 outputs information to the operation panel 2 and the monitor 3, respectively.
[0084] In the case of the processing circuit Figure 6 In the case of the control circuit 30 shown, the processing unit of the numerical control 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 the memory 33. In the processing circuit, the program stored in the memory 33 is read out and executed by the processor 32, thereby implementing each function. That is, the processing circuit has a memory 33 that stores the program for finally executing the processing of the numerical control device 1. In addition, these programs can be said to cause a computer to execute the sequence and method of the numerical control device 1. The above program counter is provided in the processor 32.
[0085] The processor 32 is a CPU (Central Processing Unit), a processing device, an arithmetic device, a microprocessor, a microcomputer, a processor, or a DSP (Digital Signal Processor). The memory 33 is, for example, a non-volatile or volatile semiconductor memory such as a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable Read Only Memory), an EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory), a magnetic disk, a floppy disk, an optical disk, a compact disk, a mini disk, or a DVD (Digital Versatile Disc). The program memory 5 is implemented by the memory 33.
[0086] Figure 6 This is an example of the hardware in the case where each structural element is implemented by a general-purpose processor 32 and a memory 33. Each structural element can also be implemented by a dedicated hardware circuit.
[0087] Figure 7 This is a diagram showing a structural example of the dedicated hardware circuit 35 according to Embodiment 1.
[0088] The dedicated hardware circuit 35 has an input section 31, an output section 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 formed by combining them. Each function of the numerical control device 1 can be implemented by the processing circuit 36 according to the function, or the functions can be aggregated and implemented by the processing circuit 36. In addition, each structural element can also be implemented by combining the control circuit 30 and the hardware circuit 35.
[0089] The structure shown in the above embodiment shows an example of the content of the present invention. The structure of the embodiment can be combined with other known techniques. A part of the structure of the embodiment can be omitted or changed without departing from the gist of the present invention.
[0090] Explanation of reference numerals
[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 Machine tool, 30 Control circuit, 31 Input section, 32 Processor, 33 Memory, 34 Output section, 35 Hardware circuit, 36 Processing circuit.
Claims
1. A numerical control device, characterized in that, it has: a parsing processing unit that reads a program block indicated by a program counter from a numerical control program and parses the program block; and a control processing unit that generates an instruction for driving a control object based on the parsing result in the parsing processing unit, when a conditional wait program block in which a conditional expression indicating a condition for executing the numerical control program is described is read, the parsing processing unit repeatedly determines whether the condition is successful until the condition is satisfied, and parses the conditional wait program block before the first, second, and subsequent determinations of whether the condition is successful until the condition is satisfied.
2. The numerical control device according to claim 1, characterized in that, the parsing processing unit calculates the conditional expression including operators.
3. The numerical control device according to claim 1 or 2, characterized in that, a limit time for waiting for the condition to be satisfied is described in the conditional wait program block, when the limit time has elapsed after starting to wait for the condition to be satisfied, the parsing processing unit ends the wait for the condition to be satisfied.
4. The numerical control device according to claim 3, characterized in that, the parsing processing unit executes a pre-specified program in at least one of the case where the condition is satisfied and the case where the condition is not satisfied within the limit time.
5. The numerical control device according to claim 4, characterized in that, the parsing processing unit executes the conditional wait program block including at least one of a plurality of program blocks executed when the condition is satisfied and a plurality of program blocks executed when the condition is not satisfied within the limit time.
Citation Information
Patent Citations
Graphic instruction analysis design method
CN108121566A
Graphical programming system interpreter based on XML industrial robot
CN111708525A
Numerical controller
CN112147953A
Control device, program, and control method
CN115176208A
Data processing device
GB0003270D0