Patent ID: 8637785

Claim:
A wire-cut electric discharge machine, comprising: a wire-cut electric discharge machine main unit including a wire electrode; and a controller configured to control the wire-cut electric discharge machine main unit, wherein the controller includes: an analysis and calculation unit configured to analyze a block of a machining program and to calculate a measuring point and a measuring direction based on a result of the analysis; a control unit configured to control application of a machining power supply voltage to the wire electrode to machine a workpiece according to the machining program; a storage unit configured to store the measuring point and the measuring direction calculated by the analysis and calculation unit; a first movement unit configured to move the wire electrode relative to the workpiece in a state in which the application of the machining power supply voltage to the wire electrode is turned off according to the block of the machining program analyzed by the analysis and calculation unit; a determination unit configured to determine whether or not the wire electrode moved by the first movement unit has reached the measuring point; a second movement unit configured to move the wire electrode relative to the workpiece in the measuring direction, in response to a determination made by the determination unit that the wire electrode has reached the measuring point; and an end face detection unit configured to detect a position of an end face of the workpiece as a result of the wire electrode moved by the second movement unit being brought into contact with the workpiece, wherein the measuring point is a midpoint between a starting point and an end point defined by the block of the machining program, an equally dividing point between the starting point and the end point, or a position a predetermined distance away from the starting point.