WO2022190425A1 - 制御装置および制御方法 - Google Patents

制御装置および制御方法 Download PDF

Info

Publication number
WO2022190425A1
WO2022190425A1 PCT/JP2021/034559 JP2021034559W WO2022190425A1 WO 2022190425 A1 WO2022190425 A1 WO 2022190425A1 JP 2021034559 W JP2021034559 W JP 2021034559W WO 2022190425 A1 WO2022190425 A1 WO 2022190425A1
Authority
WO
WIPO (PCT)
Prior art keywords
mode
control device
processor
program
control
Prior art date
Application number
PCT/JP2021/034559
Other languages
English (en)
French (fr)
Inventor
英輝 原田
州平 遠坂
大輔 若林
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2022190425A1 publication Critical patent/WO2022190425A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts

Definitions

  • the present disclosure relates to a control device and control method, and more particularly to setting the operation of the control device.
  • Patent Document 1 discloses that a processor of a control device executes a high-priority program and a low-priority program within a certain control cycle, and a high-priority program It discloses executing a low-priority program during a processor's idle time so as not to interfere with the execution of a program.
  • the processor repeatedly executes the first program with a high priority at regular intervals. Furthermore, the processor is caused to execute the second program and the third program during the processor's idle time during the control cycle so as not to interfere with the execution of the first program. From the viewpoint of improving the computation speed and performance, the processor performs computation until the last possible time within the set control cycle. However, since the processor and peripheral circuits are in a high load state, the power consumption of the control device is large. The greater the power consumption of the control device, the greater the amount of heat emitted from the control device.
  • the controller is designed so that it can be used at a certain operating ambient temperature.
  • the actually manufactured device is evaluated whether it can be used up to its operating ambient temperature.
  • the design and evaluation are performed under conditions that are severe for the controller, i.e., the condition that the processor is operating until just before the end of the control period (maximum load condition).
  • the heat dissipation capacity of the control device may not be sufficient. For example, if the control device is operated under maximum load at an ambient temperature higher than the upper limit of the operating ambient temperature determined at the design and evaluation stage, the control device may malfunction, stop, or fail. occurs.
  • Some processors have a function that automatically lowers the clock frequency when the temperature is high. By lowering the clock frequency, the power consumption of the processor is reduced, so the amount of heat generated by the processor can be reduced.
  • control devices such as PLCs used in production sites, a problem arises in that control performance is degraded when the clock frequency is lowered. Therefore, the operation of the object (manufacturing device) controlled by the control device may change.
  • control devices can be used at a temperature higher than the assumed operating ambient temperature. For example, if an attempt is made to improve the heat dissipation performance of the control device by enlarging the housing, a new design of the control device is required. Hardware changes are not easy due to size and manufacturing cost requirements.
  • One object of the present invention is to provide a control device that can operate at higher ambient temperatures and a control method for operating the control device.
  • a control device is a control device for controlling a controlled object, and includes an input unit that receives input regarding setting of an operation mode of the control device, a processor that executes a task of controlling the controlled object, and a processor and a program that manages the tasks performed by.
  • the operating modes include a first mode and a second mode for operating the controller at a temperature higher than the operating temperature in the first mode. If the input selects the second mode, the program allocates processor idle time within the task's control period.
  • the control device allocates processor idle time within the control cycle when the second mode is selected by the user. Since the processor does not operate during idle time, the amount of heat generated by the processor is suppressed. It is thus possible to operate the control device at temperatures higher than the ambient temperature in the first mode.
  • the program executes a high-priority task among a plurality of tasks within a first remaining time excluding idle time from the control cycle. Assign tasks.
  • the controller can be operated at high ambient temperatures without affecting the performance of tasks of high importance.
  • the program when the second mode is selected by the input, the program performs, among the plurality of tasks, within a second remaining time excluding the idle time and the execution time of the high-priority task from the control period. Determine if a low-priority task with low execution priority can be assigned. The program assigns the low priority task within the second remaining time if the low priority task is assignable within the second remaining time, and the low priority task can be assigned within the second remaining time. If not, the second remaining time is assigned to idle time.
  • the control cycle by executing the high priority task and the low priority task within the control cycle, it is possible to improve the control performance of the controlled object. If the low-priority task cannot be executed, the idle time within the control cycle can be made longer. Therefore, the effect of suppressing the amount of heat generated by the processor can be enhanced.
  • the program allocates the maximum execution time of the high priority task due to fluctuations in the execution time of the high priority task within the first remaining time.
  • At least part of the free time is allocated immediately after the high-priority task ends within the control cycle.
  • control device further includes a temperature sensor that measures the temperature of the control device.
  • the program allocates free time based on temperature sensor readings such that the higher the temperature, the longer the free time.
  • the idle time can be changed according to the temperature of the control device.
  • the amount of heat generated by the processor can be reduced. Therefore, it is possible to prevent the temperature of the control device from significantly increasing.
  • the program when the first mode is selected by the input, the program does not secure idle time within the control cycle, and multiple tasks are executed within the control cycle in descending order of priority. Assign multiple tasks so that
  • a control method is a control method for a control device that controls a controlled object, and the control device includes an input unit that receives input regarding an operation mode of the control device, and a processor that executes a task of controlling the controlled object. and a program that manages the tasks performed by the processor.
  • the control method includes the steps of receiving input regarding an operating mode of the control device and setting operating conditions of the control device according to the input.
  • the operating modes include a first mode and a second mode for operating the controller at a temperature higher than the operating temperature in the first mode.
  • the setting step includes allocating processor idle time within a task control period when the second mode is selected by the input.
  • control device can be set so that the control device can be used at higher ambient temperatures.
  • control device it is possible to operate the control device so that the control device can be used at higher ambient temperatures.
  • FIG. 4 is a schematic diagram showing an example of a program execution schedule in default mode in the control device according to the present embodiment
  • FIG. 4 is a schematic diagram showing an example of a program execution schedule in an extended mode in the control device according to the present embodiment
  • 1 is a schematic diagram of a control system including a control device according to an embodiment
  • FIG. 3 is a schematic diagram showing an example of a hardware configuration of an arithmetic unit that constitutes the control device according to the embodiment
  • FIG. 2 is a block diagram showing a hardware configuration example of a support device that configures the system according to the present embodiment
  • FIG. 3 is a schematic diagram showing an example of a software configuration of an arithmetic unit that constitutes the control device according to the present embodiment
  • FIG. 3 is a diagram showing an example of a screen for setting an operation mode provided by a display unit of a support device; 4 is a flowchart showing an overview of operation mode setting processing of the control device according to the first embodiment;
  • FIG. 10 is a diagram illustrating priority of allocation of time within a control cycle in default mode and extended mode;
  • FIG. 4 is a diagram illustrating an example of task processing executed by an arithmetic unit of a control device in default mode;
  • FIG. 4 is a diagram illustrating an example of task processing executed by an arithmetic unit of a control device in an extended mode;
  • FIG. 10 is a diagram illustrating another example of task processing executed by the arithmetic unit of the control device in the extended mode;
  • FIG. 10 is a diagram explaining still another example of task processing executed by the arithmetic unit of the control device in the extended mode;
  • FIG. 11 is a flow chart showing an outline of operation mode setting processing of the control device according to the second embodiment;
  • FIG. 11 is a flowchart for explaining processing related to control of processor idle time when a task is executed by a control device;
  • FIG. 10 is a diagram illustrating an example of task processing executed in an extended mode by an arithmetic unit of a control device according to a second embodiment;
  • FIG. 1 An example of a scene to which the present invention is applied will be described with reference to FIGS. 1 and 2.
  • FIG. 1 An example of a scene to which the present invention is applied will be described with reference to FIGS. 1 and 2.
  • FIG. 1 An example of a scene to which the present invention is applied will be described with reference to FIGS. 1 and 2.
  • FIG. 1 An example of a scene to which the present invention is applied will be described with reference to FIGS. 1 and 2.
  • a control device is a computer for controlling an arbitrary controlled object, and has one or more processors.
  • the controller has two modes of operation. The first mode of operation is the default (standard) mode. The second mode of operation is extended mode.
  • FIG. 1 is a schematic diagram showing an example of a program execution schedule in the default mode in the control device according to the present embodiment.
  • FIG. 2 is a schematic diagram showing an example of a program execution schedule in extended mode in the control device according to the present embodiment.
  • the control device when operating the control device in the default mode, the control device executes a high priority task 20 and a low priority task 30 within the control cycle.
  • a "task” is a basic unit to be controlled for allocating computing resources, and one or more programs to be executed are set for each task. That is, when computing resources are allocated to any task and the task becomes ready to be executed, execution of one or more programs set for the task is started or resumed.
  • the high priority task 20 is a task that should be executed within the control cycle.
  • the high-priority task 20 is set with a program having the highest execution priority (hereinafter also simply referred to as "priority") that is repeatedly executed by the processor of the control device.
  • the high-priority task 20 may include, for example, input/output data update processing, sequence operation processing that should be executed with the highest priority, and the like.
  • the processing time of the high priority task 20 is allocated within the control cycle so that the high priority task 20 is always executed within the control cycle.
  • the low-priority task 30 is a task whose execution priority is lower than that of the high-priority task 20, and is executed, for example, upon request.
  • a program having a lower priority than the program set to the high priority task 20 is set to the low priority task 30 .
  • the control device manages the execution timing of each program set for these tasks according to the scheduler program.
  • Program execution management by the scheduler program can be realized by allocating computing resources to each program at appropriate times and periods.
  • the scheduler program is set to the low-priority task 30 when the high-priority task 20 is not being executed within the control period so as not to interfere with the execution of the program set to the high-priority task 20. is executed by the processor.
  • the scheduler program allocates the execution time of the low-priority task 30 within a control cycle so as not to exceed a preset control cycle. Therefore, in a certain control cycle, even with the high priority task 20 and the low priority task 30 assigned, it is possible that the processor will have idle time. Also, in another control cycle, only the high priority task 20 may be assigned, and the remaining time may be the idle time of the processor.
  • the extended mode is selected when operating the control device at an ambient temperature (eg, 60° C.) higher than the operating ambient temperature (eg, 55° C. or less) of the standard control device.
  • the scheduler program reserves a predetermined percentage of the control period for processor idle time 40 .
  • the ratio of the idle time 40 to the control period may be a value determined by, for example, the developer of the control device by performing a temperature measurement test while changing the idle time using the actual device.
  • the scheduler program allocates the processing time of the high-priority task 20 to the remaining time (first remaining time) after subtracting the idle time 40 of the control cycle. Subsequently, the scheduler program determines whether the low priority task 30 can be allocated to the second remaining time obtained by subtracting the idle time 40 and the processing time of the high priority task 20 from the control period.
  • the low-priority task 30 can be assigned to the second remaining time, the high-priority task 20 and the low-priority task 30 are assigned and executed in that control cycle. Furthermore, in the control period, an idle time 40 having a predetermined length is secured. On the other hand, when the low-priority task 30 cannot be assigned to the second remaining time, only the high-priority task 20 is executed in that control cycle. That is, the time other than the execution time of the high-priority task 20 becomes the idle time 40 of the processor. Therefore, the actual processor idle time is longer than the pre-assigned time.
  • the control device when the control device is operating in default mode, the maximum processing time for high-priority tasks increases, and it is possible that free time cannot be secured within the control cycle.
  • the control period when the ambient temperature of the control device increases, the control period must be set longer. However, if the control period is lengthened, the processing performance of high priority tasks will be degraded. That is, the control performance of the control device is degraded.
  • the control device in the extended mode, can always secure an idle time 40 of a length equal to or longer than a certain period of time within the control cycle.
  • the processor suspends operations during idle time. Therefore, power consumption of the processor can be reduced compared to operation in the default mode. By reducing the power consumption of the processor, the amount of heat generated by the processor can be suppressed. This allows the enhanced mode to operate the controller at higher ambient temperatures than the default mode.
  • FIG. 3 is a schematic diagram of a control system including a control device according to one embodiment.
  • a control device according to the present embodiment is provided, for example, in an FA production line 10 and controls a control target.
  • the production line 10 includes controllers 1A, 1B, 1C, 1D, 1E, 1F, 1G and 1H.
  • the controllers 1A-1H are implemented by PLCs, for example.
  • the control devices 1A to 1H are connected to the communication device 4.
  • the control devices 1A to 1H can exchange data with each other via the communication device 4.
  • the communication device 4 is a device for realizing real-time performance required for communication performed in the industrial field, and is, for example, a switch complying with IEEE 802.1.TSN.
  • the control devices 1A, 1B, 1C, 1D, 1E, 1F, 1G, and 1H are synchronized with each other.
  • the control devices 1A, 1B, 1C, 1D, 1E, 1F, 1G and 1H have a timer function.
  • At least one of the control devices 1A to 1H in the production line 10 shown in FIG. 3 is the control device according to the embodiment.
  • the control device 1A will be described as a control device according to the embodiment.
  • all of the control devices 1A to 1H may correspond to the control device according to the present embodiment.
  • FIG. 3 is not intended to limit the number of controllers included in production line 10 .
  • the control device 1A executes control processing for the field device 5 to be controlled.
  • the control device 1A includes a plurality of functional units in which functions for executing the control processing are implemented. As shown in FIG. 1, the control device 1A includes an arithmetic unit 100A, functional units 201A, 201B, 201C, 201D and an I/O unit 300A.
  • the type of field device 5 is not particularly limited, and may include, for example, a servomotor.
  • each of the functional units 201A, 201B, 201C, and 201D are not particularly limited.
  • functional units 201A, 201B, 201C, 201D may include communication units.
  • functional unit 201D is a communication unit and is connected to communication device 4 via a network.
  • the AC-DC power supply 400A converts the AC voltage into a DC voltage and supplies the DC voltage to the control device 1A as a power supply voltage.
  • the power supply voltage of the control device 1A is, for example, DC24V.
  • the control device 1B includes an arithmetic unit 100B, a functional unit 202A and an I/O unit 300B.
  • Functional unit 202A is, for example, a communication unit and is connected to communication device 4 via a network.
  • AC-DC power supply 400B supplies power supply voltage (eg, 24 V DC) to each functional unit of controller 1B.
  • the support device 8 is a device that supports preparations necessary for the control devices 1A to 1H to control the target. Specifically, the support device 8 provides a setting environment related to tasks executed by each of the control devices 1A to 1H, a monitor screen of the execution status of the tasks in the control devices 1A to 1H, and the like.
  • FIG. 4 is a schematic diagram showing an example of the hardware configuration of the arithmetic unit 100A that constitutes the control device 1A according to the present embodiment.
  • arithmetic unit 100A includes processor 101, chipset 102, main memory 104, nonvolatile memory 106, system timer 108, PLC system bus controller 120, field network controller 140, and a USB connector 110 .
  • Chipset 102 and other components are each coupled via various buses.
  • the processor 101 and chipset 102 are typically configured according to general-purpose computer architecture. That is, the processor 101 interprets and executes instruction codes sequentially supplied from the chipset 102 according to the internal clock. The chipset 102 exchanges internal data with various connected components and generates instruction codes necessary for the processor 101 . Furthermore, the chipset 102 has a function of caching data obtained as a result of arithmetic processing executed by the processor 101 .
  • processor 101 For convenience of explanation, one processor 101 is depicted in FIG. The performance and configuration of processor 101 may be determined according to the required computing resources.
  • the arithmetic unit 100A has a main memory 104 and a nonvolatile memory 106 as storage means.
  • the main memory 104 is a volatile storage area (RAM), and holds various programs to be executed by the processor 101 after power is turned on to the arithmetic unit 100A.
  • the main memory 104 is also used as a working memory when the processor 101 executes various programs.
  • a device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory) is used.
  • the nonvolatile memory 106 nonvolatilely holds data such as a real-time OS (Operating System), the system program of the control device 1A, user programs, and system setting parameters. These programs and data are copied to the main memory 104 so that the processor 101 can access them as needed.
  • a semiconductor memory such as a flash memory can be used as such a nonvolatile memory 106 .
  • a magnetic recording medium such as a hard disk drive may be used as the nonvolatile memory 106 .
  • the system timer 108 generates an interrupt signal and provides it to the processor 101 .
  • it is configured to generate interrupt signals at multiple different cycles, but depending on the OS (Operating System) or BIOS (Basic Input Output System), etc., interrupts can be generated at arbitrary cycles. It can also be set to generate a signal.
  • a control operation is realized for each control period.
  • the arithmetic unit 100A has a PLC system bus controller 120 and a field network controller 140 as communication circuits. These communication circuits transmit output data, such as arbitrary command values, and receive input data, such as detection values obtained from arbitrary sensors.
  • the PLC system bus controller 120 controls data exchange via a PLC system bus (not shown). More specifically, the PLC system bus controller 120 includes a DMA (Dynamic Memory Access) control circuit 122, a PLC system bus control circuit 124, and a buffer memory 126. PLC system bus controller 120 is internally connected to the PLC system bus via PLC system bus connector 130 .
  • DMA Dynamic Memory Access
  • the buffer memory 126 is a transmission buffer for data (output data) output to other units via the PLC system bus, and a transmission buffer for data (input data) input from other units via the PLC system bus. Acts as a receive buffer.
  • the DMA control circuit 122 transfers output data from the main memory 104 to the buffer memory 126 and transfers input data from the buffer memory 126 to the main memory 104 .
  • the PLC system bus control circuit 124 performs processing of transmitting output data of the buffer memory 126 and processing of receiving and storing input data in the buffer memory 126 with other units connected to the PLC system bus.
  • the field network controller 140 controls data exchange via a field network (not shown). That is, the field network controller 140 controls transmission of output data and reception of input data according to the standard of the field network used. More specifically, field network controller 140 includes DMA control circuitry 142 , field network control circuitry 144 , and buffer memory 146 .
  • Buffer memory 146 is a transmission buffer for data (output data) to be output to other devices via the field network, and a transmission buffer for data (input data) to be input from other devices via the field network. Acts as a receive buffer.
  • the DMA control circuit 142 transfers output data from the main memory 104 to the buffer memory 146 and transfers input data from the buffer memory 146 to the main memory 104 .
  • the field network control circuit 144 performs processing of transmitting output data of the buffer memory 146 and processing of receiving and storing input data in the buffer memory 146 with other devices connected to the field network.
  • the USB connector 110 is an interface for connecting an external device and the arithmetic unit 100A.
  • arithmetic unit 100A is connected to support device 8 via USB connector 110 and a USB cable.
  • a program or the like executable by the processor 101 of the arithmetic unit 100A is transferred from the support device 8 and taken into the control device 1A via the USB connector 110.
  • the temperature sensor 161 detects the internal temperature of the arithmetic unit 100A and outputs the temperature value.
  • the temperature values are sent to processor 101 via chipset 102 .
  • Support device 8 is implemented, for example, by hardware (for example, a general-purpose personal computer) that follows a general-purpose architecture executing a program.
  • FIG. 5 is a block diagram showing a hardware configuration example of the support device 8 that configures the system according to this embodiment.
  • support device 8 includes a processor 802 such as a CPU or MPU, an optical drive 804, a main storage device 806, a secondary storage device 808, a USB controller 812, an input unit 816, and a display. 818. These components are connected via bus 820 .
  • the processor 802 reads various programs stored in the secondary storage device 808, develops them in the main storage device 806, and executes them, thereby realizing various processes to be described later.
  • the processor 802 corresponds to a setting unit that sets operating conditions of the control device 1A according to user input.
  • the secondary storage device 808 is composed of, for example, an HDD or SSD.
  • the secondary storage device 808 typically stores a development program 822, which is a tool for creating user programs and setting tasks.
  • the secondary storage device 808 may store the OS and other necessary programs.
  • the support device 8 can have an optical drive 804 .
  • the optical drive 804 reads a program stored therein from a recording medium 805 (for example, an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transitory stores a computer-readable program.
  • the program read from the recording medium 805 may be installed in the secondary storage device 808 or the like.
  • Various programs to be executed by the support device 8 may be downloaded from a server device or the like on the network and installed on the support device 8 . Also, the functions provided by the support device 8 may be realized by using some of the modules provided by the OS.
  • the USB controller 812 controls data exchange with the control device 1A via a USB connection.
  • the USB controller 812 implements a transfer unit for transferring the operating conditions of the control device 1A to the control device 1A.
  • the input unit 816 is composed of a keyboard, a mouse, and the like, and receives user operations, user inputs, and the like. In this embodiment, the input unit 816 is configured to accept user input regarding the operation mode of the control device 1A.
  • a display unit 818 is composed of a display, various indicators, a printer, and the like, and outputs processing results from the processor 802 and the like.
  • FIG. 5 shows a configuration example in which necessary functions are provided by the processor 802 executing a program. Alternatively, it may be implemented using an FPGA, etc.).
  • FIG. 6 is a schematic diagram showing an example of the software configuration of the arithmetic unit 100A that constitutes the control device 1A according to the present embodiment.
  • FIG. 6 shows an example of a software group for providing various functions according to this embodiment. Instruction codes included in these software groups are read at appropriate timings and executed by the processor 101 of the arithmetic unit 100A.
  • software executed by the arithmetic unit 100A includes a real-time OS 200, a system program 210, and a user program 234.
  • the real-time OS 200 is designed according to the computer architecture of the arithmetic unit 100A, and provides a basic execution environment for the processor 101 to execute the system program 210 and the user program 234.
  • This real-time OS is typically provided by a control device manufacturer or a specialized software company.
  • the system program 210 is a software group for providing the functions of the control device 1A.
  • system program 210 includes scheduler program 212 , IO processing program 214 (including input processing program 216 and output processing program 218 ), sequence instruction execution unit 232 , and system service program 220 .
  • the user program 234 is created according to the control purpose of the user. That is, it is a program that is arbitrarily created according to the controlled object to be controlled using the control device 1A.
  • the user program 234 is generated in the support device 8, for example.
  • the user program 234 is transferred from the support device 8 to the arithmetic unit 100A and stored in the nonvolatile memory 106 or the like.
  • the user program 234 consists of an IEC (International Electrotechnical Commission) program 236 consisting of command codes such as sequence commands and motion commands, and an application program 238 expressing control application procedures for controlling drive devices such as servo motors. including.
  • IEC International Electrotechnical Commission
  • the IEC program 236 includes a program consisting of one or more instructions written according to the international standard IEC61131-3 defined by IEC.
  • the application program 238 includes one or more commands that define the target trajectory.
  • the application program 238 may be a program written in an interpreter type language such as robot language or G language.
  • the sequence command execution unit 232 executes the IEC program 236 and outputs command values.
  • the sequence instruction execution unit 232 interprets sequence instructions included in the IEC program 236 and executes designated sequence operations (logical operations). Furthermore, the sequence command execution unit 232 calculates command values according to motion commands included in the IEC program 236 .
  • a motion command defines calculation of a command value over a plurality of control cycles by one command. Update.
  • the system service program 220 collectively indicates a group of programs for realizing various functions of the control device 1A, other than the programs shown individually in FIG.
  • the system service program 220 is, for example, a program that implements processing for transmitting and receiving files and data to and from an external device (that is, a program related to communication processing), a program that implements abnormality monitoring processing, various analysis processing, and the like. may
  • the programs included in the system service program 220 are classified into at least two priorities.
  • the system service programs 220 include a high priority service program 222 set to the high priority task 20 and a low priority service program 226 set to the low priority task.
  • the high-priority service program 222 has a higher execution priority than the low-priority service program 226 .
  • the high priority service program 222 includes an application program execution unit (not shown).
  • the application program execution unit for example, executes the application program 238 by an interpreter method and outputs a command value for a controlled object (for example, a servomotor).
  • the scheduler program 212 causes the processor 101 to execute a program set for each task according to the priority set for each task. That is, the scheduler program 212 controls the IO processing program 214, the system service program 220, and the like to start processing in each execution cycle and to resume processing after processing interruption.
  • the scheduler program 212 includes a control function 2120 and a monitoring function 2122.
  • the control function 2120 controls allocation of computing resources to each process.
  • a monitoring function 2122 monitors the execution status of each program included in the system service program 220 .
  • the monitoring function 2122 grasps the execution status of each service based on the notification by the notification function program of the high-priority service program 222 included in the system service program 220 .
  • the IO processing program 214 is in charge of updating the data (input data and output data) available in the arithmetic unit 100A.
  • Input processing program 216 of IO processing program 214 rearranges input data received by PLC system bus controller 120 and/or field network controller 140 into a form suitable for use by processor 101 of arithmetic unit 100A.
  • the output processing program 218 rearranges the output data generated by execution of the user program 234 into a form suitable for transfer to the PLC system bus controller 120 and/or field network controller 140 .
  • output processing program 218 issues such commands.
  • FIG. 7 is a diagram showing an example of a screen for setting an operation mode provided by the display unit 818 of the support device 8.
  • FIG. 7 In the example of the setting screen shown in FIG. 7, a default mode and an extended mode are displayed on the screen.
  • the default mode is the operating mode of the control device 1A when the operating ambient temperature is the standard temperature (55°C in this example).
  • the extended mode is an operation mode of the control device 1A in which the operating ambient temperature is higher than the operating ambient temperature in the default mode (for example, 60°C).
  • the input unit 816 accepts an operation mode input by the user when the user performs a determination operation on the input unit 816 .
  • C Setting the operation mode of the control device> (C-1. Setting by tool)
  • the support device 8 sets the idle time within the control cycle.
  • FIG. 8 is a flowchart showing an outline of operation mode setting processing of the control device according to the first embodiment.
  • the processing shown in FIG. 8 is executed by the support device 8 executing the program.
  • the setting process first includes a mode setting process (step S11) executed in support device 8.
  • the operation mode is determined by the user operating the setting screen of the support device 8 (see FIG. 7).
  • the input unit 816 receives an operation mode input by the user.
  • step S12 the processor 802 of the support device 8 determines whether the operating mode accepted by the input unit 816 is the default mode or the extended mode. In the case of the default mode, in step S13, settings for control processing in the default mode are executed. On the other hand, in the extended mode, settings for control processing in the extended mode are executed in step S14.
  • the user uses the user interface provided by the support device 8 to determine the length of the control cycle, assignment of high-priority tasks, and assignment of low-priority tasks. Set quotas, etc. The assignment of tasks within the control cycle differs between the default mode and the extended mode.
  • Fig. 9 is a diagram explaining the priority of time allocation within the control cycle in the default mode and the extended mode.
  • high-priority tasks priority: high
  • low-priority tasks priority: medium to low
  • the idle time of the processor is allocated with the highest priority within the control cycle.
  • processing time for high priority tasks priority: high
  • a low priority task is assigned if the remaining time in the control cycle can be assigned to the low priority task.
  • the user sets the assignment of high-priority tasks, the assignment of low-priority tasks, and the length of the control cycle.
  • the processor 802 of the support device 8 does not secure processor idle time within the control period.
  • processor 802 allows multiple tasks to be assigned such that multiple tasks are executed within a control cycle in order of priority. Therefore, in the default mode, basically no processor idle time occurs within the control period. Alternatively, even if processor idle time occurs in the default mode, the idle time is extremely short.
  • the processor 802 of the support device 8 secures a certain percentage (for example, 10%) of the control cycle as processor idle time. Further, the processor 802 accepts the user's setting so that the high-priority task is assigned within the remaining time (first remaining time) within the control cycle.
  • the processor 802 calculates the processing (task) exclusive time in consideration of the maximum fluctuation in the processing time of high-priority tasks. That is, processor 802 calculates the maximum processing time of the high-priority task and displays the calculation result on display unit 818 .
  • the user determines the allocation of high-priority tasks and the control period based on the calculation results. Since the ratio of the processor idle time to the control cycle is constant, the processor idle time is determined according to the length of the control cycle set by the user. Therefore, even if the execution time of the high-priority task becomes long, it is possible to secure the free time of the processor within the control cycle.
  • the processor 802 determines whether or not the low priority task can be assigned within the second remaining time from the control period excluding the idle time and the execution time of the high priority task. If a low priority task is assignable within the second remaining time, the processor 802 allocates execution time for the low priority task within the second remaining time. On the other hand, if no low priority task can be assigned within the second remaining time, the processor 802 allocates the second remaining time to processor idle time. Therefore, if the low-priority task cannot be assigned within the control period, the processor idle time becomes longer than the initially secured time.
  • step S13 or step S14 When the setting by the user is completed in step S13 or step S14, the program and setting contents are transferred from the support device 8 to the control device 1A (PLC) in step S15.
  • the extended mode in addition to the contents transferred from the support device 8 to the control device 1A (PLC) in the default mode, information indicating that there is processor idle time within the control cycle and the length of the idle time. Information is sent to the controller 1A.
  • the arithmetic unit 100A When the arithmetic unit 100A receives the information regarding the extended mode setting, the arithmetic unit 100A sets an interrupt request to the processor 101 based on the idle time information included in the information. As a result, a circuit (eg, system timer 108) inside arithmetic unit 100A generates an interrupt signal at the set timing and provides the interrupt signal to processor 101.
  • a circuit eg, system timer 108
  • FIG. 10 is a diagram explaining an example of task processing executed by the arithmetic unit of the control device 1A in the default mode.
  • an IRQ is generated every set control cycle.
  • the processor 101 of the arithmetic unit 100A starts processing in response to the IRQ and executes the high priority task 20 and the low priority task 30.
  • FIG. 11 is a diagram explaining an example of task processing executed by the arithmetic unit of the control device 1A in the extended mode.
  • extended mode an IRQ is generated at the start of idle time in addition to the start of a control cycle.
  • the processor 101 of the arithmetic unit 100A stops arithmetic processing according to the IRQ within the control cycle.
  • the time from when the processor 101 stops the calculation to when the next control cycle starts corresponds to the idle time 40 .
  • the next IRQ is generated at the start of the control cycle.
  • the processor 101 starts computation (execution of the high-priority task 20) in the next control cycle according to the IRQ.
  • FIG. 12 is a diagram explaining another example of task processing executed by the arithmetic unit of the control device 1A in the extended mode.
  • the end of the idle time 40 may be notified to the processor 101 by an IRQ.
  • the idle time 40 can be arranged in any period within the control period.
  • the idle time 40 may be arranged between the high priority task 20 and the low priority task 30 (in other words, immediately after the high priority task 20 ends).
  • FIG. 13 is a diagram explaining still another example of task processing executed by the arithmetic unit of the control device 1A in the extended mode.
  • a plurality of idle times 40 may be arranged within the control period.
  • the beginning and end of each idle time 40 is signaled to processor 101 by an IRQ.
  • IRQ IRQ
  • the time during which the processor 101 operates continuously can be shortened, so that a large rise in the temperature of the processor 101 can be suppressed without changing the control cycle.
  • free time may be allocated for each divided task.
  • the arithmetic unit 100A of the control device 1A determines the idle time within the control cycle based on the measured value of the temperature sensor 161 (see FIG. 4).
  • FIG. 14 is a flowchart showing an outline of operation mode setting processing of the control device according to the second embodiment.
  • processor 101 executes scheduler program 212 of control device 1A to execute the processing shown in FIG.
  • the arithmetic unit 100A receives an input of a program and setting contents.
  • the user determines the operation mode, sets the length of the control cycle, assigns high-priority tasks, assigns low-priority tasks, and the like.
  • the program and setting contents are transferred from the support device 8 to the control device 1A.
  • the setting content includes information about the operation mode.
  • the processor 101 of the arithmetic unit 100A determines, based on the information transferred from the support device 8, whether the operation mode set by the user is the default mode or the extension mode. In default mode, in step S23, processor 101 performs settings for control processing in default mode. On the other hand, in the extended mode, in step S24, the processor 101 performs settings for control processing in the extended mode.
  • the processor 101 does not secure processor idle time within the control cycle. Furthermore, the processor 101 allocates a plurality of tasks within the control cycle so that the plurality of tasks are executed within the control cycle in order of priority.
  • the processor 101 reserves a certain percentage (for example, 10%) of the control cycle as processor idle time. Then, the processor 101 assigns high priority tasks within the remaining time (first remaining time) within the control cycle. In this case, the processor 101 allocates the high-priority task within the control period in consideration of the maximum fluctuation of the processing time of the high-priority task.
  • the processor 101 determines whether or not the low priority task can be assigned within the second remaining time, excluding the idle time and the execution time of the high priority task, from the control cycle. If a low priority task is assignable within the second remaining time, processor 101 allocates the execution time of the low priority task within the second remaining time. On the other hand, if the low-priority task cannot be assigned within the second remaining time, the processor 101 assigns the second remaining time to processor idle time.
  • the task processing executed in the default mode and the task processing executed in the extended mode are basically the same as the processing described in the first embodiment, so detailed description will not be repeated.
  • the ratio of the processor idle time to the control cycle changes according to the temperature measured by the temperature sensor 161 (that is, the operating ambient temperature of the control device 1A). In this respect, the second embodiment differs from the first embodiment.
  • FIG. 15 is a flow chart for explaining processing related to control of processor idle time during task execution by the control device 1A.
  • the processor 101 acquires a temperature value (temperature sensor value) from the temperature sensor 161 .
  • the processor 101 may acquire measured values from the temperature sensor 161 at predetermined intervals and calculate the average value of the measured values as the temperature value.
  • the processor 101 obtains the ratio of idle time to the control cycle.
  • a method for obtaining the idle time from the temperature value is not particularly limited.
  • the processor 101 may use an arithmetic expression for obtaining the ratio of the idle time to the control period from the temperature value.
  • the processor 101 can obtain the ratio of the idle time to the control cycle from the arithmetic expression and the detection value of the temperature sensor 161, and determine the idle time based on the ratio and the control cycle.
  • the non-volatile memory 106 of the arithmetic unit 100A may store a table that associates the temperature with the ratio of free time to the control period.
  • the processor 101 obtains the ratio of the idle time to the control period from the table and the detection value of the temperature sensor 161, and can determine the idle time based on the ratio and the control period. In both the calculation formula and the table, the ratio of idle time to control period is set to increase as the temperature rises.
  • the processor 101 determines the idle time within the control cycle.
  • the processor 101 sets the idle time information in the IRQ.
  • the processor 101 executes processing according to the above settings.
  • the generation of an IRQ causes processor 101 to stop processing.
  • the IRQ informs processor 101 when the next control cycle begins.
  • the processor 101 starts calculation and processing in that control cycle in response to the IRQ.
  • the idle time is the time during which the processor 101 stops computing.
  • FIG. 16 is a diagram explaining an example of task processing executed in the extended mode by the arithmetic unit of the control device 1A according to the second embodiment.
  • the processor 101 lengthens the idle time 40 within the control period as the measured value of the temperature sensor 161 increases.
  • the measured value of temperature sensor 161 represents the operating ambient temperature of control device 1A.
  • the control device 1A shortens the idle time 40.
  • the ratio of idle time to the control period is kept higher than the ratio set by support device 8 .
  • the length of the control cycle does not change although the length of the idle time changes according to the temperature. If the length of the control cycle changes during system operation, the processing performance of the high-priority task may change (increase or decrease). A change in the processing performance of the high-priority task may affect the operation of the controlled object (for example, manufacturing equipment). By not changing the length of the control cycle, it is possible to prevent the processing performance of the high-priority task from changing.
  • FIG. 16 shows an example in which a high priority task and a low priority task are executed within one control cycle.
  • the remaining time within the control cycle may be idle time.
  • priority is given to allocation of idle time within the control cycle, followed by priority to allocation of high priority tasks. Therefore, the idle time of the processor can be secured within the control period. As a result, it is possible to suppress an increase in the amount of heat generated by the processor, thereby suppressing a large increase in the temperature of the processor.
  • IRQs can adopt the same arrangement of idle times as shown in FIGS. 12 and 13 .
  • the arrangement of the idle times 40 within the control cycle is not particularly limited.
  • a control device (1A) for controlling a controlled object an input unit (110) that receives an input regarding setting of the operation mode of the control device (1A); a processor (101) that executes a task of controlling the controlled object; a program that manages the tasks executed by the processor (101); the modes of operation include a first mode and a second mode for operating the controller at a temperature higher than the operating temperature in the first mode; A control device (1A) wherein, when said second mode is selected by said input, said program allocates idle time (40) of said processor (101) within a control period of said task.
  • the program executes the control cycle within a second remaining time excluding the idle time (40) and the execution time of the high-priority task (20). , determining whether a low-priority task (30) having a low execution priority among the plurality of tasks can be assigned; Said program If the low priority task (30) is assignable within the second remaining time, assigning the low priority task (30) within the second remaining time; The control device (1A) according to configuration 2, wherein if the low priority task (30) cannot be allocated within the second remaining time, the second remaining time is allocated to the free time (40). .
  • the control device (1A) is Further comprising a temperature sensor (161) for measuring the temperature of the control device (1A), Any one of configuration 1 to configuration 5, wherein the program allocates the idle time (40) based on the measured value of the temperature sensor (161) such that the higher the temperature, the longer the idle time (40).
  • a control device (1A) according to any one of the preceding claims.
  • a control method for a control device (1A) for controlling a controlled object wherein the control device (1A) includes an input unit (110) for receiving an input regarding an operation mode of the control device (1A), and a control device for controlling the controlled object.
  • a processor (101) for executing a task to perform and a program for managing the task executed by the processor (101) The control method is a step of receiving an input regarding an operation mode of the control device (1A); setting operating conditions of the control device (1A) according to the input; said mode of operation includes a first mode and a second mode for operating said controller (1A) at a temperature higher than the operating temperature in said first mode;
  • the setting step includes: A control method comprising the step of allocating idle time (40) of said processor (101) within a control cycle of said task when said second mode is selected by said input.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

