WO2019198169A1 - コンピュータシステムおよびコンピュータプログラム - Google Patents

コンピュータシステムおよびコンピュータプログラム Download PDF

Info

Publication number
WO2019198169A1
WO2019198169A1 PCT/JP2018/015168 JP2018015168W WO2019198169A1 WO 2019198169 A1 WO2019198169 A1 WO 2019198169A1 JP 2018015168 W JP2018015168 W JP 2018015168W WO 2019198169 A1 WO2019198169 A1 WO 2019198169A1
Authority
WO
WIPO (PCT)
Prior art keywords
switching
time
interval
start time
next start
Prior art date
Application number
PCT/JP2018/015168
Other languages
English (en)
French (fr)
Inventor
千紗都 佐藤
吉章 片山
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to PCT/JP2018/015168 priority Critical patent/WO2019198169A1/ja
Priority to TW107121117A priority patent/TW201944252A/zh
Publication of WO2019198169A1 publication Critical patent/WO2019198169A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/22Handling requests for interconnection or transfer for access to input/output bus using successive scanning, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q9/00Arrangements in telecontrol or telemetry systems for selectively calling a substation from a main station, in which substation desired apparatus is selected for applying a control signal thereto or for obtaining measured values therefrom

Definitions

  • the present invention relates to device control.
  • output to a device is determined according to a target input signal.
  • the target input signal is an input signal serving as a trigger for changing the output to the device, and may be a combination of a plurality of input signals.
  • a series of processing is mounted according to the timing.
  • the polling period is set to be equal to or shorter than the shortest time until the target input signal changes. Thereby, the omission of processing for the change of the target input signal is avoided.
  • the change interval of the target input signal is long, useless polling occurs.
  • Patent Document 1 discloses a computer system for an embedded device as follows.
  • the system adaptively changes the polling period. Thereby, useless polling is suppressed. And the memory usage and processing load which generate
  • Patent Document 1 suppresses the processing load by making the polling cycle variable.
  • the target input signal is confirmed only once in the polling cycle, a change in the target input signal can be detected only at the timing of the polling cycle. Therefore, the process cannot be performed immediately after the target input signal changes.
  • it is possible to implement so that an output process corresponding to the change of the target input signal is started by using the external interrupt function of the microcomputer.
  • the response time from when the target input signal changes to when the output to the device changes increases.
  • the target input signal is a combination of multiple input signals and the output to the device is changed according to the combination of those waveforms
  • the number of interrupts of the microcomputer is insufficient or the load increases due to multiple interrupt processing Will occur. Therefore, it is difficult to realize this solution.
  • the external interrupt function of the microcomputer cannot be used, it is necessary to perform continuous polling processing in accordance with the shortest change interval of the target input signal. For this reason, when the actual change interval of the target input signal is long, idle time, that is, useless time occurs.
  • An object of the present invention is to make it possible to shorten the time for continuous polling processing.
  • the computer system of the present invention Polling processing for repeatedly checking the input signal from the input device until the input signal from the input device satisfies the switching condition based on a switching time file indicating one or more switching times when the contents of the output to the output device are switched
  • the next start time determination unit for determining the next start time, which is the time at which is started next,
  • a timing detector that starts the polling process from the next start time and detects a switching timing at which an input signal from the input device satisfies the switching condition;
  • a switching unit that switches the content of the output to the output device when the switching timing is detected;
  • a switching time registration unit that registers the current switching time in the switching time file when the content of the output to the output device is switched;
  • the next start time is determined based on the switching time file, it is possible to start a continuous polling process immediately before the switching timing. That is, it is possible to shorten the polling processing time.
  • FIG. 1 is a configuration diagram of a computer 100 in Embodiment 1.
  • FIG. 2 is a diagram illustrating a configuration example of a computer system 200 according to Embodiment 1.
  • FIG. 3 is a flowchart of a device control method in the first embodiment.
  • 5 is a flowchart illustrating a specific example of a device control method according to the first embodiment.
  • 5 is a flowchart illustrating a specific example of a device control method according to the first embodiment.
  • FIG. 6 is a diagram showing a specific example of ⁇ first algorithm> in the first embodiment.
  • FIG. 6 is a diagram showing a specific example of ⁇ first algorithm> in the first embodiment.
  • FIG. 3 is a configuration diagram of a computer 100 according to a second embodiment.
  • 10 is a flowchart of a device control method according to the second embodiment.
  • 10 is a flowchart illustrating a specific example of a device control method according to the second embodiment.
  • Embodiment 1 FIG. A computer system for controlling the device will be described with reference to FIGS.
  • the configuration of the computer 100 will be described with reference to FIG.
  • the computer 100 is also referred to as a device control apparatus.
  • the computer 100 is a microcomputer.
  • the computer 100 is a computer including hardware such as a processor 101, a memory 102, an auxiliary storage device 103, and a peripheral device group 140. These hardwares are connected to each other via signal lines.
  • the processor 101 is an IC (Integrated Circuit) that performs arithmetic processing, and controls other hardware.
  • the processor 101 is an MPU (Micro Processing Unit).
  • the memory 102 is a volatile storage device.
  • the memory 102 is also called main memory or main memory.
  • the memory 102 is a RAM (Random Access Memory).
  • Data stored in the memory 102 is stored in the auxiliary storage device 103 as necessary.
  • the auxiliary storage device 103 is a nonvolatile storage device.
  • the auxiliary storage device 103 is a ROM (Read Only Memory), a HDD (Hard Disk Drive), or a flash memory. Data stored in the auxiliary storage device 103 is loaded into the memory 102 as necessary.
  • the peripheral device group 140 is one or more peripheral devices.
  • the peripheral device group 140 includes a startup timer 141 and an input device 142.
  • An output device 201 and a sensor group 210 are connected to the peripheral device group 140.
  • the computer 100 includes elements such as a main processing unit 110 and a polling processing unit 120. These elements are realized by software.
  • the main processing unit 110 includes a next start time determination unit 111, a polling process activation unit 112, and another processing unit 113.
  • the polling processing unit 120 includes a timing detection unit 121, a switching unit 122, and a switching time registration unit 123.
  • the auxiliary storage device 103 stores a computer program for causing a computer to function as the main processing unit 110 and the polling processing unit 120.
  • the computer program is loaded into the memory 102 and executed by the processor 101.
  • the auxiliary storage device 103 stores an OS (Operating System). At least a part of the OS is loaded into the memory 102 and executed by the processor 101. That is, the processor 101 executes the computer program while executing the OS.
  • Data obtained by executing the computer program is stored in a storage device such as the memory 102, the auxiliary storage device 103, a register in the processor 101, or a cache memory in the processor 101.
  • the memory 102 has a function of a storage unit that stores a switching time file 131, a start time file 132, and the like.
  • the computer 100 may include a plurality of processors that replace the processor 101.
  • the plurality of processors share the role of the processor 101.
  • the computer program can be recorded (stored) in a computer-readable manner on a nonvolatile recording medium such as an optical disk or a flash memory.
  • the computer program in the computer 100 is also called a device control program.
  • the computer system 200 is also referred to as a device control system.
  • the computer system 200 is a computer system for embedded devices.
  • the computer system 200 includes hardware such as the computer 100, a first sensor 211, a second sensor 212, and a motor 201A.
  • the first sensor 211 is one sensor in the sensor group 210 and is connected to the GPIO 142A.
  • the GPIO 142A is an example of the input device 142.
  • GPIO is an abbreviation for General Purpose Input Output.
  • the second sensor 212 is one sensor in the sensor group 210 and is connected to the A / D converter 142B.
  • the A / D converter 142B is an example of the input device 142.
  • a / D is an abbreviation for Analog to Digital.
  • the motor 201 ⁇ / b> A is an example of the output device 201 and is connected to the control timer 143.
  • the control timer 143 is a timer for controlling the motor 201 ⁇ / b> A and is included in the peripheral device group 140.
  • the computer 100 may be connected with an input device and an output device.
  • An example of an input device is a mouse and a keyboard, and an example of an output device is a display.
  • the operation of the computer 100 corresponds to a device control method.
  • the device control method procedure corresponds to the device control program procedure.
  • step S ⁇ b> 110 the next start time determination unit 111 determines the next start time based on the switching time file 131.
  • the switching time file 131 indicates one or more switching times. That is, the switching time file 131 indicates a single switching time or a plurality of switching times.
  • the switching time is the time when the output contents are switched.
  • the output content is the content of output to the output device 201. Specifically, the output content is the content of information output from the processor 101 for controlling the output device 201. For example, the output content is the content of PWM waveform information output from the processor 101 to the control timer 143.
  • the PWM waveform information is information for specifying a PWM waveform for controlling the motor 201A, and is input from the control timer 143 to the motor 201A.
  • PWM is an abbreviation for Pulse Width Modulation.
  • the next start time is the time when the polling process for the input signal is started next.
  • the polling process for the input signal is a polling process for repeatedly checking the input signal until the input signal satisfies the output content switching condition.
  • the input signal is a signal that is output from the input device 142 and input to the processor 101.
  • step S120 the polling process activation unit 112 activates the polling process for input signals at the next start time.
  • step S ⁇ b> 130 the timing detection unit 121 starts polling processing for input signals and detects switching timing.
  • the switching timing is a timing at which the input signal satisfies the output content switching condition.
  • the switching condition is a condition for the input signal and is determined in advance.
  • step S140 the switching unit 122 switches the output contents when the switching timing is detected.
  • step S150 the switching time registration unit 123 registers the current switching time in the switching time file 131 when the output content is switched.
  • step S110 to step S150 is repeatedly executed.
  • step S111 to step S123 will be described with reference to FIG.
  • step S ⁇ b> 111 the next start time determination unit 111 calculates the next start time based on the switching time file 131. Details of the calculation process (S111) will be described later.
  • step S112 the next start time determination unit 111 registers the next start time in the start time file 132.
  • the start time file 132 indicates one or more start times.
  • the start time is the time when the polling process for the input signal is started or the time when the polling process for the input signal is started.
  • step S121 the polling process activation unit 112 reads the next start time from the start time file 132.
  • step S122 the polling process activation unit 112 activates the activation timer 141 based on the next start time.
  • the activation timer 141 is a timer for activating the polling processing unit 120, that is, a timer for starting polling processing.
  • the polling process activation unit 112 operates as follows. First, the polling process activation unit 112 calculates a count time. The count time is the time from the current time to the next start time. Next, the polling process activation unit 112 calculates a counter value corresponding to the count time. Next, the polling process activation unit 112 sets the counter value in the activation timer 141. Then, the polling process activation unit 112 activates the activation timer 141.
  • step S122 the activation timer 141 times out at the next start time.
  • an interrupt for activating the polling processing unit 120 is generated.
  • step S123 the polling processing unit 120 is activated at the next start time. Specifically, the polling processing unit 120 is activated by the function of the OS.
  • step S124 the other processing unit 113 executes other processing.
  • the other processing unit 113 executes other processing from when the activation timer 141 is activated until the activation timer 141 times out.
  • the other processes are processes different from the processes of the next start time determination unit 111, the polling process activation unit 112, the timing detection unit 121, the switching unit 122, and the switching time registration unit 123, respectively.
  • the other process is an initialization process or a communication process.
  • step S ⁇ b> 131 the timing detection unit 121 acquires an input signal from the input device 142.
  • the timing detection unit 121 determines whether it is the switching timing. Specifically, the timing detection unit 121 determines whether the acquired input signal satisfies the switching condition. The timing when the acquired input signal satisfies the switching condition is the switching timing.
  • the switching condition specifies a change in the input signal. In this case, the rising timing of the input signal or the falling timing of the input signal is the switching timing.
  • the switching condition specifies the number of changes in the input signal. In this case, the timing at which the change in the input signal occurs the specified number of times is the switching timing.
  • the switching condition may be a condition for a plurality of input signals.
  • the switching condition is a condition for three input signals obtained from three input devices, and specifies three waveforms.
  • the timing at which the three waveforms represented by the three input signals coincide with the three waveforms specified as the switching condition is the switching timing. If it is time to switch, the process proceeds to step S141. If it is not the switching timing, the process proceeds to step S131.
  • step S141 the switching unit 122 determines new output contents.
  • a method for determining new output contents is arbitrary.
  • the switching unit 122 determines new output content by referring to the output content table.
  • the output content table is a table in which one or more output contents are defined.
  • the switching unit 122 selects one output content from the output content table as new output content.
  • step S142 the switching unit 122 executes an output process corresponding to the new output content.
  • the switching unit 122 executes a software module such as a device driver by using new output content information as an input.
  • step S151 the switching time registration unit 123 registers the current switching time in the switching time file 131. Specifically, the switching time registration unit 123 registers the time at which the output process is started in step S142 in the switching time file 131 as the current switching time. After step S151, the polling processing unit 120 stops.
  • Steps S111 to S151 are repeatedly executed (see FIGS. 4 and 5).
  • next start time determination unit 111 calculates the next start time by one of the following algorithms.
  • the next start time determination unit 111 acquires a plurality of switching times from the switching time file 131 and calculates a plurality of switching time intervals at the plurality of switching times.
  • the switching time interval is an interval between two switching times that are continuous in time series.
  • the next start time determination unit 111 calculates one or more interval errors in a plurality of switching time intervals.
  • the interval error is an absolute value of the difference between two consecutive switching time intervals in the time series.
  • the next start time determination unit 111 selects the maximum interval error from one or more interval errors.
  • the next start time determination unit 111 selects a reference interval and subtracts the maximum interval error from the reference interval.
  • the time obtained by this is called waiting time.
  • the reference interval is a reference switching time interval. For example, the reference interval is the previous switching time interval.
  • the next start time determination unit 111 calculates the time when the waiting time has elapsed from the previous switching time. The calculated time is the next start time.
  • next start time previous switching time + (reference interval-maximum interval error)
  • FIG. 6 A specific example of ⁇ first algorithm> will be described with reference to FIGS.
  • FIG. 6 six switching time intervals at seven switching times are shown. A value surrounded by a circle is a switching time interval. Furthermore, five interval errors in six switching time intervals are shown. The maximum interval error among the five interval errors is 15 microseconds.
  • timing control means the processing from step S111 to step S122 (see FIG. 4).
  • the polling process means the process from step S131 to step S151 (see FIG. 5).
  • the method for obtaining the maximum interval error may be a method using a fixed value calculated from an interval error measured in advance before the operation of the computer system 200, in addition to the method of calculating after the operation of the computer system 200 is started as described above.
  • the polling process may be executed at the timing in the prior art any number of times after the start of the operation of the computer system 200, and a fixed value smaller than the next switching time is used as (reference interval ⁇ maximum interval error). Polling processing may be executed. In this case, a plurality of switching times between them are registered in the switching time file 131.
  • the next start time determination unit 111 acquires a plurality of switching times from the switching time file 131 and analyzes the increasing / decreasing tendency of the switching time intervals at the plurality of switching times. Next, the next start time determination unit 111 predicts the next interval error based on the analysis result.
  • the next interval error is an interval error between the previous switching time interval and the next switching time interval.
  • the previous switching time interval is the switching time interval immediately before the current time
  • the next switching time interval is the switching time interval immediately after the current time.
  • the predicted next interval error is called a predicted interval error.
  • the next start time determination unit 111 adds the adjustment time to the previous interval error. The time obtained by this is the prediction interval error.
  • the next start time determination unit 111 subtracts the adjustment time from the previous interval error.
  • the time obtained by this is the prediction interval error.
  • the adjustment time may be a fixed time, or may be a time according to the magnitude of increase / decrease in the switching time interval.
  • the next start time determination unit 111 selects a reference interval and subtracts a prediction interval error from the reference interval. The time obtained by this is called waiting time.
  • the reference interval is a reference switching time interval.
  • the reference interval is the previous switching time interval.
  • the next start time determination unit 111 calculates the time when the waiting time has elapsed from the previous switching time. The calculated time is the next start time.
  • next start time previous switching time + (reference interval-prediction interval error)
  • the second algorithm is particularly effective for an input device in which the generation interval of the input signal that satisfies the switching condition continuously increases or decreases.
  • the second algorithm is particularly effective for motors.
  • Embodiment 1 it is possible to predict the timing at which output content switching should be performed, and to perform polling processing without losing input signal changes necessary to determine the content of output switching. Become. Specifically, it is possible to determine the next start time and start the polling process at the next start time. Then, the polling process is started at an appropriate timing in response to the interruption, and the polling process is finished in a short time. Therefore, the dead time of the polling process is reduced and the processing efficiency is improved.
  • the first embodiment can also be used in a multitasking environment.
  • FIG. A mode for dealing with a situation in which the switching timing cannot be detected will be described with reference to FIGS. 8 to 10 mainly on differences from the first embodiment.
  • the configuration of the computer 100 will be described with reference to FIG.
  • the computer 100 further includes a cancellation unit 124.
  • the computer program further causes the computer to function as the cancellation unit 124.
  • step S130A the timing detection unit 121 starts a polling process for an input signal.
  • step S130B the timing detection unit 121 performs a timing detection operation.
  • the timing detection operation is an operation for detecting the switching timing. Specifically, the timing detection unit 121 determines whether the input signal satisfies the output content switching condition. If the switching timing is detected, the process proceeds to step S140. If the switching timing is not detected, the process proceeds to step S130C.
  • step S130C the cancel unit 124 determines whether the upper limit time of the polling process has elapsed from the start time of the polling process. When the upper limit time of the polling process has elapsed, the cancel unit 124 ends the polling process. If the upper limit time of the polling process has not elapsed, the process proceeds to step S130B. That is, the cancellation unit 124 continues the polling process.
  • step S130C the cancel unit 124 ends the polling process when the switching timing is not detected between the polling process start time and the upper limit time of the polling process.
  • Step S140 and step S150 are as described in the first embodiment (see FIG. 3).
  • step S131 that is, steps S111 to S124 are as described in the first embodiment (see FIG. 4).
  • Steps S131 and S132 are as described in the first embodiment (see FIG. 5). If it is time to switch in step S132, the process proceeds to step S141. If it is not the switching timing in step S132, the process proceeds to step S133.
  • step S133 the cancel unit 124 determines whether the upper limit time of the polling process has elapsed from the start time of the polling process.
  • the start time of the polling process is the time when the polling process is actually started, that is, the time when the polling processing unit 120 is activated.
  • the start time of the polling process may be the start time registered in the start time file 132.
  • the upper limit time of the polling process may be determined in advance, or may be calculated based on a predetermined formula.
  • the cancellation unit 124 calculates the upper limit time of the polling process by calculating the following expression.
  • step S134 the cancel unit 124 ends the polling process.
  • the process proceeds to step S111.
  • arbitrary processing is executed.
  • the arbitrary process is a process determined as a process to be performed when an input signal is missed.
  • the equation for calculating the next start time may be changed.
  • the next start time determination unit 111 calculates the temporary start time using the original equation.
  • the temporary start time is the same time as the next start time calculated by the original equation.
  • the next start time determination unit 111 calculates the next start time by subtracting the adjustment time from the temporary start time.
  • the adjustment time is a predetermined time.
  • Steps S141 to S151 are as described in the first embodiment (see FIG. 5).
  • Embodiment 2 it is possible to cope with a situation where the switching timing cannot be detected. For example, it is possible to cope with the case where the switching timing occurs before the next start time or when the switching timing does not occur due to some abnormality. In addition, it is possible to perform processing appropriate for such a situation.
  • the computer 100 includes a processing circuit 109.
  • the processing circuit 109 is hardware that implements the main processing unit 110 and the polling processing unit 120.
  • the processing circuit 109 may be dedicated hardware or the processor 101 that executes a program stored in the memory 102.
  • the processing circuit 109 is dedicated hardware, the processing circuit 109 is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC, an FPGA, or a combination thereof.
  • ASIC is an abbreviation for Application Specific Integrated Circuit
  • FPGA is an abbreviation for Field Programmable Gate Array.
  • the computer 100 may include a plurality of processing circuits that replace the processing circuit 109. The plurality of processing circuits share the role of the processing circuit 109.
  • processing circuit 109 some functions may be realized by dedicated hardware, and the remaining functions may be realized by software or firmware.
  • the processing circuit 109 can be realized by hardware, software, firmware, or a combination thereof.
  • the embodiment is an example of a preferred embodiment and is not intended to limit the technical scope of the present invention.
  • the embodiment may be implemented partially or in combination with other embodiments.
  • the procedure described using the flowchart and the like may be changed as appropriate.
  • 100 computer 101 processor, 102 memory, 103 auxiliary storage device, 109 processing circuit, 110 main processing unit, 111 next start time determining unit, 112 polling process starting unit, 113 other processing unit, 120 polling processing unit, 121 timing detection unit 122 switching unit, 123 switching time registration unit, 124 cancellation unit, 131 switching time file, 132 start time file, 140 peripheral device group, 141 start timer, 142 input device, 142A GPIO, 142B A / D converter, 143 control timer , 200 computer system, 201 output device, 201A motor, 210 sensor group, 211 first sensor, 212 second sensor.

