WO2012104896A1 - 安全制御装置および安全制御方法 - Google Patents

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

Info

Publication number
WO2012104896A1
WO2012104896A1 PCT/JP2011/000524 JP2011000524W WO2012104896A1 WO 2012104896 A1 WO2012104896 A1 WO 2012104896A1 JP 2011000524 W JP2011000524 W JP 2011000524W WO 2012104896 A1 WO2012104896 A1 WO 2012104896A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
execution
interrupt
partition
safety
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2011/000524
Other languages
English (en)
French (fr)
Inventor
平 哲也
浩司 尾藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2011528113A priority Critical patent/JP5136693B2/ja
Priority to PCT/JP2011/000524 priority patent/WO2012104896A1/ja
Priority to US13/259,795 priority patent/US20120198464A1/en
Priority to CN201180038085.7A priority patent/CN103052923B/zh
Priority to EP11822790.9A priority patent/EP2677377B1/en
Publication of WO2012104896A1 publication Critical patent/WO2012104896A1/ja
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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
    • G05B9/00Safety arrangements
    • G05B9/02Safety arrangements electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Program-control systems
    • G05B19/02Program-control systems electric
    • G05B19/04Program control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Program control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0428Safety, monitoring
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • G06F9/4887Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues involving deadlines, e.g. rate based, periodic
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25343Real time multitasking
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25347Multitasking machine control
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34382Preemptive multitasking, cpu decides upon priority scheme, which task to start
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/34Director, elements to supervisory
    • G05B2219/34383Dynamic preemptive, special event register manages time slices for applications

