Shape carving electrical discharge machining machine

JPWO2024252592A5Active Publication Date: 2025-05-19MITSUBISHI ELECTRIC CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023565634
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2023-06-07
Publication Date
2025-05-19
Estimated Expiration
2043-06-07

AI Technical Summary

Technical Problem

Existing die-sinking electrical discharge machines face challenges in accurately checking the shape and dimensions of a workpiece without removing it from the processing machine surface plate, as the camera lens gets dirty from oil smoke and the internal circuit board may malfunction due to contamination, making precise repositioning difficult.

Method used

A die-sinking electric discharge machine with a detachable imaging device that uses a contact detection system to prevent lens contamination and circuit board failure, allowing for in-situ inspection by attaching the imaging device to the main spindle and using connector connections to ensure safe and precise movement.

Benefits of technology

Enables accurate in-situ inspection of workpiece shape and dimensions, preventing lens contamination and circuit board failure, and allowing for automatic tool changes, reducing repositioning errors and maintaining precise machining accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000016_0000
    Figure 00000016_0000
  • Figure 00000016_0001
    Figure 00000016_0001
  • Figure 00000016_0002
    Figure 00000016_0002
Patent Text Reader

Abstract

The die-sinking electric discharge machine (100) includes a spindle (1), a machining electrode (5) that is detachably attached to the spindle (1) and machines the workpiece (16) by performing non-contact discharge on the workpiece (16) placed in an insulating machining fluid, an imaging device (3) that is detachably attached to the spindle (1) by replacing the machining electrode (5) and photographs the workpiece (16) machined by the machining electrode (5) and acquires imaging data that shows the shape of the workpiece (16) after machining, a contact detection unit (70) that is connected to the spindle (1) and detects contact between the imaging device (3) and the workpiece (16) when the imaging device (3) is attached to the spindle (1), and an NC device (72) that controls movement and stopping of the spindle (1), and the NC device (72) brings the movement of the spindle (1) to an emergency stop when the contact detection unit (70) detects the contact. The user inspects the shape and dimensions of the workpiece (16) based on the imaging data.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a die-sinking electrical discharge machine. [Background technology]

[0002] Generally, a die-sinking EDM machine is a device that performs die-sinking EDM, which transfers the shape of the machining electrode onto a workpiece called a workpiece. In die-sinking EDM, the workpiece is first set on the machine table, which is installed in a machining tank filled with insulating machining fluid such as oil or water. Next, with the machining electrode and the workpiece facing each other, the highly precisely machined machining electrode is brought close to the workpiece, and an electric current is passed through the machining electrode to cause discharge. At this time, the workpiece is machined while maintaining a small constant distance between the workpiece and the machining electrode, for example, about several tens of μm. The gap between the workpiece and the machining electrode is called the discharge gap. Through the above process, the workpiece is machined into a three-dimensional shape that is the inverse of the shape of the machining electrode.

[0003] In die-sinking EDM, the workpiece is removed from the machine platen after machining to check whether its shape and dimensional accuracy meet the requirements. If the check shows that the requirements are not met, additional machining is performed on the workpiece. When additional machining is performed, the workpiece must be set on the machine platen again, which takes time before remachining of the workpiece can begin. In addition, once the workpiece is removed from the machine platen, it is very difficult to reproduce its original state with high precision and attach it in the exact same position. In addition, even if the position of the workpiece can be perfectly reproduced, the positions of the machine and tools change over time, and even if the workpiece is remachined to correct its dimensions, the corrections may not be corrected correctly.

[0004] Therefore, there is a demand for a method for checking the shape and dimensions of a workpiece without removing the workpiece from the processing machine platen, and as such a method, for example, a method described in Patent Document 1 has been proposed. In Patent Document 1, a camera is attached to a spindle to which a tool is attached, alongside the tool. The camera moves in synchronization with the tool. Images obtained by the camera are automatically recognized by a recognition device and are displayed on a monitor. A user can check the shape and dimensions of the workpiece from the displayed image. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Publication No. 4-93150 Summary of the Invention [Problem to be solved by the invention]

[0006] The NC (Numerical Control) machine tool described in Patent Document 1 is a processing device that mainly performs grinding processing, and is not intended to perform processing while the workpiece is immersed in a processing fluid.

[0007] Meanwhile, during die-sinking EDM in a die-sinking EDM machine, oily smoke is generated from the machining fluid. As described in Patent Document 1, if a camera is left attached to the spindle, the camera lens may become dirty with the oily smoke or the internal circuit board of the camera may deteriorate and break down.

[0008] Thus, when the camera described in Patent Document 1 is applied to a die-sinking EDM machine rather than a general machine tool, there is a problem that the camera lens becomes dirty due to the oily smoke produced during the die-sinking EDM process, making it impossible to capture a clear image, and there is also a possibility that the camera's internal circuit board may become damaged.

[0009] The present disclosure has been made in consideration of the above, and has an object to provide a die-sinking electric discharge machine that makes it possible to check the shape and dimensions of a workpiece without removing the workpiece from the base, while preventing contamination of the lens of the imaging device and malfunction of the imaging device. [Means for solving the problem]

[0010] In order to solve the above-mentioned problems and achieve the object, the die-sinking electric discharge machine according to the present disclosure comprises a spindle, a machining electrode that is detachably attached to the spindle and machines the workpiece by performing non-contact discharge on the workpiece placed in an insulating machining fluid, an imaging device that is replaced with the machining electrode and detachably attached to the spindle and photographs the workpiece machined by the machining electrode and obtains imaging data showing the shape of the workpiece after machining, a contact detection unit that is connected to the spindle and detects contact if the imaging device comes into contact with the workpiece when the imaging device is attached to the spindle, and an NC device that controls the movement and stopping of the spindle. a control box that supplies power to the imaging device via the spindle using power from an external power source, receives imaging data acquired by the imaging device via the spindle, and processes the imaging data to generate image data; Equipped with When the imaging device is attached to the spindle, the contact detection unit and the control box are insulated from each other so that a single electric circuit is not formed among the imaging device, the control box, the contact detection unit, and the spindle. The NC device is characterized by the fact that it brings the movement of the spindle to an emergency stop when the contact detection unit detects contact. Effect of the Invention