Abstract

次回開始時刻決定部(111)は、出力デバイス(201)への出力の内容が切り替えられた切り替え時刻を複数示す切り替え時刻ファイル(131)に基づいて、入力デバイス(142)からの入力信号が切り替え条件を満たすまで前記入力デバイスからの入力信号を繰り返し確認するポーリング処理が次に開始される時刻である次回開始時刻を決定する。タイミング検出部(121)は、前記次回開始時刻から前記ポーリング処理を開始し、前記入力デバイスからの入力信号が前記切り替え条件を満たす切り替えタイミングを検出する。切り替え部(122)は、前記切り替えタイミングが検出されたときに前記出力デバイスへの出力の内容を切り替える。

Description

コンピュータシステムおよびコンピュータプログラム
 本発明は、デバイス制御に関するものである。
 組み込み機器におけるデバイス制御では、対象入力信号に応じてデバイスへの出力が決定される。対象入力信号は、デバイスへの出力を変化させるためのトリガとなる入力信号であり、複数の入力信号の組み合せとなることもある。
 一般的に、指定時間以内に何らかの処理が実施されなければならない場合、対象入力信号が変化したか否かがポーリングによって定期的に確認される。そして、そのタイミングに合わせて一連の処理が実装される。また、対象入力信号の変化が一定周期でない場合、ポーリング周期は、対象入力信号が変化するまでの最短時間以下に設定される。これにより、対象入力信号の変化に対する処理の抜けが回避される。しかし、対象入力信号の変化間隔が長い場合には、無駄なポーリングが発生してしまう。
 特許文献1は、次のような組み込み機器向けのコンピュータシステムを開示している。
 そのシステムは、ポーリング周期を適応的に変化させる。これにより、無駄なポーリングが抑制される。そして、ポーリングに伴って発生するメモリ使用量および処理負荷が抑制される。
