WO2019221082A1 - 制御装置及びデータ記録方法 - Google Patents

制御装置及びデータ記録方法 Download PDF

Info

Publication number
WO2019221082A1
WO2019221082A1 PCT/JP2019/019002 JP2019019002W WO2019221082A1 WO 2019221082 A1 WO2019221082 A1 WO 2019221082A1 JP 2019019002 W JP2019019002 W JP 2019019002W WO 2019221082 A1 WO2019221082 A1 WO 2019221082A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
area
log recording
recording
main processor
Prior art date
Application number
PCT/JP2019/019002
Other languages
English (en)
French (fr)
Inventor
佐藤 健司
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Publication of WO2019221082A1 publication Critical patent/WO2019221082A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment

Definitions

  • the present invention relates to a control device and a data recording method.
  • Patent No. 5122000 Japanese Patent Gazette “Patent No. 5122000”
  • the present invention has been made in view of the above points, and an object of the present invention is to provide a control device and a data recording method capable of reducing the processing amount of a processor required for recording a history of data received from an external device. Yes.
  • a communication buffer that holds data received from an externally connected device, a memory that includes a plurality of log recording areas that can record the data, and the communication buffer
  • a main processor that reads data and records the read data in the log recording area of the memory repeatedly at a predetermined timing, and the main processor performs a logging process when performing the logging process.
  • the control device records the data in a log recording area different from the log recording area used for recording in the logging process executed at the previous timing.
  • One embodiment of the present invention is a data used for a control device that includes a communication buffer that holds data received from an externally connected device, and a memory that includes a plurality of log recording areas that are areas in which the data can be recorded.
  • a recording method comprising: a reading step for reading data held in the communication buffer; and a recording step for recording the data read in the reading step in the log recording area of the memory. In the step, the data is recorded in a log recording area different from the log recording area used for recording in the recording step executed at the immediately preceding timing.
  • FIG. 1 is a diagram illustrating a specific example of a configuration of a control system (control system 100) in the first embodiment.
  • the control system 100 includes a control device 10 and a device 90.
  • the device 90 is an input device such as a temperature sensor or a pressure sensor, or an output device such as a servo motor.
  • the device 90 corresponds to an external device for the control device 10.
  • the device 90 When the device 90 is an input device, the device 90 outputs a value obtained as a result of sensing.
  • the device 90 is an output device, the device 90 outputs a value indicating the content of the operation, the state after the operation, and the like.
  • the device 90 is connected to the control device 10.
  • the device 90 and the control device 10 are connected via a predetermined communication path.
  • the device 90 and the control device 10 may be connected using a network such as EtherCAT (registered trademark) or EtherNet / IP.
  • the device 90 and the control device 10 may be connected via an internal bus (local bus).
  • the control device 10 is configured using an information processing device.
  • the control device 10 is a PLC (Programmable Logic Controller), for example.
  • the control device 10 is connected to the device 90 and receives data sequentially output from the device 90.
  • the control device 10 includes a connector 11, a communication controller 12, a memory 13, and a main processor 14 connected by an internal bus.
  • the connector 11 is an interface for physically connecting a communication path for the control device 10 to communicate with the device 90.
  • the connector 11 may be configured as an interface to which a communication cable is connected.
  • the connector 11 may be configured as a connection terminal for the internal bus. A signal input to the connector 11 is output to the communication controller 12 via the internal bus.
  • the communication controller 12 includes a communication processor 121 and a communication buffer 122.
  • the communication processor 121 decodes a signal input via the connector 11.
  • the communication processor 121 records the decrypted data in the communication buffer 122.
  • the communication buffer 122 is configured using a storage device such as a semiconductor storage device.
  • the communication buffer 122 holds data recorded by the communication processor 121. Data held in the communication buffer 122 is read by the main processor 14.
  • the memory 13 is configured using a storage device such as a semiconductor storage device.
  • the memory 13 has a plurality of areas as areas to which logs of data recorded in the communication buffer 122 are written (hereinafter referred to as “log recording areas”).
  • log recording areas areas to which logs of data recorded in the communication buffer 122 are written.
  • the memory 13 has N areas (area 01 to area N) as log recording areas.
  • the main processor 14 is an arithmetic unit such as a CPU (Central Processing Unit).
  • the main processor 14 reads out the data recorded in the communication buffer 122 at a predetermined cycle and records it in the log recording area in the memory 13.
  • Such processing of the main processor 14 is referred to as “logging processing” in the following description.
  • the main processor 14 uses a log recording area different from the log recording area used for recording in the logging process executed at the previous timing as the write destination area.
  • Such logging processing of the main processor 14 may be executed, for example, at the timing of I / O refresh.
  • Such logging processing of the main processor 14 may be applied in place of the conventional I / O refresh processing.
  • the main processor 14 may store information (hereinafter referred to as “recording position information”) indicating the position of the log recording area used for data recording in the latest logging process, for example.
  • the recording position information may be recorded in a storage device such as a semiconductor storage device included in the main processor 14, for example.
  • the main processor 14 functions as a position storage unit.
  • the main processor 14 may use the N log recording areas (area 01 to area N) of the memory 13 cyclically in a predetermined order (for example, number order), for example.
  • FIG. 2 is a diagram illustrating a specific example of logging processing for N log recording areas in the first embodiment.
  • the main processor 14 reads out the data recorded in the communication buffer 122 and records it in the first log recording area (area 01) of the memory 13. At this time, the main processor 14 does not record data in a storage area (for example, a conventional I / O memory area) fixedly allocated in the memory 13 for the purpose of temporarily recording data in the communication buffer 122.
  • the data is recorded in the log recording area (FIG. 2A).
  • the main processor 14 reads the data recorded in the communication buffer 122 at the next cycle time and records it in the second log recording area (area 02) of the memory 13 (FIG. 2B). When such processing is repeatedly executed N times, the data in the communication buffer 122 is also recorded in the Nth log recording area (area N) (FIG. 2C). In the (N + 1) th process, the main processor 14 overwrites data in the first log recording area (area 01) (FIG. 2D). By executing the logging process in this manner, at least N logs of data in the communication buffer 122 can be retained.
  • FIG. 3 is a time chart showing an outline of the processing cycle of the main processor 14.
  • the main processor 14 repeatedly executes a plurality of processes at a predetermined period (hereinafter referred to as “cycle time”).
  • the plurality of processes executed in one cycle time include, for example, an I / O refresh 21, a user program 22, and a system service 23.
  • the logging process executed by the main processor 14 may be executed at the timing of the I / O refresh 21, for example.
  • a user program constructed by the user of the control device 10 is executed.
  • Message processing and self-diagnosis are executed at the timing of the system service 23.
  • FIG. 3 shows only the processing of the primary task, but processing with a lower priority such as a secondary task may be executed within the cycle time.
  • the main processor 14 operates in such a cycle time
  • the communication cycle in the communication path between the device 90 and the control device 10 and the write cycle to the communication buffer 122 by the communication processor 121 are also synchronized with the cycle time. It is desirable.
  • the cycle time may be, for example, 1 millisecond, 10 milliseconds, or any value.
  • FIG. 4 is a flowchart showing a specific example of the processing flow of the main processor 14 in the first embodiment.
  • a predetermined timing for example, I / O refresh timing
  • the main processor 14 reads data from the communication buffer 122 (step S102).
  • the main processor 14 determines a log recording area to which the data read in the process of step S102 is to be written.
  • the main processor 14 determines a log recording area different from the log recording area used in the previous cycle time logging process as the write destination area (step S103).
  • the main processor 14 may determine the write destination area based on the recording position information, for example. More specifically, the log recording area next to the area indicated by the recording position information may be determined as the writing destination area.
  • the main processor 14 writes the data read in step S102 into the log recording area determined in step S103 (step S104). Such processing is repeatedly executed every cycle time.
  • control device 10 configured in this way, it is possible to reduce the processing amount of the main processor 14 required for recording the history of data received from the external device (device 90). Specifically, it is as follows.
  • the main processor 14 of the control device 10 When reading the data from the communication buffer 122, the main processor 14 of the control device 10 records the read data in an area different from the area used for recording in the logging process executed at the previous timing. . Therefore, a history for at least one cycle time can be recorded. In such a logging process, a process of writing one data recorded in the communication buffer 122 to the memory 13 is performed only once. In other words, conventionally, the writing process from the communication buffer to the memory, the writing process for logging in the memory, and the writing process twice are performed. It is possible to take a log by one writing process. Therefore, the processing amount of the main processor 14 can be reduced as compared with the case where the copy process (write process) is performed at least twice as in the prior art.
  • control device 10 configured in this way, it is possible to record more data histories by providing more log recording areas.
  • N log recording areas are provided in the memory 13, and cyclic recording is performed, so that a maximum of N data including the latest data can be recorded. It becomes.
  • FIG. 5 is a diagram illustrating a specific example of the configuration of the control system (control system 100a) in the second embodiment.
  • the control system 100a differs from the first embodiment (control system 100) in that a control device 10a is provided instead of the control device 10.
  • the control apparatus 10a used in 2nd Embodiment is demonstrated.
  • the control device 10a differs from the control device 10 of the first embodiment in that a memory 13a is provided in place of the memory 13 and a main processor 14a is provided in place of the main processor 14, and the other configuration is the first implementation. This is the same as the control device 10 of the embodiment. Hereinafter, differences from the control device 10 of the first embodiment will be described.
  • the memory 13a has a plurality of area groups as log recording areas.
  • the area group has a plurality of log recording areas. Each log recording area belonging to one area group is cleared of data at the same timing.
  • the memory 13 a includes a first area group 131 and a second area group 132.
  • the first area group 131 has N log recording areas (area A01 to area AN).
  • the second area group 132 has N log recording areas (area B01 to area BN).
  • the number of log recording areas that the first area group 131 has and the number of log recording areas that the second area group 132 have are equal to N, but are not necessarily limited. There is no need to match.
  • the main processor 14a handles any one of the plurality of area groups as the active system, and handles the remaining area groups as the standby system.
  • the main processor 14a reads the data in the communication buffer 122, it records the data in the active area group.
  • the main processor 14a changes the active area group to the standby system and changes other area groups to the active system. Change to After that, the main processor 14a records data in the area group that has newly become the active system. If data has already been recorded in the newly active area group, the main processor 14a clears the data in that area group and records the data in that area group.
  • FIG. 6 is a diagram showing a specific example of the logging process in the second embodiment.
  • the first region group 131 operates as an active region group and the second region group 132 operates as a standby region group at the first time point.
  • the main processor 14a reads the data recorded in the communication buffer 122 and records it in the first log recording area (area A01) of the active area group (first area group 131) in the memory 13a.
  • the main processor 14a reads the data recorded in the communication buffer 122 at the next cycle time, and records it in the second log recording area (area A02) of the active area group of the memory 13a.
  • data in the communication buffer 122 is also recorded in the Nth log recording area (area AN) of the active area group (FIG. 6A).
  • the main processor 14a responds to the fact that data has been recorded in all the log recording areas provided in the active area group, and the main processor 14a has previously been the active area group (first area).
  • the group 131) is changed to the standby system, and the other area group (second area group 132) is changed to the active system.
  • data is recorded in the first log recording area (area B01) of the second area group 132, which is the area group that has newly become the active system (FIG. 6B).
  • the main processor 14a reads the data recorded in the communication buffer 122 at the next cycle time, and records it in the second log recording area (area B02) of the active area group of the memory 13a.
  • data in the communication buffer 122 is also recorded in the Nth log recording area (area BN) (FIG. 6C).
  • the main processor 14a responds to the fact that data has been recorded in all the areas provided in the active area group, and the main processor 14a has previously been in the active area group ( The second area group 132) is changed to the standby system, and the other area group (first area group 131) is changed to the active system. Further, in response to the fact that data has already been recorded in the first area group 131 that has newly become the active system, the main processor 14a clears the data in that area group (FIG. 6D). The main processor 14a then overwrites the data in the first log recording area (area A01) of the first area group 131, which is the area group that has newly become the active system.
  • FIG. 7 is a flowchart showing a specific example of the processing flow of the main processor 14a in the second embodiment.
  • the same processes as those in the flowchart of FIG. 4 are denoted by the same reference numerals.
  • step S101—YES When a predetermined timing (for example, I / O refresh timing) comes according to the cycle time (step S101—YES), the main processor 14a reads data from the communication buffer 122 (step S102). When the area recorded in the previous cycle time is not the last area of the active area group (step S201—NO), the main processor 14a executes the processes of steps S103 and S104.
  • a predetermined timing for example, I / O refresh timing
  • step S201-YES when the area recorded in the previous cycle time is the last area of the active system area group (step S201-YES), the main processor 14a determines the area group that has been active until then. The system is changed to the standby system, and another area group is changed to the active system (step S202). Further, the main processor 14a clears the data of the area group that has newly become the active system (step S203). Then, the processing of step S103 and step S104 is executed in the area group that has newly become the active system. Such processing is repeatedly executed every cycle time.
  • control device 10a of the second embodiment configured as described above, the same effect as that of the control device 10 of the first embodiment can be obtained. Furthermore, according to the control device 10a of the second embodiment, it is possible to hold a log corresponding to at least the number of areas provided as a standby area group.
  • a communication buffer that holds data received from an externally connected device, a memory that includes a plurality of log recording areas that can record the data, and the communication buffer
  • a main processor that reads data and records the read data in the log recording area of the memory repeatedly at a predetermined timing, and the main processor performs a logging process when performing the logging process.
  • the control apparatus records the data in a log recording area different from the log recording area used for recording in the logging process executed at the previous timing.
  • One aspect of the present invention is the above-described control device, further including a position storage unit that stores recording position information that is information indicating a position of a log recording area used for data recording in the latest logging process.
  • One aspect of the present invention is the above-described control device, wherein the memory includes a plurality of area groups each having a plurality of log recording areas, and the main processor uses one area group as an active system, The other area group is used as a standby system, and the data is recorded in the active area group.
  • One embodiment of the present invention is a data used for a control device that includes a communication buffer that holds data received from an externally connected device, and a memory that includes a plurality of log recording areas that are areas in which the data can be recorded.
  • a recording method comprising: a reading step for reading data held in the communication buffer; and a recording step for recording the data read in the reading step in the log recording area of the memory. In the step, the data is recorded in a log recording area different from the log recording area used for recording in the recording step executed at the immediately preceding timing.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Programmable Controllers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、前記通信バッファーに保持されたデータを読み出し、読み出されたデータを前記メモリーの前記ログ記録領域に記録するロギング処理を所定のタイミングで繰り返し行うメインプロセッサーと、を備え、前記メインプロセッサーは、前記ロギング処理を行う際に、一つ前のタイミングで実行されたロギング処理において記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する。

