A controller which operates both a control program for executing sequence control or the like, and a data processing program for executing complex computations or the like, wherein I/O resource information is shared in a shared memory, and read prohibition information and write permission information are used to control access of the I/O resource information by the data processing program.