特開平08-180287号公報
 特許文献1に開示されたシステムは、ポーリング周期を可変にすることにより、処理負荷を抑制する。しかし、ポーリング周期に一度しか対象入力信号を確認しないため、ポーリング周期のタイミングでしか対象入力信号の変化を検知できない。そのため、対象入力信号の変化後、即座に処理を実施することができない。
 この解決策として、マイクロコンピュータの外部割り込み機能を利用することによって、対象入力信号の変化時にそれに応じた出力処理が起動するように実装することも可能である。しかしながら、割り込みによるオーバーヘッドが発生するため、対象入力信号が変化してからデバイスへの出力が変化するまでの応答時間が長くなる。また、対象入力信号が複数の入力信号の組み合わせとなっていて、それらの波形の組み合わせに応じてデバイスへの出力を変化させる場合には、マイクロコンピュータの割り込み本数不足または複数の割り込み処理による負荷増加が発生してしまう。そのため、この解決策の実現は困難である。
 また、マイクロコンピュータの外部割り込み機能が利用できない場合には、対象入力信号の最短の変化間隔に合わせて連続したポーリング処理を行う必要がある。そのため、対象入力信号の実際の変化間隔が長い場合には、空回り時間、すなわち、無駄な時間が発生してしまう。
 本発明は、連続したポーリング処理の時間を短縮できるようにすることを目的とする。
 本発明のコンピュータシステムは、
 出力デバイスへの出力の内容が切り替えられた切り替え時刻を1つ以上示す切り替え時刻ファイルに基づいて、入力デバイスからの入力信号が切り替え条件を満たすまで前記入力デバイスからの入力信号を繰り返し確認するポーリング処理が次に開始される時刻である次回開始時刻を決定する次回開始時刻決定部と、
 前記次回開始時刻から前記ポーリング処理を開始し、前記入力デバイスからの入力信号が前記切り替え条件を満たす切り替えタイミングを検出するタイミング検出部と、
 前記切り替えタイミングが検出されたときに前記出力デバイスへの出力の内容を切り替える切り替え部と、
 前記出力デバイスへの出力の内容が切り替えられた場合に今回の切り替え時刻を前記切り替え時刻ファイルに登録する切り替え時刻登録部とを備える。
 本発明によれば、切り替え時刻ファイルに基づいて次回開始時刻が決定されるため、切り替えタイミングの直前に連続したポーリング処理を開始することが可能となる。つまり、ポーリング処理の時間を短縮することが可能となる。