[0011] The die-sinking electric discharge machine according to the present disclosure has the advantage of being able to check the shape and dimensions of the workpiece without removing it from the base, while preventing contamination of the lens of the imaging device and malfunction of the imaging device. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 is a diagram showing a configuration of a die-sinking electric discharge machine according to a first embodiment; [Diagram 2] FIG. 1 is a diagram showing an internal configuration of a control box provided in a die-sinking electric discharge machine according to a first embodiment; [Diagram 3] FIG. 1 is a schematic diagram showing a method for imaging and checking a workpiece in a die-sinking electric discharge machine according to a first embodiment; [Figure 4]A flowchart showing the flow of processing between the NC device and the control box provided in the die-sinking electric discharge machine according to the first embodiment. [Diagram 5] FIG. 1 is a diagram showing an example of the configuration of an ATC provided in a die-sinking electric discharge machine according to a first embodiment; [Figure 6] FIG. 1 is a schematic diagram showing how an imaging device and a machining electrode are replaced by an ATC provided in a die-sinking electric discharge machine according to a first embodiment; [Figure 7] FIG. 1 is a diagram showing an example of a configuration of a connector connection provided in a die-sinking electric discharge machine according to the first embodiment; [Figure 8] FIG. 1 is a diagram showing a roller bearing structure for preventing a second connector terminal from falling off, which is provided in a die-sinking electric discharge machine according to the first embodiment; [Figure 9] FIG. 1 is a diagram showing a configuration of a contact detection function in a die-sinking electric discharge machine according to a first embodiment; [Figure 10] FIG. 1 is a diagram showing a configuration of an insulation function in a die-sinking electric discharge machine according to a first embodiment. [Figure 11] FIG. 1 is a diagram showing an example of the configuration of a processing circuit provided in a control box according to a first embodiment when the processing circuit is realized by a processor and a memory. [Figure 12] FIG. 1 is a diagram showing an example of a processing circuit in a control box according to a first embodiment, the processing circuit being configured with dedicated hardware; [Figure 13] FIG. 1 is a diagram showing an internal configuration of a power supply panel provided in a die-sinking electric discharge machine according to a first embodiment; [Figure 14] FIG. 1 is a diagram showing an internal configuration of a numerical control device (NC device) provided in a die-sinking electric discharge machine according to a first embodiment. [Figure 15] FIG. 1 is a diagram showing a wiring configuration when a machining electrode is attached to a die-sinking electric discharge machine according to a first embodiment; [Figure 16] FIG. 1 is a diagram showing a wiring configuration when an imaging device and a control box are attached to a die-sinking electric discharge machine according to a first embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A die-sinking electric discharge machine according to an embodiment of the present disclosure will be described below in detail with reference to the drawings.

[0014] Embodiment 1 (Components) 1 is a diagram showing the configuration of a die-sinking electric discharge machine according to embodiment 1. The die-sinking electric discharge machine 100 includes a spindle 1, an electrode chuck 2, an imaging device 3, a control box 4, a machining electrode 5, a contact detection circuit 7, an ATC (Automatic Tool Changer) 9, a power supply panel 10, and a surface plate 21. The power supply panel 10 has a contact detection unit 70.

[0015] As shown in Fig. 1, an electrode chuck 2 is provided on a spindle 1 of a die-sinking electric discharge machine 100. The electrode chuck 2 is a mounting fixture for mounting an imaging device 3 or a machining electrode 5 to the spindle 1. The imaging device 3 or the machining electrode 5 is detachably fixed to the spindle 1 by the electrode chuck 2. The imaging device 3 and the machining electrode 5 are never both mounted on the spindle 1 at the same time, and only one of them is always mounted on the spindle 1. The example in Fig. 1 shows a state in which the imaging device 3 is mounted on the electrode chuck 2.

[0016] The imaging device 3 is provided with a lens 3a at its lower end. The lens 3a is disposed facing the workpiece 16. The imaging device 3 is supplied with power via a control box 4. The imaging device 3 and the control box 4 are connected via a power line 41 for supplying power and a signal line 45 for transmitting imaging data. After the die-sinking electric discharge machine 100 performs die-sinking electric discharge machining of the workpiece 16, the imaging device 3 photographs the workpiece 16. Then, the imaging device 3 transmits the imaging data acquired by the photographing to the control box 4 via the signal line 45. Power is supplied to the imaging device 3 from a power source 30 via the control box 4. The power source 30 is an external power source such as an outlet. The power source 30 is composed of an AC power source such as a commercial power source, but may be a DC power source such as a storage battery. The imaging device 3 is composed of, for example, a camera.

[0017] The control box 4 is connected to the power source 30 via a power line 40. The control box 4 supplies power from the power source 30 to the imaging device 3. The control box 4 also processes the imaging data received from the imaging device 3 to generate image data 15. The image data 15 is input to a PC (Personal Computer) 8 via a signal line 42. The user displays the image data 15 on the screen of the PC 8 and checks the shape and dimensions of the workpiece 16 based on the image data 15. In this way, by sequentially transferring the image data 15 from the control box 4 to the PC 8, the user can use the PC 8 to check the processing state of the workpiece 16 in real time when the imaging device 3 is photographing it. The control box 4 also is connected to the earth 11 via an earth wire 43.

[0018] FIG. 2 is a diagram showing the internal configuration of a control box provided in the die-sinking electric discharge machine according to the first embodiment. As shown in FIG. 2, the control box 4 has a power supply unit 4a, an image processing unit 4b, a storage unit 4c, and a calculation unit 4d. The power supply unit 4a supplies power to the imaging device 3 using power from the power source 30. The image processing unit 4b performs image processing on the imaging data acquired by the imaging device 3 to generate image data 15. The storage unit 4c stores the operation program of the control box 4 and stores various data such as the calculation results of the control box 4. The calculation unit 4d performs various calculations to confirm the shape and dimensions of the workpiece 16. FIG. 2 is an example of the control box 4, and is not limited thereto. The control box 4 does not necessarily have to have all of the units shown in FIG. 2, and may have other configurations other than the units shown in FIG. 2. Furthermore, some or all of the units of the control box 4 in FIG. 2 may be configured as a cloud server. Furthermore, the control box 4 may be configured as a server. In this case, the control box 4 may be installed near the die-sinking electric discharge machine 100, or may be installed in a remote location. When the control box 4 is installed in a remote location, the control box 4 and the die-sinking electric discharge machine 100 may be connected via a network such as the Internet. In addition, in the example of FIG. 1, the control box 4 and the power supply panel 10 are configured separately, but this is not limited to the example of FIG. 1. In other words, the control box 4 may be mounted inside the power supply panel 10, or may be provided outside the power supply panel 10.

[0019] Returning to the explanation of FIG. 1, the machining electrode 5 is attached to the spindle 1 by the electrode chuck 2. The machining electrode 5 is machined with high precision into a shape that is the inverse of the finished shape of the workpiece 16. The machining electrode 5 is made of, for example, copper or graphite, and has electrical conductivity. The machining electrode 5 may also be made of other materials, such as tungsten, that have electrical conductivity only when the temperature is higher than a certain temperature. The machining electrode 5 machines the workpiece 16 by non-contact discharge to the workpiece 16 placed in an insulating machining liquid.

[0020] The die-sinking electric discharge machining will be described in more detail. First, the workpiece 16 is set in a machining tank filled with machining fluid. Next, the machining electrode 5 is brought close to the workpiece 16, and a current is passed through the machining electrode 5 to cause discharge. As a result, the workpiece 16 is machined into a three-dimensional shape that is the inverse of the shape of the machining electrode 5. The shape of the workpiece 16 after machining is sometimes called the product shape. By using the ATC 9, the machining electrode 5 and the imaging device 3 are automatically replaced with respect to the spindle 1 by program operation, without the user having to replace them manually.