Definitions

  • the present invention relates to a safety control device mounted on a service robot, transportation equipment or the like for ensuring functional safety, and more particularly to a safety control device using a computer system.
  • the service robot needs to ensure functional safety by constantly monitoring the safety state with external sensors and self-diagnosis devices and executing appropriate safety control logic when any danger is detected.
  • IEC 61508 has been established as an international standard for functional safety for systems that operate on electrical principles such as transport equipment.
  • IEC 61508 a system provided for ensuring functional safety is called a safety-related system.
  • IEC 61508 defines various techniques for constructing safety-related systems using hardware such as microprocessors and PLCs (Programmable Logic Controllers) and computer programs (software). By using the technique defined in IEC 61508, it is possible to construct a safety-related system using a computer system.
  • Patent Literature 1 discloses a technique for causing an application program (hereinafter referred to as a safety-related application) related to ensuring functional safety to operate on one computer system together with other application programs (hereinafter referred to as a non-safety-related application). Has been.
  • a safety-related application an application program related to ensuring functional safety to operate on one computer system together with other application programs (hereinafter referred to as a non-safety-related application). has been.
  • the safety-related applications safety monitoring program and safety control program
  • the non-safety-related applications normal control program
  • the normal control program can be excluded from the safety-related system, which can contribute to the cost reduction of the safety-related system configured using the computer system.
  • the center diagram of FIG. 18 illustrates a case where the interrupt process is executed immediately in response to an interrupt in the case illustrated in the upper diagram of FIG.
  • a period for executing the interrupt processing occurs in the partition B.
  • This interruption process is executed while consuming the time resource of the partition B. Therefore, the time resource necessary for executing the process in the partition B is not guaranteed, and the process in the partition B may not be executed to the end and may end incompletely.
  • the process after the partition C when the process on the assumption that the process in the partition B is completed is executed, there is a problem that the process after the partition C cannot be executed normally. End up.
  • the lower diagram of FIG. 18 extends the period of partition B so that the completion of processing in partition B is guaranteed when interrupt processing is executed in the case illustrated in the upper diagram of FIG. The case is illustrated.
  • the time resource necessary for executing the process in the partition B is guaranteed, but the execution timing of the process after the partition C is delayed. Therefore, if there is a process that needs to be executed periodically in the processes after the partition C, there is a problem that the process cannot be executed periodically.
  • a process that needs to be executed periodically is a process for updating the command value for the actuator to be controlled, the command value cannot be updated at a desired timing.
  • a process that needs to be executed periodically is a process that accesses a reset circuit that resets the system when there is no access from the system for a predetermined time in order to monitor the hang-up of the system.
  • the reset circuit cannot be accessed at a desired timing. As a result, even if there is no problem in the system, there arises a problem that the reset circuit resets the system.
  • the interrupt processing when interrupt processing is applied to a system program that employs time partitioning, there is a problem that the processing fails.
  • the interrupt processing also has an aspect in which processing that is desired to be executed as soon as possible according to the occurrence of the interrupt is mounted.
  • the present invention has been made on the basis of the above-described knowledge, and even when interrupt processing is executed in time partitioning, processing failure is suppressed while suppressing execution delay of interrupt processing. It is an object of the present invention to provide a safety control device and a safety control method that can prevent the above-described problem.
  • the safety control device includes a processor, a safety-related task that executes a process related to ensuring functional safety of a control target, and a non-safety related task that executes a process related to control of the other control target. And a system program for controlling the allocation of the execution time of the processor to an interrupt processing task for executing processing in response to an interrupt from the control target, and an interrupt handler to be executed in response to the interrupt from the control target.
  • the processor is configured to execute the system program to assign a safety-related time partition to which the execution time is assigned to the safety-related task, a non-safety-related time partition to which the execution time is assigned to the non-safety-related task, and Before the scheduled execution task that was scheduled to run
  • the task is scheduled according to scheduling information indicating scheduling contents of a reserved execution time partition to which an execution time is allocated, and the processor executes the interrupt handler when an interrupt is generated from the control target.
  • An interrupt processing task that executes a process according to the execution reservation task is reserved as the execution reservation task, and the processor performs the reservation before the time partition period before the reserved execution time partition ends in the scheduling.
  • any of the execution reserved tasks is replaced with the previous time partition instead of the execution time in the reserved execution partition. It is intended to allocate the execution time in Deployment.
  • the safety control method includes a step of reserving an execution of an interrupt processing task for executing a process corresponding to the interrupt as an execution reservation task when an interrupt is generated from a control target;
  • the execution time of a processor is assigned to a safety-related task that executes a process related to ensuring the functional safety of a target, and the execution time is assigned to a non-safety-related task that executes a process related to control of the other control target. Scheduling the task according to scheduling information indicating scheduling contents of a non-safety related time partition and a reserved execution time partition in which the execution time is allocated to the execution reserved task reserved for execution.
  • step when the execution of the task assigned the execution time to the previous time partition is completed before the period of the time partition before the reserved execution time partition ends, any of the execution reservation tasks In addition, instead of the execution time in the reserved execution partition, the execution time in the previous time partition is allocated.
  • a safety control device and a safety control method can be provided.
  • Embodiment 1 of invention It is a block diagram which shows the structural example of the safety control apparatus concerning Embodiment 1 of invention. It is a figure for demonstrating the concept of the time partitioning in Embodiment 1 of invention. It is a conceptual diagram for demonstrating the concept of the resource partitioning in Embodiment 1 of invention. It is a figure which shows the relationship between the partition scheduler and task started by the execution environment provided by OS shown in FIG. It is a figure which shows the specific example of a scheduling pattern. It is a figure which shows the specific example of a scheduling pattern. It is a flowchart which shows the specific example of the process sequence of a partition scheduler. It is a flowchart which shows the specific example of the reset process procedure of a microcontroller.
  • FIG. 10 is a diagram illustrating a relationship among a partition scheduler, a task, and an interrupt handler that is activated in an execution environment provided by the OS illustrated in FIG. 9. It is a state transition diagram of a task. It is a figure which shows the specific example of the scheduling pattern concerning Embodiment 2 of invention. It is a conceptual diagram of the process sequence at the time of interruption generation concerning Embodiment 2 of invention. It is a flowchart which shows the specific example of the process sequence at the time of interruption generation
  • the safety control device 1 is mounted on a service robot, a transportation device, or the like, and executes safety control for ensuring functional safety.
  • the safety control device 1 is configured to execute a safety-related application and a non-safety-related application on the same computer system.
  • FIG. 1 is a block diagram illustrating a configuration example of the safety control device 1 according to the present embodiment.
  • the processor 10 obtains a program (instruction stream), decodes an instruction, and performs arithmetic processing according to the instruction decoding result.
  • the safety control device 1 may have a multiprocessor configuration having a plurality of processors 10.
  • the processor 10 may be a multi-core processor.
  • the processor 10 provides a multiprogramming environment by executing an operating system (OS) 100 as a system program.
  • OS operating system
  • a multi-programming environment is an environment in which multiple programs are executed in parallel by periodically switching and executing multiple programs, or by switching the programs to be executed in response to the occurrence of a certain event. means.
  • Multiprogramming is sometimes called multiprocess, multithread, multitask, etc.
  • a process, a thread, and a task mean a program unit that is executed in parallel in a multiprogramming environment.
  • the multi-programming environment included in the processor 10 of the present embodiment may be a multi-process environment or a multi-thread environment.
  • the execution memory 11 is a memory used for program execution by the processor 10.
  • the execution memory 11 stores programs (such as the OS 100 and applications 101 to 103) loaded from the nonvolatile memory 13, input / output data of the processor 10, and the like.
  • the processor 10 may directly execute these programs from the nonvolatile memory 13 without loading the programs from the nonvolatile memory 13 to the execution memory 11.
  • the execution memory 11 may be a random accessible volatile memory such as SRAM (Static Random Access Memory) or DRAM (Dynamic Random Access Memory).
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • the execution memory 11 in FIG. 1 represents a logical unit. That is, the execution memory 11 may be, for example, a combination of a plurality of SRAM devices, a combination of a plurality of DRAM devices, or a combination of an SRAM device and a DRAM device.
  • the I / O port 12 is used for data transmission / reception with an external device.
  • the external device is a visual sensor that can measure an obstacle around the service robot, an actuator that operates the service robot, or the like.
  • the non-volatile memory 13 is a memory device capable of stably maintaining the stored contents as compared with the execution memory 11 without receiving power supply.
  • the nonvolatile memory 13 is a ROM (Read Only Memory), a flash memory, a hard disk drive or an optical disk drive, or a combination thereof.
  • the nonvolatile memory 13 stores the OS 100 and the applications 101 to 103.
  • at least a part of the nonvolatile memory 13 may be configured to be removable from the safety control device 1.
  • the memory storing the applications 101 to 103 may be removable.
  • at least a part of the nonvolatile memory 13 may be disposed outside the safety control device 1.
  • the OS 100 is executed by the processor 10 to use task resources including task scheduling, interrupt management, time management, resource management using hardware resources such as the processor 10, the execution memory 11, and the nonvolatile memory 13. Provides inter-task synchronization and inter-task communication mechanism.
  • the OS 100 has a function of protecting hardware resources temporally and spatially.
  • the hardware resources include the processor 10, the execution memory 11, and the I / O port 12.
  • temporal protection is performed by partitioning a temporal resource called the execution time of the processor 10. Specifically, temporal protection is performed by partitioning the execution time of the processor 10 and assigning a task (process or thread) to each partition (referred to as a time partition).
  • the scheduling function (partition scheduler 21) of the OS 100 guarantees the use of resources including the execution time of the processor 10 for tasks assigned to each time partition (hereinafter sometimes referred to as TP).
  • FIG. 2 is a conceptual diagram related to time partitioning.
  • a predetermined cycle time is divided into three TP1, TP2, and TP3 is shown.
  • the first 20 Tick is defined as TP1
  • the middle 30 Tick is defined as TP2
  • the second 50 Tick is defined as TP3.
  • the first application (APL1) to the fourth application (APL4) are assigned to any one of TP1 to TP3.
  • the scheduling function (partition scheduler 21) of the OS 100 selects and determines which of TP1 to TP3 is activated as time elapses. Then, the application assigned to the active TP is executed by the processor 10.
  • partitioning fixed resources including the execution memory 11 and the I / O port 12 and assigning tasks to each partition referred to as a resource partition.
  • the scheduling function (partition scheduler 21) of the OS 100 prohibits a task from accessing other resources beyond a pre-assigned resource partition (hereinafter sometimes referred to as RP).
  • FIG. 3 is a conceptual diagram related to resource partitioning.
  • two RPs RP1 and RP2 are shown.
  • a part of the execution memory 11 and the nonvolatile memory 13 (A area) and a part of the I / O port 12 (port A) are allocated to RP1.
  • another part (B area) of the execution memory 11 and the nonvolatile memory 13 and another part (port B) of the I / O port 12 are allocated to RP2.
  • Access from RP1 to the resource assigned to RP2 is prohibited, and access from RP2 to the resource assigned to RP1 is prohibited.
  • the actuator needs to be accessible from both the normal control application 102 and the safety control application 103. Therefore, the I / O port for controlling the actuator may be shared by the RP to which the normal control application 101 belongs and the RP to which the safety control application 102 belongs.
  • the applications 101 to 103 are executed in a multiprogramming environment provided by the OS 100 and the processor 10.
  • the safety monitoring application 101 executes the processor 10 to monitor the execution status of the normal control application 102, monitor the execution status of the safety control application 103, and monitor input / output data to the I / O port 12.
  • Instruction code to make it Further, the safety monitoring application 101 includes an instruction code for causing the processor 10 to execute a result notification to the partition scheduler 21. That is, the safety monitoring application 101 is a safety related application.
  • the normal control application 102 includes an instruction code for causing the processor 10 to execute a control procedure for causing a control target such as a service robot to perform a normal function / operation. Further, the normal control application 102 includes an instruction code for causing the processor 10 to execute a result notification to the partition scheduler 21. That is, the normal control application 102 is a non-safety related application.
  • the safety control application 103 includes an instruction code for causing the processor 10 to execute a control procedure determined to ensure functional safety in response to a case where some abnormality is detected. Further, the safety control application 103 includes an instruction code for causing the processor 10 to execute a result notification to the partition scheduler 21. That is, the safety control application 103 is a safety-related application.
  • the reset circuit 14 resets the microcontroller 15 based on a signal from the OS 100. A reset mechanism of the microcontroller 15 using the reset circuit 14 will be described later.
  • FIG. 4 is a diagram showing the relationship between the partition scheduler 21 and the tasks 24, 26, and 28 that are activated in the multiprogramming environment provided by the OS 100.
  • the microcontroller 15 includes a processor 10, an execution memory 11, an I / O port 12, a non-volatile memory 13, and the like. 4 illustrates a configuration in which the reset circuit 14 is provided outside the microcontroller 15, but a configuration in which the reset circuit 14 is included in the microcontroller 15 may be employed.
  • the clock signal from an external clock source is supplied to the microcontroller 15, and the processor 10 and the like operate at a predetermined timer cycle based on this clock signal.
  • the predetermined timer cycle is described as 1 Tick.
  • the partition scheduler 21 operates every 1 Tick, and at each TP, the task schedulers 23, 25, 27 and tasks (safety monitoring task 24, normal control task 26, safety The control task 28) operates every 1 Tick.
  • the partition scheduler 21 operates every 1 tick and performs TP switching (partition scheduling).
  • the partition scheduler 21 selects and determines which of TP1 to TP3 is activated during the next 1 Tick. Furthermore, the partition scheduler 21 starts the operation of the task scheduler related to the selected TP.
  • the partition scheduler 21 refers to the scheduling table 22 and performs partition scheduling in accordance with a scheduling pattern that defines TP settings.
  • the scheduling table 22 holds a scheduling pattern that defines the TP switching order and timing.
  • the scheduling table 22 holds at least two different scheduling patterns. One is a scheduling pattern that is applied when abnormality detection by the safety monitoring task 24 is not performed (that is, during normal time). The other is a scheduling pattern applied when an abnormality is detected by the safety monitoring task 24.
  • normal control scheduling pattern A scheduling pattern applied at the time of detecting an abnormality is called a “safe control scheduling pattern”.
  • FIG. 5A shows a specific example of the normal control scheduling pattern.
  • TP2 to which the normal control task 26 belongs is assigned to the first half (T1) of one cycle time.
  • TP1 to which the safety monitoring task 24 belongs is assigned to the second half (T2) of one cycle time.
  • T1 to which the safety monitoring task 24 belongs is assigned to the second half (T2) of one cycle time.
  • FIG. 5B shows a specific example of the safety control scheduling pattern.
  • TP3 to which the safety control task 28 belongs is assigned to the first half (T3) of one cycle time.
  • TP1 to which the safety monitoring task 24 belongs is assigned to the second half (T4) of one cycle time.
  • T3 first half
  • T4 second half
  • the safety control task 28 and the safety monitoring task 24 are repeatedly scheduled.
  • each TP is illustrated as including only one task, but actually includes one or more tasks.
  • the normal control task A and the normal control task B may be included in the normal control TP2.
  • the safety monitoring task 24 is a task generated when the safety monitoring application 101 is activated. In the example of FIG. 4, the safety monitoring task 24 is assigned to TP1 and RP1. The safety monitoring task 24 monitors the execution status of the normal control task 26 that is a non-safety related application, monitors the safety control task 28 that is a safety related application, and monitors input / output data of the I / O port 12. Furthermore, the safety monitoring task 24 notifies the partition scheduler 21 of the task execution status.
  • the normal control task 26 is a task generated when the normal control application 102 is activated. In the example of FIG. 4, the normal control task 26 is assigned to TP2 and RP2. The normal control task 26 performs control for causing a control target such as a service robot to perform a normal function / operation. Further, the normal control task 26 notifies the partition scheduler 21 of the task execution status.
  • the safety control task 28 is a task generated when the safety control application 103 is activated.
  • the safety control task 28 is assigned to TP3 and RP3.
  • the safety control task 28 performs control determined to ensure functional safety in response to any abnormality being detected. Further, the safety control task 28 notifies the partition scheduler 21 of the task execution status.
  • a task can call a system call (service call) of the OS 100 and notify the partition scheduler 21 of the result via the OS 100.
  • the task sets a flag value according to the execution status, and the partition scheduler 21 executes the task according to the flag set value. The situation can also be judged.
  • the partition scheduler 21 operates every 1 tick, and selects and determines which of TP1 to TP3 is activated. Further, the partition scheduler 21 starts the operation of the task scheduler related to the selected TP. Then, task scheduling is performed by the task schedulers 23, 25, and 27 starting operations, and the processor 10 executes the tasks in the TP according to the order scheduled by the task schedulers 23, 25, and 27. Go. As a result, the application assigned to the active TP is executed by the processor 10.
  • FIG. 6 is a flowchart showing a specific example of the processing procedure of the partition scheduler 21.
  • the partition scheduler 21 that operates every 1 tick operates the task scheduler of TPX (S11).
  • the variable X indicates the number of TP, and X is a value other than 1. That is, in S11, either TP2 or TP3 except for TP1 for safety monitoring is operated.
  • FIG. 6 a case where scheduling is executed according to a normal control scheduling pattern (for example, FIG. 5A) or a safety control scheduling pattern (for example, FIG. 5B) will be described as an example. That is, when the next TP following TP2 or TP3 is TP1, and when an abnormality in TP2 is detected in TP1, the next TP selected and determined based on the result from TP1 is TP3 Will be described as an example.
  • the task scheduler of TPX that started the operation in S11 executes the task in TPX according to the priority (S12).
  • the partition scheduler 21 starts TP scheduling (S13). That is, the partition scheduler 21 selects and determines which TP is to be activated during the next 1 Tick according to the scheduling pattern.
  • the partition scheduler 21 If the partition scheduler 21 does not change the TP to be activated next (No in S14), the partition scheduler 21 returns to S11 and continues the operation for the same TPX. Therefore, the processing from S11 to S14 is repeated until the TPX switching timing comes.
  • the partition scheduler 21 When changing the TP to be activated next (Yes in S14), the partition scheduler 21 operates the task scheduler of the time partition to be changed (S15). Here, the task scheduler of TP1 is operated. Then, the task scheduler 23 of TP1 executes the tasks in TP1 according to the priority (S16).
  • the safety monitoring task 24 executed by TP1 monitors the execution status of the normal control task 26 and the input / output data of the I / O port 12, and determines whether these are normal (S17). As a result of the determination, if it is determined that there is an abnormality (No in S18), the safety monitoring task 24 notifies the partition scheduler 21 of the result (S19).
  • the partition scheduler 21 starts scheduling again (S20).
  • the partition scheduler 21 selects and determines which TP to activate during the next 1 Tick according to the scheduling pattern, and if the TP to be activated next is not changed (No in S21), returns to S15. , The operation for TP1 is continued.
  • the partition scheduler 21 changes the TP to be activated next (Yes in S21), the partition scheduler 21 further determines whether or not TPX is normal according to the notification result from TP1 in S19 (S22). . If the result of the determination is abnormal (No in S22), the partition scheduler 21 selects and determines TP3 as the TP to be activated during the next 1 Tick (S23).
  • the partition scheduler 21 selects and determines a TPX other than TP1 and TP3 as a TP to be activated during the next 1 Tick (S24).
  • S15 TP2 is changed to TP1, and remains TP1 from S15 to S21.
  • TPX TP3 is satisfied in S23 (that is, the safety control scheduling pattern starting from TP3 is switched).
  • TP3 safety monitoring
  • TP1 normal control
  • TP3 safety control
  • TP5 safety control partitions
  • the partition scheduler 21 determines the type of abnormal state of the execution status (data input / output) related to TPX, and selects either TP3 or TP5 for safety control according to the abnormal type. Good.
  • either TP2 or TP4 for normal control may be selected.
  • the OS 100 includes the partition scheduler 21 that selects and determines the partition to be activated next in response to a notification from the TP1 for safety monitoring or a notification from each TP. ing.
  • the partition scheduler 21 operates at a predetermined timer period independently of the tasks executed in each TP. Since the partition scheduler 21 that operates independently at a predetermined timer cycle has a partition scheduling function, the following effects can be obtained.
  • the safety monitoring task 24 selects and determines a scheduling pattern in addition to monitoring the execution status of the normal control task 26 and monitoring input / output data of the I / O port 12. Therefore, it is necessary to allocate the execution time required for the selection / determination for TP2 to which the safety monitoring task 24 belongs.
  • the safety monitoring task 24 and the normal control task 26 need to be executed alternately. For this reason, in the conventional technology, the scheduling pattern selection / determination by the safety monitoring task 24 is executed every time as the normal control task 26 is executed. This is necessary for the selection and determination of the scheduling pattern by the safety monitoring task 24.
  • the safety monitoring task 24 itself does not need to execute the selection / determination of the scheduling pattern.
  • the execution time required for the partition scheduler 21 to select and determine the scheduling pattern is short. Therefore, compared with the prior art, the safety monitoring TP1 can be assigned in a shorter time, and the normal control TP2 can be assigned for a longer time.
  • the partition scheduler 21 selects and determines TP3 for safety control in response to a result notification from TP1 (S23) or selects and determines TP2 for normal control.
  • S23 result notification from TP1
  • TP2 selects and determines TP2 for normal control.
  • S24 the present invention is not limited to this.
  • the configuration is such that the execution status is notified to the partition scheduler 21 from each of TP1 to TP3.
  • the TP3 for safety control may be selected and determined according to the result notification from the TP.
  • the partition scheduler 21 Since the partition scheduler 21 that operates independently receives the result notifications from all TPs, the partition scheduler 21 can grasp the situation regarding all TPs in an integrated manner. Therefore, for example, when the partition scheduler 21 decides and selects the next partition in response to the result notification from the safety monitoring TP1, the partition scheduler 21 considers the situation of each TP. The next partition can be determined and selected only from the TP in the normal state. Therefore, compared to the prior art, there is an effect that more accurate partition scheduling can be realized.
  • FIGS. 7 and 8 are flowcharts showing a specific example of the reset processing procedure of the microcontroller 15 using the reset circuit 14.
  • the partition scheduler 21 that operates every 1 tick has a reset function of the microcontroller 15.
  • the partition scheduler 21 detects an abnormality in the OS 100, it performs an abnormality treatment in conjunction with the reset circuit 14.
  • the reset circuit 14 resets the microcontroller 15 based on a signal from the partition scheduler 21.
  • TPX is a TP other than TP1 and TP3.
  • the safety monitoring task 24 belonging to TP1 determines whether the abnormality in TPX is an abnormality that can be handled by the safety control task 28 belonging to TP3 (S36). . If it is not an abnormality that can be dealt with by TP3 (No in S36), the safety monitoring task 24 belonging to TP1 notifies the partition scheduler 21 that the abnormality has an emergency stop (S37). The partition scheduler 21 that has received the notification from the safety monitoring task 24 belonging to TP1 outputs a reset instruction signal to the reset circuit 14, and the reset circuit 14 that has received the reset instruction signal resets the microcontroller 15 (S38).
  • the safety monitoring task 24 belonging to TP1 notifies the partition scheduler 21 that TPX is abnormal (S39). Receiving the notification from TP1, the partition scheduler 21 switches from TPX to TP3 (S40).
  • TPX is a TP other than TP1 and TP3.
  • the partition scheduler 21 stops the transmission signal to the reset circuit 14, and in S63, the partition scheduler 21 sends a signal to the reset circuit 14. Is different in sending. Further, the difference in S61 of FIG. 8 is that the reset circuit 14 resets the microcontroller 15 in response to the transmission signal from the partition scheduler 21 being interrupted.
  • the other processing from S58 to S64 shown in FIG. 8 is basically the same as the processing from S36 to S40 shown in FIG.
  • the partition scheduler 21 in addition to the case where the partition scheduler 21 intentionally instructs the reset circuit 14 to reset, the partition scheduler 21 itself does not operate normally for some reason, or the partition scheduler 21 Even when a failure occurs in the signal line that transmits the transmission signal to the reset circuit 14, the microcontroller 15 can be reliably reset. At the same time, it can be assured that TP switching is normally executed every 1 tick.
  • the partition scheduler 21 outputs the reset instruction signal to the reset circuit 14 or stops the transmission signal to the reset circuit 14 in response to the result notification from the TP1.
  • the reset instruction signal may be output to the reset circuit 14 or the transmission signal to the reset circuit 14 may be stopped in response to the result notification from any of TP1 to TP3.
  • FIG. 9 is a block diagram illustrating a configuration example of the safety control device 2 according to the second embodiment.
  • description of the same contents as those of the safety control device 1 according to the first embodiment will be omitted.
  • the processor 10 detects an interrupt from a control target and a timer interrupt.
  • the processor 10 detects an interrupt from the control target by inputting an interrupt signal from the control target.
  • the processor 10 executes an interrupt handler 31 described later.
  • the microcontroller 15 of the safety control device 2 has a timer (not shown).
  • the timer outputs an interrupt signal to the processor 10 at a predetermined cycle based on the clock signal.
  • the processor 10 detects a timer interrupt by inputting an interrupt signal from the timer.
  • the processor 10 executes the partition scheduler 21 when detecting an interrupt from the control target.
  • Nonvolatile memory 13 stores interrupt processing application 104.
  • the interrupt processing application 104 includes an instruction code for causing the processor 10 to execute interrupt processing in response to an interrupt from a control target. Further, the interrupt processing application 104 may include an instruction code for causing the processor 10 to execute a result notification to the partition scheduler 21.
  • the interrupt handling application 104 may be a safety related application or a non-safety related application.
  • a plurality of interrupt processing applications 104 are prepared so as to correspond to the respective interrupt factors. That is, the interrupt processing application 104 includes an instruction code for interrupt processing to be executed in response to the interrupt of the corresponding interrupt factor. Note that one interrupt processing application 104 may correspond to two or more interrupt factors.
  • FIG. 10 is a diagram showing the relationship between the partition scheduler 21, tasks 24, 26, 28, and 30 and the interrupt handler 31 that are activated in the multiprogramming environment provided by the OS 100.
  • description of the same contents as those of the safety control device 1 according to the first embodiment will be omitted.
  • the partition scheduler 21 performs partition scheduling by operating every 1 tick in response to a timer interrupt generated every 1 tick. That is, the process of performing partition scheduling in the partition scheduler 21 is, for example, the process of the partition scheduler 21 registered as an interrupt handler for timer interruption in the initialization process immediately after the startup of the partition scheduler 21.
  • the partition scheduler 21 selects and determines which of TP1 to TP3 and the interrupt dedicated time partition TPI is activated during the next 1 Tick.
  • the interrupt processing task 30 belongs to the TPI.
  • the task scheduler 29 schedules the interrupt processing task 30 belonging to the TPI, similarly to the task schedulers 23, 25, and 27.
  • the interrupt processing task 30 is a task generated when the interrupt processing application 104 is activated. Therefore, the interrupt processing task 30 executes interrupt processing according to the interrupt from the control target. Further, a plurality of interrupt processing tasks 30 are generated so as to correspond to the respective interrupt factors. When an interrupt from a control target occurs, the interrupt processing task 30 generated by starting the interrupt processing application 104 corresponding to the interrupt factor of the interrupt is executed. The interrupt processing task 30 may perform control for causing the control target to perform a normal function / operation, or may perform control defined to ensure functional safety.
  • the interrupt handler 31 is executed in response to an interrupt from the control target.
  • the interrupt handler 31 reserves execution of the interrupt processing task 30 that executes interrupt processing corresponding to the interrupt so that it is executed by TPI.
  • the interrupt handler 31 reserves execution of the interrupt processing task 30 corresponding to the interrupt factor of the generated interrupt.
  • the processing in the interrupt handler 31 executed in response to the interrupt is only reserved for execution of the interrupt processing task 30, and the interrupt processing task 30 reserved for execution is executed by TPI. Yes.
  • the processing time in the interrupt handler 31 is an execution time that is incomparably shorter than the case of executing the interrupt processing. For this reason, the processing delay in the active TP does not occur at the time when the interrupt occurs.
  • FIG. 11 is a task state transition diagram.
  • the tasks 24, 26, 28, and 30 take one of an execution state, an executable state, a wait state, a double wait state, a forced wait state, and a dormant state.
  • the execution state is a state in which the execution time of the processor 10 is assigned to the task by the task schedulers 23, 25, 27, and 29.
  • a task is in an execution state, the task is being executed by the processor 10.
  • the task in the execution state transitions to an executable state when, for example, the execution time of the processor 10 allocated by the task schedulers 23, 25, 27, and 29 is used up.
  • the task in the execution state transitions to a waiting state when sleeping, for example.
  • the executable state is a state in which the execution time of the processor 10 can be assigned to the task, but the execution time of the processor 10 is not assigned to the task.
  • the executable state is, for example, a state where a task is awakened.
  • the task in the executable state transitions to the execution state when the execution time of the processor 10 is assigned by the task scheduler 23, 25, 27, 29, for example.
  • the waiting state is a state in which the execution time of the processor 10 cannot be assigned to the task and the execution time of the processor 10 is not assigned.
  • the waiting state is, for example, a state where the task is sleeping.
  • a task in a waiting state transitions to an executable state when it wakes up from a sleeping state, for example, due to expiration of a sleep time or reception of inter-task communication from another task.
  • the forced waiting state is a state where the execution time of the processor 10 cannot be assigned to the task and the execution time of the processor 10 is not assigned.
  • the forced waiting state is a state in which execution of a task in an executable state is temporarily prohibited by, for example, the partition scheduler 21, the task scheduler 23, 25, 27, 29, or another task.
  • the task in the forced waiting state transitions to an executable state when the forced waiting state is released by the partition scheduler 21, task scheduler 23, 25, 27, 29, or another task.
  • the double waiting state is a state in which the execution time of the processor 10 cannot be assigned to the task and the execution time of the processor 10 is not assigned.
  • the double waiting state is a state in which the waiting task is temporarily prohibited from being executed by, for example, the partition scheduler 21, the task scheduler 23, 25, 27, 29, or another task.
  • the task in the forced waiting state transitions to the waiting state when the forced waiting state is canceled by the partition scheduler 21, the task scheduler 23, 25, 27, 29, or another task.
  • a task in a forced waiting state transitions to a forced waiting state when it wakes up.
  • the hibernation state is a state in which the execution time of the processor 10 cannot be assigned to the task and the execution time of the processor 10 is not assigned.
  • the dormant state is, for example, a state where the task has not been activated or a state where the task has ended.
  • FIG. 12 is a diagram illustrating a specific example of a scheduling pattern according to the second embodiment. That is, in the second embodiment, a case where the scheduling pattern illustrated in FIG. 12 is stored in the scheduling table 22 will be described.
  • FIG. 13 is a conceptual diagram of a processing procedure when an interrupt occurs according to the second embodiment.
  • FIG. 14 is a flowchart illustrating a specific example of a processing procedure when an interrupt occurs according to the second embodiment.
  • the processor 10 executes the partition scheduler 21. That is, the processor 10 executes the partition scheduler 21 when a timer interrupt occurs.
  • the partition scheduler 21 starts partition scheduling of the time partition according to the scheduling pattern shown in FIG. 12 (S82).
  • the processor 10 executes the interrupt handler 31. That is, the processor 10 executes the interrupt handler 31 when an interrupt from the control target occurs.
  • the interrupt handler 31 determines whether or not the interrupt processing task 30 corresponding to the interrupt factor of the generated interrupt is registered in the interrupt handler table IST_table (S83).
  • the interrupt handler table IST_table is a table in which interrupt factors are associated with the interrupt processing task 30. Specifically, the interrupt handler table IST_table associates an interrupt factor with a task ID of the interrupt processing task 30 to be executed in response to the interrupt factor interrupt.
  • the interrupt handler table IST_table is stored in the execution memory 11, for example.
  • the interrupt handler table IST_table may be any information as long as it is information that associates the interrupt factor with the interrupt processing task 30. For example, as illustrated in FIG. 13, information in which task IDs of the interrupt processing tasks 30 corresponding to the plurality of interrupt factors are stored in areas corresponding to the plurality of interrupt factors may be used.
  • the interrupt handler 31 identifies the interrupt factor by referring to the value of the interrupt factor register.
  • the interrupt factor register is a register that stores a value indicating the interrupt factor of the interrupt that has occurred. For example, the value of the interrupt factor register is set by the control target when the control target generates an interrupt.
  • An interrupt factor register (not shown) is provided in the microcontroller 15.
  • the interrupt handler 31 wakes up the task. Specifically, the interrupt handler 31 acquires the task ID stored in the area corresponding to the interrupt factor of the generated interrupt from the interrupt handler table. The interrupt handler wakes up the task, for example, by inter-task communication specifying the acquired task ID. As a result, only the interrupt processing task 30 corresponding to the interrupt factor that caused the interrupt becomes executable, and the other interrupt processing tasks 30 remain in the waiting state. The interrupt handler 31 masks the interrupt factor that caused the interrupt (S85). Then, the interrupt handler 31 ends the process.
  • the interrupt processing task 30 that has been set to the executable state in this manner is assigned to the execution time of the processor 10 by the task scheduler 29 when the TPI becomes active. That is, the interrupt handler 31 reserves execution so that the interrupt execution task 30 is executed by TPI by making the interrupt processing task 30 executable.
  • the partition scheduler 21 When the TPI becomes active after a lapse of time, the partition scheduler 21 operates the task scheduler 29.
  • the task scheduler 29 executes the interrupt processing task 30 woken up by the interrupt handler 31 (S86).
  • the processor 10 executes the interrupt handler 31 to execute the interrupt processing task 30 when there is an interrupt from the control target. I only make reservations. Then, the execution time of the processor 10 is assigned to the interrupt processing task 30 reserved for execution in the TPI and executed. According to this, since there is no delay in task processing in the active TP at the time of occurrence of the interrupt, time resources necessary for processing in the TP are guaranteed. Accordingly, it is possible to prevent the subsequent failure of processing in the TP.
  • FIG. 15 is a flowchart of a specific example of a scheduling process procedure according to the second embodiment of the present invention.
  • TPX in FIG. 15 represents any one of TP1 to TP3 and TPI.
  • TPX is any one of TP1 to TP3.
  • the partition scheduler 21 determines whether or not the time resource remains depending on whether or not there is a remainder from the period of the TPX, excluding the period after the TPX is activated. For example, information indicating the number of ticks in each of TP1 to TP3 and TPI is stored in advance in the execution memory 11. The partition scheduler 21 counts the number of ticks every time the TPX is activated and operates every tick. The counted number of ticks indicates a period of time that has elapsed since the activation of TPX. Then, the partition scheduler 21 determines whether or not time resources remain depending on whether or not the number of ticks indicated by the information stored in the execution memory 11 is larger than the counted number of ticks.
  • the partition scheduler 21 switches to the next TP of TPX (S94).
  • the partition scheduler 21 stops the operation of the task scheduler belonging to TPX and starts the operation of the task scheduler belonging to the TP next to TPX.
  • the task scheduler that has started the operation executes the tasks in the TP to which the task scheduler belongs.
  • the partition scheduler 21 waits for the next Tick interrupt (S91).
  • the partition scheduler 21 determines whether or not the TPX process has ended (S95). That is, the partition scheduler 21 determines whether or not the execution of tasks belonging to TPX has been completed. Whether or not the task has been executed is determined, for example, based on whether or not the task belonging to TPX is in an executable state or an execution state.
  • the partition scheduler 21 does not execute the TP switching, and continues the TPX process by the task scheduler belonging to TPX (S96). That is, the task scheduler belonging to TPX executes the tasks in the executable state belonging to TPX.
  • the partition scheduler 21 determines whether or not there is an interrupt processing task 30 for which an interrupt acceptance process (S85) has been completed (S97). That is, the partition scheduler 21 determines whether or not there is an interrupt processing task 30 that has been woken up and is in an executable state.
  • the partition scheduler 21 waits for the next Tick interrupt (S91).
  • the partition scheduler 21 executes the interrupt processing (S98). Specifically, the partition scheduler 21 switches from TPX to TPI, and activates TPI for the remaining period of TPX. The partition scheduler 21 stops the operation of the task scheduler belonging to TPX and starts the operation of the task scheduler 29 belonging to TPI. The task scheduler 29 executes the interrupt processing task 30 in the executable state among the interrupt processing tasks 30 belonging to the TPI. Note that the period during which the TPI is active may be of any length as long as it is within the remaining period of TPX.
  • the execution of the task belonging to the TPX before the TPI ends before the period of the TPX before the TPI ends. If there is, the execution time of the processor 10 in the TPX before the TPI is assigned to one of the interrupt processing tasks 30 reserved for execution instead of the execution time of the processor 10 in the TPI. According to this, the interrupt processing task 30 can be executed in the TPX before the TPI without waiting for the TPI. In addition, since the interrupt processing task 30 is executed using the remaining time resource of the TPX, the time resource necessary for processing in the TPX is also guaranteed. Therefore, failure of processing can be prevented while suppressing execution delay of interrupt processing.
  • the priority of task execution is set in advance for each of the interrupt processing tasks 30, and the priority is set low for the interrupt processing task 30 that has no problem even if the processing is waited until TPI.
  • the priority may be set higher than that.
  • the task scheduler 29 preferentially executes from the interrupt processing task 30 having a higher priority.
  • FIG. 16 is a flowchart showing a specific example of a scheduling process procedure according to the second embodiment of the present invention. Since steps S101 to S105 are the same as steps S91 to S95, the description thereof is omitted. Note that TPX in FIG. 16 represents any one of TP1 to TP3 and TPI.
  • the partition scheduler 21 waits until there is no TPX time resource (S106). That is, the partition scheduler 21 repeats the processes of steps S101, S102, S103, and S105 until there is no time resource in TPX. When the time resource of TPX is exhausted (No in S103), the partition scheduler 21 switches to the next TP of TPX.
  • the partition scheduler 21 determines whether or not the time resource for executing the current TPX process is insufficient (S107). For example, as an example where time resources are insufficient, there is a case where many interrupt processing tasks 30 are woken up due to many interrupts when TPX is TPI. For example, when a plurality of interrupts are generated and the respective interrupt factors are different, a plurality of interrupt processing tasks 30 are woken up. In this case, the execution of all the interrupt processing tasks 30 may not be completed with only the TPI time resource.
  • the partition scheduler 21 determines whether or not the time resource is insufficient depending on whether or not the remaining period in the TPX is less than a period necessary for executing an unexecuted task belonging to the TPX. For example, information indicating the number of ticks in each of TP1 to TP3 and TPI is stored in advance in the execution memory 11. Further, information indicating how many ticks are necessary for executing each task is stored in advance in the execution memory 11. The partition scheduler 21 calculates the number of ticks corresponding to the remaining period in the TPX from the number of ticks counted since the TPX became active and the number of ticks of the TPX indicated by the information stored in the execution memory 11. Then, the partition scheduler 21 has insufficient time resources depending on whether or not the calculated remaining number of ticks is equal to or greater than the number of ticks necessary for executing the unexecuted task indicated by the information stored in the execution memory 11. It is determined whether or not.
  • the partition scheduler 21 When the time resource is sufficient (No in S107), the partition scheduler 21 does not execute the TP switching, and continues the TPX process by the task scheduler belonging to TPX (S108). That is, the task scheduler belonging to TPX executes the tasks in the executable state belonging to TPX.
  • the partition scheduler 21 determines whether or not there is time from the start of the next TP to the WCWT (Worst Case Wakeup Time) of the next TP (S109).
  • WCWT will be described with reference to FIG.
  • WCWT is a time during which processing can be surely terminated within the TP period if the processing is started before the Tick included in the TP period. That is, the WCWT is a point in the TP period in which execution of a task belonging to the TP can be completed within the TP period if the execution of the task is started by then.
  • the partition scheduler 21 determines whether or not there is time until the WCWT based on whether or not there is a surplus period obtained by excluding a period necessary for executing a task belonging to the TP from the period of the TP next to the TPX. . Based on the information stored in advance in the execution memory 11 described above, whether or not the number of ticks for the period of the next TP of TPX is larger than the total number of ticks necessary for the execution of tasks belonging to the TP, It is determined whether or not there is a time until the WCWT of the next TP of TPX.
  • the partition scheduler 21 continues the process as it is (S110). That is, the partition scheduler 21 continues the operation of the task scheduler belonging to TPX until there is no remaining time resource of TPX. Further, the partition scheduler 21 may be switched to TP3 as necessary, and may instruct the reset circuit 14 to reset the microcontroller 15. For example, when the abnormality is caused by the end of the TPX process, it is performed as such. When the abnormality caused by the end of the TPX process is an abnormality that can be dealt with by the safety control task 28, the partition scheduler 21 switches from TPX to TP3. If the abnormality caused by the TPX process not being completed is an abnormality requiring an emergency stop, the partition scheduler 21 resets the microcontroller 15.
  • the partition scheduler 21 extends the TPX period by reducing the time resource of the next TP (S111).
  • the period extended here may be any length as long as it is within the range from the start of the next TP period to the WCWT of the next TP.
  • the TPI period can be extended within the range of the surplus period. According to this, even when many interrupts occur and all the interrupt processing tasks 30 cannot be executed with the time resource of the TPI, by using the time resource of the TP next to the TPI, The execution of the interrupt processing task 30 can be continued without waiting for the next TPI. Therefore, it is possible to suppress execution delay of interrupt processing. Further, since the surplus time resource of the TP next to the TPI is used, it is possible to prevent the failure of the process caused by the delay of the interrupt process.
  • Embodiments 1 to 3 may be implemented in combination.
  • a plurality of safety monitoring tasks 24, normal control tasks 26, and safety control tasks 28 may belong to each of TP1 to TP3.
  • a task for executing an arbitrary process other than the safety monitoring task 24, the normal control task 26, and the safety control task 28 may belong to each of TP1 to TP3.
  • the case where the OS has TP1 to TP3 and TPI is exemplified, but the type and number of TPs are not limited to this.
  • the scheduling pattern is not limited to that exemplified in the present embodiment.
  • a period transfer PT may be provided next to the TP that may have insufficient time resources such as TPI.
  • Safety control device 10 Processor 11
  • Execution memory 12 I / O port 13
  • Non-volatile memory 14 Reset circuit 15
  • Microcontroller 21 Partition scheduler 22 Scheduling tables 23, 25, 27, 29 Task scheduler 24
  • Safety monitoring task 26 Normal control task 28
  • Safety control task 30 Interrupt processing task 31
  • Interrupt handler 100 Operating system 101
  • Safety control application 104 Interrupt processing application

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Debugging And Monitoring (AREA)
  • Safety Devices In Control Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

 タイム・パーティションニングに関し、割り込み処理を実行する場合でも、割り込み処理の実行遅延を抑制しつつ処理の破綻を防止する。安全制御装置は、プロセッサは、安全関連タスク、非安全関連タスク、及び、割り込み処理タスクに対するプロセッサの実行時間の割り当てを制御するシステムプログラムと、割り込みハンドラを備える。プロセッサは、割り込みハンドラで、割り込み発生時に割り込み処理タスクを実行予約タスクとして実行予約し、システムプログラムで、安全関連タスクが属する安全関連TP、非安全関連タスクが属する非安全関連TP、及び、実行予約タスクが属する予約実行TPのスケジューリング情報に従ってタスクをスケジューリングし、予約実行TPより前のTPの期間の終了前に前のTPのタスクが実行終了したとき、実行予約タスクに前のTPの実行時間を割り当てる。