実施の形態1におけるコンピュータ100の構成図。 実施の形態1におけるコンピュータシステム200の構成例を示す図。 実施の形態1におけるデバイス制御方法のフローチャート。 実施の形態1におけるデバイス制御方法の具体例を示すフローチャート。 実施の形態1におけるデバイス制御方法の具体例を示すフローチャート。 実施の形態1における<第1アルゴリズム>の具体例を示す図。 実施の形態1における<第1アルゴリズム>の具体例を示す図。 実施の形態2におけるコンピュータ100の構成図。 実施の形態2におけるデバイス制御方法のフローチャート。 実施の形態2におけるデバイス制御方法の具体例を示すフローチャート。 それぞれの実施の形態におけるコンピュータ100のハードウェア構成図。
 実施の形態および図面において、同じ要素および対応する要素には同じ符号を付している。同じ符号が付された要素の説明は適宜に省略または簡略化する。図中の矢印はデータの流れ又は処理の流れを主に示している。
 実施の形態1.
 デバイスを制御するコンピュータシステムについて、図1から図7に基づいて説明する。
***構成の説明***
 図1に基づいて、コンピュータ100の構成を説明する。
 コンピュータ100は、デバイス制御装置ともいう。
 例えば、コンピュータ100は、マイクロコンピュータである。
 コンピュータ100は、プロセッサ101とメモリ102と補助記憶装置103と周辺機器群140といったハードウェアを備えるコンピュータである。これらのハードウェアは、信号線を介して互いに接続されている。
 プロセッサ101は、演算処理を行うIC(Integrated Circuit)であり、他のハードウェアを制御する。例えば、プロセッサ101は、MPU(Micro Processing Unit)である。
 メモリ102は揮発性の記憶装置である。メモリ102は、主記憶装置またはメインメモリとも呼ばれる。例えば、メモリ102はRAM(Random Access Memory)である。メモリ102に記憶されたデータは必要に応じて補助記憶装置103に保存される。
 補助記憶装置103は不揮発性の記憶装置である。例えば、補助記憶装置103は、ROM(Read Only Memory)、HDD(Hard Disk Drive)、またはフラッシュメモリである。補助記憶装置103に記憶されたデータは必要に応じてメモリ102にロードされる。
 周辺機器群140は1つ以上の周辺機器である。周辺機器群140は、起動タイマ141と入力デバイス142とを含む。
 周辺機器群140には、出力デバイス201とセンサ群210とが接続される。
 コンピュータ100は、メイン処理部110とポーリング処理部120といった要素を備える。これらの要素はソフトウェアで実現される。
 メイン処理部110は、次回開始時刻決定部111とポーリング処理起動部112と他処理部113とを有する。
 ポーリング処理部120は、タイミング検出部121と切り替え部122と切り替え時刻登録部123とを有する。
 補助記憶装置103には、メイン処理部110とポーリング処理部120としてコンピュータを機能させるためのコンピュータプログラムが記憶されている。コンピュータプログラムは、メモリ102にロードされて、プロセッサ101によって実行される。
 さらに、補助記憶装置103にはOS(Operating System)が記憶されている。OSの少なくとも一部は、メモリ102にロードされて、プロセッサ101によって実行される。
 つまり、プロセッサ101は、OSを実行しながら、コンピュータプログラムを実行する。
 コンピュータプログラムを実行して得られるデータは、メモリ102、補助記憶装置103、プロセッサ101内のレジスタまたはプロセッサ101内のキャッシュメモリといった記憶装置に記憶される。
 メモリ102は、切り替え時刻ファイル131および開始時刻ファイル132などを記憶する記憶部の機能を有する。
 コンピュータ100は、プロセッサ101を代替する複数のプロセッサを備えてもよい。複数のプロセッサは、プロセッサ101の役割を分担する。
 コンピュータプログラムは、光ディスクまたはフラッシュメモリ等の不揮発性の記録媒体にコンピュータで読み取り可能に記録(格納)することができる。
 コンピュータ100におけるコンピュータプログラムは、デバイス制御プログラムともいう。
 図2に基づいて、コンピュータシステム200の構成例を説明する。
 コンピュータシステム200は、デバイス制御システムともいう。
