Numerical controller

11550296 ยท 2023-01-10

Assignee

Inventors

Cpc classification

International classification

Abstract

A numerical controller includes an activation unit that builds a memory map according to settings when the power is on; a change detection unit that detects an operation requiring reconstructing of the memory map; a task control unit that, when the operation is detected, performs a stopping process of a task being operated; and a memory map control unit that, after the task has stopped, acquires a backed up memory, reconstructs the memory map according to the setting, and compares the reconstructed memory map and the backed-up memory map, and resets information required for operating the task again such as a program counter.

Claims

1. A numerical controller comprising: a processor comprising: an activation unit that builds a memory map according to settings when the numerical controller is powered on; a change detection unit that detects an operation requiring restart, wherein the operation requiring restart is an operation requiring a reconstructing of the memory map; a task control unit that, when the operation requiring restart is detected, performs a stopping process of a task being operated, wherein access to a memory area to be reconstructed is stopped; and a memory map control unit that, after the task has stopped, acquires a backup of the memory map, reconstructs the memory map according to the setting of the numerical controller, compares the reconstructed memory map to the backed-up memory map, and resets, based on the comparison, information on the processor required for operating the task again.

2. The numerical controller according to claim 1, wherein the task control unit restarts the stopped task after the completion of the processing by the memory map control unit.

3. The numerical controller according to claim 1, further comprising a peripheral device communication unit that performs communication with a peripheral device while the memory map control unit reconstructs the memory map, wherein the communication is executed by arranging the backed-up memory map in a memory area different from a memory area of the memory map being reconstructed and further developing a program for executing the communication.

4. The numerical controller according to claim 1, wherein a program counter is reset to provide the information on the processor required for operating the task in accordance with the reconstructed memory map.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

(1) The above and other objects and features of the invention will be apparent from the following description of embodiments with reference to the accompanying drawings. Of those figures:

(2) FIG. 1 is a diagram illustrating an example of a hardware configuration of a numerical controller;

(3) FIG. 2 is a diagram showing an example of a functional configuration of the numerical controller;

(4) FIG. 3 is a flowchart showing an operation example of the numerical controller;

(5) FIG. 4 is a diagram showing a problem in the related art;

(6) FIG. 5 is a diagram showing a problem in the related art; and

(7) FIG. 6 is a diagram showing a problem in the related art.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

(8) FIG. 1 is a schematic hardware configuration diagram showing a main part of the numerical controller 1 according to the first embodiment. The numerical controller 1 is a device that controls an industrial machine including a machine tool. The numerical controller 1 includes a CPU 11, a ROM 12, a RAM 13, a non-volatile memory 14, a bus 10, an axis control circuit 16, a servo amplifier 17, an interface 18, and an interface 19. A servomotor 50, an input/output device 60, and one or more peripheral devices 70 are connected to the numerical controller 1.

(9) The CPU 11 is a processor that controls the numerical controller 1 as a whole. The CPU 11 reads the system program stored in the ROM 12 via the bus 10, and controls the entire numerical controller 1 according to the system program.

(10) The ROM 12 stores, for example, a system program for executing various controls of the machine.

(11) The RAM 13 temporarily stores temporary calculation data and display data, data and programs input by the operator via the input/output device 60, and the like.

(12) The non-volatile memory 14 is backed up by, for example, a battery, not shown, and retains the stored state even if the power of the numerical controller 1 is shut off. The non-volatile memory 14 stores data, programs, and the like input from the input/output device 60. The program and data stored in the non-volatile memory 14 may be expanded on the RAM 13 at the time of execution and use.

(13) The axis control circuit 16 controls the operating axis of the machine. The axis control circuit 16 receives an axis movement command amount output from the CPU 11, and outputs an operation axis movement command to the servo amplifier 17.

(14) The servo amplifier 17 drives the servomotor 50 in response to an axis movement command output from the axis control circuit 16.

(15) The servomotor 50 is driven by the servo amplifier 17 to move the operating axis of the machine. The servomotor 50 typically incorporates a position/speed detector. The position/speed detector outputs a position/speed feedback signal, which is fed back to the axis control circuit 16 to perform position/speed feedback control.

(16) Although only one axis control circuit 16, one servo amplifier 17, and one servomotor 50 are shown in FIG. 1, in actually, these are prepared by the same number as the number of axes to be controlled provided in the machine.

(17) The input/output device 60 is a data input/output device provided with a display, a hardware key and the like, and is typically an MDI or a control panel. The input/output device 60 displays the information received from the CPU 11 via the interface 18 on the display. The input/output device 60 passes a command, data, etc. input from a hardware key or the like to the CPU 11 via the interface 18.

(18) The peripheral device 70 is one or more peripheral devices connected to the numerical controller or the machine tool, and includes, for example, various sensors, timers, robots, and the like. The peripheral device 70 receives information from the CPU 11 via the interface 19. Information output by the peripheral device 70 is passed to the CPU 11 via the interface 19.