制御装置は、制御装置の動作モードの設定に関する入力を受け付ける入力部と、制御対象を制御するタスクを実行するプロセッサと、プロセッサによって実行されるタスクを管理するプログラムとを備える。動作モードは、第1のモードと、第1のモードでの動作温度よりも高温で制御装置を動作させるための第2のモードとを含む。前記入力によって第2のモードが選択された場合、プログラムは、制御周期内にプロセッサの空き時間を割り当てる。

Description

制御装置および制御方法
 本開示は、制御装置および制御方法に関し、特に、制御装置の動作の設定に関する。
 様々な生産現場において、PLC(プログラマブルコントローラ)などの制御装置を用いたFA(Factory Automation)技術が広く普及している。近年の情報通信技術(ICT:Information and Communication Technology)の発展に伴って、このようなFA分野における制御装置においても、従来のシーケンスプログラムだけではなく、各種のアプリケーションプログラムが実行されるようになっている。
 たとえば特開2020-61055号公報(特許文献1)は、制御装置のプロセッサにおいて、一定の制御周期内に高優先度のプログラムと低優先度のプログラムとを実行させること、および、高優先度プログラムの実行を妨げないように、プロセッサの空き時間に低優先度プログラムを実行することを開示する。
特開2020-61055号公報
 上述の制御装置では、優先度の高い第1のプログラムがプロセッサによって、定周期で繰り返し実行される。さらに、第1のプログラムの実行を妨げないように、制御周期中のプロセッサの空き時間に、第2のプログラムおよび第3のプログラムをプロセッサに実行させる。演算速度および性能の向上の観点から、設定された制御周期の中で、プロセッサは、その周期を超えないぎりぎりの時間まで演算をおこなう。しかし、プロセッサおよび周辺回路は高負荷状態にあるため、制御装置の消費電力が大きい。制御装置の消費電力が大きくなるほど、制御装置から発せられる熱の量も大きくなる。
 制御装置は、ある動作周囲温度で使用可能なように設計される。また、実際に作製された装置は、その動作周囲温度まで使用可能かどうか評価される。設計および評価は、制御装置にとって厳しい条件、すなわち、制御周期の終わりの直前までプロセッサが演算を行ったという条件(最大負荷状態)で実施される。
 小型サイズ、および製造コストの抑制といった点から、制御装置の放熱の能力に余裕がない可能性がある。たとえば、設計および評価の段階で決定した動作周囲温度の上限よりも高い周囲温度のもとで制御装置を最大負荷状態で動作させた場合には、制御装置の誤動作、停止、あるいは故障の可能性が生じる。
 プロセッサの中には、高温時にクロック周波数を自動的に低下させる機能を有するものがある。クロック周波数を低下させることによってプロセッサの消費電力が下がるため、プロセッサの発熱量を下げることができる。しかし、PLCのように生産現場に用いられる制御装置では、クロック周波数を下げた場合には制御性能が低下するという問題が生じる。このため、制御装置によって制御される対象(製造装置)の動作が変化することが起こり得る。
 制御装置の使用されうる環境が多様になっている。したがって想定した使用周囲温度よりも高い温度の下で制御装置を使用する可能性も生じる。たとえば筐体を大きくすることによって、制御装置の放熱性能を高めようとすれば、制御装置の新たな設計が必要になる。サイズおよび製造コストに対する要請の点から、ハードウェアの変更は容易ではない。
 本発明の1つの目的は、より高い周囲温度で動作可能な制御装置および、その制御装置を動作させるための制御方法を提供することである。
 本開示の一例の制御装置は、制御対象を制御するための制御装置であって、制御装置の動作モードの設定に関する入力を受け付ける入力部と、制御対象を制御するタスクを実行するプロセッサと、プロセッサによって実行されるタスクを管理するプログラムとを備える。動作モードは、第1のモードと、第1のモードでの動作温度よりも高温で制御装置を動作させるための第2のモードとを含む。前記入力によって第2のモードが選択された場合、プログラムは、タスクの制御周期内にプロセッサの空き時間を割り当てる。
 この開示によれば、制御装置は、ユーザによって第2のモードが選択された際に、制御周期内にプロセッサの空き時間を割り当てる。空き時間の間には、プロセッサは演算を行わないので、プロセッサの発熱量が抑えられる。したがって第1のモードでの周囲温度よりも高い温度において制御装置を動作させることが可能となる。
 上述の開示において、前記入力によって第2のモードが選択された場合、プログラムは、制御周期から空き時間を除いた第1の残り時間内に、複数のタスクのうち実行の優先度の高い高優先タスクを割り当てる。
 上述の開示によれば、高優先タスクの実行に影響を与えることなく、制御周期内でプロセッサの空き時間を確保することができる。したがって、たとえば重要度の高いタスクの実行に影響を与えることなく、高い周囲温度において制御装置を動作させることができる。
 上述の開示において、前記入力によって第2のモードが選択された場合に、プログラムは、制御周期から空き時間および高優先タスクの実行時間を除いた第2の残り時間内に、複数のタスクのうち実行の優先度の低い低優先タスクが割り当て可能かどうかを判断する。プログラムは、第2の残り時間内に、低優先タスクが割り当て可能である場合には、第2の残り時間内に低優先タスクを割り当て、低優先タスクが第2の残り時間内に割り当てることができない場合には、第2の残り時間を空き時間に割り当てる。
 上述の開示によれば、制御周期内に高優先タスクおよび低優先タスクを実行することによって、制御対象に対する制御の性能を向上させることができる。低優先タスクが実行できない場合は、制御周期内の空き時間をより長くすることができる。したがって、プロセッサの発熱量を抑える効果を高めることができる。
 上述の開示において、前記入力によって第2のモードが選択された場合に、プログラムは、高優先タスクの実行時間の揺らぎによる高優先タスクの最大の実行時間を、第1の残り時間内に割り当てる。
 上述の開示によれば、制御周期内に空き時間を確保しつつ、高優先タスクを確実に実行することができる。
 上述の開示において、空き時間の少なくとも一部は、制御周期内の高優先タスクの終了直後に割り当てられる。
 上述の開示によれば、プロセッサが連続的に動作する時間を短くすることによって、制御周期を変えることなく、プロセッサの温度が大きく上昇することを抑えることができる。
 上述の開示において、制御装置は、制御装置の温度を測定する温度センサをさらに備える。プログラムは、温度センサの測定値に基づいて、温度が高いほど空き時間が長くなるように、空き時間を割り当てる。
 上述の開示によれば、制御装置の温度に応じて空き時間を変化させることができる。空き時間を長くすることによって、プロセッサの発熱の量を抑えることができる。したがって、制御装置の温度が大幅に上昇することを抑えることができる。
 上述の開示において、入力によって第1のモードが選択された場合に、プログラムは、制御周期内に空き時間を確保せず、かつ、複数のタスクが優先度の高い順に制御周期内で実行されるように、複数のタスクを割り当てる。
 上述の開示によれば、制御周期内に高優先タスクおよび低優先タスクを実行することによって、制御対象に対する制御の性能を向上させることができる。
 本開示の一例の制御方法は、制御対象を制御する制御装置の制御方法であって、制御装置は、制御装置の動作モードに関する入力を受け付ける入力部と、制御対象を制御するタスクを実行するプロセッサと、プロセッサによって実行されるタスクを管理するプログラムとを含む。制御方法は、制御装置の動作モードに関する入力を受け付けるステップと、入力に従って制御装置の動作条件を設定するステップとを備える。動作モードは、第1のモードと、第1のモードでの動作温度よりも高温で制御装置を動作させるための第2のモードとを含む。設定するステップは、前記入力によって第2のモードが選択された場合に、タスクの制御周期内に、プロセッサの空き時間を割り当てるステップを含む。
 この開示によれば、より高い周囲温度で制御装置を使用可能なように制御装置を設定することができる。
 本開示によれば、より高い周囲温度で制御装置を使用可能なように制御装置を動作させることができる。