例えば、コンピュータシステム200は、組み込み機器向けのコンピュータシステムである。
 コンピュータシステム200は、コンピュータ100と第1センサ211と第2センサ212とモータ201Aといったハードウェアを備える。
 第1センサ211は、センサ群210の中の1つのセンサであり、GPIO142Aに接続される。GPIO142Aは入力デバイス142の一例である。GPIOはGeneral Purpose Input Outputの略称である。
 第2センサ212は、センサ群210の中の1つのセンサであり、A/Dコンバータ142Bに接続される。A/Dコンバータ142Bは入力デバイス142の一例である。A/DはAnalog to Digitalの略称である。
 モータ201Aは、出力デバイス201の一例であり、制御タイマ143に接続される。制御タイマ143は、モータ201Aを制御するためのタイマであり、周辺機器群140に含まれる。
 コンピュータ100には、入力装置および出力装置が接続されてもよい。入力装置の一例はマウスおよびキーボードであり、出力装置の一例はディスプレイである。
***動作の説明***
 コンピュータ100の動作はデバイス制御方法に相当する。また、デバイス制御方法の手順はデバイス制御プログラムの手順に相当する。
 図3に基づいて、デバイス制御方法を説明する。
 ステップS110において、次回開始時刻決定部111は、切り替え時刻ファイル131に基づいて、次回開始時刻を決定する。
 切り替え時刻ファイル131は、1つ以上の切り替え時刻を示す。つまり、切り替え時刻ファイル131は単一もしくは複数の切り替え時刻を示す。
 切り替え時刻は、出力内容が切り替えられた時刻である。
 出力内容は、出力デバイス201への出力の内容である。具体的には、出力内容は、出力デバイス201を制御するためにプロセッサ101から出力される情報の内容である。例えば、出力内容は、プロセッサ101から制御タイマ143へ出力されるPWM波形情報の内容である。PWM波形情報は、モータ201Aを制御するためのPWM波形を指定する情報であり、制御タイマ143からモータ201Aに入力される。PWMはPulse Width Modulationの略称である。
 次回開始時刻は、入力信号用のポーリング処理が次に開始される時刻である。
 入力信号用のポーリング処理は、入力信号が出力内容の切り替え条件を満たすまで入力信号を繰り返し確認するポーリング処理である。
 入力信号は、入力デバイス142から出力されてプロセッサ101に入力される信号である。
 ステップS120において、ポーリング処理起動部112は、次回開始時刻に入力信号用のポーリング処理を起動する。
 ステップS130において、タイミング検出部121は、入力信号用のポーリング処理を開始し、切り替えタイミングを検出する。
 切り替えタイミングは、入力信号が出力内容の切り替え条件を満たすタイミングである。
 切り替え条件は、入力信号についての条件であり、予め決められる。
 ステップS140において、切り替え部122は、切り替えタイミングが検出されたときに出力内容を切り替える。
 ステップS150において、切り替え時刻登録部123は、出力内容が切り替えられた場合に今回の切り替え時刻を切り替え時刻ファイル131に登録する。
 ステップS110からステップS150の処理は繰り返し実行される。
 図4および図5に基づいて、デバイス制御方法の具体例を説明する。
 まず、図4に基づいて、ステップS111からステップS123を説明する。
 ステップS111において、次回開始時刻決定部111は、切り替え時刻ファイル131に基づいて、次回開始時刻を算出する。
 算出処理(S111)の詳細については後述する。
 ステップS112において、次回開始時刻決定部111は、次回開始時刻を開始時刻ファイル132に登録する。
 開始時刻ファイル132は、1つ以上の開始時刻を示す。
 開始時刻は、入力信号用のポーリング処理が開始される時刻または入力信号用のポーリング処理が開始された時刻である。
 ステップS121において、ポーリング処理起動部112は、開始時刻ファイル132から次回開始時刻を読み出す。
 ステップS122において、ポーリング処理起動部112は、次回開始時刻に基づいて、起動タイマ141を起動する。
 起動タイマ141は、ポーリング処理部120を起動するためのタイマ、つまり、ポーリング処理を開始するためのタイマである。
 具体的には、ポーリング処理起動部112は次のように動作する。
 まず、ポーリング処理起動部112は、カウント時間を算出する。カウント時間は、現在時刻から次回開始時刻までの時間である。
 次に、ポーリング処理起動部112は、カウント時間に対応するカウンタ値を算出する。
 次に、ポーリング処理起動部112は、カウンタ値を起動タイマ141に設定する。
 そして、ポーリング処理起動部112は、起動タイマ141を起動する。
 ステップS122の後、起動タイマ141は次回開始時刻にタイムアウトする。
 起動タイマ141がタイムアウトすると、ポーリング処理部120を起動させるための割り込みが発生する。
 ステップS123において、ポーリング処理部120が次回開始時刻に起動される。
 具合的には、ポーリング処理部120はOSの機能によって起動される。
 ステップS124において、他処理部113は他処理を実行する。例えば、他処理部113は、起動タイマ141が起動されたときから起動タイマ141がタイムアウトするまでの間、他処理を実行する。
 他処理は、次回開始時刻決定部111とポーリング処理起動部112とタイミング検出部121と切り替え部122と切り替え時刻登録部123とのそれぞれの処理とは別の処理である。例えば、他処理は、初期化処理または通信処理などである。
 次に、図5に基づいて、ステップS131からステップS151を説明する。
 ステップS131において、タイミング検出部121は、入力デバイス142から入力信号を取得する。
 ステップS132において、タイミング検出部121は、切り替えタイミングになったか判定する。
 具体的には、タイミング検出部121は、取得した入力信号が切り替え条件を満たすか判定する。取得した入力信号が切り替え条件を満たしたタイミングが切り替えタイミングである。
 例えば、切り替え条件は、入力信号の変化を指定する。この場合、入力信号の立ち上がりのタイミングまたは入力信号の立ち下がりのタイミングが切り替えタイミングである。
 例えば、切り替え条件は、入力信号の変化の回数を指定する。この場合、入力信号の変化が指定回数発生したタイミングが切り替えタイミングである。
 切り替え条件は、複数の入力信号についての条件であってもよい。例えば、切り替え条件は、3つの入力デバイスから得られる3つの入力信号についての条件であり、3つの波形を指定する。この場合、3つの入力信号が表す3つの波形が、切り替え条件として指定された3つの波形と合致したタイミングが切り替えタイミングである。
 切り替えタイミングになった場合、処理はステップS141に進む。
 切り替えタイミングになっていない場合、処理はステップS131に進む。
 ステップS141において、切り替え部122は、新たな出力内容を決定する。
 新たな出力内容を決定する方法は任意である。例えば、切り替え部122は、出力内容テーブルを参照することによって、新たな出力内容を決定する。出力内容テーブルは、1つ以上の出力内容が定義されたテーブルである。切り替え部122は、出力内容テーブルから1つの出力内容を新たな出力内容として選択する。
 ステップS142において、切り替え部122は、新たな出力内容に対応する出力処理を実行する。
 例えば、切り替え部122は、新たな出力内容の情報を入力として、デバイスドライバなどのソフトウェアモジュールを実行する。
 ステップS151は、切り替え時刻登録部123は、今回の切り替え時刻を切り替え時刻ファイル131に登録する。
 具体的には、切り替え時刻登録部123は、ステップS142において出力処理が開始された時刻を今回の切り替え時刻として切り替え時刻ファイル131に登録する。
 ステップS151の後、ポーリング処理部120は停止する。
 ステップS111からステップS151は繰り返し実行される(図4および図5参照)。
 次に、算出処理(S111)の詳細について説明する。
 例えば、次回開始時刻決定部111は、以下のいずれかのアルゴリズムによって次回開始時刻を算出する。