Description

制御装置及びデータ記録方法
 本発明は、制御装置及びデータ記録方法に関する。
 従来、PLC(Programmable Logic Controller)等の制御装置において、外部装置から受信されたデータの履歴を記録する技術(例えば特許文献1参照。)が提案されている。履歴を残すためには、例えば以下のような処理が行われていた。まず、所定のI/Oリフレッシュのタイミングで、プロセッサーが通信バッファーからメモリー内の所定の記憶領域にデータをコピーする。I/Oリフレッシュのタイミングでコピーに用いられる所定の記憶領域は、I/Oリフレッシュの度にデータが上書きされてしまう。そのため、履歴を残すための領域として予め設けられた記憶領域に対し、プロセッサーがデータをコピーしてデータを残す。このように、少なくとも2回のコピー処理が実行されることによって、受信されたデータの履歴が残されていた。2回目のコピー処理は、ユーザープログラムとして実装されることもあった。
日本国特許公報「特許第5122000号公報」
 このような処理では、履歴を残すために少なくとも2回のコピー処理を行う必要がある。そのため、プロセッサーの処理能力を有効に活用できない可能性があった。
 本発明は上記の点に鑑みてなされたものであり、外部装置から受信されたデータの履歴を記録する際に要するプロセッサーの処理量を削減できる制御装置及びデータ記録方法を提供することを目的としている。
 本発明の一態様は、外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、前記通信バッファーに保持されたデータを読み出し、読み出されたデータを前記メモリーの前記ログ記録領域に記録するロギング処理を所定のタイミングで繰り返し行うメインプロセッサーと、を備え、前記メインプロセッサーは、前記ロギング処理を行う際に、一つ前のタイミングで実行されたロギング処理において記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、制御装置である。
 本発明の一態様は、外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、を備える制御装置に用いるデータ記録方法であって、前記通信バッファーに保持されたデータを読み出す読出ステップと、前記読出ステップにおいて読み出されたデータを前記メモリーの前記ログ記録領域に記録する記録ステップと、を有し、前記記録ステップでは、一つ前のタイミングで実行された前記記録ステップにおいて記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、データ記録方法である。
 本発明によれば、外部装置から受信されたデータの履歴を記録する際に要するプロセッサーの処理量を削減できる。