本実施の形態に係る制御装置におけるデフォルトモードでのプログラムの実行スケジュールの一例を示す模式図である。 本実施の形態に係る制御装置における拡張モードでのプログラムの実行スケジュールの一例を示す模式図である。 一実施形態に係る制御装置を含む制御システムの模式図である。 本実施の形態に係る制御装置を構成する演算ユニットのハードウェア構成の一例を示す模式図である。 本実施の形態に係るシステムを構成するサポート装置のハードウェア構成例を示すブロック図である。 本実施の形態に係る制御装置を構成する演算ユニットのソフトウェア構成の一例を示す模式図である。 サポート装置の表示部によって提供される、動作モードの設定のための画面の一例を示す図である。 第1の実施の形態に係る制御装置の動作モード設定処理の概略を示したフローチャートである。 デフォルトモードと拡張モードにおける、制御周期内の時間の割当ての優先度を説明した図である。 制御装置の演算ユニットがデフォルトモードにおいて実行するタスク処理の例を説明する図である。 制御装置の演算ユニットが拡張モードにおいて実行するタスク処理の例を説明する図である。 制御装置の演算ユニットが拡張モードにおいて実行するタスク処理の別の例を説明する図である。 制御装置の演算ユニットが拡張モードにおいて実行するタスク処理のさらに別の例を説明する図である。 第2の実施の形態に係る制御装置の動作モード設定処理の概略を示したフローチャートである。 制御装置によるタスクの実行時におけるプロセッサ空き時間の制御に関する処理を説明するフローチャートである。 第2の実施の形態に係る制御装置の演算ユニットが拡張モードにおいて実行するタスク処理の例を説明する図である。
 以下、図面を参照しつつ、本発明に従う実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。
 <A.適用例>
 まず、図1および図2を参照して、本発明が適用される場面の一例について説明する。
 本実施の形態に係る制御装置は、任意の制御対象を制御するためのコンピュータであり、1または複数のプロセッサを有する。制御装置は、2つの動作モードを有する。第1の動作モードはデフォルト(標準)モードである。第2の動作モードは拡張モードである。
 図1は、本実施の形態に係る制御装置におけるデフォルトモードでのプログラムの実行スケジュールの一例を示す模式図である。図2は、本実施の形態に係る制御装置における拡張モードでのプログラムの実行スケジュールの一例を示す模式図である。
 図1に示すように、制御装置をデフォルトモードで動作させる場合、制御装置は、制御周期内で高優先タスク20と、低優先タスク30とを実行する。
 本明細書において、「タスク」は、コンピューティング資源を割当てる制御の対象となる基本単位であり、各タスクに、実行させるべき1または複数のプログラムが設定される。すなわち、いずれかのタスクに対してコンピューティング資源が割当てられ、当該タスクが実行できる状態になると、当該タスクに設定されている1または複数のプログラムの実行が開始または再開される。
 高優先タスク20は、制御周期内に実行すべきタスクである。高優先タスク20には、制御装置のプロセッサで繰返し実行される最も実行の優先度(以下、単に「優先度」とも称す。)の高いプログラムが設定される。高優先タスク20は、例えば、入出力データの更新処理、および最優先で実行されるべきシーケンス演算処理などを含んでもよい。高優先タスク20が制御周期内に必ず実行されるように、制御周期内に高優先タスク20の処理時間が割り当てられる。
 一方、低優先タスク30は、高優先タスク20よりも実行の優先度が低いタスクであり、たとえば要求があった場合に実行される。低優先タスク30には、高優先タスク20に設定されるプログラムより優先度が低いプログラムが設定される。
 制御装置は、スケジューラプログラムに従って、これらのタスクに設定される各プログラムの実行タイミングを管理する。スケジューラプログラムによるプログラムの実行管理は、適時のタイミングおよび期間で、コンピューティング資源を各プログラムに割当てることで実現できる。
 デフォルトモードでは、スケジューラプログラムは、高優先タスク20に設定されたプログラムの実行を妨げないように、制御周期内の高優先タスク20を実行していない時間に、低優先タスク30に設定されるプログラムをプロセッサに実行させる。なお、スケジューラプログラムは、予め設定された制御周期を超えないように、制御周期内に低優先タスク30の実行時間を割り当てる。したがって、ある制御周期では、高優先タスク20および低優先タスク30を割り当てた状態で、さらにプロセッサの空き時間が生じることが起こり得る。また、別の制御周期では、高優先タスク20のみが割り当てられ、残りの時間がプロセッサの空き時間となることが起こり得る。
 図2を参照して、標準的な制御装置の使用周囲温度(たとえば55℃以下の温度)よりも高い周囲温度(たとえば60℃)で制御装置を動作させる場合に、拡張モードが選択される。制御装置を拡張モードで動作させる場合、スケジューラプログラムは、制御周期のうちの所定の割合の時間を、プロセッサの空き時間40に確保する。制御周期に対する空き時間40の割合は、たとえば制御装置の開発者が、実際の装置を用いて空き時間を変えながら温度測定試験を実施することによって決定した値であってもよい。
 次にスケジューラプログラムは、制御周期のうちの空き時間40を引いた残り時間(第1の残り時間)に高優先タスク20の処理時間を割り当てる。続いてスケジューラプログラムは、制御周期から空き時間40および高優先タスク20の処理時間を引いた第2の残り時間に、低優先タスク30を割り当てることができるかどうかを判断する。
 第2の残り時間に、低優先タスク30を割り当てることができる場合、その制御周期では、高優先タスク20および低優先タスク30が割り当てられるとともに実行される。さらに、その制御周期では、予め決められた長さを持つ空き時間40が確保される。一方、第2の残り時間に、低優先タスク30を割り当てることができない場合は、その制御周期において、高優先タスク20のみ実行される。すなわち、高優先タスク20の実行時間以外の時間が、プロセッサの空き時間40となる。したがって実際のプロセッサ空き時間は、予め確保された時間よりも長くなる。
 たとえば制御装置をデフォルトモードで動作させている状態で、高優先タスクの最大処理時間が長くなり、制御周期内に空き時間を確保できないことが起こり得る。この状態において、制御装置の周囲温度が高くなると、制御周期を長く設定しなければならない。しかし、制御周期を長くすると、高優先タスクの処理の性能が低下する。すなわち制御装置の制御性能が低下する。
 本開示の実施の形態によれば、拡張モードにおいて、制御装置は、必ず、一定時間以上の長さの空き時間40を制御周期内に確保することができる。プロセッサは空き時間の間、演算を停止する。したがって、デフォルトモードでの動作に比べてプロセッサの消費電力を低減できる。プロセッサの消費電力を低減することによって、プロセッサの発熱量を抑えることができる。これにより、拡張モードでは、デフォルトモードよりも高い周囲温度でも制御装置を動作させることができる。特に、本開示の実施の形態によれば、制御装置の放熱性を高めるためのハードウェアの変更(たとえば筐体を大きくする)を不要としながら高い周囲温度でも制御装置を動作させることができる。
 <B.構成例>
 (B-1.システムの構成)
 図3は、一実施形態に係る制御装置を含む制御システムの模式図である。本実施の形態に係る制御装置は、たとえばFAの生産ライン10に備えられ、制御対象を制御する。生産ライン10は、制御装置1A,1B,1C,1D,1E,1F,1G,1Hを含む。制御装置1A~1Hは、たとえばPLCによって実現される。
 制御装置1A~1Hは、通信装置4に接続される。制御装置1A~1Hは通信装置4を介して、互いの間でデータを遣り取りできる。通信装置4は、産業分野で行われる通信に必要なリアルタイム性を実現するための装置であり、たとえばIEEE 802.1.TSNに準拠したスイッチである。また、制御装置1A,1B,1C,1D,1E,1F,1G,1Hは、互いに時刻同期する。このために制御装置1A,1B,1C,1D,1E,1F,1G,1Hは、タイマー機能を備える。
 図3に示す生産ライン10において、制御装置1A~1Hのうち少なくとも1つが実施の形態に係る制御装置である。以後、実施の形態に係る制御装置として、制御装置1Aを説明する。なお、制御装置1A~1Hのすべてが本実施の形態に係る制御装置に該当してもよい。さらに、図3は、生産ライン10に含まれる制御装置の数を限定することを意図していない。
 制御装置1Aは、制御対象であるフィールド機器5に対する制御処理を実行する。制御装置1Aは、その制御処理を実行するための機能が実装された複数の機能ユニットを備える。図1に示すように、制御装置1Aは、演算ユニット100A、機能ユニット201A,201B,201C,201DおよびI/Oユニット300Aを含む。フィールド機器5の種類は特に限定されず、たとえばサーボモータ等を含みうる。
 機能ユニット201A,201B,201C,201Dの各々が実装する機能は、特に限定されるものではない。たとえば、機能ユニット201A,201B,201C,201Dは、通信ユニットを含むことができる。図1に示した例では、機能ユニット201Dは通信ユニットであり、ネットワークを介して通信装置4に接続される。
 AC-DC電源400Aは、交流電圧を直流電圧に変換して、その直流電圧を、制御装置1Aに電源電圧として供給する。制御装置1Aの電源電圧は、たとえばDC24Vである。
 制御装置1Bは、演算ユニット100B、機能ユニット202AおよびI/Oユニット300Bを含む。機能ユニット202Aは、たとえば通信ユニットであり、ネットワークを介して通信装置4に接続される。制御装置1Aと同様に、AC-DC電源400Bは、電源電圧(たとえばDC24V)を制御装置1Bの各機能ユニットに供給する。
 サポート装置8は、制御装置1A~1Hが対象を制御するために必要な準備を支援する装置である。具体的には、サポート装置8は、制御装置1A~1Hの各々で実行されるタスクに関する設定環境、制御装置1A~1Hにおけるタスクの実行状況のモニタ画面などを提供する。
 (B-2.演算ユニットのハードウェア構成)
 図4は、本実施の形態に係る制御装置1Aを構成する演算ユニット100Aのハードウェア構成の一例を示す模式図である。図4を参照して、演算ユニット100Aは、プロセッサ101と、チップセット102と、メインメモリ104と、不揮発性メモリ106と、システムタイマ108と、PLCシステムバスコントローラ120と、フィールドネットワークコントローラ140と、USBコネクタ110とを含む。チップセット102と他のコンポーネントとの間は、各種のバスを介してそれぞれ結合されている。
 プロセッサ101およびチップセット102は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成される。すなわち、プロセッサ101は、チップセット102から内部クロックに従って順次供給される命令コードを解釈して実行する。チップセット102は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、プロセッサ101に必要な命令コードを生成する。さらに、チップセット102は、プロセッサ101での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。
 図4には、説明の便宜上、1つのプロセッサ101が描かれているが、複数のプロセッサ101を配置してもよいし、1つのプロセッサ101に複数のコアが実装されていてもよい。プロセッサ101の性能および構成は、要求されるコンピューティング資源に応じて決定されてもよい。
 演算ユニット100Aは、記憶手段として、メインメモリ104および不揮発性メモリ106を有する。メインメモリ104は、揮発性の記憶領域(RAM)であり、演算ユニット100Aへの電源投入後にプロセッサ101で実行されるべき各種プログラムを保持する。また、メインメモリ104は、プロセッサ101による各種プログラムの実行時の作業用メモリとしても使用される。このようなメインメモリ104としては、DRAM(Dynamic Random Access Memory)またはSRAM(Static Random Access Memory)といったデバイスが用いられる。
 不揮発性メモリ106は、リアルタイムOS(Operating System)、制御装置1Aのシステムプログラム、ユーザプログラム、システム設定パラメータといったデータを不揮発的に保持する。これらのプログラムやデータは、必要に応じて、プロセッサ101がアクセスできるようにメインメモリ104にコピーされる。このような不揮発性メモリ106としては、フラッシュメモリのような半導体メモリを用いることができる。あるいは、不揮発性メモリ106として、ハードディスクドライブのような磁気記録媒体などを用いてもよい。
 システムタイマ108は、割り込み信号を発生させてプロセッサ101に提供する。典型的には、ハードウェアの仕様によって、複数の異なる周期でそれぞれ割り込み信号を発生するように構成されるが、OS(Operating System)やBIOS(Basic Input Output System)などによって、任意の周期で割り込み信号を発生するように設定することもできる。システムタイマ108が発生する割り込み信号を利用して、制御周期毎の制御動作が実現される。
 演算ユニット100Aは、通信回路として、PLCシステムバスコントローラ120およびフィールドネットワークコントローラ140を有する。これらの通信回路は、任意の指令値といった出力データを送信するとともに、任意のセンサから得られた検出値といった入力データを受信する。
 PLCシステムバスコントローラ120は、PLCシステムバス(図示せず)を介したデータの遣り取りを制御する。より具体的には、PLCシステムバスコントローラ120は、DMA(Dynamic Memory Access)制御回路122と、PLCシステムバス制御回路124と、バッファメモリ126とを含む。PLCシステムバスコントローラ120は、PLCシステムバスコネクタ130を介してPLCシステムバスと内部的に接続される。
 バッファメモリ126は、PLCシステムバスを介して他のユニットへ出力されるデータ(出力データ)用の送信バッファ、および、PLCシステムバスを介して他のユニットから入力されるデータ(入力データ)用の受信バッファとして機能する。DMA制御回路122は、メインメモリ104からバッファメモリ126への出力データの転送、および、バッファメモリ126からメインメモリ104への入力データの転送を行う。PLCシステムバス制御回路124は、PLCシステムバスに接続される他のユニットとの間で、バッファメモリ126の出力データを送信する処理および入力データを受信してバッファメモリ126に格納する処理を行う。
 フィールドネットワークコントローラ140は、フィールドネットワーク(図示せず)を介したデータの遣り取りを制御する。すなわち、フィールドネットワークコントローラ140は、用いられるフィールドネットワークの規格に従い、出力データの送信および入力データの受信を制御する。より具体的には、フィールドネットワークコントローラ140は、DMA制御回路142と、フィールドネットワーク制御回路144と、バッファメモリ146とを含む。
 バッファメモリ146は、フィールドネットワークを介して他の装置などへ出力されるデータ(出力データ)用の送信バッファ、および、フィールドネットワークを介して他の装置などから入力されるデータ(入力データ)用の受信バッファとして機能する。DMA制御回路142は、メインメモリ104からバッファメモリ146への出力データの転送、および、バッファメモリ146からメインメモリ104への入力データの転送を行う。フィールドネットワーク制御回路144は、フィールドネットワークに接続される他の装置との間で、バッファメモリ146の出力データを送信する処理および入力データを受信してバッファメモリ146に格納する処理を行う。
 USBコネクタ110は、外部の装置と演算ユニット100Aとを接続するためのインターフェイスである。たとえば演算ユニット100Aは、USBコネクタ110およびUSBケーブルを介してサポート装置8に接続される。演算ユニット100Aのプロセッサ101で実行可能なプログラムなどは、サポート装置8から転送され、USBコネクタ110を介して制御装置1Aに取込まれる。
 温度センサ161は、演算ユニット100Aの内部の温度を検出して、温度値を出力する。温度値は、チップセット102を介してプロセッサ101へと送られる。
 (B-3.サポート装置のハードウェア構成)
 本実施の形態に係るサポート装置8は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)がプログラムを実行することによって実現される。
 図5は、本実施の形態に係るシステムを構成するサポート装置8のハードウェア構成例を示すブロック図である。図5を参照して、サポート装置8は、CPUまたはMPUなどのプロセッサ802と、光学ドライブ804と、主記憶装置806と、二次記憶装置808と、USBコントローラ812と、入力部816と、表示部818とを含む。これらのコンポーネントはバス820を介して接続される。
 プロセッサ802は、二次記憶装置808に格納された各種プログラムを読み出して、主記憶装置806に展開して実行することで、後述するような各種処理を実現する。プロセッサ802は、ユーザ入力に従って制御装置1Aの動作条件を設定する設定部に相当する。
 二次記憶装置808は、例えば、HDDあるいはSSDなどによって構成される。二次記憶装置808には、典型的には、ユーザプログラムの作成、タスクに関する設定などを行うツールである開発プログラム822が格納される。二次記憶装置808には、OSおよび他の必要なプログラムが格納されてもよい。
 サポート装置8は、光学ドライブ804を有することができる。光学ドライブ804は、コンピュータ読取可能なプログラムを非一過的に格納する記録媒体805(例えば、DVD(Digital Versatile Disc)などの光学記録媒体)から、その中に格納されたプログラムを読み出す。記録媒体805から読み出されたプログラムは、二次記憶装置808などにインストールされてもよい。
 サポート装置8で実行される各種プログラムは、ネットワーク上のサーバ装置などからダウンロードされてサポート装置8にインストールされてもよい。またサポート装置8が提供する機能は、OSが提供するモジュールの一部を利用する形で実現されてもよい。
 USBコントローラ812は、USB接続を介して制御装置1Aとの間のデータの遣り取りを制御する。本実施の形態では、USBコントローラ812は、制御装置1Aの動作条件を制御装置1Aに転送するための転送部を実現する。
 入力部816は、キーボードおよびマウスなどで構成され、ユーザ操作、ユーザ入力などを受付ける。本実施の形態では、入力部816は、制御装置1Aの動作モードに関するユーザ入力を受け付けるように構成される。
 表示部818は、ディスプレイ、各種インジケータ、プリンタなどで構成され、プロセッサ802からの処理結果などを出力する。
 図5には、プロセッサ802がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
 (B-4.演算ユニットのソフトウェア構成)
 図6は、本実施の形態に係る制御装置1Aを構成する演算ユニット100Aのソフトウェア構成の一例を示す模式図である。図6には、本実施の形態に係る各種機能を提供するためのソフトウェア群の一例を示す。これらのソフトウェア群に含まれる命令コードは、適切なタイミングで読み出され、演算ユニット100Aのプロセッサ101によって実行される。
 図6を参照して、演算ユニット100Aで実行されるソフトウェアは、リアルタイムOS200と、システムプログラム210と、ユーザプログラム234とを含む。
 リアルタイムOS200は、演算ユニット100Aのコンピュータアーキテクチャに応じて設計されており、プロセッサ101がシステムプログラム210およびユーザプログラム234を実行するための基本的な実行環境を提供する。このリアルタイムOSは、典型的には、制御装置のメーカあるいは専門のソフトウェア会社などによって提供される。
 システムプログラム210は、制御装置1Aとしての機能を提供するためのソフトウェア群である。具体的には、システムプログラム210は、スケジューラプログラム212と、IO処理プログラム214(入力処理プログラム216および出力処理プログラム218を含む)と、シーケンス命令実行部232と、システムサービスプログラム220とを含む。
 ユーザプログラム234は、ユーザにおける制御目的に応じて作成される。すなわち、制御装置1Aを用いて制御する制御対象に応じて、任意に作成されるプログラムである。ユーザプログラム234は、例えばサポート装置8において生成される。ユーザプログラム234は、サポート装置8から演算ユニット100Aへ転送されて、不揮発性メモリ106などに格納される。
 ユーザプログラム234は、シーケンス命令およびモーション命令などの命令コードからなるIEC(International Electrotechnical Commission:国際電気標準会議)プログラム236と、サーボモータなどの駆動装置を制御する制御アプリケーションの手順を表現するアプリケーションプログラム238とを含む。
 IECプログラム236は、IECによって規定された国際規格IEC61131-3に従って記述された1または複数の命令からなるプログラムを包含する。
 アプリケーションプログラム238は、目標軌跡を定義する1または複数のコマンドを含む。アプリケーションプログラム238は、ロボット言語やG言語などのインタプリタ型の言語で書かれたプログラムであってもよい。
 シーケンス命令実行部232は、IECプログラム236を実行して指令値を出力する。シーケンス命令実行部232は、IECプログラム236に含まれるシーケンス命令を解釈し、指定されたシーケンス演算(論理演算)を実行する。さらに、シーケンス命令実行部232は、IECプログラム236に含まれるモーション命令に従って指令値を算出する。モーション命令は、1つのコマンドによって複数の制御周期に亘って指令値の算出を定義しており、シーケンス命令実行部232は、このようなモーション命令を解釈して、モーション指令値を制御周期毎に更新する。
 システムサービスプログラム220は、図6に個別に示したプログラム以外の、制御装置1Aの各種機能を実現するためのプログラム群をまとめて示すものである。システムサービスプログラム220は、例えば、外部装置との間でファイルやデータを送受信する処理を実現するプログラム(すなわち、通信処理に係るプログラム)、異常監視処理および各種解析処理などを実現するプログラムなどであってもよい。
 本実施の形態に係る演算ユニット100Aにおいては、システムサービスプログラム220に含まれるプログラムは、少なくとも2つに優先度が区別されている。一例として、システムサービスプログラム220は、高優先タスク20に設定される高優先度サービスプログラム222と、低優先タスクに設定される低優先度サービスプログラム226とを含む。高優先度サービスプログラム222は、低優先度サービスプログラム226に比較して、実行に関する優先度が高く設定されている。
 高優先度サービスプログラム222は、アプリケーションプログラム実行部(図示せず)を含む。アプリケーションプログラム実行部は、例えば、アプリケーションプログラム238をインタプリタ方式で実行して、制御対象(たとえばサーボモータ)に対する指令値を出力する。
 スケジューラプログラム212は、タスク毎に設置された優先度に応じて、各タスクに設定されるプログラムをプロセッサ101に実行させる。すなわち、スケジューラプログラム212は、IO処理プログラム214、およびシステムサービスプログラム220等について、各実行周期での処理開始および処理中断後の処理再開を制御する。
 具体的には、スケジューラプログラム212は、制御機能2120と、監視機能2122とを含む。制御機能2120は、各処理に対してコンピューティング資源を割当てるための制御を司る。監視機能2122は、システムサービスプログラム220に含まれる各プログラムの実行状況を監視する。監視機能2122は、システムサービスプログラム220に含まれる高優先度サービスプログラム222の通知機能プログラムによる通知などに基づいて、各サービスの実行状況を把握する。
 IO処理プログラム214は、演算ユニット100Aにおいて利用可能なデータ(入力データおよび出力データ)を更新する処理を司る。IO処理プログラム214の入力処理プログラム216は、PLCシステムバスコントローラ120および/またはフィールドネットワークコントローラ140によって受信された入力データを、演算ユニット100Aのプロセッサ101が使用するのに適した形式に再配置する。
 出力処理プログラム218は、ユーザプログラム234の実行によって生成された出力データを、PLCシステムバスコントローラ120および/またはフィールドネットワークコントローラ140へ転送するのに適した形式に再配置する。PLCシステムバスコントローラ120またはフィールドネットワークコントローラ140が、プロセッサ101からの、送信を実行するための指令を必要とする場合は、出力処理プログラム218がそのような指令を発行する。
 なお、プロセッサ101が図6に示されるプログラムを実行することで後述するような機能および処理を実現する実装形態に代えて、その一部または全部を、ASIC(Application Specific Integrated Circuit)やFPGA(Field-Programmable Gate Array)などのハードワイヤードな回路を用いて実装してもよい。
 図7は、サポート装置8の表示部818によって提供される、動作モードの設定のための画面の一例を示す図である。図7に示す設定画面の例では、デフォルト(Default)モードと、拡張(Extended)モードとが画面に表示される。
 デフォルトモードとは、動作周囲温度(Operating Ambient Temperature)が標準温度(この例では55℃)である場合の制御装置1Aの動作モードである。拡張モードとは、動作周囲温度が、デフォルトモードでの動作周囲温度よりも高い温度(たとえば60℃)での制御装置1Aの動作モードである。
 ユーザがサポート装置の入力部816を操作することによって、画面内に矢印の形状で表現されたカーソルが上下に移動するとともに、その矢印が指す動作モードの表示が反転される。ユーザが決定のための操作を入力部816に対して行うことによって、入力部816は、ユーザによる動作モードの入力を受け付ける。