[0021] The machining fluid used in the die-sinking electric discharge machining is composed of an insulating liquid such as water or oil. When the workpiece 16 and the machining electrode 5 are insulated by the machining fluid, and the workpiece 16 and the machining electrode 5 approach each other, a dielectric breakdown occurs between them. Dielectric breakdown is a phenomenon in which the electrical resistance drops suddenly and a large current flows when the electric field to an insulator exceeds a threshold value. A high-density discharge state called an arc column occurs when a pulse current flows in instantly due to the dielectric breakdown, and the surface of the workpiece 16 becomes locally hot, for example, at about 6000 to 7000°C. This melts the workpiece 16 made of metal. By executing each process of dielectric breakdown and melting for each machining area of ​​the workpiece 16, the workpiece 16 is machined until it finally becomes the product shape.

[0022] The imaging device 3 has a housing (not shown), an imaging device cover 6 attached to cover the housing, a lens 3a, and an electric unit 3b (see FIG. 9). The housing forms the outer shell of the imaging device 3. The electric unit 3b includes an internal board that realizes various functions of the imaging device 3. The imaging device cover 6 is conductive. As shown in FIG. 1, the imaging device cover 6 has, for example, a cylindrical shape. The lower end of the imaging device cover 6 is open. The lens 3a provided at the lower end of the imaging device 3 is exposed to the outside from the opening of the imaging device cover 6. When the imaging device 3 is attached to the spindle 1, the lens 3a and the workpiece 16 face each other. The imaging device cover 6 is connected to a contact detection circuit 7 of the die-sinking electric discharge machine 100.

[0023] The contact detection circuit 7 has a first contact detection line 7a and a second contact detection line 7b. The first contact detection line 7a connects the surface plate 21 installed in a machining tank (not shown) and the contact detection unit 70. The second contact detection line 7b connects the imaging device cover 6 and the contact detection unit 70. When the imaging device cover 6 and the workpiece 16 come into contact with each other, one electric circuit is formed by the imaging device cover 6, the workpiece 16, the surface plate 21, and the contact detection unit 70 through the contact detection circuit 7. The contact detection unit 70 detects that the imaging device cover 6 and the workpiece 16 have come into contact with each other based on the conduction state of the electric circuit, that is, when it detects that a current has flowed through the electric circuit. When the contact detection unit 70 detects the contact, a spindle control unit 72a (see FIG. 14) in a numerical control device (hereinafter referred to as an NC device) 72 (described later) provided in the power supply panel 10 immediately brings the spindle 1 to an emergency stop. This makes it possible to minimize damage to the imaging device 3 and the workpiece 16. It is desirable that the lower end of the imaging device cover 6 is disposed at the same height as the lens 3a of the imaging device 3 or extends to a position lower than the lens 3a. In the explanation of the first embodiment, "contact between the imaging device cover 6 of the imaging device 3 and the workpiece 16" is sometimes referred to as "contact between the imaging device 3 and the workpiece 16" for the sake of simplicity.

[0024] The die-sinking electric discharge machine 100 is provided with an ATC 9 that exchanges the machining electrode 5 and the imaging device 3 for the spindle 1. The ATC 9 exchanges the machining electrode 5 and the imaging device 3 for the spindle 1 in response to a signal input from the outside. The signal input from the outside is, for example, a command from an ATC control unit 72b in an NC device 72, described later, provided on the power supply panel 10. When the NC device 72 determines that machining of the workpiece 16 has been completed, it outputs a command to the ATC 9 to remove the machining electrode 5 from the spindle 1 and attach the imaging device 3 to the spindle 1 instead of the machining electrode 5. When the NC device 72 receives a command to remachine the workpiece 16 from the PC 8, it outputs a command to the ATC 9 to remove the imaging device 3 from the spindle 1 and attach the machining electrode 5 to the spindle 1 instead of the imaging device 3. The ATC 9 automatically attaches and detaches the machining electrode 5 or the imaging device 3 to and from the spindle 1 based on these commands from the NC device 72. The machining electrode 5 or the imaging device 3 removed from the spindle 1 is returned to the magazine 9a of the ATC 9. The ATC 9 is sometimes called an automatic tool changer.

[0025] As shown in Fig. 1, the imaging device 3 is provided with a first connector terminal 12 for connector connection. In addition, the spindle 1 is provided with a second connector terminal 13 for connector connection. By connecting the first connector terminal 12 of the imaging device 3 to the second connector terminal 13 of the spindle 1, it becomes possible to perform a wired connection between the imaging device 3 and the control box 4, and a wired connection between the imaging device cover 6 and the contact detection unit 70. Note that the main body of the first connector terminal 12 may be attached to the imaging device cover 6 instead of the imaging device 3. Meanwhile, the first connector terminal 12 is not provided on the processing electrode 5.

[0026] As shown in FIG. 1, the power supply panel 10 is provided with a contact detection unit 70 therein. Here, FIG. 13 is a diagram showing the internal configuration of the power supply panel provided in the die-sinking electric discharge machine according to the first embodiment. To explain in more detail with reference to FIG. 13, the power supply panel 10 is provided with a contact detection unit 70, a power supply unit 71, and an NC device 72. The contact detection unit 70 detects contact between the imaging device cover 6 and the workpiece 16, and also detects contact between the processing electrode 5 and the workpiece 16. When the contact detection unit 70 detects either of these contacts, it outputs a contact detection signal to the NC device 72. When the NC device 72 receives the contact detection signal, it immediately brings the spindle 1 to an emergency stop via a spindle control unit 72a (see FIG. 14) described later. This makes it possible to minimize damage to the imaging device 3, the processing electrode 5, and the workpiece 16. The power supply unit 71 shown in FIG. 13 supplies power to the ATC 9, the processing electrode 5, and the drive device 50 using power from the power source 30. The NC device 72 shown in FIG. 13 controls the spindle 1, the ATC 9, and the machining electrode 5 to control machining of the workpiece 16. FIG. 14 is a diagram showing the internal configuration of a numerical control device (NC device) provided in the die-sinking electric discharge machine according to the first embodiment. As shown in FIG. 14, the NC device 72 is provided with a spindle control unit 72a, an ATC control unit 72b, and a machining control unit 72c. The spindle control unit 72a controls the movement and stopping operation of the spindle 1, and performs an emergency stop of the spindle 1 in the event of an emergency. The ATC control unit 72b controls the operation of the ATC 9, and causes the ATC 9 to replace the machining electrode 5 with the imaging device 3. The machining control unit 72c supplies power to the machining electrode 5 by outputting a power supply command to the power supply unit 71 in the power supply panel 10. The machining control unit 72c also controls the value of the machining voltage at the machining electrode 5. As shown in FIG. 1, the power supply panel 10 is connected to a power source 30. Furthermore, the power supply panel 10 is connected to the earth 11 by an earth wire 44 .

