Patent ID: 8346378
Filing Date: 2013-01-01
Classification: G05B

Abstract:
1. A programmable controller comprising: an external input/output unit connected to a control target device; a user memory that stores a user program for operating the control target device; an input/output memory that stores input/output data corresponding to external input/output signals from/to the external input/output unit; and a system memory having stored therein a system program for implementing functionality as the programmable controller, wherein the system program stored in the system memory includes a series of a plurality of system processes to be repeatedly performed, and the plurality of system processes include at least: an input/output refresh process in which input data is captured from the external input/output unit and written to an input data storage area of the input/output memory, and output data is loaded from an output data storage area of the input/output memory and sent into the external input/output unit; a user program execution process in which instructions which form the user program are sequentially read from the user memory, and the instructions are executed by referring to the input data in the input/output memory and the output data in the input/output memory is rewritten based on results of the execution; and a peripheral service process including a process of allowing a change to the user program in response to a command coming from a predetermined tool apparatus through communication, the peripheral service process comprising an operational mode in which the control target device can operate and a non-operational mode in which the control target device cannot operate are prepared, wherein, in the operational mode, the series of a plurality of system processes are repeatedly performed, in the non-operational mode, the series of a plurality of system processes except for at least the user program execution process are repeatedly performed, the system program further includes a time adjustment process including: a measurement process in which, when the series of a plurality of system processes are repeatedly performed, elapsed time from a start of the input/output refresh process to completion of a system process to be performed immediately previous to a next input/output refresh process is measured as an actual cycle time; a determination process in which a comparison is made between the actual cycle time measured in the measurement process and a fixed cycle time to determine which one of them is greater; and a selection delaying process in which when it is determined in the determination process that the fixed cycle time is greater than the actual cycle time, a point in time at which the next input/output refresh process starts is delayed by an amount of time corresponding to a difference between the fixed cycle time and the actual cycle time, and when it is determined in the determination process that the actual cycle time is greater than the fixed cycle time, the next input/output refresh process immediately starts, and wherein the selection delaying process allows a change to the fixed cycle time to be compared with the actual cycle time not only in the non-operational mode but also in the operational mode.