<C.制御装置の動作モードの設定>
 (C-1.ツールによる設定)
 第1の実施の形態では、サポート装置8が制御周期内の空き時間を設定する。
 図8は、第1の実施の形態に係る制御装置の動作モード設定処理の概略を示したフローチャートである。サポート装置8がプログラムを実行することによって、図8に示した処理が実行される。図8を参照して、設定処理は、まず、サポート装置8において実行されるモード設定処理(ステップS11)を含む。具体的には、ユーザがサポート装置8の設定画面(図7を参照)を操作することによって、動作モードが決定される。入力部816は、ユーザによる動作モードの入力を受け付ける。
 ステップS12において、サポート装置8のプロセッサ802は、入力部816によって受け付けられた動作モードが、デフォルトモードまたは拡張モードのいずれであるかを判定する。デフォルトモードの場合、ステップS13において、デフォルトモードでの制御処理のための設定が実行される。一方、拡張モードの場合、ステップS14において拡張モードでの制御処理のための設定が実行される。
 デフォルトモードおよび拡張モードの設定処理(ステップS13,S14)において、ユーザは、サポート装置8によって提供されるユーザインターフェイスを用いて、制御周期の長さ、および、高優先タスクの割り当て、低優先タスクの割当て等を設定する。デフォルトモードと拡張モードとでは、制御周期内のタスクの割当てが相違する。
 図9は、デフォルトモードと拡張モードにおける、制御周期内の時間の割当ての優先度を説明した図である。デフォルトモードでは、高優先タスク(優先度:高)が制御周期内に優先的に割り当てられ、制御周期内の残りの時間に、低優先タスク(優先度:中~低)が割り当てられる。一方、拡張モードでは、プロセッサの空き時間が制御周期内に最優先で割り当てられる。次に、高優先タスク(優先度:高)の処理時間が割り当てられる。制御周期内の残りの時間に低優先タスクを割り当て可能である場合には、低優先タスクが割り当てられる。
 図8に戻り、デフォルトモードの設定の場合、ユーザは、高優先タスクの割り当て、低優先タスクの割当ておよび、制御周期の長さを設定する。このとき、サポート装置8のプロセッサ802は、制御周期内にプロセッサ空き時間を確保しない。さらにプロセッサ802は、複数のタスクが優先度の高い順に制御周期内で実行されるように、複数のタスクが割り当てられることを可能にする。したがって、デフォルトモードでは、基本的に、制御周期内にプロセッサ空き時間が発生しない。あるいは、デフォルトモードにおいてプロセッサ空き時間が発生したとしても、空き時間は極めて短い。
 一方、拡張モードの設定の場合、サポート装置8のプロセッサ802は、制御周期中の一定の割合(たとえば10%)をプロセッサ空き時間として確保する。その上で、プロセッサ802は、制御周期内の残りの時間(第1の残り時間)内に高優先タスクの割当てが行われるように、ユーザの設定を受け付ける。
 なお、拡張モードの設定において、プロセッサ802は、高優先タスクの処理時間の最大の揺らぎを考慮して、処理(タスク)専有時間を計算する。すなわち、プロセッサ802は、高優先タスクの最大の処理時間を計算して、その計算結果を表示部818に表示する。ユーザは、この計算結果に基づいて、高優先タスクの割り当ておよび制御周期を決定する。制御周期に対するプロセッサ空き時間の割合は一定であるので、ユーザが設定した制御周期の長さに応じてプロセッサ空き時間が決定される。したがって、高優先タスクの実行時間が長くなった場合であっても、制御周期内にプロセッサの空き時間を確保することができる。
 さらに、拡張モードの設定では、プロセッサ802は、制御周期から空き時間および高優先タスクの実行時間を除いた第2の残り時間内に、低優先タスクが割り当て可能かどうかを判断する。第2の残り時間内に、低優先タスクが割り当て可能である場合には、プロセッサ802は、その第2の残り時間内に低優先タスクの実行時間を割り当てる。一方、第2の残り時間内に、低優先タスクが割り当てできない場合には、プロセッサ802は、その第2の残り時間をプロセッサ空き時間に割り当てる。したがって、制御周期内に低優先タスクを割り当てできない場合には、プロセッサ空き時間が最初に確保された時間よりも長くなる。
 ステップS13またはステップS14において、ユーザによる設定が終了すると、ステップS15において、プログラムおよび設定内容が、サポート装置8から制御装置1A(PLC)に転送される。拡張モードでは、デフォルトモードでサポート装置8から制御装置1A(PLC)に転送される内容に加えて、制御周期内にプロセッサ空き時間があることを示す情報、および、その空き時間の長さについての情報が制御装置1Aに送られる。
 演算ユニット100Aが、拡張モードの設定に関する情報を受け取った場合、演算ユニット100Aは、その情報に含まれる空き時間の情報に基づいて、プロセッサ101への割り込み要求を設定する。これにより、演算ユニット100A内部の回路(たとえばシステムタイマ108)は、設定されたタイミングで割り込み信号を発生させ、その割り込み信号をプロセッサ101に提供する。以後の説明では、割り込み信号によってプロセッサ101に送られる割り込み要求を「IRQ(Interrupt ReQuest)」と称する。
 図10は、制御装置1Aの演算ユニットがデフォルトモードにおいて実行するタスク処理の例を説明する図である。デフォルトモードでは、設定された制御周期ごとにIRQが発生する。演算ユニット100Aのプロセッサ101は、IRQに応じて処理を開始して高優先タスク20および低優先タスク30を実行する。デフォルトモードでは、制御周期の終わり直前までタスクが実行される。したがって、演算速度および制御性能が高められる。
 図11は、制御装置1Aの演算ユニットが拡張モードにおいて実行するタスク処理の例を説明する図である。拡張モードでは、制御周期の開始時に加え、空き時間の開始時に、IRQが発生する。演算ユニット100Aのプロセッサ101は、制御周期内のIRQに応じて演算処理を停止する。プロセッサ101が演算を停止してから次の制御周期の開始までの時間が空き時間40に相当する。演算処理を停止した後、制御周期の開始時に次のIRQが発生する。プロセッサ101はIRQに応じて、次の制御周期での演算(高優先タスク20の実行)を開始する。
 図12は、制御装置1Aの演算ユニットが拡張モードにおいて実行するタスク処理の別の例を説明する図である。図12に示すように、空き時間40の開始に加え、空き時間40の終了をIRQによってプロセッサ101に通知してもよい。これにより図12に示すように、空き時間40を制御周期内の任意の期間に配置させることができる。たとえば図12に示すように、空き時間40は、高優先タスク20と低優先タスク30との間(言い換える高優先タスク20の終了直後)に配置されてもよい。プロセッサ101が連続的に動作する時間を短くすることによって、制御周期を変えることなく、プロセッサ101の温度が大きく上昇することを抑えることができる。
 図13は、制御装置1Aの演算ユニットが拡張モードにおいて実行するタスク処理のさらに別の例を説明する図である。図13に示すように、複数の空き時間40が制御周期内に配置されてもよい。各々の空き時間40の開始および終了がIRQによってプロセッサ101に通知される。この例によれば、高優先タスク20の終了直後にプロセッサ101の演算を停止させるだけでなく、低優先タスク30終了直後にもプロセッサ101の演算を停止させることができる。これによって、プロセッサ101が連続で稼働する時間を短くすることができるので、制御周期を変えることなく、プロセッサ101の温度が大きく上昇することを抑えることができる。
 なお、高優先タスクを複数のタスクに分割できる場合には、その分割されたタスクの終了ごとに空き時間を割り当てても良い。
 (C-2.制御装置による設定)
 第2の実施の形態では、拡張モードが設定された場合、制御装置1Aの演算ユニット100Aは、温度センサ161(図4を参照)の測定値に基づいて制御周期内の空き時間を決定する。
 図14は、第2の実施の形態に係る制御装置の動作モード設定処理の概略を示したフローチャートである。たとえばプロセッサ101が制御装置1Aのスケジューラプログラム212を実行することによって、図14に示した処理が実行される。まず、ステップS21において、演算ユニット100Aは、プログラムおよび設定内容の入力を受け付ける。ユーザは、サポート装置8を操作することにより、動作モードを決定するとともに、制御周期の長さ、高優先タスクの割り当て、低優先タスクの割当て等を設定する。サポート装置8から、プログラムおよび設定内容が制御装置1Aに転送される。設定内容は、動作モードに関する情報を含む。
 ステップS22において、演算ユニット100Aのプロセッサ101は、サポート装置8から転送された情報に基づいて、ユーザにより設定された動作モードが、デフォルトモードまたは拡張モードのいずれであるかを判断する。デフォルトモードの場合、ステップS23において、プロセッサ101は、デフォルトモードでの制御処理のための設定を実行する。一方、拡張モードの場合、ステップS24において、プロセッサ101は、拡張モードでの制御処理のための設定を実行する。
 デフォルトモードでの動作時に、プロセッサ101は、制御周期内にプロセッサ空き時間を確保しない。さらに複数のタスクが優先度の高い順に制御周期内で実行されるように、プロセッサ101は、制御周期内に複数のタスクを割り当てる。
 拡張モードでの動作時に、プロセッサ101は、制御周期中の一定の割合(たとえば10%)をプロセッサ空き時間として確保する。その上で、プロセッサ101は、制御周期内の残りの時間(第1の残り時間)内に高優先タスクを割当てる。この場合において、プロセッサ101は、高優先タスクの処理時間の最大の揺らぎを考慮して高優先タスクを制御周期内に割り当てる。
 さらに、プロセッサ101は、制御周期から空き時間および高優先タスクの実行時間を除いた第2の残り時間内に、低優先タスクが割り当て可能かどうかを判断する。第2の残り時間内に、低優先タスクが割り当て可能である場合には、プロセッサ101は、その第2の残り時間内に低優先タスクの実行時間を割り当てる。一方、第2の残り時間内に、低優先タスクが割り当てできない場合には、プロセッサ101は、その第2の残り時間をプロセッサ空き時間に割り当てる。
 デフォルトモードにおいて実行するタスク処理、および拡張モードにおいて実行するタスク処理は、第1の実施の形態において説明された処理と基本的に同じであるので、詳細な説明は繰り返さない。第2の実施の形態では、拡張モードが選択された場合、制御周期に対するプロセッサ空き時間の割合が、温度センサ161によって測定された温度(すなわち制御装置1Aの動作周囲温度)に応じて変化する。この点において第2の実施の形態は第1の実施形態と相違する。
 図15は、制御装置1Aによるタスクの実行時におけるプロセッサ空き時間の制御に関する処理を説明するフローチャートである。ステップS31において、プロセッサ101は、温度センサ161から温度値(温度センサ値)を取得する。プロセッサ101は、所定の周期ごとに温度センサ161から測定値を取得して、その測定値の平均値を温度値として算出してもよい。
 ステップS32において、プロセッサ101は、制御周期に対する空き時間の比率を求める。温度値から空き時間を求める方法は、特に限定されない。たとえばプロセッサ101は、制御周期に対する空き時間の比率を温度値から求めるための演算式を用いてもよい。
 プロセッサ101は、演算式および温度センサ161の検出値から、制御周期に対する空き時間の比率を求め、その比率と制御周期とに基づいて、空き時間を決定することができる。あるいは演算ユニット100Aの不揮発性メモリ106が、温度と、制御周期に対する空き時間の比率とを対応付けたテーブルを記憶してもよい。プロセッサ101は、そのテーブルと、温度センサ161の検出値から、制御周期に対する空き時間の比率を求め、その比率と制御周期とに基づいて、空き時間を決定することができる。演算式およびテーブルのいずれにおいても、制御周期に対する空き時間の比率は、温度が高いほど大きくなるように設定される。
 ステップS33において、プロセッサ101は、制御周期内の空き時間を決定する。ステップS34において、プロセッサ101は、空き時間の情報をIRQに設定する。
 上記の設定に従い、プロセッサ101は処理を実行する。拡張モードでは、IRQの発生によって、プロセッサ101は、演算を停止させる。さらに、IRQによって、次の制御周期の開始時がプロセッサ101に通知される。プロセッサ101はIRQに応じて、その制御周期での演算および処理を開始する。プロセッサ101が演算を停止する時間が空き時間である。
 図16は、第2の実施の形態に係る制御装置1Aの演算ユニットが拡張モードにおいて実行するタスク処理の例を説明する図である。図16に示すように、拡張モードにおいて、プロセッサ101は、温度センサ161の測定値が高いほど制御周期内の空き時間40を長くする。温度センサ161の測定値は、制御装置1Aの動作周囲温度を表わす。一方、制御装置1Aの動作周囲温度が低下した場合、制御装置1Aは、空き時間40を短くする。この場合、たとえば制御周期に対する空き時間の割合が、サポート装置8で設定された割合よりも大きく保たれる。
 第2の実施の形態では、制御周期の長さは、空き時間の長さが温度に応じて変化するものの制御周期の長さは変化しない。システムの稼働中に制御周期の長さが変わると、高優先タスクの処理性能が変化する(高くなる、あるいは低くなる)可能性がある。高優先タスクの処理性能が変化すると、制御対象(たとえば製造装置)の動作に影響が生じる可能性がある。制御周期の長さを変えないことによって高優先タスクの処理性能が変化することを防ぐことができる。
 図16では、1つの制御周期内に高優先タスクと低優先タスクとが実行される例が示されている。しかし、温度が高くなった場合に1つの制御周期内に高優先タスクのみが実行され、制御周期内の残りの時間が空き時間であってもよい。第1の実施の形態と同様に、第2の実施の形態でも、制御周期内へ空き時間の割当てが最も優先され、次に、高優先タスクの割り当てが優先される。したがって、制御周期内にプロセッサの空き時間を確保することができる。これにより、プロセッサの発熱量が増加することを抑えることができるので、プロセッサの温度が大きく上昇することを抑えることができる。
 また、第2の実施の形態においても、IRQによって、図12、図13に示した空き時間の配置と同じ配置を採用することができる。制御周期内の空き時間40の配置は特に限定されない。
 <D.付記>
 上述したような本実施の形態は、以下のような技術思想を含む。
 [構成1]
 制御対象を制御するための制御装置(1A)であって、
 前記制御装置(1A)の動作モードの設定に関する入力を受け付ける入力部(110)と、
 前記制御対象を制御するタスクを実行するプロセッサ(101)と、
 前記プロセッサ(101)によって実行される前記タスクを管理するプログラムとを備え、
 前記動作モードは、第1のモードと、前記第1のモードでの動作温度よりも高温で前記制御装置を動作させるための第2のモードとを含み、
 前記入力によって前記第2のモードが選択された場合、前記プログラムは、前記タスクの制御周期内に前記プロセッサ(101)の空き時間(40)を割り当てる、制御装置(1A)。
 [構成2]
 前記入力によって前記第2のモードが選択された場合、前記プログラムは、前記制御周期から前記空き時間(40)を除いた第1の残り時間内に、複数のタスクのうち実行の優先度の高い高優先タスク(20)を割り当てる、構成1に記載の制御装置(1A)。
 [構成3]
 前記入力によって前記第2のモードが選択された場合に、前記プログラムは、前記制御周期から前記空き時間(40)および前記高優先タスク(20)の実行時間を除いた第2の残り時間内に、前記複数のタスクのうち実行の優先度の低い低優先タスク(30)が割り当て可能かどうかを判断して、
 前記プログラムは、
 前記第2の残り時間内に、前記低優先タスク(30)が割り当て可能である場合には、前記第2の残り時間内に前記低優先タスク(30)を割り当て、
 前記低優先タスク(30)が前記第2の残り時間内に割り当てることができない場合には、前記第2の残り時間を前記空き時間(40)に割り当てる、構成2に記載の制御装置(1A)。
 [構成4]
 前記入力によって前記第2のモードが選択された場合に、前記プログラムは、前記高優先タスク(20)の実行時間の揺らぎによる前記高優先タスク(20)の最大の実行時間を、前記第1の残り時間内に割り当てる、構成2に記載の制御装置(1A)。
 [構成5]
 前記空き時間(40)の少なくとも一部は、前記制御周期内の前記高優先タスク(20)の終了直後に割り当てられる、構成2から構成4のいずれかに記載の制御装置(1A)。
 [構成6]
 前記制御装置(1A)は、
 前記制御装置(1A)の温度を測定する温度センサ(161)をさらに備え、
 前記プログラムは、前記温度センサ(161)の測定値に基づいて、前記温度が高いほど前記空き時間(40)が長くなるように、前記空き時間(40)を割り当てる、構成1から構成5のいずれかに記載の制御装置(1A)。
 [構成7]
 前記入力によって前記第1のモードが選択された場合に、前記プログラムは、前記制御周期内に前記空き時間(40)を確保せず、かつ、複数のタスクが優先度の高い順に前記制御周期内で実行されるように、前記複数のタスクを割り当てる、構成1から構成5のいずれかに記載の制御装置(1A)。
 [構成8]
 制御対象を制御する制御装置(1A)の制御方法であって、前記制御装置(1A)は、前記制御装置(1A)の動作モードに関する入力を受け付ける入力部(110)と、前記制御対象を制御するタスクを実行するプロセッサ(101)と、前記プロセッサ(101)によって実行される前記タスクを管理するプログラムとを含み、
 前記制御方法は、
 前記制御装置(1A)の動作モードに関する入力を受け付けるステップと、
 前記入力に従って前記制御装置(1A)の動作条件を設定するステップとを備え、
 前記動作モードは、第1のモードと、前記第1のモードでの動作温度よりも高温で前記制御装置(1A)を動作させるための第2のモードとを含み、
 前記設定するステップは、
 前記入力によって前記第2のモードが選択された場合に、前記タスクの制御周期内に、前記プロセッサ(101)の空き時間(40)を割り当てるステップを含む、制御方法。
 今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した実施の形態の説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
 1A~1H 制御装置、4 通信装置、5 フィールド機器、8 サポート装置、10 生産ライン、20 高優先タスク、30 低優先タスク、40 空き時間、100A,100B 演算ユニット、101,802 プロセッサ、102 チップセット、104 メインメモリ、106 不揮発性メモリ、108 システムタイマ、110 コネクタ、120 システムバスコントローラ、122,142 DMA制御回路、124 システムバス制御回路、126,146 バッファメモリ、130 システムバスコネクタ、140 フィールドネットワークコントローラ、144 フィールドネットワーク制御回路、161 温度センサ、200 リアルタイムOS、201A~201D,202A 機能ユニット、210 システムプログラム、212 スケジューラプログラム、214 IO処理プログラム、216 入力処理プログラム、218 出力処理プログラム、220 システムサービスプログラム、222 高優先度サービスプログラム、226 低優先度サービスプログラム、232 シーケンス命令実行部、234 ユーザプログラム、236 IECプログラム、238 アプリケーションプログラム、300A,300B I/Oユニット、400A,400B AC-DC電源、804 光学ドライブ、805 記録媒体、806 主記憶装置、808 二次記憶装置、812 USBコントローラ、816 入力部、818 表示部、820 バス、822 開発プログラム、2120 制御機能、2122 監視機能、S11~S34 ステップ。