<第1アルゴリズム>
 まず、次回開始時刻決定部111は、切り替え時刻ファイル131から複数の切り替え時刻を取得し、複数の切り替え時刻における複数の切り替え時刻間隔を算出する。切り替え時刻間隔は、時系列において連続する2つの切り替え時刻の間隔である。
 次に、次回開始時刻決定部111は、複数の切り替え時刻間隔における1つ以上の間隔誤差を算出する。間隔誤差は、時系列において連続する2つの切り替え時刻間隔の差の絶対値である。
 次に、次回開始時刻決定部111は、1つ以上の間隔誤差から最大間隔誤差を選択する。
 次に、次回開始時刻決定部111は、基準間隔を選択し、基準間隔から最大間隔誤差を引く。これによって得られる時間を待ち時間と呼ぶ。基準間隔は、基準となる切り替え時刻間隔である。例えば、基準間隔は、前回の切り替え時刻間隔である。
 そして、次回開始時刻決定部111は、前回の切り替え時刻から待ち時間が経過したときの時刻を算出する。算出される時刻が次回開始時刻である。
 次回開始時刻は以下の式で表すことができる。
 次回開始時刻 = 前回の切り替え時刻 + (基準間隔 - 最大間隔誤差)
 図6および図7に基づいて、<第1アルゴリズム>の具体例を説明する。
 図6において、7つの切り替え時刻における6つの切り替え時刻間隔が記されている。丸に囲まれた値が切り替え時刻間隔である。さらに、6つの切り替え時刻間隔における5つの間隔誤差が記されている。そして、5つの間隔誤差における最大間隔誤差は15マイクロ秒である。
 図7において、基準間隔となる前回の切り替え時刻間隔は186マイクロ秒である。前回の切り替え時刻は1296マイクロ秒である。したがって、次回開始時刻は1467マイクロ秒(=1296+(186-15))である。
 図6および図7において、タイミング制御は、ステップS111からステップS122までの処理を意味する(図4参照)。また、ポーリング処理は、ステップS131からステップS151までの処理を意味する(図5参照)。
 なお、最大間隔誤差を得る方法は、上記のとおりコンピュータシステム200の動作開始後に算出する方法の他、コンピュータシステム200の動作開始前に予め計測した間隔誤差から算出した固定値を用いる方法でも良い。
 また、コンピュータシステム200の動作開始から任意の回数は、従来技術におけるタイミングでポーリング処理を実行してもよいし、(基準間隔 - 最大間隔誤差)として次回の切り替え時刻よりも小さい固定値を用いてポーリング処理を実行してもよい。この場合、切り替え時刻ファイル131には、その間の複数の切り替え時刻が登録される。
<第2アルゴリズム>
 まず、次回開始時刻決定部111は、切り替え時刻ファイル131から複数の切り替え時刻を取得し、複数の切り替え時刻における切り替え時刻間隔の増減傾向を解析する。
 次に、次回開始時刻決定部111は、解析結果に基づいて、次回の間隔誤差を予測する。次回の間隔誤差は、前回の切り替え時刻間隔と次回の切り替え時刻間隔との間隔誤差である。前回の切り替え時刻間隔は現在時刻の直前の切り替え時刻間隔であり、次回の切り替え時刻間隔は現在時刻の直後の切り替え時刻間隔である。予測される次回の間隔誤差を予測間隔誤差と呼ぶ。
 切り替え時刻間隔が増加傾向にある場合、次回開始時刻決定部111は前回の間隔誤差に調整時間を足す。これによって得られる時間が予測間隔誤差である。切り替え時刻間隔が減少傾向にある場合、次回開始時刻決定部111は前回の間隔誤差から調整時間を引く。これによって得られる時間が予測間隔誤差である。調整時間は一定の時間であってもよいし、切り替え時刻間隔の増減の大きさに応じた時間であってもよい。
 次に、次回開始時刻決定部111は、基準間隔を選択し、基準間隔から予測間隔誤差を引く。これによって得られる時間を待ち時間と呼ぶ。基準間隔は、基準となる切り替え時刻間隔である。例えば、基準間隔は、前回の切り替え時刻間隔である。
 そして、次回開始時刻決定部111は、前回の切り替え時刻から待ち時間が経過したときの時刻を算出する。算出される時刻が次回開始時刻である。
 次回開始時刻は以下の式で表すことができる。
 次回開始時刻 = 前回の切り替え時刻 + (基準間隔 - 予測間隔誤差)
 第2アルゴリズムは、切り替え条件を満たす入力信号の発生間隔が連続的に増減する入力デバイスに対して特に有効である。例えば、第2アルゴリズムはモータに対して特に有効である。
***実施の形態1の効果***
 実施の形態1により、出力内容の切り替えを実施しなければならないタイミングを予測し、出力切替の内容を決定するために必要な入力信号の変化を取りこぼさずにポーリング処理を実施することが可能になる。具体的には、次回開始時刻を決定し、次回開始時刻にポーリング処理を開始することが可能となる。そして、ポーリング処理が割り込みを契機に適切なタイミングで開始され、ポーリング処理が短い時間で終了する。そのため、ポーリング処理の無駄時間が削減され、処理効率が向上する。実施の形態1は、マルチタスク環境においても利用可能である。
 実施の形態2.
 切り替えタイミングを検出できない状況に対処する形態について、主に実施の形態1と異なる点を図8から図10に基づいて説明する。