Description

安全制御装置および安全制御方法
 本発明は、機能安全の確保のためにサービスロボットおよび輸送機器等に搭載される安全制御装置に関し、特に、コンピュータシステムを用いた安全制御装置に関する。
 サービスロボットは、外界センサや自己診断装置によって安全状態を常時監視し、何らかの危険を検知した場合に適切な安全制御ロジックを実行することで、機能安全を確保する必要がある。
 上述したサービスロボットのほか、運輸機器等の電気的な原理で動作するシステムを対象とした機能安全に関する国際標準としてIEC 61508が制定されている。IEC 61508では、機能安全の確保のために設けられるシステムのことを安全関連系と呼んでいる。IEC 61508は、マイクロプロセッサ及びPLC(Programmable Logic Controller)等のハードウェアとコンピュータプログラム(ソフトウェア)によって安全関連系を構築するための様々な技法を定めている。IEC 61508で定められている技法を用いることで、コンピュータシステムを用いて安全関連系を構築することが可能となる。
 一方で、近年、マイクロプロセッサ等のプログラマブル電子機器の処理能力が向上している。このため、マルチタスクOS(Operating System)を利用し、1つのコンピュータシステム上で様々なアプリケーションプログラムを並列実行することで、サービスロボット及び自動車等の機器に搭載されている複数用途のコンピュータシステムを統合することができる。
 例えば特許文献1に、機能安全の確保に関するアプリケーションプログラム(以下、安全関連アプリケーションと呼ぶ)を、その他のアプリケーションプログラム(以下、非安全関連アプリケーションと呼ぶ)と共に1つのコンピュータシステム上で動作させる技術が開示されている。
 IEC 61508で定められている技法を、安全関連アプリケーションおよび非安全関連アプリケーションを含むソフトウェア全体に適用すると、非安全関連アプリケーションにまで適用する必要性が生じる。このため、ソフトウェア開発コストが増大するという問題がある。
 そこで、特許文献1に開示される技術では、システムプログラムのタイム・パーティションニングによって、安全関連アプリケーション(安全監視プログラム及び安全制御プログラム)を非安全関連アプリケーション(通常制御プログラム)から独立させている。このため、通常制御プログラムを安全関連系から除外することができ、コンピュータシステムを用いて構成される安全関連系の低コスト化に寄与することができる。