Claims (8)

  1.  制御対象を制御するための制御装置であって、
     前記制御装置の動作モードの設定に関する入力を受け付ける入力部と、
     前記制御対象を制御するタスクを実行するプロセッサと、
     前記プロセッサによって実行される前記タスクを管理するプログラムとを備え、
     前記動作モードは、第1のモードと、前記第1のモードでの動作温度よりも高温で前記制御装置を動作させるための第2のモードとを含み、
     前記入力によって前記第2のモードが選択された場合、前記プログラムは、前記タスクの制御周期内に前記プロセッサの空き時間を割り当てる、制御装置。
  2.  前記入力によって前記第2のモードが選択された場合、前記プログラムは、前記制御周期から前記空き時間を除いた第1の残り時間内に、複数のタスクのうち実行の優先度の高い高優先タスクを割り当てる、請求項1に記載の制御装置。
  3.  前記入力によって前記第2のモードが選択された場合に、前記プログラムは、前記制御周期から前記空き時間および前記高優先タスクの実行時間を除いた第2の残り時間内に、前記複数のタスクのうち実行の優先度の低い低優先タスクが割り当て可能かどうかを判断して、
     前記プログラムは、
     前記第2の残り時間内に、前記低優先タスクが割り当て可能である場合には、前記第2の残り時間内に前記低優先タスクを割り当て、
     前記低優先タスクが前記第2の残り時間内に割り当てることができない場合には、前記第2の残り時間を前記空き時間に割り当てる、請求項2に記載の制御装置。
  4.  前記入力によって前記第2のモードが選択された場合に、前記プログラムは、前記高優先タスクの実行時間の揺らぎによる前記高優先タスクの最大の実行時間を、前記第1の残り時間内に割り当てる、請求項2に記載の制御装置。
  5.  前記空き時間の少なくとも一部は、前記制御周期内の前記高優先タスクの終了直後に割り当てられる、請求項2から請求項4のいずれか1項に記載の制御装置。
  6.  前記制御装置は、
     前記制御装置の温度を測定する温度センサをさらに備え、
     前記プログラムは、前記温度センサの測定値に基づいて、前記温度が高いほど前記空き時間が長くなるように、前記空き時間を割り当てる、請求項1から請求項5のいずれか1項に記載の制御装置。
  7.  前記入力によって前記第1のモードが選択された場合に、前記プログラムは、前記制御周期内に前記空き時間を確保せず、かつ、複数のタスクが優先度の高い順に前記制御周期内で実行されるように、前記複数のタスクを割り当てる、請求項1から請求項5のいずれか1項に記載の制御装置。
  8.  制御対象を制御する制御装置の制御方法であって、前記制御装置は、前記制御装置の動作モードに関する入力を受け付ける入力部と、前記制御対象を制御するタスクを実行するプロセッサと、前記プロセッサによって実行される前記タスクを管理するプログラムとを含み、
     前記制御方法は、
     前記制御装置の動作モードに関する入力を受け付けるステップと、
     前記入力に従って前記制御装置の動作条件を設定するステップとを備え、
     前記動作モードは、第1のモードと、前記第1のモードでの動作温度よりも高温で前記制御装置を動作させるための第2のモードとを含み、
     前記設定するステップは、
     前記入力によって前記第2のモードが選択された場合に、前記タスクの制御周期内に、前記プロセッサの空き時間を割り当てるステップを含む、制御方法。