***構成の説明***
 図8に基づいて、コンピュータ100の構成を説明する。
 コンピュータ100は、さらに、中止部124を備える。
 コンピュータプログラムは、さらに、中止部124としてコンピュータを機能させる。
***動作の説明***
 図9に基づいて、デバイス制御方法を説明する。
 ステップS110およびステップS120は、実施の形態1で説明した通りである(図3参照)。
 ステップS130Aにおいて、タイミング検出部121は、入力信号用のポーリング処理を開始する。
 ステップS130Bにおいて、タイミング検出部121は、タイミング検出動作を行う。タイミング検出動作は、切り替えタイミングを検出するための動作である。
 具体的には、タイミング検出部121は、入力信号が出力内容の切り替え条件を満たすか判定する。
 切り替えタイミングが検出された場合、処理はステップS140に進む。
 切り替えタイミングが検出されなかった場合、処理はステップS130Cに進む。
 ステップS130Cにおいて、中止部124は、ポーリング処理の開始時刻からポーリング処理の上限時間が経過しているか判定する。
 ポーリング処理の上限時間が経過している場合、中止部124はポーリング処理を終了させる。
 ポーリング処理の上限時間が経過していない場合、処理はステップS130Bに進む。つまり、中止部124はポーリング処理を継続させる。
 ステップS130Cにより、中止部124は、ポーリング処理の開始時刻からポーリング処理の上限時間が経過するまでの間に切り替えタイミングが検出されない場合にポーリング処理を終了させる。
 ステップS140およびステップS150は実施の形態1で説明した通りである(図3参照)。
 図10に基づいて、デバイス制御方法の具体例を説明する。
 ステップS131の前の処理、つまり、ステップS111から124は実施の形態1で説明した通りである(図4参照)。
 ステップS131およびステップS132は、実施の形態1で説明した通りである(図5参照)。
 ステップS132で切り替えタイミングになった場合、処理はステップS141に進む。
 ステップS132で切り替えタイミングになっていない場合、処理はステップS133に進む。
 ステップS133において、中止部124は、ポーリング処理の開始時刻からポーリング処理の上限時間が経過したか判定する。
 ポーリング処理の開始時刻は、ポーリング処理が実際に開始された時刻、つまり、ポーリング処理部120が起動された時刻である。但し、ポーリング処理の開始時刻は、開始時刻ファイル132に登録された開始時刻であってもよい。
 ポーリング処理の上限時間は、予め決められていてもよいし、予め決められた式に基づいて算出されてもよい。
 例えば、中止部124は、次の式を演算することによって、ポーリング処理の上限時間を算出する。基準間隔および最大間隔誤差は実施の形態1の<第1アルゴリズム>において説明した通りである。
 ポーリング処理の上限時間 = 基準間隔 + 最大間隔誤差
 ポーリング処理の上限時間が経過している場合、処理はステップS134に進む。
 ポーリング処理の上限時間が経過していない場合、処理はステップS131に進む。
 ステップS134において、中止部124は、ポーリング処理を終了させる。
 ステップS134の後、処理はステップS111に進む。または、任意の処理が実行される。例えば、任意の処理は、入力信号の取りこぼしの際に実施すべき処理として決められた処理である。
 ステップS134の後、次回のステップS131において、次回開始時刻を算出するための式が変更されてもよい。
 例えば、次回開始時刻決定部111は、元の式によって仮開始時刻を算出する。仮開始時刻は元の式によって算出される次回開始時刻と同じ時刻である。そして、次回開始時刻決定部111は、仮開始時刻から調整時間を引くことによって次回開始時刻を算出する。調整時間は予め決められた時間である。
 ステップS141からステップS151は実施の形態1で説明した通りである(図5参照)。
***実施の形態2の効果***
 実施の形態2により、切り替えタイミングを検出できない状況に対処することが可能となる。例えば、次回開始時刻よりも前に切り替えタイミングが発生してしまった場合、または、何らかの異常で切り替えタイミングが発生しなくなってしまった場合に対処することができる。また、そのような状況に適切な処理を行うことができる。
***実施の形態の補足***
 図11に基づいて、コンピュータ100のハードウェア構成を説明する。
 コンピュータ100は処理回路109を備える。
 処理回路109は、メイン処理部110とポーリング処理部120とを実現するハードウェアである。
 処理回路109は、専用のハードウェアであってもよいし、メモリ102に格納されるプログラムを実行するプロセッサ101であってもよい。
 処理回路109が専用のハードウェアである場合、処理回路109は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC、FPGAまたはこれらの組み合わせである。
 ASICはApplication Specific Integrated Circuitの略称であり、FPGAはField Programmable Gate Arrayの略称である。
 コンピュータ100は、処理回路109を代替する複数の処理回路を備えてもよい。複数の処理回路は、処理回路109の役割を分担する。
 処理回路109において、一部の機能が専用のハードウェアで実現されて、残りの機能がソフトウェアまたはファームウェアで実現されてもよい。
 このように、処理回路109はハードウェア、ソフトウェア、ファームウェアまたはこれらの組み合わせで実現することができる。
 実施の形態は、好ましい形態の例示であり、本発明の技術的範囲を制限することを意図するものではない。実施の形態は、部分的に実施してもよいし、他の形態と組み合わせて実施してもよい。フローチャート等を用いて説明した手順は、適宜に変更してもよい。
 100 コンピュータ、101 プロセッサ、102 メモリ、103 補助記憶装置、109 処理回路、110 メイン処理部、111 次回開始時刻決定部、112 ポーリング処理起動部、113 他処理部、120 ポーリング処理部、121 タイミング検出部、122 切り替え部、123 切り替え時刻登録部、124 中止部、131 切り替え時刻ファイル、132 開始時刻ファイル、140 周辺機器群、141 起動タイマ、142 入力デバイス、142A GPIO、142B A/Dコンバータ、143 制御タイマ、200 コンピュータシステム、201 出力デバイス、201A モータ、210 センサ群、211 第1センサ、212 第2センサ。

