A controller for a wire electric discharge machine, the controller creating a machining path based on an axis movement instruction in a machining program, performing programmed operation in accordance with the machining program, and moving a wire electrode and a workpiece relative to each other in accordance with the created machining path, the controller comprising: a programmed operation controlling unit that executes the machining program; a consumable life reaching monitoring unit that monitors whether it is required to exchange a consumable, wherein the consumable includes at least one of a filter, a power feeder, and an ion exchange resin; a consumable exchange time evaluating unit a programmed operation stoppage instructing unit that outputs an instruction to stop the programmed operation to the programmed operation controlling unit when the time for exchange of the consumable has been reached; a consumable exchange controlling unit that, when receiving a determination from the consumable exchange time evaluating unit that time for exchange of the consumable has been reached or after it is checked that the programmed operation has been stopped, outputs an instruction to exchange the consumable to a consumable exchanging unit and monitors whether the consumable has been exchanged; and a programmed operation resumption instructing unit that outputs an instruction to resume the programmed operation to the programmed operation controlling unit when the consumable exchanging unit has completed the exchange of the consumable the controller being characterised by further comprising a discharge state monitoring unit that monitors a discharge state during the programmed operation; and in that the consumable exchange time evaluating unit , when receiving a signal representing that time for exchange of the consumable has been reached from the consumable life reaching monitoring unit and then receiving a state signal representing that the machine is not in the discharge state from the discharge state monitoring unit , determines that time for exchange of the consumable has been reached, and otherwise determines that time for exchange of the consumable has not been reached. a programmed operation controlling unit that executes the machining program; a consumable life reaching monitoring unit that monitors whether it is required to exchange a consumable, wherein the consumable includes at least one of a filter, a power feeder, and an ion exchange resin; a consumable exchange time evaluating unit a programmed operation stoppage instructing unit that outputs an instruction to stop the programmed operation to the programmed operation controlling unit when the time for exchange of the consumable has been reached; a consumable exchange controlling unit that, when receiving a determination from the consumable exchange time evaluating unit that time for exchange of the consumable has been reached or after it is checked that the programmed operation has been stopped, outputs an instruction to exchange the consumable to a consumable exchanging unit and monitors whether the consumable has been exchanged; and a programmed operation resumption instructing unit that outputs an instruction to resume the programmed operation to the programmed operation controlling unit when the consumable exchanging unit has completed the exchange of the consumable the controller being characterised by further comprising <EOS>