PCT/JP2021/034559 2021-03-08 2021-09-21 制御装置および制御方法 WO2022190425A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2021036617A JP2022136824A (ja) 2021-03-08 2021-03-08 制御装置および制御方法
JP2021-036617 2021-03-08

Publications (1)

Publication Number Publication Date
WO2022190425A1 true WO2022190425A1 (ja) 2022-09-15

Family

ID=83227812

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/034559 WO2022190425A1 (ja) 2021-03-08 2021-09-21 制御装置および制御方法

Country Status (2)

Country Link
JP (1) JP2022136824A (ja)
WO (1) WO2022190425A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002229663A (ja) * 2001-02-06 2002-08-16 Seiko Epson Corp 情報処理装置
JP2005165470A (ja) * 2003-11-28 2005-06-23 Toshiba Corp 電子機器およびプロセッサ速度制御方法
JP2020061055A (ja) * 2018-10-12 2020-04-16 オムロン株式会社 制御システム、制御装置および制御方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002229663A (ja) * 2001-02-06 2002-08-16 Seiko Epson Corp 情報処理装置
JP2005165470A (ja) * 2003-11-28 2005-06-23 Toshiba Corp 電子機器およびプロセッサ速度制御方法
JP2020061055A (ja) * 2018-10-12 2020-04-16 オムロン株式会社 制御システム、制御装置および制御方法