第1実施形態における制御システムの構成の具体例を示す図である。 第1実施形態におけるN個のログ記録領域に対するロギング処理の具体例を示す図である。 メインプロセッサーの処理の周期の概略を示すタイムチャートである。 第1実施形態におけるメインプロセッサーの処理の流れの具体例を示すフローチャートである。 第2実施形態における制御システムの構成の具体例を示す図である。 第2実施形態におけるロギング処理の具体例を示す図である。 第2実施形態におけるメインプロセッサーの処理の流れの具体例を示すフローチャートである。
 (第1実施形態)
 図1は、第1実施形態における制御システム(制御システム100)の構成の具体例を示す図である。制御システム100は、制御装置10及び機器90を備える。
 機器90は、温度センサや圧力センサ等の入力機器、又は、サーボモーター等の出力機器である。機器90は、制御装置10にとって外部装置に該当する。機器90は、入力機器である場合には、センシングを行った結果として得られる値を出力する。機器90は、出力機器である場合には、動作の内容や動作後の状態等を示す値を出力する。機器90は、制御装置10に対して接続される。機器90と制御装置10とは、所定の通信路で接続される。機器90と制御装置10とは、例えばEtherCAT(登録商標)やEtherNet/IP等のネットワークを用いて接続されてもよい。機器90と制御装置10とは、内部バス(ローカルバス)を介して接続されてもよい。
 制御装置10は、情報処理装置を用いて構成される。制御装置10は、例えばPLC(Programmable Logic Controller)である。制御装置10は、機器90に接続され、機器90から順次出力されるデータを受信する。
 制御装置10のハードウェア構成を説明する。制御装置10は、内部バスによって接続されたコネクター11、通信コントローラー12、メモリー13及びメインプロセッサー14を備える。
 コネクター11は、制御装置10が機器90と通信するための通信路を物理的に接続するためのインターフェースである。例えば、制御装置10と機器90とがネットワークを用いて接続される場合、コネクター11は通信ケーブルが接続されるインターフェースとして構成されてもよい。例えば、制御装置10と機器90とが内部バスを介して接続される場合には、コネクター11は、内部バス用の接続端子として構成されてもよい。コネクター11に入力された信号は内部バスを介して通信コントローラー12に出力される。
 通信コントローラー12は、通信プロセッサー121及び通信バッファー122を備える。通信プロセッサー121は、コネクター11を介して入力された信号を復号する。通信プロセッサー121は、復号されたデータを通信バッファー122に記録する。
 通信バッファー122は、半導体記憶装置等の記憶装置を用いて構成される。通信バッファー122は、通信プロセッサー121によって記録されたデータを保持する。通信バッファー122に保持されているデータは、メインプロセッサー14によって読み出される。
 メモリー13は、半導体記憶装置等の記憶装置を用いて構成される。メモリー13は、通信バッファー122に記録されているデータのログが書き込まれる領域(以下「ログ記録領域」という。)として複数の領域を有する。図1の具体例では、メモリー13は、ログ記録領域としてN個の領域(領域01~領域N)を有する。
 メインプロセッサー14は、例えばCPU(Central Processing Unit)等の演算装置である。メインプロセッサー14は、所定の周期で通信バッファー122に記録されているデータを読み出し、メモリー13内のログ記録領域に記録する。このようなメインプロセッサー14の処理を、以下の説明では「ロギング処理」という。メインプロセッサー14は、ロギング処理を行う際に、一つ前のタイミングで実行されたロギング処理において記録に用いられたログ記録領域とは異なるログ記録領域を書き込み先の領域として使用する。このようなメインプロセッサー14のロギング処理は、例えばI/Oリフレッシュのタイミングで実行されてもよい。このようなメインプロセッサー14のロギング処理は、従来のI/Oリフレッシュ処理に置き換えて適用されてもよい。メインプロセッサー14は、例えば最新のロギング処理でデータの記録に用いられたログ記録領域の位置を示す情報(以下「記録位置情報」という。)を記憶してもよい。記録位置情報は、例えばメインプロセッサー14が備える半導体記憶装置等の記憶装置に記録されてもよい。この場合、メインプロセッサー14が位置記憶部として機能する。
 メインプロセッサー14は、メモリー13のN個のログ記録領域(領域01~領域N)を、例えば所定の順序(例えば番号順)でサイクリックに使用してもよい。図2は、第1実施形態におけるN個のログ記録領域に対するロギング処理の具体例を示す図である。メインプロセッサー14は、通信バッファー122に記録されているデータを読み出し、メモリー13の最初のログ記録領域(領域01)に記録する。このとき、メインプロセッサー14は、通信バッファー122のデータを一時的に記録する目的で固定的にメモリー13内にて割り当てられる記憶領域(例えば従来のI/Oメモリーエリア)にデータを記録することなく、データをログ記録領域に記録する(図2(A))。メインプロセッサー14は、次のサイクルタイムにおいて、通信バッファー122に記録されているデータを読み出し、メモリー13の2番目のログ記録領域(領域02)に記録する(図2(B))。このような処理がN回繰り返し実行されると、N番目のログ記録領域(領域N)にも通信バッファー122のデータが記録される(図2(C))。N+1回目の処理では、メインプロセッサー14は、1番目のログ記録領域(領域01)にデータを上書きする(図2(D))。ロギング処理がこのように実行されることによって、通信バッファー122のデータのログを少なくともN個分保持しておくことが可能となる。
 図3は、メインプロセッサー14の処理の周期の概略を示すタイムチャートである。メインプロセッサー14は、所定の周期(以下「サイクルタイム」という。)で複数の処理を繰り返し実行する。一つのサイクルタイムで実行される複数の処理には、例えばI/Oリフレッシュ21、ユーザープログラム22及びシステムサービス23が含まれる。上述したように、メインプロセッサー14によって実行されるロギング処理は、例えばI/Oリフレッシュ21のタイミングで実行されてもよい。ユーザープログラム22のタイミングでは、制御装置10のユーザーによって構築されたユーザープログラムが実行される。システムサービス23のタイミングではメッセージ処理や自己診断が実行される。
 図3には、プライマリタスクの処理のみが示されているが、セカンダリタスク等のより低い優先度の処理がサイクルタイム内に実行されてもよい。なお、このようなサイクルタイムでメインプロセッサー14が動作する場合、機器90と制御装置10との間の通信路における通信周期や通信プロセッサー121による通信バッファー122への書き込み周期も、サイクルタイムに同期することが望ましい。サイクルタイムは、例えば1ミリ秒であってもよいし、10ミリ秒であってもよいし、どのような値として設定されてもよい。
 図4は、第1実施形態におけるメインプロセッサー14の処理の流れの具体例を示すフローチャートである。サイクルタイムに応じて所定のタイミング(例えばI/Oリフレッシュのタイミング)が到来すると(ステップS101-YES)、メインプロセッサー14は、通信バッファー122からデータを読み出す(ステップS102)。メインプロセッサー14は、ステップS102の処理で読み出されたデータの書き込み先となるログ記録領域を決定する。メインプロセッサー14は、一つ前のサイクルタイムのロギング処理で用いられたログ記録領域とは異なるログ記録領域を書き込み先の領域として決定する(ステップS103)。メインプロセッサー14は、例えば記録位置情報に基づいて書き込み先の領域を決定してもよい。より具体的には、記録位置情報が示す領域の次のログ記録領域を書き込み先の領域として決定してもよい。メインプロセッサー14は、ステップS103において決定されたログ記録領域に対し、ステップS102において読み出されたデータを書き込む(ステップS104)。このような処理がサイクルタイム毎に繰り返し実行される。
 このように構成された制御装置10によれば、外部装置(機器90)から受信されたデータの履歴を記録する際に要するメインプロセッサー14の処理量を削減できる。具体的には以下の通りである。
 制御装置10のメインプロセッサー14は、通信バッファー122からデータを読み出すと、読み出されたデータを、一つ前のタイミングで実行されたロギング処理において記録に用いられた領域とは異なる領域に記録する。そのため、少なくとも1つのサイクルタイム分の履歴を記録することができる。また、このようなロギング処理において、通信バッファー122に記録された1つのデータのメモリー13への書き込み処理は1回しか行われない。すなわち、従来であれば通信バッファーからメモリーへの書き込み処理と、メモリー内でログをとるための書き込み処理と、2回の書き込み処理が行われていたが、第1実施形態ではメモリー13への1回の書き込み処理によってログをとることが可能となる。そのため、従来のように少なくとも2回のコピー処理(書き込み処理)が行われていた場合に比べて、メインプロセッサー14の処理量を削減することができる。
 また、このように構成された制御装置10によれば、より多くのログ記録領域を設けることによって、より多くのデータの履歴を記録しておくことが可能となる。例えば、図1の例ではN個のログ記録領域がメモリー13に設けられ、サイクリックに記録が行われることによって、最新のデータを含めて最大でN個のデータを記録しておくことが可能となる。
 (第2実施形態)
 図5は、第2実施形態における制御システム(制御システム100a)の構成の具体例を示す図である。制御システム100aは、制御装置10に代えて制御装置10aが設けられる点で第1実施形態(制御システム100)と異なる。以下、第2実施形態において用いられる制御装置10aについて説明する。
 制御装置10aは、メモリー13に代えてメモリー13aが設けられる点、メインプロセッサー14に代えてメインプロセッサー14aが設けられる点、で第1実施形態の制御装置10と異なり、他の構成は第1実施形態の制御装置10と同じである。以下、第1実施形態の制御装置10と異なる点について説明する。
 メモリー13aは、ログ記録領域として複数の領域群を有する。領域群は、複数のログ記録領域を有する。一つの領域群に属する各ログ記録領域は、同じタイミングでデータをクリアされる。図5の例では、メモリー13aは、第1領域群131及び第2領域群132を有する。第1領域群131は、N個のログ記録領域(領域A01~領域AN)を有する。第2領域群132は、N個のログ記録領域(領域B01~領域BN)を有する。なお、図5において第1領域群131が有しているログ記録領域の数と第2領域群132が有しているログ記録領域の数とはいずれもN個で一致しているが、必ずしも一致する必要はない。
 メインプロセッサー14aは、複数の領域群のうちいずれか一つを現用系として取り扱い、残る領域群を待機系として取り扱う。メインプロセッサー14aは、通信バッファー122のデータを読み出すと、現用系の領域群に対してデータを記録する。メインプロセッサー14aは、現用系の領域群に設けられた全てのログ記録領域にデータが記録されると、それまで現用系であった領域群を待機系に変更し、他の領域群を現用系に変更する。その後は、メインプロセッサー14aは新たに現用系となった領域群に対してデータを記録する。新たに現用系となった領域群にデータが既に記録されている場合には、メインプロセッサー14aは、その領域群のデータをクリアし、その領域群に対してデータを記録する。
 図6は、第2実施形態におけるロギング処理の具体例を示す図である。図6の具体例では、最初の時点で第1領域群131が現用系の領域群として動作し第2領域群132が待機系の領域群として動作する。
 メインプロセッサー14aは、通信バッファー122に記録されているデータを読み出し、メモリー13aの現用系の領域群(第1領域群131)の最初のログ記録領域(領域A01)に記録する。メインプロセッサー14aは、次のサイクルタイムにおいて、通信バッファー122に記録されているデータを読み出し、メモリー13aの現用系の領域群の2番目のログ記録領域(領域A02)に記録する。このような処理がN回繰り返し実行されると、現用系の領域群のN番目のログ記録領域(領域AN)にも通信バッファー122のデータが記録される(図6(A))。
 N+1回目の処理では、現用系の領域群に設けられた全てのログ記録領域にデータが記録されていることに応じて、メインプロセッサー14aは、それまで現用系であった領域群(第1領域群131)を待機系に変更し、他の領域群(第2領域群132)を現用系に変更する。そして、新たに現用系となった領域群である第2領域群132の1番目のログ記録領域(領域B01)にデータを記録する(図6(B))。メインプロセッサー14aは、次のサイクルタイムにおいて、通信バッファー122に記録されているデータを読み出し、メモリー13aの現用系の領域群の2番目のログ記録領域(領域B02)に記録する。このような処理がN回繰り返し実行されると、N番目のログ記録領域(領域BN)にも通信バッファー122のデータが記録される(図6(C))。
 (N×2)+1回目の処理では、現用系の領域群に設けられた全ての領域にデータが記録されていることに応じて、メインプロセッサー14aは、それまで現用系であった領域群(第2領域群132)を待機系に変更し、他の領域群(第1領域群131)を現用系に変更する。また、新たに現用系となった第1領域群131にデータが既に記録されていることに応じて、メインプロセッサー14aは、その領域群のデータをクリアする(図6(D))。そして、メインプロセッサー14aは、新たに現用系となった領域群である第1領域群131の1番目のログ記録領域(領域A01)にデータを上書きする。
 図7は、第2実施形態におけるメインプロセッサー14aの処理の流れの具体例を示すフローチャートである。図7において、図4のフローチャートと同じ処理については同じ符号を付して図示している。
 サイクルタイムに応じて所定のタイミング(例えばI/Oリフレッシュのタイミング)が到来すると(ステップS101-YES)、メインプロセッサー14aは、通信バッファー122からデータを読み出す(ステップS102)。メインプロセッサー14aは、一つ前のサイクルタイムにおいて記録が行われた領域が現用系領域群の最後の領域ではない場合(ステップS201-NO)、ステップS103及びステップS104の処理を実行する。
 一方、一つ前のサイクルタイムにおいて記録が行われた領域が現用系領域群の最後の領域であった場合(ステップS201-YES)、メインプロセッサー14aは、それまで現用系であった領域群を待機系に変更し、他の領域群を現用系に変更する(ステップS202)。また、メインプロセッサー14aは、新たに現用系となった領域群のデータをクリアする(ステップS203)。そして、新たに現用系となった領域群においてステップS103及びステップS104の処理を実行する。このような処理がサイクルタイム毎に繰り返し実行される。
 このように構成された第2実施形態の制御装置10aによれば、第1実施形態の制御装置10と同様の効果を得ることができる。さらに、第2実施形態の制御装置10aによれば、少なくとも待機系の領域群として設けられた領域数に応じたログを保持しておくことが可能となる。
 以上、この発明の実施形態について図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。
 (まとめ)
 本発明の一態様は、外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、前記通信バッファーに保持されたデータを読み出し、読み出されたデータを前記メモリーの前記ログ記録領域に記録するロギング処理を所定のタイミングで繰り返し行うメインプロセッサーと、を備え、前記メインプロセッサーは、前記ロギング処理を行う際に、一つ前のタイミングで実行されたロギング処理において記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、制御装置である。
 本発明の一態様は、上記の制御装置であって、最新のロギング処理でデータの記録に用いられたログ記録領域の位置を示す情報である記録位置情報を記憶する位置記憶部をさらに備える。
 本発明の一態様は、上記の制御装置であって、前記メモリーは、複数の前記ログ記録領域を有する領域群を複数有し、前記メインプロセッサーは、一の領域群を現用系として使用し、他の領域群を待機系として使用し、現用系の領域群に対して前記データを記録する。
 本発明の一態様は、外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、を備える制御装置に用いるデータ記録方法であって、前記通信バッファーに保持されたデータを読み出す読出ステップと、前記読出ステップにおいて読み出されたデータを前記メモリーの前記ログ記録領域に記録する記録ステップと、を有し、前記記録ステップでは、一つ前のタイミングで実行された前記記録ステップにおいて記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、データ記録方法である。
 100、100a…制御システム、 10、10a…制御装置、 11…コネクター、 12…通信コントローラー、 121…通信プロセッサー、 122…通信バッファー、 13、13a…メモリー、 131…第1領域群、 132…第2領域群、 14,14a…メインプロセッサー、 21…I/Oリフレッシュ、 22…ユーザープログラム、 23…システムサービス、 90…機器