[0027] Returning to the explanation of FIG. 1, the surface plate 21 is placed in a machining tank (not shown). As shown in FIG. 1, the surface plate 21 has a flat plate shape. The shape of the surface plate 21 may be rectangular or circular in a plan view. The upper surface of the surface plate 21 is placed so as to be horizontal, for example. As shown in FIG. 1, the workpiece 16 is placed on the upper surface of the surface plate 21. The surface plate 21 is connected to the contact detection unit 70 via a first contact detection line 7a. The surface plate 21 is conductive. The surface plate 21 is sometimes called a machining machine surface plate.

[0028] A PC 8 is connected to the die-sinking electric discharge machine 100. The PC 8 may be one of the components of the die-sinking electric discharge machine 100, or may be installed outside the die-sinking electric discharge machine 100. The PC 8 has a display device such as a display. The PC 8 also has a user interface that accepts various inputs by user operations. The user interface is, for example, a keyboard and a mouse. The PC 8 outputs commands to the NC device 72 in accordance with the inputs from the user, etc.

[0029] (Image capture method of the image capture device 3) FIG. 3 is a schematic diagram showing a method for imaging and checking a workpiece in the die-sinking electric discharge machine according to the first embodiment. The upper part of FIG. 3 shows imaging data of the workpiece 16. In the imaging data in the upper part of FIG. 3, the entire state of the workpiece 16 is captured. The left diagram in the lower part of FIG. 3 shows a local image 60 of the workpiece 16 when the position of the spindle 1 coincides with a first measurement point A described later, and the right diagram in the lower part shows a local image 61 of the workpiece 16 when the position of the spindle 1 coincides with a second measurement point B described later. The images 60 and 61 are examples of images displayed on the screen of the PC 8 based on the image data 15, for example.

[0030] First, a case where the shape of the workpiece 16 is confirmed will be described. The imaging device 3 is capable of clearly capturing an image of the fine shape of the surface of the workpiece 16 with an accuracy of the submicron order. The imaging data indicating the shape of each part of the workpiece 16 acquired by the imaging device 3 is transferred in real time to the control box 4. The control box 4 converts the imaging data into image data 15 by image processing the imaging data in the image processing unit 4b. The image data 15 is transferred from the control box 4 to the PC 8. This allows the user to sequentially confirm the shape and dimensions of the workpiece 16 by displaying the image data 15 on the screen of the PC 8.

[0031] In addition, since the imaging device 3 is attached to the spindle 1, the imaging device 3 can also be moved with the movement of the spindle 1. Therefore, by moving the imaging device 3 in the height direction so that the distance between the workpiece 16 and the imaging device 3 becomes large, it is possible to capture a wide range of the workpiece 16. Conversely, by moving the imaging device 3 in the height direction so that the distance between the workpiece 16 and the imaging device 3 becomes small, it is possible to capture a localized fine location of the workpiece 16. In this way, since the imaging device 3 can be moved, it is possible to capture both a wide range and a narrow range of the workpiece 16, and the focus adjustment range of the imaging device 3 becomes wide. Furthermore, the imaging device 3 can also be moved in the X direction of FIG. 1 together with the spindle 1. Therefore, it is also possible to determine the positions of the first measurement point A and the second measurement point B in the workpiece 16 in advance, and to move the spindle 1 to the first measurement point A and the second measurement point B in order to obtain localized imaging data at the positions of each measurement point.

[0032] Next, a case where the dimension measurement of the workpiece 16 is performed will be described. As described above, the spindle 1 can be moved in the X direction by, for example, the drive unit 50. The X direction is, for example, the horizontal direction. The drive unit 50 is composed of, for example, a motor. The operation of the drive unit 50 is controlled by a spindle control unit 72a of the NC device 72. The power supply unit 71 in the power supply panel 10 supplies power to the drive unit 50 via a power line 46 using power from the power source 30. The power line 46 is arranged to pass through the spindle 1 and connects the drive unit 50 and the power supply unit 71, as shown in Figs. 15 and 16 described later. The drive unit 50 is installed inside or outside the spindle 1. Here, a case where the spindle 1 is moved in the height direction and the horizontal direction by the drive unit 50 will be described as an example, but the configuration for moving the spindle 1 may be other configurations. For the purposes of the following description, the left edge of the workpiece 16 is referred to as the first edge 16a, and the right edge of the workpiece 16 is referred to as the second edge 16b. In addition, one preset point on the first edge 16a is referred to as the first measurement point A, and one preset point on the second edge 16b is referred to as the second measurement point B.

[0033] First, the spindle control unit 72a of the NC device 72 moves the spindle 1 so as to align it with the first edge 16a or the first measurement point A of the workpiece 16. Then, when the position of the imaging device 3 attached to the spindle 1 matches the position of the first edge 16a or the first measurement point A, the control box 4 records the current machine coordinates of the spindle 1, that is, the coordinates (x a ,y a ) is stored in the storage unit 4c. Note that the "coordinates when the position of the spindle 1 coincides with the first measurement point A" may be simply called the "coordinates of the first measurement point A" or the "first coordinates".

[0034] Next, the spindle control unit 72a of the NC device 72 moves the spindle 1 so as to align it with the second edge 16b of the workpiece 16 or the second measurement point B. Then, when the position of the imaging device 3 attached to the spindle 1 matches the position of the second edge 16b or the second measurement point B, the control box 4 records the current machine coordinates of the spindle 1, that is, the coordinates (x b ,y b ) is stored in the memory unit 4c. Note that the "coordinates when the position of the spindle 1 coincides with the second measurement point B" may be simply called the "coordinates of the second measurement point B" or the "second coordinates".

[0035] The calculation unit 4d of the control box 4 calculates the coordinates (x a ,y a ) and the coordinates of the second measurement point B (x b ,y b ), the distance between the first edge 16a and the second edge 16b, and the distance between the first measurement point A and the second measurement point B are calculated. These distances can be calculated, for example, by the following formula (1).

[0036] Distance AB = {(x a -x b ) 2 +(y a -y b ) 2} 1 / 2 (1)

[0037] In this way, the control box 4 can calculate the distance between two desired edges or the distance between two desired measurement points. Note that, although an example in which the calculation unit 4d of the control box 4 calculates these distances has been described here, the present invention is not limited to this case. These distances may be calculated by the PC 8, for example.

[0038] Using the PC 8, the user compares the shape and dimensions of each part of the workpiece 16 with the design data based on the distance between the two edges or the distance between the two measurement points, and checks whether the workpiece 16 has been accurately machined into the final product shape, whether the dimensional accuracy meets preset requirements, etc. Furthermore, if the check shows that the workpiece 16 has not been accurately machined into the final product shape, the user replaces the imaging device 3 and the machining electrode 5 and performs the die-sinking electric discharge machining of the workpiece 16 again.

[0039] Fig. 4 is a flow chart showing the flow of processing between the NC device and the control box provided in the die-sinking electric discharge machine according to the first embodiment. Fig. 4 shows the flow of processing to obtain the distance between the first measurement point A and the second measurement point B among the processing between the NC device 72 and the control box 4. By repeatedly performing the processing of the flow in Fig. 4 for each machining area of ​​the workpiece 16, it is possible to check the shape and dimensions of the entire workpiece 16. In addition, by comparing the dimensions with the design data, it is possible to check whether the dimensional accuracy satisfies the requirements. The flow in Fig. 4 will be explained below.

