A control device for a machine tool, the machine tool comprising a plurality of modules (M1-M3) each integrally including a workpiece gripper that grips a workpiece and an operation-part holder that holds an operation part configured to perform a predetermined operation on the workpiece gripped by the workpiece gripper, the control device comprising: a plurality of control systems (ml-m3) that are configured to control each a respective module (M1-M3), the control device controlling the machine tool to machine the workpiece in accordance with a multi-system program (MP1-MP2), the multi-system program including a plurality of machining programs which respectively correspond to the control systems (m1-m3); a multi-system program storage part that is configured to store a plurality of the multi-system programs (MP1-MP2), each of the plurality of multi-system programs (MP1-MP2) being executed to machine a respective workpiece in a different shape; a multi-system program dividing part that is configured to divide each of the multi-system programs (MP1-MP2) into the machining programs; a divided program storage part that is configured to individually store the divided machining programs; a system-based program storage part that is configured to store each of the machining programs for the respective control systems (m1-m3); and a machining program selection part that is configured to select and retrieve a desired machining program from the divided program storage part in accordance with the machining step to be executed by each of the modules (M1-M3) and to store the selected machining program in the system-based program storage part for the respective control system (m1-m3), wherein the machining program selection part selects and retrieves the machining program for each control system (m1-m3) from the divided program storage part and stores the selected machining program (MP1-MP2) in the system-based program storage part for the respective control systems such that each of the modules (M1-M3) independently executes a predetermined machining step. a plurality of control systems (ml-m3) that are configured to control each a respective module (M1-M3), the control device controlling the machine tool to machine the workpiece in accordance with a multi-system program (MP1-MP2), the multi-system program including a plurality of machining programs which respectively correspond to the control systems (m1-m3); a multi-system program storage part that is configured to store a plurality of the multi-system programs (MP1-MP2), each of the plurality of multi-system programs (MP1-MP2) being executed to machine a respective workpiece in a different shape; a multi-system program dividing part that is configured to divide each of the multi-system programs (MP1-MP2) into the machining programs; a divided program storage part that is configured to individually store the divided machining programs; a system-based program storage part that is configured to store each of the machining programs for the respective control systems (m1-m3); and a machining program selection part that is configured to select and retrieve a desired machining program from the divided program storage part in accordance with the machining step to be executed by each of the modules (M1-M3) and to store the selected machining program in the system-based program storage part for the respective control system (m1-m3), wherein the machining program selection part selects and retrieves the machining program for each control system (m1-m3) from the divided program storage part and stores the selected machining program (MP1-MP2) in the system-based program storage part for the respective control systems such that each of the modules (M1-M3) independently executes a predetermined machining step. <EOS>