Claims (4)

  1.  外部に接続された機器から受信されたデータを保持する通信バッファーと、
     前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、
     前記通信バッファーに保持されたデータを読み出し、読み出されたデータを前記メモリーの前記ログ記録領域に記録するロギング処理を所定のタイミングで繰り返し行うメインプロセッサーと、を備え、
     前記メインプロセッサーは、前記ロギング処理を行う際に、一つ前のタイミングで実行されたロギング処理において記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、制御装置。
  2.  最新のロギング処理でデータの記録に用いられたログ記録領域の位置を示す情報である記録位置情報を記憶する位置記憶部をさらに備える、請求項1に記載の制御装置。
  3.  前記メモリーは、複数の前記ログ記録領域を有する領域群を複数有し、
     前記メインプロセッサーは、一の領域群を現用系として使用し、他の領域群を待機系として使用し、現用系の領域群に対して前記データを記録する、請求項1又は2に記載の制御装置。
  4.  外部に接続された機器から受信されたデータを保持する通信バッファーと、前記データを記録可能な領域であるログ記録領域を複数有するメモリーと、を備える制御装置に用いるデータ記録方法であって、
     前記通信バッファーに保持されたデータを読み出す読出ステップと、
     前記読出ステップにおいて読み出されたデータを前記メモリーの前記ログ記録領域に記録する記録ステップと、を有し、
     前記記録ステップでは、一つ前のタイミングで実行された前記記録ステップにおいて記録に用いられたログ記録領域とは異なるログ記録領域に対して前記データを記録する、データ記録方法。