特開2010-271759号公報
 しかしながら、特許文献1に開示されているような、タイム・パーティションニングを採用したシステムプログラムに対して割り込み処理を適用した場合、処理が破綻してしまうという課題がある。以下、図18を参照して、その課題について説明する。図では、タイムパーティションを、それぞれ「パーティションA」、「パーティションB」及び「パーティションC」として示す。また、図18の上図では、パーティションA、パーティションB、パーティションCの順に、タイムパーティションが繰り返して切り替わる場合について例示している。
 ここで、図18の上図に例示するようにタイムパーティションを切り替えるケースにおいて、パーティションBにおいて割り込みが発生する場合について考える。図18の中央図は、図18の上図に例示するケースにおいて、割り込みに応じて、即時、割り込み処理を実行する場合について例示している。この場合、図18の中央図に示すように、パーティションBにおいて、割り込み処理を実行する期間が生じる。この割り込み処理は、パーティションBのタイムリソースを消費して実行されることになる。そのため、パーティションBにおける処理の実行に必要なタイムリソースは保証されず、パーティションBにおける処理が最後まで実行することができずに不完全なまま終わってしまう可能性がある。このときに、パーティションC以降の処理において、パーティションBにおける処理の完了を前提とした処理が実行されている場合、パーティションC以降の処理を正常に実行することができなくなってしまうという問題が発生してしまう。
 これに対して、図18の下図は、図18の上図に例示するケースにおいて、割り込み処理が実行されたときに、パーティションBにおける処理の完了が保証されるようにパーティションBの期間を延長した場合について例示している。この場合、パーティションBにおける処理の実行に必要なタイムリソースは保証されるが、パーティションC以降の処理の実行タイミングが遅延してしまう。そのため、パーティションC以降の処理において、定期的に実行する必要がある処理がある場合、その処理を定期的に実行できなくなってしまうという問題がある。
 例えば、定期的に実行する必要がある処理が、制御対象のアクチュエータに対する司令値を更新する処理である場合、所望のタイミングで司令値を更新できなくなってしまう。その結果、アクチュエータの制御が破綻してしまうといった問題が生じてしまう。また、例えば、定期的に実行する必要がある処理が、システムのハングアップを監視するためにシステムから所定の時間の間アクセスがないときにシステムをリセットするリセット回路に対してアクセスをする処理である場合、所望のタイミングでリセット回路にアクセスすることができなくなってしまう。その結果、システムに問題がなくても、リセット回路がシステムをリセットしてしまうといった問題が生じてしまう。
 このように、タイム・パーティションニングを採用したシステムプログラムに対して割り込み処理を適用すると、処理が破綻してしまうという問題がある。一方で、一般的に、割り込み処理は、割り込みの発生に応じて、できるだけ早く実行することが望まれる処理が実装されているという側面もある。
 本発明は、上述した知見に基づいてなされたものであって、タイム・パーティションニングにおいて、割り込み処理を実行するようにした場合であっても、割り込み処理の実行遅延を抑制しつつ、処理の破綻を防止することができる安全制御装置及び安全制御方法を提供することを目的とする。
 本発明の第1の態様にかかる安全制御装置は、プロセッサと、制御対象の機能安全の確保に関する処理を実行する安全関連タスク、その他の前記制御対象の制御に関する処理を実行する非安全関連タスク、及び、前記制御対象からの割り込みに応じた処理を実行する割り込み処理タスクに対する前記プロセッサの実行時間の割り当てを制御するシステムプログラムと、前記制御対象からの割り込みに応じて実行される割り込みハンドラと、を備え、前記プロセッサは、前記システムプログラムを実行することによって、前記安全関連タスクに前記実行時間が割り当てられる安全関連タイムパーティション、前記非安全関連タスクに前記実行時間が割り当てられる非安全関連タイムパーティション、及び、実行予約された実行予約タスクに前記実行時間が割り当てられる予約実行タイムパーティションのスケジューリング内容を示すスケジューリング情報に従って、前記タスクをスケジューリングし、前記プロセッサは、前記制御対象から割り込みがあったときに、前記割り込みハンドラを実行することによって、当該割り込みに応じた処理を実行する割り込み処理タスクを、前記実行予約タスクとして実行予約し、前記プロセッサは、前記スケジューリングにおいて、前記予約実行タイムパーティションよりも前のタイムパーティションの期間が終了する前に、当該前のタイムパーティションに前記実行時間が割り当てられるタスクの実行が終了している場合、前記実行予約タスクのいずれかに、前記予約実行パーティションにおける前記実行時間に代えて当該前のタイムパーティションにおける前記実行時間を割り当てるものである。
 本発明の第2の態様にかかる安全制御方法は、制御対象から割り込みがあったときに、当該割り込みに応じた処理を実行する割り込み処理タスクを、実行予約タスクとして実行予約するステップと、前記制御対象の機能安全の確保に関する処理を実行する安全関連タスクにプロセッサの実行時間が割り当てられる安全関連タイムパーティション、その他の前記制御対象の制御に関する処理を実行する非安全関連タスクに前記実行時間が割り当てられる非安全関連タイムパーティション、及び、前記実行予約された実行予約タスクに前記実行時間が割り当てられる予約実行タイムパーティションのスケジューリング内容を示すスケジューリング情報に従って、前記タスクをスケジューリングするステップと、を備え、前記スケジューリングするステップでは、前記予約実行タイムパーティションよりも前のタイムパーティションの期間が終了する前に、当該前のタイムパーティションに前記実行時間が割り当てられるタスクの実行が終了している場合、前記実行予約タスクのいずれかに、前記予約実行パーティションにおける前記実行時間に代えて当該前のタイムパーティションにおける前記実行時間を割り当てるものである。
 上述した本発明の各態様によれば、タイム・パーティションニングにおいて、割り込み処理を実行するようにした場合であっても、割り込み処理の実行遅延を抑制しつつ、処理の破綻を防止することができる安全制御装置及び安全制御方法を提供することができる。
発明の実施の形態1にかかる安全制御装置の構成例を示すブロック図である。 発明の実施の形態1におけるタイム・パーティショニングの概念を説明するための図である。 発明の実施の形態1におけるリソース・パーティショニングの概念を説明するための概念図である。 図1に示したOSによって提供される実行環境で起動される、パーティションスケジューラとタスクとの関係を示す図である。 スケジューリングパターンの具体例を示す図である。 スケジューリングパターンの具体例を示す図である。 パーティションスケジューラの処理手順の具体例を示すフローチャートである。 マイクロコントローラのリセット処理手順の具体例を示すフローチャートである。 マイクロコントローラのリセット処理手順の具体例を示すフローチャートである。 発明の実施の形態2にかかる安全制御装置の構成例を示すブロック図である。 図9に示したOSによって提供される実行環境で起動される、パーティションスケジューラとタスクと割り込みハンドラとの関係を示す図である。 タスクの状態遷移図である。 発明の実施の形態2にかかるスケジューリングパターンの具体例を示す図である。 発明の実施の形態2にかかる割り込み発生時の処理手順の概念図である。 割り込み発生時の処理手順の具体例を示すフローチャートである。 発明の実施の形態2にかかるスケジューリング処理手順の具体例を示すフローチャートである。 発明の実施の形態3にかかるスケジューリング処理手順の具体例を示すフローチャートである。 WCWTを説明するための図である。 課題を説明するための図である。
 以下では、本発明を適用した具体的な実施の形態について、図面を参照しながら詳細に説明する。各図面において、同一要素には同一の符号が付されており、説明の明確化のため、必要に応じて重複説明は省略される。