[0040] In step S1, the spindle control unit 72a of the NC device 72 moves the spindle 1 toward the first measurement point A.

[0041] In step S2, when the position of the spindle 1 coincides with the first measurement point A, the control box 4 detects the coordinates of the spindle 1, i.e., the coordinates of the first measurement point A (x a ,y a ) is stored as the first coordinate in the storage unit 4c.

[0042] In step S3, the spindle control unit 72a of the NC device 72 moves the spindle 1 toward the second measurement point B.

[0043] In step S4, when the position of the spindle 1 coincides with the second measurement point B, the control box 4 detects the coordinates of the spindle 1, i.e., the coordinates of the second measurement point B (x a ,y a ) is stored as the second coordinate in the storage unit 4c.

[0044] In step S5, the calculation unit 4d of the control box 4 calculates the distance between the first measurement point A and the second measurement point B based on the first coordinate and the second coordinate.

[0045] (Automatic replacement of imaging device 3 by ATC9) Fig. 5 is a diagram showing an example of the configuration of the ATC provided in the die-sinking electric discharge machine according to embodiment 1. Fig. 6 is a schematic diagram showing how the imaging device and the machining electrode are replaced by the ATC provided in the die-sinking electric discharge machine according to embodiment 1.

[0046] As shown in FIG. 5, the ATC 9 has a magazine 9a, a rotating shaft 9b, a support 9c, and a guide 9d. The magazine 9a stores the unused processing electrode 5 and the imaging device 3. As shown in FIG. 5, the magazine 9a stores the processing electrode 5 and the imaging device 3 in a suspended manner. The rotating shaft 9b connects the magazine 9a and the support 9c. The rotating shaft 9b can rotate in the direction indicated by the arrow C. The central axis of the rotating shaft 9b extends, for example, in the vertical direction or the perpendicular direction. The direction indicated by the arrow C is a circumferential direction centered on the position of the central axis of the rotating shaft 9b. In synchronization with the rotation of the rotating shaft 9b in the direction of the arrow C, the magazine 9a also rotates in the direction of the arrow C. The support 9c supports the magazine 9a via the rotating shaft 9b. The support 9c is guided by the guide 9d and can move in the direction of the arrow D. The guide 9d is a rod-shaped member extending in the direction of the arrow D. By the movement of the support 9c and the rotation of the rotary shaft 9b, the processing electrode 5 and the imaging device 3 are automatically moved to a position where they are attached to the spindle 1. The direction of the arrow D may be the same as the X direction in FIG. 1 or may be different.

[0047] Normally, a machining electrode 5 is attached to the spindle 1 of the die-sinking electric discharge machine 100 via an electrode chuck 2. By using the ATC 9, the machining electrode 5 can be automatically attached to and detached from the electrode chuck 2 by program operation of the NC device 72. In addition, the machining electrode 5 removed from the spindle 1 of the die-sinking electric discharge machine 100 is returned to the magazine 9a of the ATC 9. By using the automatic machining electrode exchange mechanism by the ATC 9, the imaging device 3 can also be automatically attached to and detached from the spindle 1 of the die-sinking electric discharge machine 100.

[0048] 6, FIG. 6(a) shows a state in which the imaging device 3 is attached to the spindle 1, and FIG. 6(b) shows a state in which the processing electrode 5 is attached to the spindle 1. As shown in FIG. 6(a), the imaging device 3 is connected to the spindle 1 via a connector. The connector connection is established by connecting the first connector terminal 12 and the second connector terminal 13. Thus, in the first embodiment, no cable or the like is used to connect the imaging device 3 to the spindle 1.

[0049] On the other hand, the camera of the conventional machining apparatus of Patent Document 1 and the like is connected to a recognition device or a calculation device by a cable. If the camera of the conventional machining apparatus of Patent Document 1 and the like were made to be automatically attached and detached by the ATC 9, problems would arise in that the camera cable would get tangled in the spindle 1, be immersed in machining fluid, or be broken when the camera is carried in and out of the magazine of the ATC 9.

[0050] In the first embodiment, imaging device 3 is connected to spindle 1 via a connector, so that such problems caused by a cable do not occur. The connector connection will be described below.

[0051] (Connector connection of imaging device 3) FIG. 7 is a diagram showing an example of a configuration of a connector connection provided in the die-sinking electric discharge machine according to the first embodiment. FIG. 16 is a diagram showing a wiring configuration when an imaging device and a control box are attached to the die-sinking electric discharge machine according to the first embodiment. In FIG. 16, in order to make the description easier to understand, some wiring that is not necessary for the description is omitted. As shown in FIG. 1, FIG. 7, and FIG. 16, the imaging device 3 is provided with a first connector terminal 12, and the spindle 1 is provided with a second connector terminal 13. The first connector terminal 12 is a male type, and the second connector terminal 13 is a female type. By inserting the first connector terminal 12 into a recess of the female second connector terminal 13, the first connector terminal 12 and the second connector terminal 13 are electrically connected to each other, and a connector connection is established. The first connector terminal 12 may be a female type, and the second connector terminal 13 may be a male type.

[0052] 7 and 16, the second contact detection line 7b, the power supply line 41, and the signal line 45 run through the first connector terminal 12 and the second connector terminal 13. When the imaging device 3 is attached to the spindle 1, the second contact detection line 7b connects the imaging device cover 6 and the contact detection unit 70. The power supply line 41 supplies power from the power supply 30 to the imaging device 3 via the control box 4. The signal line 45 transmits imaging data obtained by the imaging device 3 to the control box 4.

[0053] Therefore, when the imaging device 3 is attached to the spindle 1, the imaging device 3 can be connected to the control box 4 and the imaging device cover 6 can be connected to the contact detection unit 70 by connector connection.

[0054] In the first embodiment, the imaging device 3 and the control box 4 are connected by connectors so that the wired connection between them is automatically established. In the first embodiment, the imaging device 3 is mounted on the electrode chuck 2 provided on the spindle 1 by program operation under the control of the NC device 72, and the connector connection is also automatically performed at the same time. Therefore, the user's workload can be reduced when replacing the processing electrode 5 and the imaging device 3. When the connector connection is automatically performed, for example, the first connector terminal 12 is supported by a member having high rigidity. As shown in FIG. 1, the member is provided between the first connector terminal 12 and the imaging device 3, and is a member that holds the first connector terminal 12, and has an L-shape in a plan view, for example. Alternatively, each of the first connector terminal 12 and the second connector terminal 13 is supported by a member having high rigidity. In this way, the posture of the first connector terminal 12 is maintained and kept in a vertically extended state, so that the first connector terminal 12 is automatically attached to the second connector terminal 13 as the imaging device 3 moves, without the user's operation. Note that a robot may be used as another method for automatically connecting the connectors. In this case, a jig such as a robot arm that holds and transports the first connector terminal 12 is provided in the ATC 9. Then, the first connector terminal 12 is held by the jig and transported to the second connector terminal 13, where the first connector terminal 12 is inserted into the second connector terminal 13 for connection.