PCT/JP2019/019002 2018-05-18 2019-05-13 制御装置及びデータ記録方法 WO2019221082A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018096607A JP7067260B2 (ja) 2018-05-18 2018-05-18 制御装置及びデータ記録方法
JP2018-096607 2018-05-18

Publications (1)

Publication Number Publication Date
WO2019221082A1 true WO2019221082A1 (ja) 2019-11-21

Family

ID=68539736

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/019002 WO2019221082A1 (ja) 2018-05-18 2019-05-13 制御装置及びデータ記録方法

Country Status (2)

Country Link
JP (1) JP7067260B2 (ja)
WO (1) WO2019221082A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290355B (zh) * 2020-02-27 2021-06-22 中电九天智能科技有限公司 记录及查找log的方法

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016120906A1 (ja) * 2015-01-30 2016-08-04 三菱電機株式会社 A/d変換装置、d/a変換装置、及びplc

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016120906A1 (ja) * 2015-01-30 2016-08-04 三菱電機株式会社 A/d変換装置、d/a変換装置、及びplc

Also Published As

Publication number Publication date
JP7067260B2 (ja) 2022-05-16
JP2019200744A (ja) 2019-11-21

Similar Documents

Publication Publication Date Title
US10274936B2 (en) Control apparatus
US7631244B2 (en) Soft error correction method, memory control apparatus and memory system
EP1739890A2 (en) Processing of data frames exchanged over a communication controller in a time-triggered system
EP3376316B1 (en) Slave device, control method of slave device, information processing program and computer readable recording medium
GB2504772A (en) Coprocessor providing service address space for diagnostics collection
WO2019221082A1 (ja) 制御装置及びデータ記録方法
CN110704236B (zh) 芯片flash数据的在线校验方法及计算机存储介质
WO2016024483A1 (ja) アナログ/ディジタル変換回路
JP6419400B1 (ja) Plc、ネットワークユニット、cpuユニット、及びデータ転送方法
JP5836229B2 (ja) ストリーム処理装置、サーバ、及び、ストリーム処理方法
US20190250593A1 (en) Slave device, control system, communication method for response data and storage medium
JP2016130947A (ja) 制御システム、および制御装置
WO2020246095A1 (ja) 制御システム、プログラマブルロジックコントローラおよび情報処理方法
JP6570462B2 (ja) 通信プロトコル変換装置
WO2022190186A1 (ja) プログラマブルコントローラの通信ユニット、受信データ記憶方法及びプログラム
JPH11338712A (ja) 割込順序保存回路
WO2023248548A1 (ja) 制御システム、中継装置および通信方法
US20230099487A1 (en) Communication control device and method for controlling communication control device
EP3327521B1 (en) Duplexing process control device
JP7350488B2 (ja) 周辺装置制御システム、および周辺装置制御方法
US20230152783A1 (en) Control system, industrial device, control method, and program
KR101560583B1 (ko) 데이터 수신 장치 및 그 방법
JP6409520B2 (ja) 制御システム、および中継装置
JP6631063B2 (ja) 電子装置
JPS62243008A (ja) Pmcの信号トレ−ス制御方式

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: 19802510

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: 19802510

Country of ref document: EP

Kind code of ref document: A1