<発明の実施の形態1>
 本実施の形態にかかる安全制御装置1は、サービスロボットや運輸機器等に搭載されて機能安全確保のための安全制御を実行する。安全制御装置1は、安全関連アプリケーションと非安全関連アプリケーションを同一のコンピュータシステムで実行するよう構成される。図1は、本実施の形態にかかる安全制御装置1の構成例を示すブロック図である。
 プロセッサ10は、プログラム(命令ストリーム)の取得、命令のデコード、命令のデコード結果に応じた演算処理を行う。なお、図1では、1つのプロセッサ10のみを示しているが、安全制御装置1は、複数のプロセッサ10を有するマルチプロセッサ構成であってもよい。また、プロセッサ10は、マルチコアプロセッサでもよい。プロセッサ10は、システムプログラムとしてのオペレーティングシステム(OS)100を実行することによりマルチプログラミング環境を提供する。マルチプログラミング環境とは、複数のプログラムを定期的に切り替えて実行したり、あるイベントの発生に応じて実行するプログラムを切り替えたりすることによって、複数のプログラムがあたかも並列実行されているような環境を意味する。
 マルチプログラミングは、マルチプロセス、マルチスレッド、マルチタスク等と呼ばれる場合もある。プロセス、スレッド及びタスクは、マルチプログラミング環境で並列実行されるプログラム単位を意味する。本実施の形態のプロセッサ10が具備するマルチプログラミング環境は、マルチプロセス環境でもよいし、マルチスレッド環境でもよい。
 実行用メモリ11は、プロセッサ10によるプログラム実行のために使用されるメモリである。実行用メモリ11には、不揮発性メモリ13からロードされたプログラム(OS100及びアプリケーション101~103等)、プロセッサ10の入出力データ等が記憶される。なお、プロセッサ10は、プログラムを不揮発性メモリ13から実行用メモリ11にロードすることなく、これらのプログラムを不揮発性メモリ13から直接実行してもよい。
 具体的には、実行用メモリ11は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)等のランダムアクセス可能な揮発性メモリとすればよい。図1の実行用メモリ11は、論理的な構成単位を示している。すなわち、実行用メモリ11は、例えば、複数のSRAMデバイスの組み合わせ、複数のDRAMデバイスの組み合わせ、又はSRAMデバイスとDRAMデバイスの組み合わせでもよい。
 I/Oポート12は、外部デバイスとの間のデータ送受信に使用される。例えば、安全制御装置1がサービスロボットに搭載される場合であれば、外部デバイスは、サービスロボット周囲の障害物を計測可能な視覚センサ、サービスロボットを動作させるアクチュエータ等である。
 不揮発性メモリ13は、電力の供給を受けることなく、実行用メモリ11に比べて安定的に記憶内容を維持することが可能なメモリデバイスである。例えば、不揮発性メモリ13は、ROM(Read Only Memory)、フラッシュメモリ、ハードディスクドライブ若しくは光ディスクドライブ、又はこれらの組み合わせである。不揮発性メモリ13は、OS100及びアプリケーション101~103を格納する。なお、不揮発性メモリ13の少なくとも一部は安全制御装置1から取り外し可能に構成されてもよい。例えば、アプリケーション101~103が格納されたメモリを取り外し可能としてもよい。また、不揮発性メモリ13の少なくとも一部は、安全制御装置1の外部に配置されてもよい。
 OS100は、プロセッサ10によって実行されることにより、プロセッサ10及び実行用メモリ11及び不揮発性メモリ13等のハードウェア資源を利用して、タスクスケジューリングを含むタスク管理、割り込み管理、時間管理、資源管理、タスク間同期およびタスク間通信機構の提供等を行う。
 さらに、機能安全の確保に関連する安全監視アプリケーション101及び安全制御アプリケーション103の通常制御アプリケーション102からの独立性を高めるため、OS100は、ハードウェア資源を、時間的および空間的に保護する機能を有する。ここで、ハードウェア資源とは、プロセッサ10、実行用メモリ11、I/Oポート12を含む。
 このうち、時間的な保護は、プロセッサ10の実行時間という時間的な資源をパーティショニングすることにより行う。具体的に述べると、時間的な保護は、プロセッサ10の実行時間をパーティショニングし、各パーティション(タイムパーティションと呼ぶ)にタスク(プロセス又はスレッド)を割り当てることにより行う。OS100のスケジューリング機能(パーティションスケジューラ21)は、各タイムパーティション(以下、TPと略称する場合がある。)に割り当てられたタスクに対して、プロセッサ10の実行時間を含む資源の利用を保証する。
 図2は、タイム・パーティショニングに関する概念図である。図2の例では、予め定められた1サイクル時間を3つのTP1、TP2及びTP3に分割する例を示している。例えば、1サイクル時間を100Tickとした場合、このうち前半の20TickがTP1、中間の30TickがTP2、後半の50TickがTP3と規定される。
 また、図2の例では、第1アプリケーション(APL1)~第4アプリケーション(APL4)が、TP1~TP3のいずれかに割り当てられている。OS100のスケジューリング機能(パーティションスケジューラ21)は、時間の経過に応じて、TP1~TP3のいずれをアクティブにするかを選択・決定する。そして、アクティブなTPに割り当てられているアプリケーションが、プロセッサ10で実行される。
 一方、空間的な保護は、実行用メモリ11及びI/Oポート12を含む固定的な資源をパーティショニングし、各パーティション(リソースパーティションと呼ぶ)にタスクを割り当てることにより行う。OS100のスケジューリング機能(パーティションスケジューラ21)は、予め割り当てられたリソースパーティション(以下、RPと略称する場合がある。)を超えてタスクが他のリソースにアクセスすることを禁止する。
 図3は、リソース・パーティショニングに関する概念図である。図3の例では、2つのRP(RP1及びRP2)を示している。RP1には、実行用メモリ11及び不揮発性メモリ13の一部(A領域)と、I/Oポート12の一部(ポートA)が割り当てられている。また、RP2には、実行用メモリ11及び不揮発性メモリ13の他の一部(B領域)と、I/Oポート12の他の一部(ポートB)が割り当てられている。RP1からはRP2に割り当てられたリソースへのアクセスが禁止され、RP2からはRP1に割り当てられたリソースへのアクセスが禁止される。
 なお、全てのリソースがいずれかのRPに排他的に割り当てられる必要はない。つまり、複数のRPによって共有されるリソースがあってもよい。例えば、サービスロボットの安全制御を行う場合、アクチュエータには、通常制御アプリケーション102及び安全制御アプリケーション103の双方からアクセスできる必要がある。よって、通常制御アプリケーション101が属するRPと安全制御アプリケーション102が属するRPによって、アクチュエータを制御するためのI/Oポートを共有するとよい。
 図1に戻り説明を続ける。アプリケーション101~103は、OS100及びプロセッサ10によって提供されるマルチプログラミング環境で実行される。このうち、安全監視アプリケーション101は、通常制御アプリケーション102の実行状況の監視と、安全制御アプリケーション103の実行状況の監視と、I/Oポート12への入出力データの監視と、をプロセッサ10に実行させるための命令コードを含む。さらに、安全監視アプリケーション101は、パーティションスケジューラ21への結果通知をプロセッサ10に実行させるための命令コードを含む。つまり、安全監視アプリケーション101は、安全関連アプリケーションである。
 また、通常制御アプリケーション102は、サービスロボット等の制御対象に通常の機能・動作を行わせるための制御手順をプロセッサ10に実行させるための命令コードを含む。さらに、通常制御アプリケーション102は、パーティションスケジューラ21への結果通知をプロセッサ10に実行させるための命令コードを含む。つまり、通常制御アプリケーション102は、非安全関連アプリケーションである。
 また、安全制御アプリケーション103は、何らかの異常が検出された場合に対応して、機能安全を確保するために定められた制御手順をプロセッサ10に実行させるための命令コードを含む。さらに、安全制御アプリケーション103は、パーティションスケジューラ21への結果通知をプロセッサ10に実行させるための命令コードを含む。つまり、安全制御アプリケーション103は、安全関連アプリケーションである。
 リセット回路14は、OS100からの信号に基づき、マイクロコントローラ15のリセットを行う。リセット回路14を用いたマイクロコントローラ15のリセット機構については後述する。
 続いて以下では、パーティションスケジューラ21と、アプリケーション101~103の起動により生成されるタスクと、の関係について、図4を用いて説明する。図4は、OS100によって提供されるマルチプログラミング環境で起動される、パーティションスケジューラ21とタスク24、26、28との関係を示す図である。
 マイクロコントローラ15は、プロセッサ10、実行用メモリ11、I/Oポート12、不揮発性メモリ13等を含む。なお、図4では、マイクロコントローラ15の外部にリセット回路14を備える構成を例示しているが、マイクロコントローラ15の内部にリセット回路14を含む構成としてもよい。
 マイクロコントローラ15には、外部のクロック源からのクロック信号が供給され、プロセッサ10等は、このクロック信号に基づく所定のタイマー周期で動作する。本実施の形態では、所定のタイマー周期を、1Tickであるとして説明する。このため、プロセッサ10によりOS100が実行されることで、パーティションスケジューラ21が1Tickごとに動作すると共に、各TPにおいて、タスクスケジューラ23、25、27およびタスク(安全監視タスク24、通常制御タスク26、安全制御タスク28)が1Tickごとに動作する。
 パーティションスケジューラ21は、1Tickごとに動作し、TPの切り替え(パーティション・スケジューリング)を行う。パーティションスケジューラ21は、次の1Tickの間にTP1~TP3のいずれをアクティブにするかを選択・決定する。さらに、パーティションスケジューラ21は、選択したTPに関するタスクスケジューラの動作を開始させる。
 パーティションスケジューラ21によるパーティション・スケジューリングについて具体的に述べると、パーティションスケジューラ21は、スケジューリングテーブル22を参照し、TPの設定を定めたスケジューリングパターンに従って、パーティション・スケジューリングを行う。
 スケジューリングテーブル22は、TPの切り替え順序およびタイミングを規定したスケジューリングパターンを保持している。なお、スケジューリングテーブル22は、少なくとも2つの異なるスケジューリングパターンを保持している。1つは、安全監視タスク24による異常検知が行われていない場合(つまり通常時)に適用されるスケジューリングパターンである。もう1つは、安全監視タスク24によって異常が検知された場合に適用されるスケジューリングパターンである。以下では、通常時に適用されるスケジューリングパターンを"通常制御スケジューリングパターン"と呼ぶ。また、異常検知時に適用されるスケジューリングパターンを"安全制御スケジューリングパターン"と呼ぶ。
 図5Aは、通常制御スケジューリングパターンの具体例を示している。図5Aでは、通常制御タスク26が属するTP2が1サイクル時間の前半(T1)に割り当てられている。また、安全監視タスク24が属するTP1が1サイクル時間の後半(T2)に割り当てられている。図5Aのスケジューリングパターンによれば、通常制御タスク26と安全監視タスク24が繰り返しスケジューリングされる。
 図5Bは、安全制御スケジューリングパターンの具体例を示している。図5Bでは、安全制御タスク28が属するTP3が1サイクル時間の前半(T3)に割り当てられている。また、安全監視タスク24が属するTP1が1サイクル時間の後半(T4)に割り当てられている。図5Bのスケジューリングパターンによれば、安全制御タスク28と安全監視タスク24が繰り返しスケジューリングされる。
 図4に戻り説明を続ける。タスクスケジューラ23、25、27は、それぞれが属するTP内でのタスクのスケジューリングを行う。各TP内でのタスクのスケジューリングには、一般的な優先度ベースのスケジューリングを適用すればよい。なお、図4では、各TPはそれぞれ1つのタスクのみを含むものとして図示しているが、実際には、1以上のタスクが含まれている。例えば、通常制御用のTP2内には、通常制御タスクA及び通常制御タスクBの2つのタスクが含まれていてもよい。
 安全監視タスク24は、安全監視アプリケーション101の起動によって生成されるタスクである。図4の例では、安全監視タスク24は、TP1及びRP1に割り当てられている。安全監視タスク24は、非安全関連アプリケーションである通常制御タスク26の実行状況の監視と、安全関連アプリケーションである安全制御タスク28の監視と、I/Oポート12の入出力データを監視する。さらに、安全監視タスク24は、タスクの実行状況を、パーティションスケジューラ21へ通知する。
 通常制御タスク26は、通常制御アプリケーション102の起動によって生成されるタスクである。図4の例では、通常制御タスク26は、TP2及びRP2に割り当てられている。通常制御タスク26は、サービスロボット等の制御対象に通常の機能・動作を行わせるための制御を行う。さらに、通常制御タスク26は、タスクの実行状況を、パーティションスケジューラ21へ通知する。
 安全制御タスク28は、安全制御アプリケーション103の起動によって生成されるタスクである。図4の例では、安全制御タスク28は、TP3及びRP3に割り当てられている。安全制御タスク28は、何らかの異常が検出された場合に対応して、機能安全を確保するために定められた制御を行う。さらに、安全制御タスク28は、タスクの実行状況を、パーティションスケジューラ21へ通知する。なお、各タスクからパーティション21へと結果を通知する具体的な構成としては、様々な手法を採用することができる。例えば、タスクがOS100のシステムコール(サービスコール)を呼び出し、OS100を介して、パーティションスケジューラ21に結果を通知することができる。また、例えば、タスクの実行状況に関するフラグを実行用メモリ11に格納するものとして、タスクがその実行状況に応じてフラグの値を設定し、パーティションスケジューラ21がフラグの設定値に応じてタスクの実行状況を判断することもできる。
 上述したように、パーティションスケジューラ21が1Tickごとに動作し、TP1~TP3のいずれをアクティブにするかを選択・決定する。さらに、パーティションスケジューラ21が、選択したTPに関するタスクスケジューラの動作を開始させる。そして、タスクスケジューラ23、25、27が動作を開始することでタスクのスケジューリングが行われ、プロセッサ10が、タスクスケジューラ23、25、27によりスケジューリングされた順序に従って、TP内でのタスクを実行していく。これによって、アクティブなTPに割り当てられているアプリケーションが、プロセッサ10で実行される。
 続いて以下では、パーティションスケジューラ21によるパーティション・スケジューリングについて、図6を用いて説明する。図6は、パーティションスケジューラ21の処理手順の具体例を示すフローチャートである。
 まず、1Tickごとに動作するパーティションスケジューラ21が、TPXのタスクスケジューラを動作させる(S11)。ここで、変数XはTPの番号を示し、Xは1以外の値とする。すなわち、S11では、安全監視用のTP1を除いた、TP2又はTP3のいずれかを動作させる。
 なお、図6では、通常制御スケジューリングパターン(例えば図5A)または安全制御スケジューリングパターン(例えば図5B)に従って、スケジューリングを実行する場合を例に説明する。すなわち、TP2またはTP3に続く次のTPはTP1であり、かつ、TP2での異常がTP1で検知された場合に、TP1からの結果を受けて次に選択・決定されるTPはTP3である場合を例に説明する。
 S11で動作を開始したTPXのタスクスケジューラは、TPX内のタスクを優先度に応じて実行する(S12)。そして、1Tickが経過すると、パーティションスケジューラ21が、TPのスケジューリングを開始する(S13)。すなわち、パーティションスケジューラ21は、スケジューリングパターンに従って、次の1Tickの間にいずれのTPをアクティブにするかを選択・決定する。
 パーティションスケジューラ21は、次にアクティブにするTPを変更しない(S14でNo)場合には、S11に戻り、同一のTPXについての動作を継続させる。このため、TPXの切り替えタイミングとなるまでの間、S11~S14までの処理が繰り返される。
 パーティションスケジューラ21は、次にアクティブにするTPを変更する(S14でYes)場合には、その変更するタイムパーティションのタスクスケジューラを動作させる(S15)。ここでは、TP1のタスクスケジューラを動作させる。そして、TP1のタスクスケジューラ23が、TP1内のタスクを優先度に応じて実行する(S16)。
 TP1で実行される安全監視タスク24は、通常制御タスク26の実行状況の監視と、I/Oポート12の入出力データの監視を行い、これらが正常であるか判断する(S17)。判断の結果、異常であると判断した(S18でNo)場合、安全監視タスク24は、パーティションスケジューラ21に対して、その結果を通知する(S19)。
 1Tickが経過すると、パーティションスケジューラ21が、再びスケジューリングを開始する(S20)。パーティションスケジューラ21は、スケジューリングパターンに従って、次の1Tickの間にいずれのTPをアクティブにするかを選択・決定し、次にアクティブにするTPを変更しない(S21でNo)場合には、S15に戻り、TP1についての動作を継続させる。
 パーティションスケジューラ21は、次にアクティブにするTPを変更する(S21でYes)場合には、さらに、S19でのTP1からの通知結果に応じて、TPXが正常であったか否かを判断する(S22)。判断の結果、異常であった(S22でNo)場合、パーティションスケジューラ21は、次の1Tickの間にアクティブにするTPとして、TP3を選択・決定する(S23)。
 判断の結果、正常であった(S22でYes)場合、パーティションスケジューラ21は、次の1Tickの間にアクティブにするTPとして、TP1とTP3以外のTPXを選択・決定する(S24)。
 図6で示した処理に関して、パーティション・スケジューリングの具体例を説明する。
 まず、図5Aに例示した通常制御スケジューリングパターンに従って、S11においてスケジューリングを開始した場合を説明する。この場合、S11ではTPX=TP2として開始し、S12~S14にかけてもTPX=TP2のままである。そして、S15でTP2からTP1へと変更され、S15~S21にかけてTP1のままである。S18でTP2に関する実行状況(データ入出力)が正常であると判定されていた場合には、S24では、TPX=TP2となる(つまり、TP2から開始する通常制御スケジューリングパターンが継続される。)。一方で、S18でTP2に関する実行状況(データ入出力)が異常であると判定されていた場合には、S23で、TPX=TP3となる(つまり、TP3から開始する安全制御スケジューリングパターンに切り替わる。)。
 また、図5Bに例示した安全制御スケジューリングパターンに従って、S11においてスケジューリングを開始した場合を説明する。この場合、S11ではTPX=TP3として開始し、S12~S14にかけてもTPX=TP3のままである。そして、S15でTP3からTP1へと変更され、S15~S21にかけてTP1のままである。S18でTP3に関する実行状況(データ入出力)が正常であると判定されていた場合には、S24では、TPX=TP2となる(つまり、TP2から開始する通常制御スケジューリングパターンに切り替わる。)。一方で、S18でTP3に関する実行状況(データ入出力)に異常があると判定されていた場合には、S23で、TPX=TP3となる(つまり、TP3から開始する安全制御スケジューリングパターンが継続される。)。
 なお、上述の例では、スケジューリングパターンとして、3つのTP(安全監視用のTP1、通常制御用のTP2、安全制御用のTP3)のみを組み合わせた場合を例に説明したが、TP2のような通常制御用パーティションや、TP3のような安全制御用パーティションについては、それぞれ複数個存在するものとしてもよい。例えば、2つの通常制御用のTP2及びTP4と、安全監視用のTP1と、2つの安全制御用のTP3及びTP5と、が存在し、これら5つのTP(TP1~TP5)を組み合わせてスケジューリングパターンを構成してもよい。この場合、S23では、パーティションスケジューラ21が、TPXに関する実行状況(データ入出力)の異常状態の種類を判定し、その異常種類に応じて、安全制御用のTP3またはTP5のいずれかを選択すればよい。また、S24では、通常制御用のTP2またはTP4のいずれかを選択すればよい。
 上述したように、本実施の形態では、OS100は、安全監視用のTP1からの通知、または、各TPからの通知に応じて、次にアクティブとするパーティションを選択・決定するパーティションスケジューラ21を備えている。パーティションスケジューラ21は、各TPにおいて実行されるタスクとは独立して、所定のタイマー周期で動作する。所定のタイマー周期で独立して動作するパーティションスケジューラ21がパーティション・スケジューリング機能を有することで、以下の効果を奏することができる。
 まず、一般的に、通常制御タスク26の実行時間を十分に確保するために、安全監視タスク24の実行時間を可能な限り短縮したいという要求がある。従来技術(例えば特許文献1)では、安全監視タスク24が、通常制御タスク26の実行状況の監視と、I/Oポート12の入出力データの監視と、に加えて、スケジューリングパターンの選択・決定についても行っていたために、この選択・決定に要する実行時間についても、安全監視タスク24が属するTP2に関して割り当てておく必要があった。
 また、機能安全の確保を保証するためには、基本的には、安全監視タスク24と通常制御タスク26とが交互に実行される必要がある。このため、従来技術では、通常制御タスク26の実行に伴って安全監視タスク24によるスケジューリングパターンの選択・決定までもが毎回実行されることになり、複数のサイクルにわたって合計すると、多くの実行時間を、安全監視タスク24によるスケジューリングパターンの選択・決定のために要することになってしまう。
 これに対して、本実施の形態によれば、安全監視タスク24自体は、スケジューリングパターンの選択・決定を実行する必要がない。また、パーティションスケジューラ21がスケジューリングパターンの選択・決定に要する実行時間は短時間で済む。このため、従来技術と比較して、安全監視用のTP1はより短時間の割り当てで済み、かつ、通常制御用のTP2にはより長時間の割り当てを行うことができるという効果を奏する。
 さらに、図6で例示した処理では、パーティションスケジューラ21が、TP1からの結果通知に応じて、安全制御用のTP3を選択・決定する(S23)、または、通常制御用のTP2を選択・決定する(S24)ものとして説明したが、本発明はこれに限定されない。例えば、安全監視用のTP1のみからパーティションスケジューラ21に対して結果を通知する構成に代えて、TP1~TP3のそれぞれからパーティションスケジューラ21に対して実行状況を通知する構成とし、パーティションスケジューラ21が、各TPからの結果通知に応じて、安全制御用のTP3を選択・決定するものとしてもよい。
 独立に動作するパーティションスケジューラ21が、全てのTPから結果通知を受ける構成とすることで、パーティションスケジューラ21は、全てのTPに関する状況を一元的に把握することができる。このため、例えば、安全監視用のTP1からの結果通知に応じて、パーティションスケジューラ21が次のパーティションを決定・選択しようとする場合には、パーティションスケジューラ21は、各TPの状況を考慮した上で、正常状態にあるTPのみから次のパーティションを決定・選択することができる。従って、従来技術と比較して、より正確なパーティション・スケジューリングを実現することができるという効果を奏する。
 続いて以下では、リセット回路14を用いたマイクロコントローラ15のリセット機構について、図7及び図8を用いて説明する。図7及び図8は、リセット回路14を用いたマイクロコントローラ15のリセット処理手順の具体例を示すフローチャートである。
 本実施の形態では、1Tickごとに動作するパーティションスケジューラ21が、マイクロコントローラ15のリセット機能を有している。パーティションスケジューラ21は、OS100における異常を検出した場合に、リセット回路14と連動して異常処置を行う。リセット回路14は、パーティションスケジューラ21からの信号に基づき、マイクロコントローラ15のリセットを行う。
 まず、図7を用いて、リセット回路14を用いたマイクロコントローラ15のリセット処理手順の具体例について説明する。図7に示す処理では、パーティションスケジューラ21からリセット指示信号を受けた場合に、リセット回路14がマイクロコントローラ15をリセットするものである。なお、図7では、TPXは、TP1とTP3以外のTPである。
 まず、S31~S33では、パーティションスケジューラ21がTPXの動作を開始させることで、次にアクティブにするTPが変更されるまでの間、TPXに関する処理が実行される。そして、パーティションスケジューラ21がTP1のタスクスケジューラ23の動作を開始させた(S34)後に、TP1に属する安全監視タスク24が、TPXに関する処理(入出力)が正常であったかを判断する(S35)。判断の結果、正常であった(S35でYes)場合、S31に戻り、同一のTPXについての動作が継続される。
 判断の結果、異常であった(S35でNo)場合、TP1に属する安全監視タスク24が、TPXでの異常がTP3に属する安全制御タスク28で対応可能な異常であるかを判断する(S36)。TP3で対応可能な異常ではなかった(S36でNo)場合、TP1に属する安全監視タスク24が、パーティションスケジューラ21に対して、緊急停止を有する異常であることを通知する(S37)。TP1に属する安全監視タスク24からの通知を受けたパーティションスケジューラ21が、リセット回路14にリセット指示信号を出力し、リセット指示信号を受けたリセット回路14がマイクロコントローラ15のリセットを行う(S38)。
 TP3で対応可能な異常であった(S36でYes)場合、TP1に属する安全監視タスク24は、パーティションスケジューラ21に対して、TPXが異常であることを通知する(S39)。TP1からの通知を受けたパーティションスケジューラ21は、TPXからTP3へと切り替える(S40)。
 次に、図8を用いて、リセット回路14を用いたマイクロコントローラ15のリセット処理手順の他の具体例について説明する。図8に示す処理では、パーティションスケジューラ21からリセット回路14に定期的に信号を送信し、リセット回路14は、パーティションスケジューラ21からの送信信号が途絶えた場合に、マイクロコントローラ15をリセットするものである。なお、図8では、TPXは、TP1とTP3以外のTPである。
 図7のS31~S35にかけての処理と比較して、図8のS53では、パーティションスケジューラ21が1Tickごとに動作する点が明確化され、また、S54及びS55で、パーティションスケジューラ21がリセット回路14に定期的に信号を送信する点で異なっている。その他の図8に示すS51~S57にかけての処理は、図7に示したS31~S35にかけての処理と基本的に同一である。
 また、図7のS36~S40にかけての処理と比較して、図8のS60では、パーティションスケジューラ21がリセット回路14への送信信号を停止し、S63では、パーティションスケジューラ21がリセット回路14への信号を送信する点で異なっている。さらに、図8のS61では、パーティションスケジューラ21からの送信信号が途絶えたことに応じて、リセット回路14がマイクロコントローラ15のリセットを行う点で異なっている。その他の図8に示すS58~S64にかけての処理については、図7に示したS36~S40にかけての処理と基本的に同一である。
 さらに、図8のS71及びS72に示すように、S51~S64にかけての処理と並行して、パーティションスケジューラ21において不具合が発生した場合、または、パーティションスケジューラ21からリセット回路14への信号線において不具合が発生した場合には、パーティションスケジューラ21からリセット回路14への送信信号が伝達されなくなる。この場合にも、パーティションスケジューラ21からの送信信号が途絶えたことに応じて、リセット回路14がマイクロコントローラ15のリセットを行う(S61)。
 図8に示した処理によれば、パーティションスケジューラ21からリセット回路14へ意図的にリセット指示を行う場合に加えて、パーティションスケジューラ21自身が何らかの原因により正常に動作しない場合、または、パーティションスケジューラ21からリセット回路14へ送信信号を伝達する信号線に不具合が発生した場合においても、マイクロコントローラ15のリセットを確実に行うことができる。また同時に、TPの切り替えが、1Tickごとに正常に実行されているかについても保証することができる。
 なお、図7及び図8では、パーティションスケジューラ21は、TP1からの結果通知に応じて、リセット回路14へのリセット指示信号の出力、または、リセット回路14への送信信号の停止を行うものとして説明したが、TP1~TP3のいずれかからの結果通知に応じて、リセット回路14へのリセット指示信号の出力、または、リセット回路14への送信信号の停止を行うものとしてもよい。
