A CPU unit for a PLC configured to control a control target, the CPU unit comprising: a microprocessor; a storage section (104, 106); and a communication circuit (120, 140), wherein: the storage section stores a system program, a control program, and schedule-building data; the microprocessor executes the system program and the control program stored in the storage section; the communication circuit transmits output data generated through execution of the control program and receives input data for execution of the control program; and if the schedule-building data including execution order specifications for the procedures included in a procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data characterized in that the system program includes the procedure library in which at least a first procedure for controlling execution of the control program and a second procedure for controlling output of the output data and input of the input data are included. a microprocessor; a storage section (104, 106); and a communication circuit (120, 140), wherein: the storage section stores a system program, a control program, and schedule-building data; the microprocessor executes the system program and the control program stored in the storage section; the communication circuit transmits output data generated through execution of the control program and receives input data for execution of the control program; and if the schedule-building data including execution order specifications for the procedures included in a procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data characterized in that the system program includes the procedure library in which at least a first procedure for controlling execution of the control program and a second procedure for controlling output of the output data and input of the input data are included. the storage section stores a system program, a control program, and schedule-building data; the microprocessor executes the system program and the control program stored in the storage section; the communication circuit transmits output data generated through execution of the control program and receives input data for execution of the control program; and if the schedule-building data including execution order specifications for the procedures included in a procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data characterized in that the system program includes the procedure library in which at least a first procedure for controlling execution of the control program and a second procedure for controlling output of the output data and input of the input data are included.