[0055] FIG. 8 is a diagram showing a roller bearing structure for preventing the second connector terminal provided in the die-sinking electric discharge machine according to the first embodiment from falling off. As shown in FIGS. 7 and 8, the second connector terminal 13 on the spindle 1 side is provided with rollers 17. The rollers 17 have a circular shape in side view. The rollers 17 are cylindrical or spherical members. Also, as shown in FIG. 7, the first connector terminal 12 on the imaging device 3 side is provided with a recess 18 for receiving the rollers 17. The recess 18 is composed of a recessed portion, and as shown in FIG. 7, it is formed so as to be recessed from the surface of the first connector terminal 12 toward the inside. The recess 18 has a shape complementary to the rollers 17. The recess 18 functions as a roller bearing for the rollers 17. When the first connector terminal 12 is attached to the second connector terminal 13, the rollers 17 come into contact with the inner wall of the recess 18 and are caught, thereby preventing the first connector terminal 12 from falling off the second connector terminal 13.

[0056] As shown in FIG. 8, a spring 19 is connected to the roller 17. One end of the spring 19 is joined to the roller 17, and the other end of the spring 19 is joined to the second connector terminal 13. Normally, as shown in FIG. 8, the spring 19 is not contracted, and a part of the roller 17 protrudes from the inner wall of the second connector terminal 13 toward the space inside the second connector terminal 13. On the other hand, when the imaging device 3 is attached to the spindle 1 via the electrode chuck 2, the roller 17 is pressed by the insertion pressure of the first connector terminal 12, and the spring 19 contracts. As a result, the entire roller 17 is completely accommodated in the second connector terminal 13. As a result, the first connector terminal 12 can be inserted into the second connector terminal 13. Then, when the insertion of first connector terminal 12 into second connector terminal 13 is completed, the elastic force of spring 19 causes spring 19 to return to its original contraction state, and roller 17 is inserted into recess 18, fixing first connector terminal 12 to second connector terminal 13. In this way, once roller 17 is inserted into recess 18, roller 17 engages with recess 18, so that first connector terminal 12 can be prevented from falling off second connector terminal 13.

[0057] (Wiring configuration when machining electrode is attached) FIG. 15 is a diagram showing a wiring configuration when a machining electrode is attached to the die-sinking electric discharge machine according to the first embodiment. In FIG. 15, in order to make the description easier to understand, some wiring that is not necessary for the description is omitted. As shown in FIG. 6(b) and FIG. 15, a connector is not used for connecting the machining electrode 5. Power is supplied to the machining electrode 5 by the power supply unit 71 of the power supply panel 10 via the machining control unit 72c of the NC device 72. Specifically, the NC device 72 uses the machining control unit 72c to output a power command to the power supply unit 71 to instruct the power supply unit 71 to supply power to the machining electrode 5, as shown in FIG. 13. As a result, the power supply unit 71 supplies power to the machining electrode 5 via the power line 47. The power line 47 is arranged to pass through the inside of the spindle 1, as shown in FIG. 15, and connects the machining electrode 5 and the power supply unit 71. Power is supplied to the drive unit 50 by the power supply unit 71 via the power line 46 using the power of the power source 30. When the processing electrode 5 is attached to the spindle 1, the second contact detection line 7b connects the processing electrode 5 and the contact detection unit 70.

[0058] (Contact detection function) Fig. 9 is a diagram showing the configuration of a contact detection function in the die-sinking electric discharge machine according to embodiment 1. Fig. 9 shows a contact detection circuit that detects contact between the imaging device cover 6 of the imaging device 3 and the workpiece 16.

[0059] In order for the imaging device 3 to obtain an image with submicron-order accuracy, the imaging device 3 needs to be brought close to the workpiece 16. In general, existing conventional die-sinking electric discharge machines are provided with a contact detection function for detecting contact between the machining electrode 5 and the workpiece 16. However, existing conventional die-sinking electric discharge machines are not provided with a contact detection function for detecting contact between the imaging device 3 and the workpiece 16. Therefore, when the imaging device 3 and the workpiece 16 come into contact with each other, there have been actual cases in which both the imaging device 3 and the workpiece 16 have been damaged.

[0060] Therefore, in the first embodiment, the contact detection circuit 7 between the machining electrode 5 and the workpiece 16, which is specific to the die-sinking electric discharge machine 100, is also applied to the imaging device 3. For this purpose, in the first embodiment, the imaging device cover 6 capable of conducting electricity is attached to the imaging device 3. As a result, as can be seen from FIG. 9, when the workpiece 16 comes into contact with the imaging device cover 6, one electric circuit is formed by the imaging device cover 6, the workpiece 16, the surface plate 21, the first contact detection line 7a, the contact detection unit 70, and the second contact detection line 7b. The contact detection unit 70 detects the contact between the workpiece 16 and the imaging device cover 6 by detecting that a current has flowed through the electric circuit. When the contact detection unit 70 detects the contact, it instantly outputs a contact detection signal to the NC device 72. When the NC device 72 receives the contact detection signal, it outputs a command from the spindle control unit 72a to the drive device 50 that drives the spindle 1 to urgently stop the operation of the spindle 1.

[0061] The operation when the processing electrode 5 and the workpiece 16 come into contact with each other is similar. That is, when the processing electrode 5 and the workpiece 16 come into contact with each other, one electric circuit is formed by the processing electrode 5, the workpiece 16, the surface plate 21, the first contact detection line 7a, the contact detection unit 70, and the second contact detection line 7b. The contact detection unit 70 detects the contact between the workpiece 16 and the processing electrode 5 by detecting that a current flows through the electric circuit. When the contact detection unit 70 detects the contact, it instantly outputs a contact detection signal to the NC device 72. When the NC device 72 receives the contact detection signal, it outputs a command from the spindle control unit 72a to the drive device 50 that drives the spindle 1 to urgently stop the operation of the spindle 1.

[0062] In this manner, in the first embodiment, since the contact detection circuit 7 composed of the first contact detection line 7a and the second contact detection line 7b is provided, it is possible to detect not only the contact between the processing electrode 5 and the workpiece 16, but also the contact between the imaging device 3 and the workpiece 16. As a result, when the imaging device 3 comes into contact with the workpiece 16, the contact detection unit 70 in the power supply panel 10 immediately detects the contact and can bring the spindle 1 to an emergency stop via the NC device 72. This makes it possible to minimize damage to the imaging device 3 and the workpiece 16.

[0063] (Connector connection of imaging device cover 6) The imaging device cover 6 and the contact detection unit 70 need to be connected by wire, similar to the imaging device 3. It is desirable that the wired connection between the imaging device cover 6 and the contact detection unit 70 can be automatically attached and detached by program operation. Therefore, in the first embodiment, as described above, the imaging device cover 6 and the contact detection unit 70 are connected by wire using the connector connection shown in FIG.

[0064] (insulation function) Fig. 10 is a diagram showing the configuration of an insulating function in the die-sinking electric discharge machine according to embodiment 1. Fig. 10 shows an insulating function that provides insulation between the contact detection unit 70 in the power supply panel 10 of the die-sinking electric discharge machine 100 and the control box 4. In embodiment 1, the insulating function is provided to prevent the spindle 1 from always coming to a stop due to an erroneous detection that the imaging device 3 and the workpiece 16 are in contact when the imaging device 3 is attached to the spindle 1.

[0065] Depending on the model of the imaging device 3, the earth of the electric section 3b of the imaging device 3 may be connected to the housing (not shown) of the imaging device 3. In that case, the moment the imaging device 3 is attached to the spindle 1, one electric circuit is formed by the imaging device 3, the control box 4, the contact detector 70, and the spindle 1 via the electrode chuck 2, and the contact detector 70 always erroneously detects that the workpiece 16 and the imaging device 3 are in contact. In this case, in the die-sinking electric discharge machine 100, the spindle 1 continues to be in an emergency stop state, and the movement of the spindle 1 is interlocked. To avoid this, in the first embodiment, the earth 20 is provided in the imaging device 3 at a location not in contact with the housing, and the electric section 3b of the imaging device 3 is connected to the earth 20. In other words, the earth 20 is not in electrical contact with the housing of the imaging device 3 and the imaging device cover 6. In this manner, in the first embodiment, by providing the earth 20, it is possible to insulate the contact detection unit 70 connected to the imaging device cover 6 from the control box 4 connected to the electrical unit 3b of the imaging device 3. The earth 20 is sometimes called an insulating unit. This makes it possible to prevent the contact detection unit 70 from erroneously detecting that the workpiece 16 and the imaging device 3 are in contact with each other when the imaging device 3 is attached to the spindle 1 in the first embodiment.

[0066] (Hardware configuration) Here, the hardware configuration of the control box 4 will be described.

[0067] In the control box 4 according to the first embodiment, the power supply unit 4a, the image processing unit 4b, and the calculation unit 4d are realized by a processing circuit. The processing circuit may be a processor and a memory that executes a program stored in a memory, or may be dedicated hardware. The processing circuit is also called a control circuit.

[0068] FIG. 11 is a diagram showing an example of the configuration of a processing circuit in the case where the processing circuit included in the control box according to the first embodiment is realized by a processor and a memory. The processing circuit 90 shown in FIG. 11 is a control circuit and includes a processor 91 and a memory 92. When the processing circuit 90 is configured with the processor 91 and the memory 92, each function of the processing circuit 90 is realized by software, firmware, or a combination of software and firmware. The software or firmware is described as a program and stored in the memory 92. In the processing circuit 90, each function is realized by the processor 91 reading and executing the program stored in the memory 92. That is, the processing circuit 90 includes a memory 92 for storing a program that results in the processing of the control box 4 being executed. This program can also be said to be a program for causing the control box 4 to execute each function realized by the processing circuit 90. This program may be provided by a storage medium in which the program is stored, or may be provided by other means such as a communication medium.

[0069] The above program can also be said to be a program that causes the control box 4 to execute, for example, the processes of steps S2, S4, and S5 in Fig. 4. In other words, the above program can also be said to be a program that causes the control box 4 to execute a step of storing a first coordinate, a step of storing a second coordinate, and a step of calculating the distance between the first measurement point A and the second measurement point B based on the first coordinate and the second coordinate.

[0070] Here, the processor 91 is, for example, a CPU (Central Processing Unit), a processing device, an arithmetic device, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor), etc. Also, the memory 92 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 ROM), an EEPROM (Electrically EPROM), a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, or a DVD (Digital Versatile Disc), etc.

[0071] Fig. 12 is a diagram showing an example of a processing circuit provided in the control box according to the first embodiment, which is configured with dedicated hardware. The processing circuit 93 shown in Fig. 12 corresponds to, for example, 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 combination of these. The processing circuit 93 may be partially realized with dedicated hardware and partially realized with software or firmware. In this way, the processing circuit 93 can realize each of the above-mentioned functions by dedicated hardware, software, firmware, or a combination of these.

[0072] Like the control box 4, the PC 8 is also configured with a processing circuit 90 shown in Fig. 11 or a processing circuit 93 shown in Fig. 12. Similarly, the spindle control unit 72a, the ATC control unit 72b, and the machining control unit 72c of the NC device 72 are also configured with, for example, the processing circuit 90 shown in Fig. 11 or the processing circuit 93 shown in Fig. 12. The processing circuits 90 and 93 in these cases have the same configurations as those in the control box 4, so their description will be omitted here.

[0073] (effect) As described above, in the first embodiment, since the imaging device 3 that can be attached to the spindle 1 is provided, the surface shape and dimensions of the workpiece 16 after processing can be confirmed without removing the workpiece 16 from the surface plate 21. Therefore, even if the confirmation result indicates that additional processing is required for the workpiece 16, the time and effort required to place the workpiece 16 on the surface plate 21 again can be reduced. In addition, the occurrence of minute positional deviations due to the workpiece 16 being placed again can be prevented. Furthermore, since the imaging device 3 is attached to the spindle 1, the imaging device 3 can be moved together with the spindle 1. Therefore, it is possible to photograph the workpiece 16 in a desired range, from a wide range to a narrow range, and the focus adjustment range of the imaging device 3 can be widened.

[0074] In the first embodiment, the earth 20 is provided in the imaging device 3 at a location that is not in contact with the housing of the imaging device 3 and the imaging device cover 6. In this way, the control box 4 and the contact detection unit 70 in the power supply panel 10 are insulated from each other by connecting the electric unit 3b of the imaging device 3 to the earth 20, which is different from the earth 11. Therefore, when the imaging device 3 is attached to the spindle 1, it is possible to prevent the imaging device 3, the control box 4, the contact detection unit 70, and the spindle 1 from forming one electric circuit. As a result, it is possible to prevent the contact detection unit 70 from erroneously detecting that the workpiece 16 and the imaging device 3 are in contact with each other when the imaging device 3 is attached to the spindle 1. As a result, it is possible to prevent the movement of the spindle 1 from being interlocked due to erroneous detection, and the spindle 1 from being unable to move. Therefore, after the imaging device 3 is attached to the spindle 1, the imaging device 3 can be freely moved together with the spindle 1.

[0075] Furthermore, in the first embodiment, the imaging device 3 has a conductive imaging device cover 6. For example, due to a user's operation error or a program malfunction, the imaging device 3 and the workpiece 16 may come into contact with each other. In the first embodiment, the conductive imaging device cover 6 is provided, so that even if the workpiece 16 comes into contact with the imaging device 3, the contact detection unit 70 can immediately detect the contact based on the conduction state of one electric circuit formed by the imaging device cover 6, the workpiece 16, and the contact detection unit 70. In addition, based on the detection result of the contact detection unit 70, the NC device 72 instantly stops the movement of the spindle 1, so that damage to the imaging device 3 and the workpiece 16 can be minimized.

[0076] In the first embodiment, the machining electrode 5 and the imaging device 3 can be automatically attached to and detached from the spindle 1 by using the ATC 9. The removed machining electrode 5 and imaging device 3 are stored in a magazine 9a of the ATC 9. Since the magazine 9a is installed away from the machining tank, it is possible to prevent the machining electrode 5 and imaging device 3 stored in the magazine 9a from being exposed to oily smoke generated from the machining fluid. As a result, it is possible to prevent the lens 3a of the imaging device 3 from being soiled by the oily smoke and the internal circuit board of the electric part 3b of the imaging device 3 from being deteriorated by the oily smoke.

[0077] In the first embodiment, the imaging device 3 and the control box 4 are connected, and the imaging device cover 6 and the contact detector 70 are connected by a connector connection consisting of a first connector terminal 12 and a second connector terminal 13. It is assumed that the imaging device 3 and the control box 4, or the imaging device cover 6 and the contact detector 70 are connected by a wired connection using a cable or the like. In that case, when attaching or detaching the imaging device 3 to the spindle 1, the cable may get caught or entangled on the spindle 1 or the ATC 9, and the cable may be pulled and broken. Furthermore, the cable may be immersed in the machining fluid. In the first embodiment, since a connector connection is used, these problems caused by the cable do not occur.

[0078] By acquiring image data of the workpiece 16 with the imaging device 3, the control box 4 can acquire the coordinates of the first measurement point A and the second measurement point B on the workpiece 16. Therefore, the dimensions of each part of the workpiece 16 can be easily measured. Since the user can check the image data 15 of the workpiece 16 in real time using the PC 8, it is possible to inspect whether the shape and dimensions of the workpiece 16 are accurate and correct.

[0079] When the camera described in the above-mentioned Patent Document 1 is applied to a die-sinking electric discharge machine as shown in the first embodiment, rather than to a general NC machine tool, the following problems arise. (1) The camera lens gets dirty due to the oily smoke produced during the die-sinking EDM process, making it difficult to capture clear images. (2) Oil smoke produced during the die-sinking EDM process can cause deterioration of the camera's internal circuit boards, which can lead to failure of the internal circuit boards. (3) Even if the camera is removable, the camera and NC machine tool are connected by wire, which makes it difficult to manage the cable when replacing the camera. As a result, the cable may break. (4) The camera does not have an emergency stop function in the event of contact, so there is a possibility that the camera or the workpiece may be damaged if the camera continues to come into contact with the workpiece. (5) Even if the camera is equipped with an emergency stop function in case of contact, if the ground of the internal circuit board of the camera is connected to the camera housing, the moment the camera is attached to the spindle, the spindle will enter an emergency stop state. As a result, the spindle will be fixed and the camera cannot be moved, making it impossible to photograph the workpiece in the desired range, and the focus adjustment range of the camera will be narrowed. In contrast, the die-sinking electric discharge machine 100 according to the first embodiment can solve all of these problems (1) to (5) as described above.

[0080] The configurations shown in the above embodiments are merely examples, and may be combined with other known technologies, or may be combined with the various modified examples described in the embodiments. Furthermore, it is also possible to omit or modify parts of the configurations without departing from the spirit of the invention. [Explanation of symbols]

[0081] 1 spindle, 2 electrode chuck, 3 imaging device, 3a lens, 3b electrical section, 4 control box, 4a power supply section, 4b image processing section, 4c memory section, 4d calculation section, 5 machining electrode, 6 imaging device cover, 7 contact detection circuit, 7a first contact detection line, 7b second contact detection line, 8 PC, 9 ATC, 9a magazine, 9b rotating shaft, 9c support section, 9d guide, 10 power supply panel, 11, 20 earth, 12 first connector terminal, 13 second connector terminal, 15 image data, 16 workpiece, 16a first edge, 16b second edge, 17 roller, 18 recess, 19 spring, 21 surface plate, 30 power supply, 40, 41, 46, 47 power supply line, 42, 45 signal line, 43, 44 earth line, 50 drive device, 60, 61 Image, 70 contact detection unit, 71 power supply unit, 72 numerical control device (NC device), 72a spindle control unit, 72b ATC control unit, 72c machining control unit, 90, 93 processing circuit, 91 processor, 92 memory, 100 die-sinking electric discharge machine, A first measurement point, B second measurement point, C, D arrows.

Claims

1. The main axis and a machining electrode that is detachably attached to the spindle and that machines a workpiece placed in an insulating machining fluid by performing non-contact discharge on the workpiece; an imaging device that is replaced with the processing electrode and detachably attached to the spindle, images the workpiece machined by the processing electrode, and acquires imaging data showing the shape of the workpiece after machining; a contact detection unit connected to the spindle, the contact detection unit detecting contact between the imaging device and the workpiece when the imaging device is attached to the spindle; An NC device that controls the movement and stopping of the spindle; a control box that supplies power to the imaging device via the spindle using power from an external power source, receives the imaging data acquired by the imaging device via the spindle, and processes the imaging data to generate image data; Equipped with the contact detection unit and the control box are insulated from each other so that a single electric circuit is not formed among the imaging device, the control box, the contact detection unit, and the spindle when the imaging device is attached to the spindle; The NC device performs an emergency stop on the movement of the spindle when the contact detection unit detects the contact. A die-sinking electric discharge machine characterized by:

2. the imaging device includes a conductive imaging device cover that is attached to cover the imaging device and connected to the contact detection unit, the contact detection unit detects the presence or absence of contact between the imaging device and the workpiece based on a conduction state of one electric circuit formed by the imaging device cover, the workpiece, and the contact detection unit when the imaging device is attached to the spindle; 2. The die-sinking electric discharge machine according to claim 1.

3. A first connector terminal provided on the imaging device; a second connector terminal provided on the main shaft and configured to establish a connector connection when connected to the first connector terminal; Equipped with the connection between the imaging device and the control box, and the connection between the imaging device cover and the contact detection unit are performed by the connector connection; 3. The die-sinking electric discharge machine according to claim 2.

4. an automatic tool changer that changes the machining electrode and the imaging device relative to the spindle in response to a signal input from an external device; 4. The die-sinking electric discharge machine according to claim 1, further comprising:

5. When the imaging device photographs the workpiece, When the NC device moves the spindle so as to align it with a first measurement point set in advance on the workpiece, the control box stores, as first coordinates, the coordinates of the spindle when the position of the spindle coincides with the first measurement point; When the NC device moves the spindle so as to align it with a second measurement point set in advance on the workpiece, the control box stores, as second coordinates, the coordinates of the spindle when the position of the spindle coincides with the second measurement point; The control box calculates a distance between the first measurement point and the second measurement point based on the first coordinates and the second coordinates.

4. The die-sinking electric discharge machine according to claim 1, wherein the die-sinking electric discharge machine is a die-sinking electric discharge machine.