Simulation device and computer-readable storage medium
The simulation device addresses the inefficiencies in data usage by analyzing machining programs and selecting point sequence data based on machining states and tolerance values, reducing data load and improving simulation efficiency.
Patent Information
- Application Number
- PCT/JP2023/021229
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-12-12
AI Technical Summary
Conventional simulation devices face increased calculation time and memory usage when simulating machining processes, particularly due to the large amount of data required for accurate representation, which is not efficiently reduced by simply selecting tool points for simulation.
A simulation device that includes a program analysis unit, a point sequence data acquisition unit, a data selection unit, and a simulation unit, which analyzes machining programs, acquires and selects point sequence data based on machining states and tolerance values to create a simulation image, reducing the number of points used and thus the data load.
The solution effectively reduces the amount of data needed for simulation, minimizing memory and calculation loads by selectively using point sequence data based on machining states and tolerance values, resulting in more efficient simulation image creation.
Smart Images

Figure JP2023021229_12122024_PF_FP_ABST
Abstract
Description
Simulation device and computer-readable storage medium
[0001] The present disclosure relates to a simulation device and a computer-readable storage medium.
[0002] Conventionally, there have been numerical control devices with a simulation function. In addition, there have been information processing devices such as PCs (personal computers) with a configuration simulating a numerical control device. These information processing devices with a simulation function (hereinafter referred to as simulation devices) analyze a machining program, generate commands, and create a simulation image based on the generated commands.
[0003] In general, when performing a simulation, problems arise such as an increase in calculation time and memory usage due to an increase in data, and an increase in the time required to display the simulation results. To avoid these problems, there are techniques for selecting points to be used in a simulation. For example, see Patent Document 1.
[0004] Japanese Patent Application Laid-Open No. 2021-56835
[0005] However, if the only information available for selecting whether or not each point is to be used in the simulation is the tool point sequence, it is not possible to sufficiently reduce the number of points.
[0006] For example, when simulating the cutting process of a workpiece shape, there is no need to use the parts where the tool is simply moving without hitting the workpiece. Also, there can be fewer points in parts where the required machining accuracy is low compared to fine parts. In the field of creating simulation images of machine tools, there is a demand for reducing the data used in simulations.
[0007] A simulation device according to one aspect of the present disclosure includes a program analysis unit that analyzes a machining program, a point sequence data acquisition unit that acquires point sequence data in which tool positions are arranged in chronological order based on the analysis results of the machining program, a data selection unit that selects point sequence data to be used in creating a simulation image based on modal data at the time the point sequence data was acquired, and a simulation unit that uses the selected point sequence data to create a simulation image that visually represents the cutting process.
[0008] FIG. 1 is a block diagram of a numerical control device of this embodiment. FIG. 1 is an example of a display screen for registering the correspondence between program numbers and machining states. FIG. 2 is a table showing the correspondence between tool numbers and tool diameters. FIG. 3 is a schematic diagram showing the configuration of point sequence data to which machining states have been added. FIG. 4 is a schematic diagram showing the configuration of point sequence data to which tool diameters have been added. FIG. 5 is an explanatory diagram of deviations in point sequence data. FIG. 6 is an explanatory diagram of data selection using deviations in point sequence data. FIG. 7 is a table showing the correspondence between machining states and tolerance values. FIG. 8 is a flowchart explaining the operation of the numerical control device. FIG. 9 is a hardware configuration diagram of the numerical control device.
[0009] A numerical control device 100 according to this embodiment will be described below with reference to the drawings. In the following embodiment, a numerical control device 100 to which a simulation device is applied will be described. The simulation device can also be applied to an information processing device that simulates the numerical control device 100. The simulation device has a function of analyzing a machining program and creating tool position data, similar to the numerical control device 100. FIG. 1 is a block diagram showing the configuration of the numerical control device 100. The numerical control device 100 includes a program analysis unit 11, an interpolation unit 12, a command unit 13, a motor control unit 14, a point sequence data acquisition unit 15, a data selection unit 16, a machining state addition unit 17, and a simulation unit 18.
[0010] The program analysis unit 11 analyzes the machining program and calculates the tool path, tool speed, etc. The interpolation unit 12 calculates a command value per command cycle. For example, in position control, the command value is the amount of movement of the motor divided into minute time units. The command unit 13 outputs a control pulse corresponding to the command value calculated by the interpolation unit 12 to the motor control unit.
[0011] The motor control unit 14 controls the servo motor and the spindle motor, which are provided with an encoder or the like that detects the amount of rotation of the motor.
[0012] The point sequence data acquisition unit 15 acquires point sequence data. The point sequence data is a time series of changes in the position and attitude of the tool tip. The point sequence data includes (1) point sequence data that does not involve actual machining, and (2) point sequence data that involves actual machining. (1) Point sequence data that does not involve actual machining is data in which tool positions are arranged in time series based on control commands for servo control calculated from the machining program. (2) Point sequence data that involves actual machining is a time series of changes in the position and attitude of the actual tool tip fed back from the motor control unit 14.
[0013] The machining state addition unit 17 acquires modal data at the time the point sequence data is acquired. Modal data is data representing the machining state of the machining program. The modal data is obtained directly as a result of program analysis. The machining state can be determined from the modal data. The modal data includes the program number, tool number, and whether the compensation function is enabled or disabled. In this embodiment, for convenience, the modal data includes comments on the machining program. The machining state addition unit 17 determines the machining state from the modal data and adds the machining state (or modal data representing the machining state) to the point sequence data. The machining state is data representing the machining accuracy. Machining states include "rough cutting," "semi-finishing," and "finishing." One example of a method for determining the machining state is a method using the program number. In this method, the correspondence between the program number and the machining state is registered in advance. In the example of Figure 2, the "subprogram number" is treated as modal data. Specifically, subprogram number "1000" corresponds to the machining state "rough cutting," subprogram number "1001" corresponds to the machining state "rough cutting," subprogram number "1002" corresponds to the machining state "semi-finishing," and subprogram number "1003" corresponds to the machining state "finishing."
[0014] Another example of modal data representing the machining state is a tool number. There is a one-to-one correspondence between tool numbers and tool diameters. There is a correlation between machining accuracy and tool diameters. Generally, tools with small diameters are used for high-precision machining. The tool number represents the machining state. The machining state addition unit 17 acquires a correspondence table of tool numbers and tool diameters. In the table of Figure 3, tool number "1" corresponds to tool diameter "1," tool number "2" corresponds to tool diameter "2," tool number "3" corresponds to tool diameter "4," and tool number "4" corresponds to tool diameter "10." The correspondence between tool numbers and tool diameters can be acquired from a tool management system or the like. Tool management systems are existing technology. Tool management systems manage information such as machining programs and tool lists.
[0015] The machining state adding unit 17 adds a machining state (including modal data serving as a reference for machining state determination) to the point sequence data acquired by the point sequence data acquiring unit 15. The point sequence data is time-series data in which time and coordinates are associated with each other. In the table of FIG. 4, the "machining state" of the point sequence data is added to the "time" and "value" of the point sequence data. In the table of FIG. 4, the point sequence data from time "0" to less than "50" corresponds to the machining state "fast forward", the point sequence data from time "50" to less than "60" corresponds to the machining state "rough cutting", the point sequence data from time "60" to less than "1000" corresponds to the machining state "fast forward", and the point sequence data from time "1000" onwards corresponds to the machining state "finishing".
[0016] The tool diameter can be used as data representing the machining state. In the table of Figure 5, the "tool diameter" is added to the "time" of the point sequence data and the "value" of the point sequence data. For convenience, the tool diameter for rapid traverse is set to "-1". A tool diameter of "-1" means that no cutting is performed.
[0017] The data selection unit 16 selects point sequence data to be used in the simulation image. A tolerance value is used for data selection. The tolerance value will be described with reference to FIG. 6. The tolerance value means the allowable deviation value for three consecutive point sequence data. The deviation is calculated by selecting point P2 and three points (P1, P2, P3) before and after it, and connecting the previous and next points with lines from start point P1 to end point P3. Then, the distance between point P2 and the line segment connecting P1 and P3 is calculated. If this distance (called the deviation) is greater than the tolerance value, it is determined that the deviation of point P2 exceeds the allowable value.
[0018] A data selection method using tolerance values will be described with reference to FIG. 7. Note that the shaded area in FIG. 7 indicates the tolerance value range centered on the line segment. First, in step 1, the starting point P1 of the point sequence data is determined. In FIG. 7, the black circle point is the starting point P1. In step 2, three points (P1, P2, P3) starting from the black circle point P1 are selected, and the deviation of P2 is calculated. Comparing the deviation of P2 with the tolerance value reveals that the deviation is smaller than the tolerance value. Therefore, P2 is removed from the point sequence data. In step 3, three points (P1, P3, P4) excluding P2 are selected. The data selection unit calculates the deviation of P3 based on the new three points (P1, P3, P4). The deviation of P3 of the new three points (P1, P3, P4) is equal to or greater than the tolerance value. In step 4, the data selection unit 16 sets P3 as the new starting point.
[0019] In step S5, the data selection unit 16 selects three points (P3, P4, P5) starting from P3, and calculates the deviation of P4. The deviation of P4 is equal to or greater than the tolerance value. In step S6, the data selection unit 16 sets P4 as a new starting point.
[0020] In step 7, the data selection unit 16 selects three points (P4, P5, P6) starting from P4 and calculates the deviation of P5. Since the deviation of P5 is smaller than the tolerance value, P5 is excluded from the point sequence data and three new points (P4, P6, P7) starting from P4 are selected. The data selection unit 16 repeats this process to select point sequence data.
[0021] The tolerance value varies depending on the machining state. FIG. 8 is a table showing the correspondence between the machining state and the tolerance value. In the table of FIG. 8, the machining state "rapid feed" is associated with the selection method "not selected," the machining state "rough cutting" with the tolerance value "T1 (μm)," the machining state "semi-finishing" with the tolerance value "T2 (μm)," and the machining state "finishing" with the tolerance value "T3 (μm)." The relationship between the machining state and the tolerance value is T1 > T2 > T3. That is, the tolerance value "T1" for "rough cutting" is smaller than the tolerance value "T2" for "semi-finishing," which is smaller than the tolerance value "T3" for "finishing." The more emphasis is placed on precision in machining, the smaller the tolerance value.
[0022] The processing state "fast forward" is different from other processing states. In "fast forward," no point sequence data is selected. This is because no processing is performed in "fast forward." When the processing state is "fast forward," the number of point sequence data used to create a simulation image becomes "0." Because the number of point sequence data is reduced, the load on the memory and calculation device required to create a simulation image is reduced.
[0023] When the machining state is "rough cutting", the data selection unit 16 calculates the deviation of the three points, and if the deviation is smaller than the tolerance value "T1 (μm)", the data selection unit 16 excludes the middle point from the point sequence data. On the other hand, if the deviation is equal to or larger than the tolerance value "T1 (μm)", the data selection unit 16 selects the middle point as point sequence data and sets it as a new start point. When the machining state is "semi-finishing", the data selection unit 16 calculates the deviation of the three points, and if the deviation is smaller than the tolerance value "T2 (μm)", the data selection unit 16 excludes the middle point from the point sequence data. On the other hand, if the deviation is equal to or larger than the tolerance value "T2 (μm)", the data selection unit 16 selects the middle point as point sequence data and sets it as a new start point. When the machining state is "finishing", the data selection unit 16 calculates the deviation of the three points, and if the deviation is smaller than the tolerance value "T3 (μm)", the data selection unit 16 excludes the middle point from the point sequence data. On the other hand, if the deviation is equal to or greater than the tolerance value "T3 (μm)", the center point is selected as point sequence data and set as a new starting point.
[0024] The relationship between the machining state and the tolerance value is T1>T2>T3, so for the same point sequence data, the more precision-oriented the machining, such as "finishing," the more point sequence data is used to create the simulation image to be selected, while the less precision-oriented the machining, such as "rough cutting," the fewer point sequence data are used to create the simulation image to be selected. There is also a relationship between tool diameter and tolerance value. Generally, tools with small diameters are used for high-precision machining. Small tolerance values are associated with machining using tools with small diameters.
[0025] The simulation unit 18 stores three-dimensional image data of the tool shape and the workpiece shape, etc. The simulation unit 18 moves the three-dimensional image data of the tool along the point sequence data. The simulation unit 18 calculates the cutting area of the tool from the three-dimensional image data of the workpiece, removes the cutting area from the workpiece surface, and creates a simulation image that visually represents the cutting process.
[0026] The number of point sequence data processed by the simulation unit 18 varies depending on the tolerance value. In this embodiment, the tolerance value T3 is the highest for "rough cutting." In "rough cutting," small changes in point sequence data do not need to be reflected in the simulation image. In "rough cutting," small deviations are ignored, so fewer point sequence data are selected. The tolerance value T2 for "semi-finishing" is smaller than the tolerance value T1 for "rough cutting." In "semi-finishing," higher accuracy is required than in "rough cutting," but the same high accuracy as in "finishing" is not required. In "finishing," which requires high accuracy, the tolerance value T3 is the lowest. In "finishing," which requires high accuracy, even small changes in point sequence data are selected and reflected in the simulation image, so a highly accurate simulation image can be created.
[0027] FIG. 9 is a flowchart illustrating the operation of the numerical control device 100 according to this embodiment. The operation of the numerical control device 100 differs between (1) a case where actual machining is not performed and (2) a case where actual machining is performed. When actual machining is performed (step S10; Yes), the program analysis unit 11 analyzes the machining program (step S11), the interpolation unit 12 calculates a command value per command cycle (step S12), and the command unit 13 outputs control pulses corresponding to the command value calculated by the interpolation unit 12 to the motor control unit 14 (step S13). The motor control unit 14 controls the motor of the machine tool in accordance with the command from the command unit 13. The motor is equipped with a measuring device such as an encoder. The point sequence data acquisition unit 15 acquires the motor rotation amount (corresponding to the axis movement amount) from the motor. Based on the motor rotation amount, the point sequence data acquisition unit 15 acquires point sequence data, which is a set of tool coordinate positions (the tool movement path) (step S14).
[0028] If actual machining is not involved (Step S10; No), the program analysis unit 11 analyzes the machining program (Step S15) to generate point sequence data. The point sequence data corresponds to a set of coordinate positions of the tool (the tool movement path). The point sequence data acquisition unit 15 acquires the point sequence data generated by the program analysis unit 11 (Step S16).
[0029] The machining state adding unit 17 determines the machining state of the machine tool when the point sequence data was acquired based on the modal data (step S17). Machining states include "rough cutting," "semi-finishing," and "finishing." The machining state is determined using the program number, tool number, tool diameter, machining program comments, etc. The machining state adding unit 17 adds information about the machining state (which may be modal data) to the point sequence data acquired by the point sequence data acquiring unit 15 (step S18).
[0030] The data selection unit 16 calculates the deviation of the three points from the point sequence data acquired by the point sequence data acquisition unit 15 (step S19). The tolerance value, which is the allowable deviation value, is determined by the machining state of the machine tool when the point sequence data was acquired. The tolerance value for the "rough cutting" machining state is "T1," the tolerance value for the "semi-finishing" machining state is "T2," and the tolerance value for the "finishing" machining state is "T3." The data selection unit 16 compares the deviation with the tolerance value and selects points whose deviation is equal to or greater than the tolerance value as point sequence data for creating a simulation image (step S20). If the deviation is smaller than the tolerance value, the change in the point sequence data is small, so the point is excluded from the point sequence data for creating a simulation image. If the deviation of the three points is equal to or greater than the tolerance value, the change in the point sequence data is large, so the middle point of the three points is selected.
[0031] The data selection unit 16 checks whether the final data of the point sequence data has been processed, and if the final data of the point sequence data has not been processed (step S21; No), the data selection unit 16 proceeds to step S19, selects three points starting from the point selected in step S20, and calculates the deviation. If the final data of the point sequence data has been processed (step S21; Yes), the data selection unit 16 ends the selection of the point sequence data.
[0032] The simulation unit 18 uses the point sequence data acquired from the data selection unit 16 to create a simulation image of the machining (step S22). The number of point sequence data used to create the simulation image is adjusted depending on the machining state and the deviation of the point sequence data. This reduces the memory load and calculation load required for the simulation. The types of simulation include simulation of the surface quality of the workpiece's cutting surface and machine simulation that visualizes the machine's movement during program execution using a 3D model.
[0033] The hardware configuration of the numerical control device 100 will be described below. Fig. 10 is a hardware configuration diagram of the numerical control device 100. As shown in Fig. 10, the numerical control device 100 includes a CPU 111 that controls the entire numerical control device 100, a ROM 112 that records programs and data, and a RAM 113 for temporarily expanding data. The CPU 111 reads out a system program recorded in the ROM 112 via a bus and executes avoidance in accordance with the system program.
[0034] The nonvolatile memory 114 is backed up by, for example, a battery (not shown), and retains its stored state even when the power to the numerical control device 100 is turned off. The nonvolatile memory 114 stores various data such as programs read from the external device 120 via the interfaces 115, 118, and 119 and operation inputs input via the input unit 30. The nonvolatile memory 114 may also store programs and data for executing the numerical control device 100 of this embodiment. The display unit 70 also displays various data, measurement results, causes of invalid data, etc.
[0035] The interface 115 is an interface for connecting the numerical control device 100 to an external device 120 such as an adapter. Programs, various parameters, etc. are loaded from the external device 120. The interface 118 is an interface for connecting the numerical control device 100 to a display unit 70 such as a liquid crystal display. The display unit 70 displays various data loaded into memory, data obtained as a result of executing programs, etc. The interface 119 is an interface for connecting the numerical control device 100 to an input unit 30 such as a keyboard or pointing device. The input unit 30 passes commands, data, etc. based on operations by an operator to the CPU 111 via the interface 119.
[0036] Although the present disclosure has been described in detail, the present disclosure is not limited to the individual embodiments described above. Various additions, substitutions, modifications, partial deletions, etc. are possible in these embodiments without departing from the gist of the present disclosure or the gist of the present disclosure derived from the claims and their equivalents. Furthermore, these embodiments can also be implemented in combination. For example, in the above-described embodiments, the order of each operation and the order of each process are shown as examples and are not limited to these.
[0037] The following supplementary notes are further disclosed regarding the above-described embodiments and modifications. (Supplementary Note 1) A simulation device (100) includes a program analysis unit (11) that analyzes a machining program, a point sequence data acquisition unit (15) that acquires point sequence data in which tool positions are arranged in chronological order based on the analysis results of the machining program, a data selection unit (16) that selects point sequence data to be used for creating a simulation image based on modal data at the time the point sequence data was acquired, and a simulation unit (18) that creates a simulation image that visually represents the machining process using the selected point sequence data. (Supplementary Note 2) The simulation device (100) includes a machining state addition unit (17) that determines a machining state based on the modal data and adds the machining state to the point sequence data, and the data selection unit (16) selects point sequence data based on the machining state. (Supplementary Note 3) The machining state is associated with a tolerance value, and the data selection unit (16) calculates the deviation of a point included in the point sequence data from a line segment passing through adjacent points before and after it, and selects point sequence data using the tolerance value as a threshold value for the deviation. (Supplementary Note 4) The machining state includes at least one of rough cutting, semi-finishing, and finishing. (Supplementary Note 5) The data selection unit (16) does not select point sequence data in a machining state of rapid feed. (Supplementary Note 6) The tolerance value becomes smaller as the machining state places greater importance on accuracy. (Supplementary Note 7) The point sequence data acquisition unit (15) acquires point sequence data in actual machining. (Supplementary Note 8) The point sequence data acquisition unit (15) acquires point sequence data calculated from a control command for controlling a servo motor based on the machining program. (Supplementary Note 9) The modal data is a program number. (Supplementary Note 10) The modal data is a tool number. (Supplementary Note 11) The storage medium (112, 113, 114) stores instructions to cause one or more processors (111) to execute the following processes: analyze a machining program; acquire point sequence data in which tool positions are arranged in chronological order based on the analysis result of the machining program; select point sequence data to be used for creating a simulation image based on modal data at the time when the point sequence data was acquired; and create a simulation image that visually represents the machining process using the selected point sequence data.
[0038] REFERENCE SIGNS LIST 100 Numerical control device 11 Program analysis unit 12 Interpolation unit 13 Command unit 14 Motor control unit 15 Point sequence data acquisition unit 16 Data selection unit 17 Machining state addition unit 18 Simulation unit 111 CPU 112 ROM 113 RAM 114 Non-volatile memory
Claims
1. A simulation device comprising: a program analysis unit which analyzes a machining program; a point sequence data acquisition unit which acquires point sequence data in which tool positions are arranged in chronological order based on the analysis results of the machining program; a data selection unit which selects point sequence data to be used for creating a simulation image based on modal data at the time when the point sequence data was acquired; and a simulation unit which uses the selected point sequence data to create a simulation image that visually represents the machining process.
2. A simulation device according to claim 1, further comprising a machining state adding section which judges a machining state based on said modal data and adds the machining state to the point sequence data, said data selecting section selecting the point sequence data based on the machining state.
3. A simulation device as described in claim 2, wherein the machining state is associated with a tolerance value, and the data selection unit calculates a deviation from a line segment passing through adjacent points before and after a point included in the point sequence data, and selects the point sequence data using the tolerance value as a threshold value for the deviation.
4. The simulation device according to claim 2, wherein said machining state includes at least one of rough cutting, semi-finishing, and finishing.
5. The simulation device according to claim 2, wherein said data selection section does not select point sequence data in which the machining state is fast forward.
6. The simulation device according to claim 3, wherein the tolerance value is smaller as the machining state places greater importance on accuracy.
7. The simulation device according to claim 1, wherein said point sequence data acquisition unit acquires point sequence data in actual machining.
8. The simulation device according to claim 1, wherein said point sequence data acquisition section acquires point sequence data determined from a control command for controlling a servo motor based on said machining program.
9. The simulation device according to claim 1, wherein said modal data is a program number.
10. The simulation device according to claim 1, wherein the modal data is a tool number.
11. A computer-readable storage medium storing instructions to cause one or more processors to execute the following processes: analyzing a machining program; acquiring point sequence data in which tool positions are arranged in chronological order based on the analysis results of the machining program; selecting point sequence data to be used for creating a simulation image based on modal data at the time when the point sequence data was acquired; and using the selected point sequence data to create a simulation image that visually represents the machining process.
Citation Information
Patent Citations
Generation system for cutter path for rough cutting
JP1993094207A
Halfway actuating method in numerical controller
JP1993158518A
Machining simulation device and optimal process determination device
JP2012014601A
Three-dimensional model creation system, processing simulation system, and tool path automatic production system
JP2020086759A
Simulation device
JP2021056835A
