· Working Principle of Electric Discharge Machining. The workpiece and the tool are electrically connected to dc electric power. The workpiece is connected to the +ve terminal it becomes the anode. The tool is the hode. A gap, known as the 'sparkgap' in the ranges of to mm is maintained between the workpiece and the tool.