(19) FIG. 2 is a block diagram showing a characteristic functional configuration of the numerical controller 1. The typical numerical controller 1 includes an activation unit 101, a task control unit 102, a change detection unit 103, a peripheral device communication unit 104, and a memory map control unit 105. A combination of these is a component enabled by the unique technology of the invention.

(20) The operation of each processing unit of the numerical controller 1 will be described in sequence with reference to the flowchart of FIG. 3. The flowchart in FIG. 3 can be roughly classified into processing in a left rectangle surrounded by the dashed dotted line and processing in a right rectangle surrounded by the dashed dotted line. Among these, the processing in the rectangle on the right side particularly includes the novel processing unique to the invention.

(21) The activation unit 101 performs processing necessary when the numerical controller 1 is powered on (S101). For example, parameters and options stored in advance in the non-volatile memory 14 are read, software is loaded according to the settings, and a memory map of a code area and a work area is created. Furthermore, initialization of tasks and initialization of communication between the CPU 11 and the peripheral devices 70 are performed. After that, the activation unit 101 notifies the task control unit 102 of the completion of the processing to be executed at the time of power-on.

(22) After the completion of the processing to be executed at the time of power-on, the task control unit 102 executes processing for activating the task (S102) or stopping the task according to the cycle and priority of the task. To stop the task, make sure that the active task is not performing critical processing and then stop it. If there is a task that is performing critical processing, it is stopped after the processing of the task is completed (S104 to S105). When the operator performs an operation requiring a restart (detected and notified by the change detection unit 103 described later), the task control unit 102 notifies the memory map control unit 105 that all tasks have stopped, and then asks to reconstruct the memory map.

(23) The change detection unit 103 detects an operation by an operator that needs to be restarted (S103). An operation requiring a restart is an operation requiring a reconstruct of the memory map, and includes, for example, software installation. If an operation requiring restart is detected, the change detection unit 103 requests the task control unit 102 to stop all tasks in operation. When all tasks in operation stop, access to the memory area to be reconstructed by the CPU 11 is stopped, and safe reconstruction of the memory map is enabled.

(24) While the memory map control unit 105 reconstructs the memory map, that is, while the CPU 11 stops the memory access to the memory area being reconstructed, the peripheral device communication unit 104 substitutes communication (handshake) between the peripheral device 70 and the numerical controller 1 (S106). For example, there are a process of invalidating a watchdog timer monitoring the state of the numerical controller 1 and a process of returning a response when a request or feedback is transmitted from the servo motor to the numerical controller 1. As a result, the peripheral device 70 can continue to operate while the numerical controller 1 is reconstructing the memory map without false recognition that the numerical controller 1 has stopped operating or the like.

(25) The peripheral device communication unit 104 can execute this process using a memory area other than the memory area under reconstruction. That is, the peripheral device communication unit 104 secures a temporary memory map including a program and a work area for performing handshake processing with the peripheral device 70 in an area different from the memory map to be reconstructed. While the memory map control unit 105 is reconstructing the memory map, the peripheral device communication unit 104 performs handshake processing with the peripheral device 70 using the above-described temporary memory map.

(26) The memory map control unit 105 controls the memory map. When requested by the task control unit 102 to reconstruct the memory map, the memory map control unit 105 acquires a backup of the memory map before starting reconstructing the memory map (S107). After that, the memory map control unit 105 reads parameters and options again, executes known pre-check processing (whether the memory map after reconstructing exceeds the usable memory size, etc.), and then loads software according to setting of the parameters and he options to reconstruct the memory map of the code area and the work area (S108).

(27) After reconstructing the memory map, the memory map control unit 105 compares the backed up memory map with the reconstructed memory map, and the information necessary for causing the task or the CPU 11 to operate the task again such as an appropriate program counter are reset (S109). This makes it possible to operate the task safely. After that, the memory map control unit 105 requests the task control unit 102 to start the task (S102).

(28) According to the present embodiment, even when an operation that requires the restart of the numerical controller 1 in the related art, that is, an operation that requires reconstruction of the memory map is performed, the memory map can be reconstructed while maintaining the connection with the peripheral device 70 without requiring the restart. As a result, the time required for restarting the numerical controller 1 (including the time required for restarting the peripheral devices, and the like) can be reduced, so that the burden on the operator can be reduced. In addition, it is possible to reduce the power consumption and the like accompanied with the restart.

(29) Furthermore, according to the present embodiment, it is easy to attach and remove software and functions (such as dynamic download). In addition, since it is not necessary to restart the numerical controller 1 when performing fault handling, debugging, and the like or when updating software, it is possible to realize a more flexible usage form than in the related art.

(30) As mentioned above, although the embodiment of the invention has been described, the invention can be implemented in another aspect by adding an appropriate change without being limited to the example of embodiment mentioned above.