Claims (8)

  1.  出力デバイスへの出力の内容が切り替えられた切り替え時刻を1つ以上示す切り替え時刻ファイルに基づいて、入力デバイスからの入力信号が切り替え条件を満たすまで前記入力デバイスからの入力信号を繰り返し確認するポーリング処理が次に開始される時刻である次回開始時刻を決定する次回開始時刻決定部と、
     前記次回開始時刻から前記ポーリング処理を開始し、前記入力デバイスからの入力信号が前記切り替え条件を満たす切り替えタイミングを検出するタイミング検出部と、
     前記切り替えタイミングが検出されたときに前記出力デバイスへの出力の内容を切り替える切り替え部と、
     前記出力デバイスへの出力の内容が切り替えられた場合に今回の切り替え時刻を前記切り替え時刻ファイルに登録する切り替え時刻登録部と
    を備えるコンピュータシステム。
  2.  前記次回開始時刻決定部は、前記切り替え時刻ファイルから複数の切り替え時刻を取得し、前記複数の切り替え時刻における複数の切り替え時刻間隔を算出し、前記複数の切り替え時刻間隔における1つ以上の間隔誤差を算出し、前記1つ以上の間隔誤差から最大間隔誤差を選択し、基準間隔から前記最大間隔誤差を引いて得られる待ち時間を算出し、前回の切り替え時刻から前記待ち時間が経過したときの時刻を前記次回開始時刻として算出する
    請求項1に記載のコンピュータシステム。
  3.  前記次回開始時刻決定部は、前記切り替え時刻ファイルから複数の切り替え時刻を取得し、前記複数の切り替え時刻における切り替え時刻間隔の増減傾向を解析し、前回の切り替え時刻間隔と次回の切り替え時刻間隔との間隔誤差である次回の間隔誤差を解析結果に基づいて予測し、基準間隔から前記次回の間隔誤差を引いて得られる待ち時間を算出し、前回の切り替え時刻から前記待ち時間が経過したときの時刻を前記次回開始時刻として算出する
    請求項1に記載のコンピュータシステム。
  4.  前記ポーリング処理の開始時刻から前記ポーリング処理の上限時間が経過するまでの間に前記切り替えタイミングが検出されない場合に前記ポーリング処理を終了させる中止部を備える
    請求項1から請求項3のいずれか1項に記載のコンピュータシステム。
  5.  出力デバイスへの出力の内容が切り替えられた切り替え時刻を複数示す切り替え時刻ファイルに基づいて、入力デバイスからの入力信号が切り替え条件を満たすまで前記入力デバイスからの入力信号を繰り返し確認するポーリング処理が次に開始される時刻である次回開始時刻を決定する次回開始時刻決定処理と、
     前記次回開始時刻から前記ポーリング処理を開始し、前記入力デバイスからの入力信号が前記切り替え条件を満たす切り替えタイミングを検出するタイミング検出処理と、
     前記切り替えタイミングが検出されたときに前記出力デバイスへの出力の内容を切り替える切り替え処理と、
     前記出力デバイスへの出力の内容が切り替えられた場合に今回の切り替え時刻を前記切り替え時刻ファイルに登録する切り替え時刻登録処理と
    をコンピュータに実行させるためのコンピュータプログラム。
  6.  前記次回開始時刻決定処理は、前記切り替え時刻ファイルから複数の切り替え時刻を取得し、前記複数の切り替え時刻における複数の切り替え時刻間隔を算出し、前記複数の切り替え時刻間隔における1つ以上の間隔誤差を算出し、前記1つ以上の間隔誤差から最大間隔誤差を選択し、基準間隔から前記最大間隔誤差を引いて得られる待ち時間を算出し、前回の切り替え時刻から前記待ち時間が経過したときの時刻を前記次回開始時刻として算出する
    請求項5に記載のコンピュータプログラム。
  7.  前記次回開始時刻決定処理は、前記切り替え時刻ファイルから複数の切り替え時刻を取得し、前記複数の切り替え時刻における切り替え時刻間隔の増減傾向を解析し、前回の切り替え時刻間隔と次回の切り替え時刻間隔との間隔誤差である次回の間隔誤差を解析結果に基づいて予測し、基準間隔から前記次回の間隔誤差を引いて得られる待ち時間を算出し、前回の切り替え時刻から前記待ち時間が経過したときの時刻を前記次回開始時刻として算出する
    請求項5に記載のコンピュータプログラム。
  8.  さらに、前記ポーリング処理の開始時刻から前記ポーリング処理の上限時間が経過するまでの間に前記切り替えタイミングが検出されない場合に前記ポーリング処理を終了させる中止処理をコンピュータに実行させる
    請求項5から請求項7のいずれか1項に記載のコンピュータプログラム。
PCT/JP2018/015168 2018-04-11 2018-04-11 コンピュータシステムおよびコンピュータプログラム WO2019198169A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2018/015168 WO2019198169A1 (ja) 2018-04-11 2018-04-11 コンピュータシステムおよびコンピュータプログラム
TW107121117A TW201944252A (zh) 2018-04-11 2018-06-20 電腦系統及電腦程式產品

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2018/015168 WO2019198169A1 (ja) 2018-04-11 2018-04-11 コンピュータシステムおよびコンピュータプログラム

Publications (1)

Publication Number Publication Date
WO2019198169A1 true WO2019198169A1 (ja) 2019-10-17

Family

ID=68163185

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/015168 WO2019198169A1 (ja) 2018-04-11 2018-04-11 コンピュータシステムおよびコンピュータプログラム

Country Status (2)

Country Link
TW (1) TW201944252A (ja)
WO (1) WO2019198169A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000253032A (ja) * 1999-03-04 2000-09-14 Nec Software Chugoku Ltd ポーリング方法
JP2005165431A (ja) * 2003-11-28 2005-06-23 Nec Access Technica Ltd 電子機器の遠隔制御システム
JP2016515317A (ja) * 2013-02-07 2016-05-26 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. マルチコントローラネットワークにおける相互作用制御の設定

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000253032A (ja) * 1999-03-04 2000-09-14 Nec Software Chugoku Ltd ポーリング方法
JP2005165431A (ja) * 2003-11-28 2005-06-23 Nec Access Technica Ltd 電子機器の遠隔制御システム
JP2016515317A (ja) * 2013-02-07 2016-05-26 コーニンクレッカ フィリップス エヌ ヴェKoninklijke Philips N.V. マルチコントローラネットワークにおける相互作用制御の設定

Also Published As

Publication number Publication date
TW201944252A (zh) 2019-11-16

Similar Documents

Publication Publication Date Title
JP5515792B2 (ja) 内燃機関制御装置
JP6962176B2 (ja) 電力変換装置の制御装置
JP5653332B2 (ja) 周期エラー検出方法および周期エラー検出回路
WO2019198169A1 (ja) コンピュータシステムおよびコンピュータプログラム
JP5365551B2 (ja) 内燃機関制御装置
JP7435182B2 (ja) 電子制御装置
EP2667199B1 (en) Semiconductor data processing apparatus and engine control apparatus
WO2005013130A1 (ja) リアルタイム制御システム
JP6094387B2 (ja) 制御装置
JP6338923B2 (ja) プログラマブルコントローラ及び制御プログラム
JP2010102567A (ja) 周期駆動タスク実行装置、周期駆動タスク実行方法及びプログラム
JP6665632B2 (ja) 電子制御装置
WO2019082659A1 (ja) データ取得方法およびデータ取得装置
JP7244737B2 (ja) モータ制御回路及びモータ制御装置
TWI833809B (zh) 馬達控制電路以及馬達控制裝置
JP6268071B2 (ja) 電子制御装置
JP5380409B2 (ja) 情報処理装置
JP5751975B2 (ja) 制御装置
JP2016162330A (ja) 電子制御装置
JP2009086978A (ja) 電子制御装置
GB2621246A (en) Method for Testing an Input Channel for PWM Signals of an Electronic Circuit
JP2003015888A (ja) Cpu負荷計測方式
JP5674500B2 (ja) パルス信号検出方法、パルス信号検出回路、内燃機関の点火装置およびプログラム
JPH11102298A (ja) タイマ制御方法、その回路、およびそのプログラム記録 媒体
JP2006018331A (ja) マイクロコンピュータ、およびマイクロコンピュータにおける割り込み処理方法

Legal Events

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

Ref document number: 18914747

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18914747

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP