Abstract:
A contact point is estimated by detecting a variation of a potential difference between the first and the second object as the objects approach one another. The method and apparatus are particularly suited for use in an electrical discharge machine (EDM) that is controlled by a numerical control (NC) unit for machining a workpiece.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention is directed to a positioning method and apparatus for defining the relative positions of a first object and a second object. 
     2. Description of the Related Art 
     The relative positions of a wire electrode and a workpiece of an electrical discharge machine (EDM) for performing electrical discharge machining must be defined accurately prior to the start of machining in order to ensure high machining accuracy. 
     To define the positional relationship, it is known in the art to provide the EDM with a contact position setting function which brings the electrode and the workpiece into direct contact and sets that contact position as a reference. The reference is used by a numerical control (NC) unit to control the positioning of the electrode and the workpiece relative to each other. 
     The prior art wire-cut EDM described above is shown in FIG. 5. The positioning of wire electrode 1 relative to the workpiece 2 is controlled by NC unit 15. More specifically, the workpiece 2 is positioned by moving table 3 in either the X or the Y direction, using corresponding motors 5 and 6. The wire electrode 1 is fed through the EDM by use of main tension rollers 7 and bottom rollers 8. A contact detector 14 detects the contact of the wire electrode 1 with the workpiece 2 and outputs the detection signal to NC unit 15. 
     An example of a typical contact detector 14 used in the prior art EDM is shown in FIG. 6. The detector 14 receives inputs from wire electrode 1 and the workpiece 2. A voltage source 10 supplies a contact detecting voltage to the machining gap. A comparator 11 compares the voltage level in the machining gap to determine whether there is contact between the wire electrode and the workpiece 2. The comparator 11 outputs a signal to the NC unit 15, indicating that contact has been determined (i.e., voltage V=V b ). A current limiting resistor 13 is used to limit the contact detecting voltage across the machining gap. A switch 12 can be used by the contact detector 14 to sample the gap voltage V alternately. 
     In operation, the NC unit 15 receives a command requesting a contact position setting operation to be performed. At this time, the contact detector 14 closes switch 12 and applies a voltage from source 10 across the machining gap via the current limiting resistor 13. The wire electrode 1 and the workpiece 2 begin approaching each other in accordance with commands output by the NC unit 15. During the operation, the gap voltage V is compared with a predetermined reference voltage V b  with the comparator 11 to determine whether the wire electrode 1 and the workpiece 2 have made contact. When the gap voltage V becomes lower than the reference voltage V b , an output signal is transmitted by the comparator 11 to the NC unit 15, as described above. At this point, the NC unit 15 causes the wire electrode 1 and the workpiece 2 to stop their approach, and the contact position setting operation is complete. The relationship between the machining gap distance and the gap voltage during the above-described contact position setting operation is shown in FIG. 7. 
     The gap voltage V can be represented by the following expression: 
     
         V=E-Ri                                                     (1) 
    
     where E represents the output voltage of the voltage supply unit 10, R represents the resistance value of the current limiting resistor 13, and i represents the value of the current flowing from the voltage supply unit 10 to the machining gap via the current limiting resistor 13. Thus, it can be seen that the value of the current i is restricted by the resistance of the wire electrode 1 and the resistance of the machining gap. Assuming that the resistance of the wire electrode 1 is R1 and that of the machining gap is R2, the current i can be represented by: 
     
         i =E/(R+R1+R2)                                             (2) 
    
     It should be noted that the resistance of the machining gap R2 reduces in proportion to the decrease in the gap distance. Hence, as the gap distance reduces, the current i increases and the gap voltage V decreases. The wire resistance R1 reduces in proportion to the increase in the diameter of the wire electrode 1. 
     For example, when a wire electrode 1 with a large diameter is to be machined with a workpiece 2 having a large thickness, the wire resistance Rl is small and the gap R2 decreases to a great degree as the wire electrode 1 and the workpiece approach each other (i.e., the machining gap distance decreases). In this case, the current i flowing in the machining gap increases when the wire electrode 1 and the workpiece 2 have not yet made contact, and the gap voltage V falls considerably as compared to the open voltage E, as shown in FIG. 8. In contrast, when a wire electrode 1 with a small diameter is used with a workpiece having a small thickness, the wire resistance R1 is large, and the gap resistance R2 decreases to a lesser degree as the wire electrode 1 and the workpiece 2 approach each other, hence the current i increases slightly and the gap voltage V falls slightly. When the wire electrode 1 and the workpiece 2 have made contact, the resistance of the wire electrode Rl is large and the area of contact is small as compared to the positioning of the wire electrode 1 with the large diameter and the workpiece 2 having a large thickness. The current i, then, and the gap voltage V are only slightly reduced. 
     As the reference voltage V b  of the comparator 11 is fixed, the accuracy of the positioning in the prior art EDM varies according to the types of wire electrodes and workpieces used. For instance, if the contact voltage V 2  has been set to approximate the reference voltage V b , a contact is detected considerably ahead of the contact position of the wire electrode 1 and the workpiece 2 during the positioning of a wire electrode 1 having a large diameter and a workpiece 2 having a large thickness. This is because the reference voltage V b  (set approximately equal to V2) is higher than the actual contact voltage V 1 , as shown in FIG. 8. 
     Similarly, if the contact voltage V 1  has been set to approximate the reference voltage V b , a contact cannot be detected during the positioning of the wire electrode 1 having a small diameter and the workpiece 2 having a small thickness. In this case, the gap voltage V does not fall below the reference voltage V b  due to the resistance R1 of the wire electrode 1. Hence, if the wire electrode 1 having a small diameter is positioned to contact the workpiece 2 having a small thickness, the reference voltage V b  must be set to a value higher than the contact voltage V 1  in order for the actual contact to be detected accurately. 
     In addition, the prior art EDM may be exposed to galvanic corrosion, as shown in FIG. 9, caused by a large current flow in the machining gap. Commonly, in the final stages of the above-described positioning function the gap resistance reduces to an extremely small value as the gap distance approaches 0. As a result, large current may flow in the machining gap causing galvanic corrosion. 
     Moreover, where the actual contact could not be detected accurately, the workpiece 2 would make contact with a moving wire electrode 1 causing the wire electrode 1 to fray or create shavings, as shown in FIG. 10. Shayings 16 within the machining gap tend to make positioning impossible. 
     SUMMARY OF THE INVENTION 
     Accordingly, an object of the present invention is to overcome the disadvantages of the prior art by providing a method and apparatus for precisely positioning independent objects relative to each other. 
     It is a further object of the present invention to minimize the damage to either of the objects during positioning. 
     In accordance with the above objects, a first aspect of the present invention defines the relative positions of a first object and a second object by estimating the relative positions of the first and second objects in accordance with the variation of a potential difference between the two objects. 
     A second aspect of the present invention reduces the relative moving speeds of a first object and a second object before the relative positions of the first and second objects reach their destinations by estimating the relative positions of the first and second objects in accordance with the variation of a potential difference between the objects. 
     A third aspect of the present invention positions a first object and a second object by stopping the application of a voltage across the first and second objects during the relative positioning operation of the first and second objects performed after their relative positions of destination have been defined. 
     A fourth aspect of the present invention positions a first object and a second object by stopping the relative feeds of the first and second objects in a direction different from the on for the relative positioning operation of the first and second objects during the positioning operation performed after their relative positions of destination have been defined. 
     A fifth aspect of the present invention defines the relative positions of a first object and a second object by applying a voltage across the first and second objects, changing a gap between the first and second objects, detecting the voltage across the first and second objects and the variation of the gap at a plurality of detection points, comparing the slope of the gap variation versus voltage variation at the plurality of detection points, and estimating the relative positions of the first and second objects by means of the slope after the slope has become constant. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     The invention will be more clearly understood from the following description in conjunction with the accompanying drawings, wherein: 
     FIG. 1 is a diagram illustrating an EDM which is the preferred embodiment the present invention. 
     FIG. 2 is a flow chart of a positioning program according to the present invention, which is stored in the memory of an NC unit for use with the device shown in FIG. 1. 
     FIG. 3 illustrates various sampling points of two gap voltage-distance curves. 
     FIG. 4 illustrates three sampling points on the gap voltage-distance curve having a linear characteristic used to estimate a contact detection voltage in accordance with the present invention. 
     FIG. 5 is a block diagram of a known wire-cut EDM. 
     FIG. 6 is a diagram illustrating a known contact detector. 
     FIG. 7 is a graph illustrating a contact position setting operation using the known EDM. 
     FIG. 8 is a pair of graphs illustrating gap voltage-distance curves for a large-thickness workpiece and a small-thickness workpiece. 
     FIG. 9 illustrates damage of a workpiece due to galvanic corrosion of the wire electrode and workpiece. 
     FIG. 10 illustrates positioning error produced by shavings of a workpiece caused by wire feeding during contact of the wire electrode with the workpiece. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 illustrates an EDM used to practice the present invention. The EDM is similar to the prior art EDM (FIG. 5), wherein corresponding parts are designated by like reference characters. As in the prior art, a wire electrode 1 and workpiece 2 are positioned in accordance with commands output by NC unit 4 prior to machining of the workpiece 2 by the EDM. However, in accordance with the present invention, an improved machining gap voltage detector 9 and NC unit 4 are employed to more accurately and efficiently perform a contact position setting function. 
     The NC unit 4 controls the EDM during a contact position setting function in accordance with a program stored therein. FIG. 2 illustrates a flow chart of a contact position setting program stored in the memory of the NC unit 4. The steps are described as follows. 
     S1: The wire 1 is fed and tensioned. The switch 12 is then closed, and a voltage is applied by the voltage supply unit 10 to the machining gap via the current limiting resistor 13. The relative approach speed and direction of the wire 1 and workpiece 2 are set. The slope of the variation of the gap voltage with respect to a previous positioning period (hereinafter referred to as the &#34;slope&#34; or &#34;inclination&#34; ) and a new inclination is set to 1000. Any value may be defined instead of 1000 as long as its absolute value is much greater than 0. 
     S2: The wire 1 and workpiece 2 are then relatively moved a certain distance so as to come closer (e.g., several μm) to each other. 
     S3: The gap voltage V is converted into a digital value by the analog-to-digital converter 11 of the machining gap voltage detector 9. This voltage is compared with an open voltage E to determine whether it is lower by a predetermined level (e.g., an 80% point) or not. If the gap voltage V has not reached the predetermined level, the processing of S2 is repeated until the gap voltage V is lower than the predetermined level. The point where the gap voltage V is lower than the open voltage E by the predetermined level is the sampling starting position. 
     S4: The relative moving speed between the wire and workpiece is reduced to a speed such that measurement or sampling of the gap voltage V occurs once per each reduction of the machining gap by 1 μm. 
     S5: The current inclination becomes the preceding or previous inclination. 
     S6: The machining gap is then reduced by a distance indicated by l (e.g., 1 μm) in FIG. 3 and sampling points (gap voltage V) are stored. The value of l need not be kept constant. 
     S7: A new inclination is obtained. 
     S8: The preceding inclination is compared with the new inclination. If they are not substantially equal (e.g., error not within ±10%), then steps S5, S6 and S7 are repeated. 
     The processing of steps S5 to S8 will now be described with reference to FIG. 3. 
     For curve A, the preceding inclination (between sampling points 1 and 2) and the new inclination (between sampling points 2 and 3) are calculated as follows: 
     Preceding inclination Dal=(Va1-Va2)/l 
     New inclination Da2=(Va2-Va3)/l 
     where, here, l=1 μm 
     Here, the preceding and new inclinations are equal, which means that the sampling points have a linear characteristic (i.e., are on the same straight line). (Three points have been defined by way of example, and three or more points are acceptable.) This indicates that the gap voltage is comparatively stable and is not affected by the workpiece thickness, wire diameter, etc. In consideration of measurement error, the sampling points are determined to be on the same straight line if the slope variance is within 10%, thus the following equation must be satisfied: 
     
         0.9&lt;Dal/Da2&lt;1.1 
    
     If the inclinations do not match within the above error (i.e.,±10%), the gap voltage variation with gap distance is not yet linear. Therefore, new sampling points must be taken and the above processing steps (i.e., S5-S8) repeated until a sequence of sampling points are determined to be on the same straight line. 
     S9: The contact position is estimated. 
     The processing of S9 will now be described with reference to FIG. 4. The estimated contact position is calculated using inclination Da4 obtained when sampling points 3, 4, 5 on the curve A have been determined to be on the same straight line: 
     
         Da4=(Va4-Va5)/l 
    
     A straight line passing through the sampling point 5, shown in FIG. 4, will contact the abscissa (gap distance=0) at an estimated contact position at distance L 0  ahead of the sampling point 5. Distance L 0  is calculated as follows, where: 
     R=current limiting resistor value (Ω) 
     E=DC power supply output (V) 
     i=current flowing in the machining gap (A) 
     R1=wire electrode resistance (Ω) 
     R2=gap resistance (Ω) 
     ρ=dielectric resistance ratio (Ω/m) 
     L=gap distance 
     
         R2=ρL                                                  (3) 
    
     The gap voltage V is represented as follows by using expressions (1), (2) and (3): 
     
         V=E(1-R/(R+R1+ρL))                                     (4) 
    
     The contact voltage at the estimated contact position is obtained as follows from expression (4) since the gap distance L becomes zero is at the contact position: ##EQU1## 
     The inclination at this time is as follows from expression (4): ##EQU2## 
     Since the inclination at the estimated contact position is approximately equal to the inclination Da4, the following expression is established: ##EQU3## 
     Assuming that Va5 is the gap voltage at the sampling point 5, the distance L 0  from the sampling point 5 to the estimated contact position is as follows: 
     
         L.sub.0 =(Va5-E·R1/(R+R1))/Da4                    (8) 
    
     Thus, a point reduced by a gap distance of L 0  from the current position (sampling point 5) becomes the estimated contact position. 
     S10: The voltage application is stopped. 
     The switch 12 is opened and the voltage application to the machining gap is stopped. 
     S11: Wire feeding is stopped. 
     S12: Positioning is performed to the estimated contact position obtained at S9. 
     The estimated contact position for the curve B using a small-diameter wire and a small-thickness workpiece can also be obtained in the same manner as described for curve A. 
     The above embodiment has been described with reference to a wire-cut EDM using a water dielectric. It can easily be shown that a similar operation can be performed using equivalent principles when the EDM uses an oil-based dielectric. 
     Further, the present invention is not limited to the relative positioning of a wire electrode and a workpiece in an EDM, but is applicable to a variety of positioning devices which define the relative positions of objects. 
     It will be apparent that the invention, as described above, defines the relative positions of first and the second objects by estimating the relative positions of the first and second objects in accordance with the variation of a potential difference between detected sampling points, so that precision positioning can be performed without affect due to the shapes, types, or other conditions of the objects. 
     The present invention, thus, can be used to reduce the relative moving speeds of first and second objects before the objects reach their relative destinations. By detecting a potential difference between the objects, the relative position destinations can be reached accurately in a short time in accordance with the present invention. 
     Furthermore, damage to either of the first or second objects can be prevented by stopping the application of a voltage across the objects during the latter part of the positioning operation, or by stopping the relative feeds of the objects when abnormal contact has been made during the machining operation. 
     Many features and advantages of the invention are apparent from the detailed specification and thus it is intended by the appended claims to cover all such features and advantages of the invention which fall within the true spirit and scope thereof. As numerous modifications and changes will readily occur to those skilled in the art, the invention is not to be limited to the exact construction and operation illustrated and described above. Accordingly all suitable modifications and equivalents are to be considered within the scope of the invention.