Also Published As

Publication number Publication date
JP2022136824A (ja) 2022-09-21

Similar Documents

Publication Publication Date Title
US9618922B2 (en) CPU of PLC, system program for PLC, and recording medium storing system program for PLC
US10761884B2 (en) Control device for operating multiple types of programs in different execution formats
US10274936B2 (en) Control apparatus
WO2018186358A1 (ja) 制御装置、制御方法および制御プログラム
US10877803B2 (en) Control apparatus, control method and non-transitory storage medium
US20140052882A1 (en) Latency Sensitive Software Interrupt and Thread Scheduling
EP3582036B9 (en) Control device
JP2018181315A (ja) 制御装置、制御方法および制御プログラム
JP4811260B2 (ja) プログラマブルコントローラ、及びその支援装置
JP7067406B2 (ja) 制御システム、制御装置および制御方法
WO2016189709A1 (ja) コントローラ
WO2022190425A1 (ja) 制御装置および制御方法
WO2022190424A1 (ja) 情報処理装置およびプログラム
WO2020075351A1 (ja) コントロール装置
US9618988B2 (en) Method and apparatus for managing a thermal budget of at least a part of a processing system
JP2002006944A (ja) 制御機能付き表示器
WO2022185581A1 (ja) 制御装置およびデータ転送方法
JP7455239B2 (ja) 数値制御システム、タスク割り当て変更装置及び数値制御方法
WO2022264424A1 (ja) 制御装置及び制御方法
KR20160035446A (ko) 공장 자동화 시스템의 제어방법
CN116457758A (zh) 控制装置、控制方法以及控制程序
JP6375602B2 (ja) 消費電力を制御する情報処理装置、電力制御方法、及びそのためのプログラム
JP2020046954A (ja) 制御システム、エンジニアリングツール、およびコントローラ
JPS5930160A (ja) 疎結合電算機システム
JP2008171111A (ja) コンピュータを用いた計測制御方法およびそのプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21930273

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21930273

Country of ref document: EP

Kind code of ref document: A1