<発明の実施の形態2>
 続いて、図9を参照して、本実施の形態2にかかる安全制御装置2について説明する。図9は、本実施の形態2のかかる安全制御装置2の構成例を示すブロック図である。以下、実施の形態1にかかる安全制御装置1と同様の内容については説明を省略する。
 プロセッサ10は、制御対象からの割り込みと、タイマー割り込みを検出する。プロセッサ10は、制御対象からの割り込み信号の入力によって、制御対象からの割り込みを検出する。プロセッサ10は、制御対象からの割り込みを検出したときに、後述する割り込みハンドラ31を実行する。ここで、安全制御装置2のマイクロコントローラ15は、タイマー(図示せず)を有する。タイマーは、クロック信号に基づいた所定の周期で割り込み信号をプロセッサ10に出力する。プロセッサ10は、タイマーからの割り込み信号の入力によって、タイマー割り込みを検出する。プロセッサ10は、制御対象からの割り込みを検出したときに、パーティションスケジューラ21を実行する。
 不揮発性メモリ13は、割り込み処理アプリケーション104を格納する。割り込み処理アプリケーション104は、制御対象からの割り込みに応じた割り込み処理を、プロセッサ10に実行させるための命令コードを含む。さらに、割り込み処理アプリケーション104は、パーティションスケジューラ21への結果通知をプロセッサ10に実行させるための命令コードを含むようにしてもよい。割り込み処理アプリケーション104は、安全関連アプリケーションであってもよく、非安全関連アプリケーションであってもよい。ここで、割り込み処理アプリケーション104は、割り込み要因のそれぞれに対応するように複数用意される。つまり、割り込み処理アプリケーション104は、対応する割り込み要因の割り込みに応じて実行されるべき割り込み処理の命令コードを含む。なお、1つの割り込み処理アプリケーション104が2つ以上の割り込み要因に対応していてもよい。
 続いて、パーティションスケジューラ21と、アプリケーション101~104の起動により生成されるタスクと、割り込みハンドラ31と、の関係について、図10を用いて説明する。図10は、OS100によって提供されるマルチプログラミング環境で起動される、パーティションスケジューラ21とタスク24、26、28、30と割り込みハンドラ31との関係を示す図である。以下、実施の形態1にかかる安全制御装置1と同様の内容については説明を省略する。
 パーティションスケジューラ21は、1Tickごとに発生するタイマー割り込みに応じて、1Tickごとに動作してパーティション・スケジューリングを行う。つまり、パーティションスケジューラ21におけるパーティション・スケジューリングを行う処理は、例えば、パーティションスケジューラ21の起動直後の初期化処理において、タイマー割り込みの割り込みハンドラとして登録されたパーティションスケジューラ21の処理である。パーティションスケジューラ21は、次の1Tickの間にTP1~TP3及び割り込み専用タイムパーティションTPIのいずれをアクティブにするかを選択・決定する。TPIには、割り込み処理タスク30が属する。
 タスクスケジューラ29は、タスクスケジューラ23、25、27と同様に、TPIに属する割り込み処理タスク30のスケジューリングを行う。
 割り込み処理タスク30は、割り込み処理アプリケーション104の起動によって生成されるタスクである。よって、割り込み処理タスク30は、制御対象からの割り込みに応じた割り込み処理を実行する。また、割り込み処理タスク30は、割り込み要因のそれぞれに対応するように複数生成されることになる。制御対象からの割り込みが発生した場合、その割り込みの割り込み要因に対応する割り込み処理アプリケーション104の起動によって生成された割り込み処理タスク30が実行される。割り込み処理タスク30は、制御対象に通常の機能・動作を行わせるための制御を行うようにしてもよく、機能安全を確保するために定められた制御を行うようにしてもよい。
 割り込みハンドラ31は、制御対象からの割り込みに応じて実行される。割り込みハンドラ31は、制御対象から割り込みがあったときに、その割り込みに応じた割り込み処理を実行する割り込み処理タスク30を、TPIで実行されるように実行予約する。なお、割り込みハンドラ31は、発生した割り込みの割り込み要因に対応する割り込み処理タスク30を実行予約する。このように、本実施の形態2では、割り込みに応じて実行される割り込みハンドラ31における処理を、割り込み処理タスク30の実行予約のみとし、実行予約した割り込み処理タスク30をTPIで実行するようにしている。これによれば、割り込みハンドラ31における処理時間は、割り込み処理を実行する場合と比べて、比較にならないほど小さい実行時間となる。そのため、割り込みが発生した時点でアクティブとなっているTPにおける処理の遅延が発生しなくなる。
 続いて、図11を参照して、タスクの状態について説明する。図11は、タスクの状態遷移図である。タスク24、26、28、30は、実行状態、実行可能状態、待ち状態、二重待ち状態、強制待ち状態、及び、休止状態のいずれかの状態をとる。
 実行状態は、タスクスケジューラ23、25、27、29によって、タスクにプロセッサ10の実行時間が割り当てられた状態である。タスクが実行状態のとき、そのタスクはプロセッサ10によって実行されていることになる。実行状態のタスクは、例えば、タスクスケジューラ23、25、27、29によって割り当てられたプロセッサ10の実行時間を使い果たしたときに実行可能状態に遷移する。また、実行状態のタスクは、例えば、スリープしたときに待ち状態に遷移する。
 実行可能状態は、タスクにプロセッサ10の実行時間を割り当て可能であるが、タスクにプロセッサ10の実行時間が割り当てられていない状態である。実行可能状態は、例えば、タスクが起床している状態である。実行可能状態のタスクは、例えば、タスクスケジューラ23、25、27、29によって、プロセッサ10の実行時間が割り当てられたときに実行状態に遷移する。
 待ち状態は、タスクにプロセッサ10の実行時間を割り当て可能でなく、プロセッサ10の実行時間が割り当てられていない状態である。待ち状態は、例えば、タスクがスリープしている状態である。待ち状態のタスクは、例えば、スリープ時間の満了、又は、他のタスクからのタスク間通信の受信等によって、スリープしている状態から起床したときに実行可能状態に遷移する。
 強制待ち状態は、タスクにプロセッサ10の実行時間を割り当て可能でなく、プロセッサ10の実行時間が割り当てられていない状態である。強制待ち状態は、例えば、パーティションスケジューラ21、タスクスケジューラ23、25、27、29、又は、他のタスクによって、実行可能状態のタスクが一時的に実行を禁止された状態である。強制待ち状態のタスクは、パーティションスケジューラ21、タスクスケジューラ23、25、27、29、又は、他のタスクによって、強制待ち状態を解除された場合に、実行可能状態に遷移する。
 二重待ち状態は、タスクにプロセッサ10の実行時間を割り当て可能でなく、プロセッサ10の実行時間が割り当てられていない状態である。二重待ち状態は、例えば、パーティションスケジューラ21、タスクスケジューラ23、25、27、29、又は、他のタスクによって、待ち状態のタスクが一時的に実行を禁止された状態である。強制待ち状態のタスクは、パーティションスケジューラ21、タスクスケジューラ23、25、27、29、又は、他のタスクによって、強制待ち状態を解除された場合に、待ち状態に遷移する。また、強制待ち状態のタスクは、起床した場合に、強制待ち状態に遷移する。
 休止状態は、タスクにプロセッサ10の実行時間を割り当て可能でなく、プロセッサ10の実行時間が割り当てられていない状態である。休止状態は、例えば、タスクが起動されていない状態、又は、タスクが終了した状態である。
 続いて、図12~図14を参照して、本実施の形態2にかかる安全制御装置2の割り込み発生時の処理手順について説明する。図12は、本実施の形態2にかかるスケジューリングパターンの具体例を示す図である。つまり、本実施の形態2では、図12に例示するスケジューリングパターンが、スケジューリングテーブル22に格納されている場合について説明する。図13は、本実施の形態2にかかる割り込み発生時の処理手順の概念図である。図14は、本実施の形態2にかかる割り込み発生時の処理手順の具体例を示すフローチャートである。
 割り込みが発生したときに、割り込みがTickの割り込みである場合(S81でYes)、プロセッサ10は、パーティションスケジューラ21を実行する。つまり、プロセッサ10は、タイマー割り込みが発生した場合、パーティションスケジューラ21を実行する。パーティションスケジューラ21は、図12に示すスケジューリングパターンに従って、タイムパーティションのパーティション・スケジューリングを開始する(S82)。
 割り込みがTickの割り込みでない場合(S81でNo)、プロセッサ10は、割り込みハンドラ31を実行する。つまり、プロセッサ10は、制御対象からの割り込みが発生した場合、割り込みハンドラ31を実行する。割り込みハンドラ31は、割り込みハンドラテーブルIST_tableに、発生した割り込みの割り込み要因に対応する割り込み処理タスク30が登録されているか否かを判定する(S83)。
 割り込みハンドラテーブルIST_tableは、割り込み要因と、割り込み処理タスク30とを対応付けたテーブルである。具体的には、割り込みハンドラテーブルIST_tableは、割り込み要因と、その割り込み要因の割り込みに応じて実行されるべき割り込み処理タスク30のタスクIDとが対応付けている。割り込みハンドラテーブルIST_tableは、例えば、実行用メモリ11に格納されている。なお、割り込みハンドラテーブルIST_tableは、割り込み要因と、割り込み処理タスク30とを対応付けた情報であれば、どのような情報であってもよい。例えば、図13に例示するように、複数の割り込み要因のそれぞれに対応した領域に、複数の割り込み要因のそれぞれに対応した割り込み処理タスク30のタスクIDが格納されている情報であってもよい。
 また、割り込みハンドラ31は、割り込み要因レジスタの値を参照することによって、割り込み要因を特定する。割り込み要因レジスタは、発生した割り込みの割り込み要因を示す値が格納されるレジスタである。例えば、割り込み要因レジスタは、制御対象が割り込みを発生するときに、制御対象によって値が設定される。割り込み要因レジスタ(図示せず)は、マイクロコントローラ15に備えられる。
 割り込み要因に対応するタスクが登録されていない場合(S84でNo)、割り込みハンドラ31は、処理を終了する。
 割り込み要因に対応する割り込み処理タスク30が登録されている場合(S84でYes)、割り込みハンドラ31は、そのタスクを起床させる。具体的には、割り込みハンドラ31は、割り込みハンドラテーブルから、発生した割り込みの割り込み要因に対応した領域に格納されているタスクIDを取得する。割り込みハンドラは、例えば、取得したタスクIDを指定したタスク間通信によって、タスクを起床する。これによって、割り込みがあった割り込み要因に対応する割り込み処理タスク30のみが実行可能状態となり、その他の割り込み処理タスク30は待ち状態のままとなる。割り込みハンドラ31は、割り込みがあった割り込み要因をマスクする(S85)。そして、割り込みハンドラ31は、処理を終了する。
 このように実行可能状態とされた割り込み処理タスク30は、TPIがアクティブとなったときにタスクスケジューラ29によって、プロセッサ10の実行時間が割り当てられて実行状態となる。つまり、割り込みハンドラ31は、割り込み処理タスク30を実行可能状態にすることによって、割り込み実行タスク30がTPIで実行されるように実行予約する。
 時間が経過して、TPIがアクティブとなったとき、パーティションスケジューラ21は、タスクスケジューラ29を動作させる。タスクスケジューラ29は、割り込みハンドラ31によって起床された割り込み処理タスク30を実行する(S86)。
 以上に説明したように、本実施の形態2にかかる割り込み発生時の処理では、制御対象から割り込みがあったときに、プロセッサ10が、割り込みハンドラ31を実行することによって、割り込み処理タスク30の実行予約のみを行うようにしている。そして、TPIにおいて実行予約された割り込み処理タスク30にプロセッサ10の実行時間を割り当てて実行するようにしている。これによれば、割り込みが発生した時点でアクティブとなっているTPにおけるタスクの処理の遅延が発生することがなくなるため、そのTPにおける処理に必要なタイムリソースが保証されるようになる。したがって、その後のTPにおける処理の破綻を防止することができる。
 続いて、図15を参照して、本発明の実施の形態2にかかるスケジューリング処理手順について説明する。図15は、本発明の実施の形態2にかかるスケジューリング処理手順の具体例を示すフローチャートである。
 Tickの割り込みが発生した場合(S91)、プロセッサ10は、パーティションスケジューラ21を実行する(S92)。パーティションスケジューラ21は、現在アクティブとなっているTPXのタイムリソースが残っている否かを判定する(S93)。言い換えると、パーティションスケジューラ21は、TPXの期間が終了していない否かを判定する。なお、図15におけるTPXは、TP1~TP3及びTPIのいずれかのTPを示す。ここでは、TPXが、TP1~TP3のいずれかであるものとして説明をしていく。
 パーティションスケジューラ21は、タイムリソースが残っているか否かを、TPXの期間から、TPXがアクティブになってから経過した期間を除いた期間に余りがあるか否かによって判定する。例えば、TP1~TP3及びTPIのそれぞれにおける期間が何Tickあるかを示す情報を実行用メモリ11に予め格納しておく。また、パーティションスケジューラ21は、TPXがアクティブになってから、1Tickごとに動作する度に、Tick数をカウントする。このカウントしたTick数は、TPXがアクティブになってから経過した期間を示すことになる。そして、パーティションスケジューラ21は、実行用メモリ11に格納された情報が示すTick数が、カウントしたTick数よりも大きいか否かによって、タイムリソースが残っている否かを判定する。
 TPXのタイムリソースが残っていない場合(S93でNo)、パーティションスケジューラ21は、TPXの次のTPに切り替える(S94)。パーティションスケジューラ21は、TPXに属するタスクスケジューラの動作を停止し、TPXの次のTPに属するタスクスケジューラの動作を開始させる。動作を開始したタスクスケジューラは、自身が属するTP内のタスクを実行していく。また、パーティションスケジューラ21は、次のTickの割り込み(S91)を待つ。
 TPXのタイムリソースが残っている場合(S93でYes)、パーティションスケジューラ21は、TPXの処理が終了しているか否かを判定する(S95)。つまり、パーティションスケジューラ21は、TPXに属するタスクの実行が終了しているか否かを判定する。タスクの実行が終了しているか否かは、例えば、TPXに属するタスクが実行可能状態又は実行状態となっていないか否かによって判定する。
 TPXの処理が終了していない場合(S95でNo)、パーティションスケジューラ21は、TPの切り替えは実行せずに、TPXに属するタスクスケジューラによるTPXの処理を継続させる(S96)。つまり、TPXに属するタスクスケジューラは、TPXに属する実行可能状態のタスクを実行していく。
 TPXの処理が終了している場合(S95でYes)、パーティションスケジューラ21は、割り込みの受付処理(S85)が済んだ割り込み処理タスク30が存在するか否かを判定する(S97)。つまり、パーティションスケジューラ21は、起床されて実行可能状態となっている割り込み処理タスク30が存在するか否かを判定する。
 割り込みの受付処理(S85)が済んだ割り込み処理タスクが存在しない場合(S97でNo)、パーティションスケジューラ21は、次のTickの割り込み(S91)を待つ。
 割り込みの受付処理(S85)が済んだ割り込み処理タスクが存在する場合(S97でYes)、パーティションスケジューラ21は、割り込み処理を実行する(S98)。具体的には、パーティションスケジューラ21は、TPXからTPIに切り替えて、TPXの残りの期間についてTPIをアクティブにする。パーティションスケジューラ21は、TPXに属するタスクスケジューラの動作を停止し、TPIに属するタスクスケジューラ29の動作を開始する。タスクスケジューラ29は、TPIに属する割り込み処理タスク30のうち、実行可能状態となっている割り込み処理タスク30を実行していく。なお、TPIをアクティブとする期間は、TPXの残りの期間内であれば、任意の長さとしてもよい。
 以上に説明したように、本実施の形態2にかかる割り込み発生時の処理では、TPIよりも前のTPXの期間が終了する前に、そのTPIより前のTPXに属するタスクの実行が終了している場合、実行予約されている割り込み処理タスク30のいずれかに、TPIにおけるプロセッサ10の実行時間に代えて、そのTPIより前のTPXにおけるプロセッサ10の実行時間を割り当てるようにしている。これによれば、TPIまで待つことなく、TPIよりも前のTPXにおいて割り込み処理タスク30を実行することができる。また、TPXの余りのタイムリソースを使用して割り込み処理タスク30を実行するようにしているため、そのTPXにおける処理に必要なタイムリソースも保証されることになる。したがって、割り込み処理の実行遅延を抑制しつつ、処理の破綻を防止することができる。
 なお、本実施の形態2において、割り込み処理タスク30のそれぞれに、予めタスク実行の優先度を、TPIまで処理の実行を待っても問題のない割り込み処理タスク30については、優先度を低く設定し、できるだけ早く実行する必要がある割り込み処理タスク30については、それよりも優先度を高く設定するようにしてもよい。そして、タスクスケジューラ29によって、より優先度の高い割り込み処理タスク30から優先的に実行されるようにする。このようにすることで、できるだけ早く実行する必要がある割り込み処理タスク30における割り込み処理の実行遅延をより抑制することができる。
