A controller comprising: a control program execution unit storing a control program that executes predetermined control; a data processing program execution unit storing a data processing program that executes data processing; a shared memory that stores data read-out from I/O resources that are shared by the control program with the data processing program, the stored data that is read-out from each of the shared I/O resources being separately accessed by the control program and the data processing program; an access right management unit that manages access right information for the data processing program, wherein the access right information defines access rights to the stored data that is read-out from each of the shared I/O resources; and an arbitration unit that determines whether there is an access right to stored data that is read-out from a specific shared I/O resource based on the access right information when the shared memory is accessed by the data processing program, and permits the data processing program to access in the shared memory the stored data that is read-out from the specific shared I/O resource, in a case where there is an access right to the data processing program to access in the shared memory the stored data that is read-out from the specific shared I/O resource; wherein the data processing program is configured to execute an arithmetic operation, read I/O resource data stored in the shared memory based on the access rights, and transmit/receive data to/from an external system, when the data processing program is added after the control program is introduced. a control program execution unit storing a control program that executes predetermined control; a data processing program execution unit storing a data processing program that executes data processing; a shared memory that stores data read-out from I/O resources that are shared by the control program with the data processing program, the stored data that is read-out from each of the shared I/O resources being separately accessed by the control program and the data processing program; an access right management unit that manages access right information for the data processing program, wherein the access right information defines access rights to the stored data that is read-out from each of the shared I/O resources; and an arbitration unit that determines whether there is an access right to stored data that is read-out from a specific shared I/O resource based on the access right information when the shared memory is accessed by the data processing program, and permits the data processing program to access in the shared memory the stored data that is read-out from the specific shared I/O resource, in a case where there is an access right to the data processing program to access in the shared memory the stored data that is read-out from the specific shared I/O resource; wherein the data processing program is configured to execute an arithmetic operation, read I/O resource data stored in the shared memory based on the access rights, and transmit/receive data to/from an external system, when the data processing program is added after the control program is introduced.