Patent ID: 8706265

Claim:
A safety controller comprising: a processor; a system program for controlling allocation of an execution time of the processor to a safety-related task for executing processing related to ensuring of functional safety of a control target, and to a non-safety-related task for executing other processing related to control of the control target; and a storage unit that stores end information indicating an end of processing in each of the tasks, wherein the processor executes the system program to schedule the tasks in accordance with scheduling information indicating scheduling contents of a safety-related time partition in which the execution time is allocated to the safety-related task when the safety-related task is in a ready state, and of a non-safety-related time partition in which the execution time is allocated to the non-safety-related task when the non-safety-related task is in the ready state, so as to start a period of at least one of the safety-related time partition and the non-safety-related time partition in a constant cycle, the processor executes a task in a time partition in the constant cycle to store, upon completion of processing in the task, the end information indicating an end of the processing in the task into the storage unit, and releases the execution time for the task to bring the task into the ready state, the processor inhibits, in the scheduling, allocation of the execution time to the task in the time partition in the constant cycle in a case where the end information is stored in the storage unit, even when the task in the time partition in the constant cycle is in the ready state, and the processor executes the system program to delete the end information stored in the storage unit during a period between an end of the period of the time partition in the constant cycle and a start of a period in a next cycle of the time partition.