<発明の実施の形態3>
 続いて、本実施の形態3にかかる安全制御装置2について説明する。なお、本実施の形態3にかかる安全制御装置2の構成は、本実施の形態2にかかる安全制御装置2の構成と同様であるため、説明を省略する。また、パーティションスケジューラ21とタスク24、26、28、30と割り込みハンドラ31との関係についても、本実施の形態2にかかる安全制御装置2の構成と同様であるため、説明を省略する。
 続いて、図16を参照して、本発明の実施の形態2にかかるスケジューリング処理手順について説明する。図16は、本発明の実施の形態2にかかるスケジューリング処理手順の具体例を示すフローチャートである。なお、ステップS101~S105については、ステップS91~95と同様であるため、説明を省略する。なお、図16におけるTPXは、TP1~TP3及びTPIのいずれかのTPを示す。
 TPXの処理が終了している場合(S105でYes)、パーティションスケジューラ21は、TPXのタイムリソースが無くなるまで待ち合わせる(S106)。つまり、パーティションスケジューラ21は、TPXにおけるタイムリソースが無くなるまで、ステップS101、S102、S103、S105の処理を繰り返す。そして、TPXのタイムリソースが無くなった場合(S103でNo)、パーティションスケジューラ21は、TPXの次のTPに切り替える。
 TPXの処理が終了していない場合(S105でNo)、パーティションスケジューラ21は、現在のTPXの処理を実行するためのタイムリソースが足りないか否かを判定する(S107)。例えば、タイムリソースが足りなくなる例としては、TPXがTPIであるときに、多くの割り込みが発生して、多くの割り込み処理タスク30が起床されてしまった場合が挙げられる。例えば、複数の割り込みが発生して、それぞれの割り込み要因が異なっている場合、複数の割り込み処理タスク30が起床されることになる。この場合、TPIのタイムリソースのみで全ての割り込み処理タスク30の実行を終了することができないことがある。
 ここで、パーティションスケジューラ21は、タイムリソースが足りないか否かを、TPXにおける残りの期間が、TPXに属する未実行のタスクの実行に必要な期間に満たないか否かによって判定する。例えば、TP1~TP3及びTPIのそれぞれにおける期間が何Tickあるかを示す情報を実行用メモリ11に予め格納しておく。また、各タスクの実行に必要な期間が何Tickあるかを示す情報を実行用メモリ11に予め格納しておく。パーティションスケジューラ21は、TPXがアクティブになってからカウントしたTick数と、実行用メモリ11に格納された情報が示すTPXのTick数から、TPXにおける残りの期間に相当するTick数を算出する。そして、パーティションスケジューラ21は、算出した残りのTick数が、実行用メモリ11に格納された情報が示す未実行のタスクの実行に必要なTick数以上であるか否かによって、タイムリソースが足りないか否かを判定する。
 タイムリソースが足りる場合(S107でNo)、パーティションスケジューラ21は、TPの切り替えは実行せずに、TPXに属するタスクスケジューラによるTPXの処理を継続させる(S108)。つまり、TPXに属するタスクスケジューラは、TPXに属する実行可能状態のタスクを実行していく。
 タイムリソースが足りない場合(S107でYes)、パーティションスケジューラ21は、次のTPの開始時から、次のTPのWCWT(Worst Case Wakeup Time)まで時間があるか否かを判定する(S109)。ここで、図17を参照して、WCWTについて説明する。WCWTとは、図17に示すように、TPの期間に含まれるTickのうち、そのTickまでに処理を開始すれば、そのTPの期間内で必ず処理を終了させることができる時間である。つまり、WCWTとは、TPの期間のうち、それまでにタスクの実行を開始すれば、そのTPの期間内でそのTPに属するタスクの実行を終了することができる地点のことである。
 例えば、パーティションスケジューラ21は、WCWTまで時間があるか否かを、TPXの次のTPの期間から、そのTPに属するタスクの実行に必要な期間を除いた余剰期間があるか否かによって判定する。上述した実行用メモリ11に予め格納された情報に基づいて、TPXの次のTPの期間のTick数が、そのTPに属するタスクの実行に必要なTick数の合計よりも大きいか否かによって、TPXの次のTPのWCWTまでの時間があるか否かを判定する。
 次のTPのWCWTまで時間がない場合(S109でNo)、現在のTPXの処理がTPXの残りのタイムリソースでは終了しないことになるが、パーティションスケジューラ21は、このまま処理を継続する(S110)。つまり、パーティションスケジューラ21は、TPXの残りのタイムリソースが無くなるまで、TPXに属するタスクスケジューラの動作を継続する。また、パーティションスケジューラ21は、必要に応じて、TP3に切り替えるようにしてもよく、マイクロコントローラ15のリセットをリセット回路14に指示するようにしてもよい。例えば、TPXの処理が終了しないことによって、異常が引き起こされてしまう場合、そのようにする。TPXの処理が終了しないことによって引き起こされる異常が安全制御タスク28で対応可能な異常である場合、パーティションスケジューラ21は、TPXからTP3に切り替える。また、TPXの処理が終了しないことによって引き起こされる異常が緊急停止を要する異常である場合、パーティションスケジューラ21は、マイクロコントローラ15をリセットする。
 次のTPのWCWTまで時間がある場合(S109でYes)、パーティションスケジューラ21は、次のTPのタイムリソースを削減することによって、TPXの期間を延長する(S111)。なお、ここで延長される期間は、次のTPの期間の開始時から、次のTPのWCWTまでの期間の範囲内であれば、どのような長さであってもよい。
 以上に説明したように、本実施の形態3によれば、TPIの期間が終了するまでに、割り込み処理タスク30の実行が終了しないときに、TPIの次のTPの期間から、TPIの次のTPに属するタスクの実行に必要な期間を除いた余剰期間がある場合、その余剰期間の範囲内でTPIの期間を延長することができる。これによれば、多くの割り込みが発生して、TPIのタイムリソースで全ての割り込み処理タスク30を実行することができない場合であっても、TPIの次のTPのタイムリソースを利用することによって、次のTPIまで待つことなく割り込み処理タスク30の実行を継続することができる。そのため、割り込み処理の実行遅延を抑制することができる。また、TPIの次のTPの余りのタイムリソースを利用しているため、割り込み処理の実行遅延によって生じる処理の破綻も防止することができる。
 さらに、本発明は上述した実施の形態のみに限定されるものではなく、既に述べた本発明の要旨を逸脱しない範囲において種々の変更が可能であることは勿論である。例えば、実施の形態1乃至3の全て又はいずれかを組み合わせて実施するようにしてもよい。
 本実施の形態では、TP1~TP3のそれぞれに属するタスクが、それぞれ安全監視タスク24、通常制御タスク26及び安全制御タスク28の1つである場合について例示したが、TPに属するタスクの種類及び数は、これに限られない。例えば、TP1~TP3のそれぞれに、安全監視タスク24、通常制御タスク26及び安全制御タスク28のそれぞれが複数属するようにしてもよい。また、TP1~TP3のそれぞれに、さらに、安全監視タスク24、通常制御タスク26及び安全制御タスク28以外の任意の処理を実行するタスクが属するようにしてもよい。
 本実施の形態では、OSが、TP1~TP3及びTPIを有する場合について例示したが、TPの種類及び数は、これに限られない。スケジューリングパターンについても、本実施の形態に例示したものに限られない。
 本実施の形態3において、制御対象の制御周期に余裕がある場合、TPIのようにタイムリソースが不足する可能性がるTPの次に、期間譲渡用のPTを備えるようにしてもよい。
