This application is based on and claims the benefit of priority from Japanese Patent Application No. 2019-092277, filed on 15 May 2019, the content of which is incorporated herein by reference.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to a numerical controller, a numerical control system, and a non-transitory computer readable recording medium having a program recorded thereon.

Related Art

Conventionally, an industrial machine including an industrial robot or a machine tool, in which a numerical controller (CNC, computerized numerical control) for performing machining processes is incorporated is known. In an industrial machine, the operation of the industrial machine is controlled using the numerical controller. Therefore, the numerical controller collects and stores various pieces of data of a control target industrial machine periodically from the industrial machine in order to grasp the operating state of the industrial machine. The numerical controller collects and stores (records) various pieces of data such as axis-related data, state data, operation data, and maintenance data periodically using a data logger, for example. Moreover, the numerical controller acquires various pieces of data from the industrial machine at each of the time intervals set in the data logger, for example. The numerical controller stores various pieces of data in a solid state drive (SSD), which is a storage medium, for example.

The service life (total service life) set in an SSD is sometimes represented as a total number of possible writes. Such an expression results from the fact that an SSD deteriorates with writing. When an SSD approaches its service life, many error sectors resulting in write failure occur. Therefore, it is preferable that an SSD in which many error sectors occur is replaced in an early stage. Therefore, a service life monitoring device capable of warning the approach of the service life of an SSD, for example, has been proposed (for an example, see Patent Document 1).

Patent Document 1: Japanese Unexamined Patent Application, Publication No. 2003-85054

SUMMARY OF THE INVENTION

The service life monitoring device of Patent Document 1 monitors the state of each sector of an SSD. Specifically, the service life monitoring device detects a write error in each sector and outputs a warning. However, the service life monitoring device of Patent Document 1 can only detect the service life of an SSD at the occurrence time of an error, and cannot predict a future service life.

However, when the period set in a data logger becomes shorter, since the load on a storage medium (SSD) increases further, the time to future replacement of a storage medium may become shorter. Moreover, even though the service life of a storage medium has been reduced greatly, an operator may not notice such a reduction. Therefore, it may be preferable to be able to output a signal indicating that it is expected that the service life of a storage medium will decrease due to the settings.

(1) An aspect of the present disclosure provides a numerical controller that collects data from an industrial machine and writes data into a storage medium, including: an interval setting unit that sets a time interval between cycles in which one cycle involves collection of operation information indicating an operating state of the industrial machine and writing of the collected operation information to the storage medium; a reduced service life calculation unit that calculates a service life of the number of writes of the storage medium reduced by the writing on the basis of the set time interval as a reduced service life; a determining unit that determines whether the calculated reduced service life exceeds a prescribed threshold; and a signal output unit that outputs a signal indicating that the reduced service life exceeds the prescribed threshold when it is determined that the reduced service life exceeds the prescribed threshold.

(2) Another aspect of the present disclosure provides a numerical control system including: the numerical controller according to (1); and a server having the storage medium and being connected to the numerical controller.

(3) Another aspect of the present disclosure provides a non-transitory computer readable recording medium having a program recorded thereon, the program causing a computer to function as a numerical controller that collects data from an industrial machine and writes data into a storage medium, the computer functioning as: an interval setting unit that sets a time interval between cycles in which one cycle involves collection of operation information indicating an operating state of the industrial machine and writing of the collected operation information to the storage medium; a reduced service life calculation unit that calculates a service life of the number of writes of the storage medium reduced by the writing on the basis of the set time interval as a reduced service life; a determining unit that determines whether the calculated reduced service life exceeds a prescribed threshold; and a signal output unit that outputs a signal indicating that the reduced service life exceeds the prescribed threshold when it is determined that the reduced service life exceeds the prescribed threshold.

According to an aspect, a numerical controller, a numerical control system, and a non-transitory computer readable recording medium having a program recorded thereon, capable of outputting a signal indicating that it is expected that the service life of a storage medium will decrease due to the settings can be provided.