1、2 安全制御装置
10 プロセッサ
11 実行用メモリ
12 I/Oポート
13 不揮発性メモリ
14 リセット回路
15 マイクロコントローラ
21 パーティションスケジューラ
22 スケジューリングテーブル
23、25、27、29 タスクスケジューラ
24 安全監視タスク
26 通常制御タスク
28 安全制御タスク
30 割り込み処理タスク
31 割り込みハンドラ
100 オペレーティングシステム
101 安全監視アプリケーション
102 通常制御アプリケーション
103 安全制御アプリケーション
104 割り込み処理アプリケーション

Claims (6)

  1.  プロセッサと、
     制御対象の機能安全の確保に関する処理を実行する安全関連タスク、その他の前記制御対象の制御に関する処理を実行する非安全関連タスク、及び、前記制御対象からの割り込みに応じた処理を実行する割り込み処理タスクに対する前記プロセッサの実行時間の割り当てを制御するシステムプログラムと、
     前記制御対象からの割り込みに応じて実行される割り込みハンドラと、
     を備え、
     前記プロセッサは、前記システムプログラムを実行することによって、前記安全関連タスクに前記実行時間が割り当てられる安全関連タイムパーティション、前記非安全関連タスクに前記実行時間が割り当てられる非安全関連タイムパーティション、及び、実行予約された実行予約タスクに前記実行時間が割り当てられる予約実行タイムパーティションのスケジューリング内容を示すスケジューリング情報に従って、前記タスクをスケジューリングし、
     前記プロセッサは、前記制御対象から割り込みがあったときに、前記割り込みハンドラを実行することによって、当該割り込みに応じた処理を実行する割り込み処理タスクを、前記実行予約タスクとして実行予約し、
     前記プロセッサは、前記スケジューリングにおいて、前記予約実行タイムパーティションよりも前のタイムパーティションの期間が終了する前に、当該前のタイムパーティションに前記実行時間が割り当てられるタスクの実行が終了している場合、前記実行予約タスクのいずれかに、前記予約実行パーティションにおける前記実行時間に代えて当該前のタイムパーティションにおける前記実行時間を割り当てる
     安全制御装置。
  2.  前記プロセッサは、前記スケジューリングにおいて、前記予約実行タイムパーティションの期間が終了するまでに、前記実行予約タスクの実行が終了しないとき、当該予約実行タイムパーティションの次のタイムパーティションの期間から、当該次のタイムパーティションにおいて前記実行時間が割り当てられるタスクの実行に必要な期間を除いた余剰期間がある場合、当該余剰期間の範囲内で当該予約実行タイムパーティションの期間を延長する
     請求項1に記載の安全制御装置。
  3.  前記安全制御装置は、前記制御対象からの割り込みの割り込み要因と、当該割り込み要因の割り込みに応じた処理を実行する割り込み処理タスクと、を対応付けた対応情報が格納される記憶部をさらに備え、
     前記プロセッサは、前記スケジューリングにおいて、前記記憶部に格納された対応情報に基づいて、前記制御対象からの割り込みの割り込み要因に対応する割り込み処理タスクを、前記実行予約タスクとして実行予約する
     請求項1又は2に記載の安全制御装置。
  4.  前記割り込み処理タスクは、予め定められた優先度を有し、
     前記プロセッサは、前記スケジューリングにおいて、より優先度の高い割り込み処理タスクである実行予約タスクに対して優先的に前記予約実行パーティションにおける前記実行時間に代えて前記前のタイムパーティションにおける前記実行時間を割り当てる
     請求項1乃至3のいずれか1項に記載の安全制御装置。
  5.  前記プロセッサは、前記スケジューリングにおいて、前記タイムパーティションにおいて前記実行時間が割り当てられるタスクが実行可能状態となっている場合に、当該タイムパーティションにおいて当該タスクに前記実行時間を割り当て、
     前記プロセッサは、前記実行予約タスクの実行予約において、前記割り込み処理タスクを実行可能状態にすることによって、当該割り込み処理タスクを前記実行予約タスクとして実行予約する
     請求項1乃至4のいずれか1項に記載の安全制御装置。
  6.  制御対象から割り込みがあったときに、当該割り込みに応じた処理を実行する割り込み処理タスクを、実行予約タスクとして実行予約するステップと、
     前記制御対象の機能安全の確保に関する処理を実行する安全関連タスクにプロセッサの実行時間が割り当てられる安全関連タイムパーティション、その他の前記制御対象の制御に関する処理を実行する非安全関連タスクに前記実行時間が割り当てられる非安全関連タイムパーティション、及び、前記実行予約された実行予約タスクに前記実行時間が割り当てられる予約実行タイムパーティションのスケジューリング内容を示すスケジューリング情報に従って、前記タスクをスケジューリングするステップと、
     を備え、
     前記スケジューリングするステップでは、前記予約実行タイムパーティションよりも前のタイムパーティションの期間が終了する前に、当該前のタイムパーティションに前記実行時間が割り当てられるタスクの実行が終了している場合、前記実行予約タスクのいずれかに、前記予約実行パーティションにおける前記実行時間に代えて当該前のタイムパーティションにおける前記実行時間を割り当てる
     安全制御方法。
PCT/JP2011/000524 2011-01-31 2011-01-31 安全制御装置および安全制御方法 Ceased WO2012104896A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2011528113A JP5136693B2 (ja) 2011-01-31 2011-01-31 安全制御装置および安全制御方法
PCT/JP2011/000524 WO2012104896A1 (ja) 2011-01-31 2011-01-31 安全制御装置および安全制御方法
US13/259,795 US20120198464A1 (en) 2011-01-31 2011-01-31 Safety controller and safety control method
CN201180038085.7A CN103052923B (zh) 2011-01-31 2011-01-31 安全控制装置及安全控制方法
EP11822790.9A EP2677377B1 (en) 2011-01-31 2011-01-31 Safety control device and safety control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/000524 WO2012104896A1 (ja) 2011-01-31 2011-01-31 安全制御装置および安全制御方法

Publications (1)

Publication Number Publication Date
WO2012104896A1 true WO2012104896A1 (ja) 2012-08-09

Family

ID=46578515

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/000524 Ceased WO2012104896A1 (ja) 2011-01-31 2011-01-31 安全制御装置および安全制御方法

Country Status (5)

Country Link
US (1) US20120198464A1 (ja)
EP (1) EP2677377B1 (ja)
JP (1) JP5136693B2 (ja)
CN (1) CN103052923B (ja)
WO (1) WO2012104896A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015097839A1 (ja) * 2013-12-27 2015-07-02 株式会社日立製作所 優先度割込み対応リアルタイムハイパバイザ
WO2024024264A1 (ja) * 2022-07-29 2024-02-01 株式会社日立産機システム コントロールシステム及び方法

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102009019096A1 (de) * 2009-04-20 2010-11-04 Pilz Gmbh & Co. Kg Sicherheitssteuerung und Verfahren zum Steuern einer automatisierten Anlage
JP5267737B2 (ja) * 2011-01-31 2013-08-21 トヨタ自動車株式会社 安全制御装置および安全制御方法
JP5321686B2 (ja) * 2011-01-31 2013-10-23 トヨタ自動車株式会社 安全制御装置および安全制御方法
US9086902B2 (en) * 2012-12-18 2015-07-21 International Business Machines Corporation Sending tasks between virtual machines based on expiration times
JP6097950B2 (ja) * 2013-04-03 2017-03-22 理想科学工業株式会社 駆動制御装置
JP2014211689A (ja) * 2013-04-17 2014-11-13 トヨタ自動車株式会社 安全制御装置および安全制御方法
CN106743327A (zh) * 2017-04-11 2017-05-31 兖州煤业股份有限公司 一种矿用带式输送机的控制器
US20210012448A1 (en) * 2017-09-25 2021-01-14 New Go - Arc (2015) Ltd. Systems and Methods for Improving Personal Safety in an Industrial Environment
KR102054832B1 (ko) * 2017-09-26 2019-12-12 미쓰비시덴키 가부시키가이샤 컨트롤러
JP6996257B2 (ja) * 2017-11-27 2022-01-17 オムロン株式会社 制御装置、制御方法、およびプログラム
JP7003217B2 (ja) * 2018-03-05 2022-01-20 三菱電機株式会社 エレベーター安全制御装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07295840A (ja) * 1994-04-28 1995-11-10 Nec Ic Microcomput Syst Ltd マルチプログラミングにおける事象管理方式
JP2006338426A (ja) * 2005-06-03 2006-12-14 Hitachi Ltd 計算機システム
JP2009251663A (ja) * 2008-04-01 2009-10-29 Denso Corp タスク制御方法及びマルチタスクシステム
JP2010271759A (ja) 2009-05-19 2010-12-02 Toyota Motor Corp 安全制御装置および安全制御方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7302685B2 (en) * 2000-06-02 2007-11-27 Honeywell International Inc. Methods and apparatus for sharing slack in a time-partitioned system
US6981129B1 (en) * 2000-11-02 2005-12-27 Intel Corporation Breaking replay dependency loops in a processor using a rescheduled replay queue
US7673304B2 (en) * 2003-02-18 2010-03-02 Microsoft Corporation Multithreaded kernel for graphics processing unit
JP3952992B2 (ja) * 2003-06-03 2007-08-01 ソニー株式会社 情報処理装置、プロセス制御方法、並びにコンピュータ・プログラム
GB0423094D0 (en) * 2004-10-18 2004-11-17 Ttp Communications Ltd Interrupt control
DE102004054571B4 (de) * 2004-11-11 2007-01-25 Sysgo Ag Verfahren zur Verteilung von Rechenzeit in einem Rechnersystem
US7958506B2 (en) * 2006-06-22 2011-06-07 Intel Corporation Time sliced interrupt processing on virtualized platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07295840A (ja) * 1994-04-28 1995-11-10 Nec Ic Microcomput Syst Ltd マルチプログラミングにおける事象管理方式
JP2006338426A (ja) * 2005-06-03 2006-12-14 Hitachi Ltd 計算機システム
JP2009251663A (ja) * 2008-04-01 2009-10-29 Denso Corp タスク制御方法及びマルチタスクシステム
JP2010271759A (ja) 2009-05-19 2010-12-02 Toyota Motor Corp 安全制御装置および安全制御方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP2677377A4

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015097839A1 (ja) * 2013-12-27 2015-07-02 株式会社日立製作所 優先度割込み対応リアルタイムハイパバイザ
JPWO2015097839A1 (ja) * 2013-12-27 2017-03-23 株式会社日立製作所 パーティション実行制御装置、パーティション実行制御方法及び計算機に読み込み可能な記憶媒体
WO2024024264A1 (ja) * 2022-07-29 2024-02-01 株式会社日立産機システム コントロールシステム及び方法
JP2024018790A (ja) * 2022-07-29 2024-02-08 株式会社日立産機システム コントロールシステム及び方法
JP7848076B2 (ja) 2022-07-29 2026-04-20 株式会社日立産機システム コントロールシステム及び方法

Also Published As

Publication number Publication date
US20120198464A1 (en) 2012-08-02
JP5136693B2 (ja) 2013-02-06
CN103052923A (zh) 2013-04-17
CN103052923B (zh) 2014-06-04
EP2677377B1 (en) 2017-03-01
JPWO2012104896A1 (ja) 2014-07-03
EP2677377A1 (en) 2013-12-25
EP2677377A4 (en) 2014-08-06

Similar Documents

Publication Publication Date Title
JP5136693B2 (ja) 安全制御装置および安全制御方法
JP5136695B2 (ja) 安全制御装置および安全制御方法
JP5267737B2 (ja) 安全制御装置および安全制御方法
JP5321686B2 (ja) 安全制御装置および安全制御方法
JP5240402B2 (ja) 安全制御装置および安全制御方法
JP5446447B2 (ja) 安全制御装置および安全制御方法
JP5621857B2 (ja) 安全制御装置および安全制御方法
JP5834935B2 (ja) 安全制御装置及び安全制御方法
JP5633501B2 (ja) 制御装置および制御方法
JP5906584B2 (ja) 制御装置及び制御方法
JP5853716B2 (ja) 情報処理装置およびタスク制御方法
JP5849731B2 (ja) 情報処理装置及びデータ格納方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180038085.7

Country of ref document: CN

WWE Wipo information: entry into national phase

Ref document number: 2011528113

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13259795

Country of ref document: US

REEP Request for entry into the european phase

Ref document number: 2011822790

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2011822790

Country of ref document: EP

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

Ref document number: 11822790

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE