JP2013029914A - Control program test apparatus, control program test system and testing method of control program - Google Patents

Control program test apparatus, control program test system and testing method of control program Download PDF

Info

Publication number
JP2013029914A
JP2013029914A JP2011164073A JP2011164073A JP2013029914A JP 2013029914 A JP2013029914 A JP 2013029914A JP 2011164073 A JP2011164073 A JP 2011164073A JP 2011164073 A JP2011164073 A JP 2011164073A JP 2013029914 A JP2013029914 A JP 2013029914A
Authority
JP
Japan
Prior art keywords
command
control program
unit
device simulation
interface unit
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.)
Withdrawn
Application number
JP2011164073A
Other languages
Japanese (ja)
Inventor
Takeshi Nishimura
健 西村
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2011164073A priority Critical patent/JP2013029914A/en
Publication of JP2013029914A publication Critical patent/JP2013029914A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To test a control program without downloading a device simulation program simulating a device to be controlled.SOLUTION: A controller 2 connected to a personal computer 3 including a device simulation program 30 simulating a device to be controlled includes a control program 20 which controls the device to be controlled, an actual I/O 25 which actually inputs/outputs data to/from the device to be controlled, a virtual I/O 24 which virtually inputs/outputs data to/from the device to be controlled, and an I/O switching section 23 which switches the actual I/O 25 and the virtual I/O 24 in accordance with a command either from the device simulation program 30 or from the control program 20. In the case where a command from the virtual I/O 24 is executed and a value change event occurs, the I/O switching section 23 transmits the value change event to the device simulation program 30.

Description

本発明は、デジタル入出力を有する制御装置に用いられる制御プログラムを試験する試験装置、試験システム、及び方法に関するものである。 The present invention relates to a test apparatus, a test system, and a method for testing a control program used in a control apparatus having a digital input / output.

FA(Factory Automation)等の分野では、制御プログラムに従い自動制御を行う制御装置が用いられている。このような制御装置において制御プログラムの動作確認を行うには、実際の入出力機器である被制御装置を接続しなければならない。 In fields such as FA (Factory Automation), a control device that performs automatic control according to a control program is used. In order to check the operation of the control program in such a control device, it is necessary to connect a controlled device that is an actual input / output device.

制御装置に被制御装置が接続されていない状態で制御プログラムの試験を行う装置として、従来、制御装置と被制御装置間で実際のデータ入出力を行う実I/Oに割当てた実I/Oアドレス、制御装置内部のメモリに仮想的に設けられたデータ入出力機器の仮想I/Oアドレス、仮想I/Oアドレスの有効性を示すフラグ、並びに実I/Oアドレス及び仮想I/Oアドレスに対応するメモリアドレスを記憶するマッピングテーブルを備え、有効フラグにより仮想I/Oアドレスの無効が示されている場合は実I/Oとメモリアドレスとの間でデータ入出力を行い、仮想I/Oアドレスの有効が示されている場合は仮想I/Oアドレスとメモリアドレスとの間でデータ入出力を行うシーケンスコントローラがある(例えば、特許文献1参照)。 As a device for testing a control program in a state where the controlled device is not connected to the control device, a real I / O that has been assigned to a real I / O that performs actual data input / output between the control device and the controlled device is conventionally used The address, the virtual I / O address of the data input / output device virtually provided in the memory inside the control device, the flag indicating the validity of the virtual I / O address, the real I / O address and the virtual I / O address A mapping table for storing the corresponding memory address is provided. When the virtual I / O address is invalid by the valid flag, data is input / output between the real I / O and the memory address, and the virtual I / O When the validity of the address is indicated, there is a sequence controller that performs data input / output between a virtual I / O address and a memory address (see, for example, Patent Document 1).

特開平8−272409号公報JP-A-8-272409

しかしながら、上記のシーケンスコントローラにおいては、制御プログラムの制御対象である装置模擬プログラムを外部のパソコン等で作成し、コントローラにダウンロードした後に制御プログラムの試験を行うため、装置模擬プログラムを変更するたびにコントローラにダウンロードしなければならないという課題があった。 However, in the above sequence controller, the device simulation program to be controlled by the control program is created on an external personal computer or the like and downloaded to the controller to test the control program. There was a problem that had to be downloaded.

本発明はこのような課題を解決するためになされたもので、装置模擬プログラムをダウンロードせず制御プログラムの試験をすることができる制御プログラム試験装置、制御プログラム試験システム、及び制御プログラムの試験方法を得ることを目的とする。 The present invention has been made to solve such a problem, and provides a control program test apparatus, a control program test system, and a control program test method capable of testing a control program without downloading a device simulation program. The purpose is to obtain.

本発明に係る制御プログラム試験装置は、被制御装置を模擬した装置模擬プログラムを有する端末装置に接続され、被制御装置を制御する制御プログラム、被制御装置に対するデータの入出力を実際に行う実インタフェース部、被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、装置模擬プログラム及び制御プログラムのいずれか一方からの指令に応じて実インタフェース部と仮想インタフェース部とを切替える切替部、を備え、仮想インタフェース部から指令を実行して値変化が発生した場合に切替部が装置模擬プログラムに値変化に関する情報を送信するものである。 A control program test apparatus according to the present invention is connected to a terminal device having an apparatus simulation program that simulates a controlled apparatus, and a control program for controlling the controlled apparatus and an actual interface that actually inputs and outputs data to the controlled apparatus A virtual interface unit that virtually inputs / outputs data to / from the controlled device, and a switching unit that switches between the real interface unit and the virtual interface unit in response to a command from either the device simulation program or the control program. When a value change occurs by executing a command from the virtual interface unit, the switching unit transmits information related to the value change to the device simulation program.

本発明に係る制御プログラム試験システムは、被制御装置を模擬した装置模擬プログラムを有する端末装置と、被制御装置を制御する制御プログラム、被制御装置に対するデータの入出力を実際に行う実インタフェース部、被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、装置模擬プログラム及び制御プログラムのいずれか一方からの指令に応じて実インタフェース部と仮想インタフェース部とを切替える切替部、を有し、端末装置に接続されたコントローラと、を備え、仮想インタフェース部が指令を実行して値変化が発生した場合に、切替部が装置模擬プログラムに値変化に関する情報を送信するものである。 A control program test system according to the present invention includes a terminal device having a device simulation program that simulates a controlled device, a control program that controls the controlled device, an actual interface unit that actually inputs and outputs data to the controlled device, A virtual interface unit that virtually inputs and outputs data to the controlled device, a switching unit that switches between the real interface unit and the virtual interface unit in response to a command from either the device simulation program or the control program, A controller connected to the terminal device, and when the virtual interface unit executes a command and a value change occurs, the switching unit transmits information about the value change to the device simulation program.

本発明に係る制御プログラムの試験方法は、被制御装置を制御する制御プログラム、被制御装置に対するデータの入出力を実際に行う実インタフェース部、被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、装置模擬プログラム及び制御プログラムのいずれか一方からの指令に応じて実インタフェース部と仮想インタフェース部とを切替える切替部、を有するコントローラと、コントローラに接続され、被制御装置を模擬した装置模擬プログラムを有する端末装置と、を備えた制御プログラム試験システムにおいて、制御プログラムまたは装置模擬プログラムが切替部に向けてデータ入出力に関する指令を送信する指令送信ステップと、指令送信ステップにより送信された指令に基づき、切替部が実インタフェース部と仮想インタフェース部とを切替えて実インタフェース部または仮想インタフェース部に指令を実行させる切替ステップと、切替ステップにより仮想インタフェース部が指令を実行した後、実行された指令により値変化が発生したか否かを切替部が判断する判断ステップと、判断ステップにより切替部が値変化が発生したと判断した場合に、切替部が装置模擬プログラムに対して値変化に関する情報を送信する値変化情報送信ステップと、値変化情報送信ステップにより送信された値変化に関する情報を受信した装置模擬プログラムが、被制御装置を模擬した装置模擬の処理を実行する装置模擬処理ステップと、を備えたものである。 The control program testing method according to the present invention includes a control program for controlling a controlled device, a real interface unit that actually inputs and outputs data to the controlled device, and a virtual that virtually inputs and outputs data to the controlled device. A device simulation that simulates a controlled device connected to the controller and a controller having a switching unit that switches between the real interface unit and the virtual interface unit in response to a command from one of the interface unit, the device simulation program, and the control program In a control program test system comprising a terminal device having a program, a command transmission step in which the control program or device simulation program transmits a command related to data input / output to the switching unit, and a command transmitted by the command transmission step. Based on the actual interface part A switching step for switching the virtual interface unit to cause the real interface unit or the virtual interface unit to execute a command, and whether or not a value change has occurred due to the executed command after the virtual interface unit executes the command in the switching step. A determination step determined by the switching unit, a value change information transmission step in which the switching unit transmits information about the value change to the device simulation program when the switching unit determines that a value change has occurred in the determination step; The apparatus simulation program that has received the information regarding the value change transmitted in the change information transmission step includes an apparatus simulation processing step that executes an apparatus simulation process that simulates the controlled apparatus.

本発明によれば、上記構成を備えたことにより、コントローラに装置模擬プログラムをダウンロードすることなく制御プログラムの試験を行うことができる。 According to the present invention, since the above configuration is provided, it is possible to test the control program without downloading the device simulation program to the controller.

実施の形態1に係る制御プログラム試験システムの構成を示す図である。It is a figure which shows the structure of the control program test system which concerns on Embodiment 1. FIG. 実施の形態1に係る制御プログラム試験システムを示す機能ブロック図である。1 is a functional block diagram showing a control program test system according to Embodiment 1. FIG. 実施の形態1に係る制御プログラム試験システムの動作シーケンス図である。3 is an operation sequence diagram of the control program test system according to Embodiment 1. FIG. 実施の形態1における制御プログラムのフローチャートである。3 is a flowchart of a control program in the first embodiment. 実施の形態1におけるI/O切替部のフローチャートである。3 is a flowchart of an I / O switching unit in the first embodiment. 実施の形態1における装置模擬I/F部のフローチャートである。3 is a flowchart of a device simulation I / F unit according to the first embodiment. 実施の形態1における装置模擬I/F部の別のフローチャートである。6 is another flowchart of the apparatus simulation I / F unit in the first embodiment. 実施の形態1における装置模擬プログラムのフローチャートである。3 is a flowchart of a device simulation program in the first embodiment. 実施の形態2に係る制御プログラム試験システムの動作シーケンス図である。FIG. 10 is an operation sequence diagram of the control program test system according to the second embodiment. 実施の形態2における装置模擬I/F部のフローチャートである。10 is a flowchart of a device simulation I / F unit in the second embodiment. 実施の形態2における装置模擬プログラムのフローチャートである。10 is a flowchart of an apparatus simulation program in the second embodiment. 実施の形態2における装置模擬プログラムの別のフローチャートである。10 is another flowchart of the apparatus simulation program in the second embodiment. 実施の形態3に係る制御プログラム試験システムを示す機能ブロック図である。FIG. 10 is a functional block diagram illustrating a control program test system according to a third embodiment. 実施の形態3に係る制御プログラム試験システムの動作シーケンス図である。FIG. 10 is an operation sequence diagram of the control program test system according to the third embodiment. 実施の形態3における装置模擬I/F部のフローチャートの一部である。FIG. 10 is a part of a flowchart of a device simulation I / F unit according to Embodiment 3. FIG. 実施の形態3における装置模擬I/F部のフローチャートの一部である。FIG. 10 is a part of a flowchart of a device simulation I / F unit in Embodiment 3. FIG. 実施の形態3におけるI/O切替部のフローチャートである。10 is a flowchart of an I / O switching unit according to the third embodiment. 実施の形態3における連携動作タイミング調整部のフローチャートである。10 is a flowchart of a cooperative operation timing adjustment unit in the third embodiment.

実施の形態1.
本発明を実施するための実施の形態1に係る制御プログラム試験システムを図1〜図8を用いて説明する。図1において、制御プログラム試験システム1は、制御対象の被制御装置(図示しない)に接続され、これを制御するコントローラ2と、被制御装置を模擬した装置模擬プログラム30の開発・生成に用いられるパソコン3とで構成されている。
なお、コントローラ2は被制御装置に接続されない場合もある。
Embodiment 1 FIG.
A control program test system according to Embodiment 1 for carrying out the present invention will be described with reference to FIGS. In FIG. 1, a control program test system 1 is connected to a controlled device (not shown) to be controlled, and is used to develop and generate a controller 2 that controls the device and a device simulation program 30 that simulates the controlled device. It consists of a personal computer 3.
The controller 2 may not be connected to the controlled device.

コントローラ2には、記憶媒体200、RAM201、CPU202、被制御装置と接続され被制御装置に対するデータの入出力を実際に行う実インタフェース(以下、実I/Oと称する)25、パソコン3と接続するコントローラ側I/F部203、が設けられている。
RAM201には、被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース(以下、仮想I/Oと称する)24が設けられ、記憶媒体200には、被制御装置を制御するための制御プログラム20、パソコン3の装置模擬プログラム30にアクセスする際に用いる装置模擬I/F部21、指令(Read/Write)に応じて仮想I/O24と実I/O25を切替る際に用いるI/O切替設定データ部22、I/O切替部23が保持されている。なお、制御プログラム20、装置模擬I/F部21、及びI/O切替部23はプログラムであり、I/O切替設定データ部22はデータベースである。記憶媒体200に保持されたプログラムは、コントローラ2で起動するOS(図示しない)によってRAM201に展開され、CPU202で実行される。また、I/O切替設定データ部22のデータはI/O切替部26によってRAM201に展開され使用される。
The controller 2 is connected to a storage medium 200, a RAM 201, a CPU 202, a real interface (hereinafter referred to as real I / O) 25 that is connected to the controlled device and actually inputs / outputs data to / from the controlled device, and a personal computer 3. A controller side I / F unit 203 is provided.
The RAM 201 is provided with a virtual interface (hereinafter referred to as virtual I / O) 24 that virtually inputs and outputs data to the controlled device, and the storage medium 200 has a control program for controlling the controlled device. 20. Device simulation I / F unit 21 used when accessing the device simulation program 30 of the personal computer 3, I / O used when switching between virtual I / O 24 and real I / O 25 according to a command (Read / Write) A switching setting data unit 22 and an I / O switching unit 23 are held. The control program 20, the device simulation I / F unit 21, and the I / O switching unit 23 are programs, and the I / O switching setting data unit 22 is a database. The program held in the storage medium 200 is expanded in the RAM 201 by the OS (not shown) activated by the controller 2 and executed by the CPU 202. The data in the I / O switching setting data unit 22 is expanded and used in the RAM 201 by the I / O switching unit 26.

パソコン3には、RAM301、開発・生成した装置模擬プログラム30やその他のデータを記憶する記憶媒体300、装置模擬プログラム30を読み出して動作させるCPU302、コントローラと接続するパソコン側I/F部303が設けられている。記憶媒体300に保持されたプログラムは、パソコン3上で起動するOS(図示しない)によってRAM301に展開され、CPU302で実行される。
コントローラ側I/F部203やパソコン側I/F部303としては、例えば、シリアル、USB、Ethernet(登録商標)に対応するインタフェースがある。
The personal computer 3 is provided with a RAM 301, a storage medium 300 for storing the developed / generated device simulation program 30 and other data, a CPU 302 for reading and operating the device simulation program 30, and a personal computer side I / F unit 303 connected to the controller. It has been. The program held in the storage medium 300 is expanded in the RAM 301 by an OS (not shown) that is activated on the personal computer 3 and executed by the CPU 302.
As the controller side I / F unit 203 and the personal computer side I / F unit 303, for example, there are interfaces corresponding to serial, USB, and Ethernet (registered trademark).

図2は、制御プログラム試験システム1を機能ブロックで示す図である。
コントローラ2には制御プログラム20、装置模擬I/F部21、I/O切替設定データ部22、I/O切替部23、仮想I/O24、及び実I/O25が設けられ、パソコン3には装置模擬プログラム30が設けられている。
FIG. 2 is a functional block diagram of the control program test system 1.
The controller 2 is provided with a control program 20, an apparatus simulation I / F unit 21, an I / O switching setting data unit 22, an I / O switching unit 23, a virtual I / O 24, and a real I / O 25. A device simulation program 30 is provided.

・全体の動作 ・ Overall operation

ここで、制御プログラム試験システム1の動作について説明する。
図3は、制御プログラム試験システム1全体の動作シーケンスを示し、実線は実際の処理を伴う動作を、破線は繰り返し同じ動作に戻る場合を表している。
まず、制御プログラム試験システム1はI/O切替部23と装置模擬I/F部21を起動する。このとき、どちらを先に起動しても良い。次に、装置模擬プログラム30と制御プログラム20を起動する。装置模擬プログラム30と制御プログラム20の起動順序は、試験対象によって決まる。
Here, the operation of the control program test system 1 will be described.
FIG. 3 shows an operation sequence of the control program test system 1 as a whole. A solid line represents an operation involving actual processing, and a broken line represents a case where the operation returns repeatedly to the same operation.
First, the control program test system 1 activates the I / O switching unit 23 and the device simulation I / F unit 21. At this time, either one may be activated first. Next, the apparatus simulation program 30 and the control program 20 are activated. The starting order of the apparatus simulation program 30 and the control program 20 is determined by the test object.

各機能ブロックを起動させると、制御プログラム試験システム1は、次の3つのケースいずれかにより試験を開始する。
ケース1:装置模擬プログラム30が装置模擬I/F部21へ指令(ReadまたはWrite)を送信する。
ケース2:制御プログラム20がI/O切替部23へ指令(ReadまたはWrite)を送信する。
When each functional block is activated, the control program test system 1 starts a test in any of the following three cases.
Case 1: The device simulation program 30 transmits a command (Read or Write) to the device simulation I / F unit 21.
Case 2: The control program 20 transmits a command (Read or Write) to the I / O switching unit 23.

ケース1の場合、装置模擬プログラム30が装置模擬処理を行い(ステップS01)装置模擬I/F部21へ指令を送信すると(ステップS02)、装置模擬I/F部21はI/O切替部23へ転送する(ステップS03)。ケース2の場合は制御プログラム20が制御処理を行い(ステップS04)、I/O切替部23へReadやWriteの指令を送信する(ステップS05)。 In case 1, when the device simulation program 30 performs device simulation processing (step S01) and sends a command to the device simulation I / F unit 21 (step S02), the device simulation I / F unit 21 turns on the I / O switching unit 23. (Step S03). In case 2, the control program 20 performs control processing (step S04), and transmits a Read or Write command to the I / O switching unit 23 (step S05).

なお、図3の例ではケース1の動作(ステップS01〜ステップS03)を行った後、ケース2のステップS04、ステップS05を順次行っているが、制御プログラム20の制御処理(ステップS04)から始めても良い。 In the example of FIG. 3, after performing the operation of case 1 (step S01 to step S03), step S04 and step S05 of case 2 are sequentially performed, but starting from the control process (step S04) of the control program 20 Also good.

ステップS04及びステップS05による指令の送信を終えると、制御プログラム20は制御が終了したか否かを判断し、処理が終了していないと判断した場合はステップS04及びステップS05より前の状態に戻る。 When the transmission of the command in step S04 and step S05 is completed, the control program 20 determines whether or not the control is completed. .

I/O切替部23は、装置模擬I/F部21または/および制御プログラム20から指令を受信すると実I/O25と仮想I/O24のどちらに入力すべきかI/O切替設定データ部22を参照して判断し、判断結果に基づいて実I/O25および仮想I/O24の切替制御を行う(ステップS06)。そして、実I/O25または仮想I/O24のデータをReadしたり、Writeしたりする(ステップS07)。このとき、制御プログラム20からの指令に従いReadしたデータは、制御プログラム20へ送信する。 When the I / O switching unit 23 receives an instruction from the device simulation I / F unit 21 or / and the control program 20, the I / O switching setting data unit 22 determines whether to input to the real I / O 25 or the virtual I / O 24. Judgment is made by referring to, and switching control between the real I / O 25 and the virtual I / O 24 is performed based on the judgment result (step S06). Then, the real I / O 25 or virtual I / O 24 data is read or written (step S07). At this time, the data read according to the command from the control program 20 is transmitted to the control program 20.

I/O切替部23は、指令が被制御装置へのWriteであり、かつ、仮想I/O24を介してデータをWriteした結果により値が変化したか否かを判断し(ステップS08)、値が変化している場合は値変化イベントを装置模擬I/F部21へ送信する(ステップS09)。装置模擬I/F部21は、この値変化イベントを装置模擬プログラム30へ転送し(ステップS10)、その後、処理が終了したか否かを判断し、処理が終了していないと判断した場合はステップS01で指令を受信するより前の状態に戻る。 The I / O switching unit 23 determines whether or not the command is a write to the controlled device and the value has changed due to the result of writing the data via the virtual I / O 24 (step S08). Is changed, a value change event is transmitted to the device simulation I / F unit 21 (step S09). The device simulation I / F unit 21 transfers this value change event to the device simulation program 30 (step S10), and then determines whether or not the processing has been completed, and if it has determined that the processing has not ended. It returns to the state before receiving the command in step S01.

装置模擬プログラム30は、装置模擬I/F部21から受信した値変化イベントにより起動条件が満たされた装置模擬処理があるか否かを判断し、起動条件が満たされた装置模擬処理がある場合はこれを起動し、別スレッドで実行する(ステップS11)。このステップS11の処理は、上記ステップS01と同じである。そして、この処理において装置模擬I/F部21へ指令を送信する(ステップS12)。指令の送信後、装置模擬プログラム30は実行すべき装置模擬処理が実行されたか否かを判断し、処理が終了していないと判断した場合はステップS10による値変化イベントを受信するより前の状態に戻る。 The device simulation program 30 determines whether or not there is a device simulation process that satisfies the activation condition based on the value change event received from the device simulation I / F unit 21, and there is a device simulation process that satisfies the activation condition. Activates it and executes it in a separate thread (step S11). The processing in step S11 is the same as that in step S01. In this process, a command is transmitted to the device simulation I / F unit 21 (step S12). After sending the command, the device simulation program 30 determines whether or not the device simulation processing to be executed has been executed, and if it is determined that the processing has not ended, the state before receiving the value change event in step S10 Return to.

装置模擬I/F部21がステップS12による指令を受信するとI/O切替部23に転送し(ステップS13)、コントローラ2の各機能ブロックは装置模擬I/F部21がステップS01で指令を受信した場合と同様の動作を繰り返す。 When the device simulation I / F unit 21 receives the command in step S12, the command is transferred to the I / O switching unit 23 (step S13), and each function block of the controller 2 receives the command in step S01 in the device simulation I / F unit 21. The same operation is repeated.

このように、制御プログラム試験システム1は、上記の動作を繰り返し行うことで装置模擬プログラム30をコントローラ2へダウンロードすることなく、制御プログラム20の試験を、装置模擬プログラム30の開発に用いたパソコン3上で容易に実行できる。また、装置模擬プログラム30のダウンロード時間を削減することで、デバッグが何回も必要となる装置模擬プログラム30の開発工期を短縮することもできる。 As described above, the control program test system 1 repeats the above-described operation to download the device simulation program 30 to the controller 2, without using the control program 20 test to develop the device simulation program 30. Can be easily implemented on the above. Further, by reducing the download time of the device simulation program 30, it is possible to shorten the development period of the device simulation program 30 that needs to be debugged many times.

ここで、各機能ブロックそれぞれの動作の詳細を、フローチャートを用いて説明する。 Here, details of the operation of each functional block will be described using a flowchart.

・制御プログラムの動作 ・ Control program operation

図4は制御プログラム20のフローチャートである。
制御プログラム20は、予めプログラム上に設定されたロジックに従いI/O切替部23へRead指令を送信し、実I/O25または仮想I/O24からデータの読み出しを行う(ステップS101、図3のステップS04、S05、S07に対応)。Read指令が無い場合、ステップS101の処理は省略できる。
FIG. 4 is a flowchart of the control program 20.
The control program 20 transmits a read command to the I / O switching unit 23 according to a logic set in advance in the program, and reads data from the real I / O 25 or the virtual I / O 24 (step S101, step of FIG. 3). Compatible with S04, S05, and S07). If there is no Read command, the process of step S101 can be omitted.

制御プログラム20はまた、予めプログラム上に設定されたロジックに従いI/O切替部23へ指令を出して実I/O25又は仮想I/O24に値のWriteを行う(ステップS102)。Readの場合と同様に、Write指令が無い場合はステップS102の処理を省略できる。
そして、Write及びReadの制御が終了したか否かを判断し(ステップS103)、制御処理が終了していない場合はステップS101の処理へ戻り、処理が終了している場合はこのフローを終了する。
The control program 20 also issues a value to the real I / O 25 or the virtual I / O 24 by issuing a command to the I / O switching unit 23 according to the logic set in advance in the program (step S102). As in the case of Read, when there is no Write command, the process of Step S102 can be omitted.
Then, it is determined whether or not the write and read controls are finished (step S103). If the control process is not finished, the process returns to step S101, and if the process is finished, this flow is finished. .

・I/O切替部の動作 ・ Operation of I / O switching unit

次に、図5を用いてI/O切替部23のフローを説明する。
I/O切替部23は、装置模擬I/F部21または制御プログラム20から指令(ReadまたはWrite)を受信すると(ステップS201、図3のステップS03、S05に対応)、この指令は実I/O25と仮想I/O24のどちらに対する指令かを判断する(ステップS202)。
Next, the flow of the I / O switching unit 23 will be described with reference to FIG.
When the I / O switching unit 23 receives a command (Read or Write) from the device simulation I / F unit 21 or the control program 20 (corresponding to Step S201 and Steps S03 and S05 in FIG. 3), the command is changed to an actual I / O. It is determined whether the command is for O25 or virtual I / O24 (step S202).

実I/O25への指令の場合はこの指令に従ってデータのReadまたはWriteを行い(ステップS203、図3のステップS07に対応)、仮想I/O24への指令の場合はこの指令に従ってReadまたはWriteを行う(ステップS204、図3のステップS07に対応)。 In the case of a command to the real I / O 25, data is read or written according to this command (corresponding to step S203, step S07 in FIG. 3), and in the case of a command to the virtual I / O 24, Read or Write is performed according to this command. Performed (corresponding to step S204, step S07 in FIG. 3).

仮想I/O24へWriteを行う場合、その指令が出力へのWrite指令であって、かつ、この指令によりWriteをした結果、値が変化したか否かを判断し(ステップS205、図3のステップS08に対応)、値変化している場合は装置模擬I/F部21へ値変化イベントを送信する(ステップS206、図3のステップS09に対応)。その後、処理が終了したかを判断し(ステップS207)、終了していなければステップS201の前の状態に戻り、処理が終了していればこのフローを終了する。 When writing to the virtual I / O 24, it is determined whether the command is a write command to output, and the value has changed as a result of writing by this command (step S205, step of FIG. 3). If the value has changed, a value change event is transmitted to the device simulation I / F unit 21 (step S206, corresponding to step S09 in FIG. 3). Thereafter, it is determined whether or not the process has been completed (step S207). If the process has not been completed, the process returns to the state before step S201. If the process has been completed, the flow ends.

一方、仮想I/O24への出力へのWrite指令であって値変化していない場合、及び仮想I/O24へのRead指令の場合は、ステップS206を行わずに上記ステップS207を行う。また、上記ステップS202で実I/O25への指令(ReadまたはWrite)と判断した場合も同様に、ステップS203の後、ステップS207で処理が終了したか否かを判断する。 On the other hand, when the command is a write command to the output to the virtual I / O 24 and the value has not changed, and when the command is a read command to the virtual I / O 24, step S207 is performed without performing step S206. Similarly, when it is determined in step S202 that the command (Read or Write) is to the real I / O 25, it is determined after step S203 whether the processing is completed in step S207.

・装置模擬I/F部の動作 ・ Operation of device simulation I / F section

次に、図6及び図7を用いて装置模擬I/F部21のフローを説明する。図6は1タスクで処理する場合を、図7は2タスクで処理する場合をそれぞれ示している。
図6において、装置模擬I/F部21は装置模擬プログラム30からの指令またはI/O切替部23からの値変化イベントを受信すると(ステップS301、図3のステップS02、S09、S12に対応)、装置模擬プログラム30からの指令かI/O切替部23からの値変化イベントかを判断する(ステップS302)。I/O切替部23からの値変化イベントの場合は装置模擬プログラム30へこれを転送し(ステップS303、図3のステップS10に対応)、装置模擬プログラム30からの指令の場合はI/O切替部23へこの指令を転送する(ステップS304、図3のステップS03、S13に対応)。そして、処理が終了したか否かを判断し(ステップS305)、終了していない場合はステップS301に戻り、処理が終了している場合はこのフローを終了する。
Next, the flow of the apparatus simulation I / F unit 21 will be described with reference to FIGS. FIG. 6 shows the case of processing with one task, and FIG. 7 shows the case of processing with two tasks.
In FIG. 6, when the device simulation I / F unit 21 receives a command from the device simulation program 30 or a value change event from the I / O switching unit 23 (corresponding to step S301, steps S02, S09, and S12 in FIG. 3). Then, it is determined whether it is a command from the apparatus simulation program 30 or a value change event from the I / O switching unit 23 (step S302). In the case of a value change event from the I / O switching unit 23, this is transferred to the device simulation program 30 (corresponding to step S303 and step S10 in FIG. 3), and in the case of a command from the device simulation program 30, I / O switching This command is transferred to the unit 23 (corresponding to steps S304 and S03 and S13 in FIG. 3). Then, it is determined whether or not the process has been completed (step S305). If the process has not been completed, the process returns to step S301. If the process has been completed, the flow ends.

装置模擬I/F部21のフローを2タスクで行う場合、図7のフロー1では装置模擬プログラム30からの指令を受信し(ステップS311、図3のステップS02、S12に対応)、受信した指令をI/O切替部23へ転送する(ステップS312、図3のステップS03、S13に対応)。そして、処理が終了したか否かを判断し(ステップS313)、処理が終了していない場合はステップS311に戻り、処理が終了している場合はフロー1を終了する。図7のフロー2では、装置模擬I/F部21はI/O切替部23からの値変化イベントを受信し(ステップS321、図3のステップS09に対応)、受信した値変化イベントを装置模擬プログラム30へ転送する(ステップS322、図3のステップS10に対応)。そして、処理が終了したか否かを判断し(ステップS323)、処理が終了していない場合はステップS321に戻り、処理が終了している場合はフロー2を終了する。 When the flow of the device simulation I / F unit 21 is performed with two tasks, in the flow 1 of FIG. 7, a command from the device simulation program 30 is received (corresponding to steps S021, S12 of FIG. 3), and the received command Is transferred to the I / O switching unit 23 (corresponding to steps S312, S03 and S13 in FIG. 3). Then, it is determined whether or not the process is completed (step S313). If the process is not completed, the process returns to step S311. If the process is completed, the flow 1 is terminated. In the flow 2 of FIG. 7, the device simulation I / F unit 21 receives a value change event from the I / O switching unit 23 (corresponding to step S321 and step S09 in FIG. 3), and the received value change event is device simulated. Transfer to program 30 (corresponding to step S322, step S10 in FIG. 3). Then, it is determined whether or not the process is finished (step S323). If the process is not finished, the process returns to step S321, and if the process is finished, the flow 2 is finished.

・装置模擬プログラムの動作 ・ Operation of device simulation program

次に、図8を用いて装置模擬プログラム30のフローを説明する。
装置模擬プログラム30は、指令がある場合に装置模擬I/F部21へ送信し(ステップS401、図3のステップS02に対応)、装置模擬I/F部21から値変化イベントを受信する(ステップS402、図3のステップS10に対応)。そして、受信した値変化イベントによって起動条件が満たされた装置模擬処理があるか否かを判断し(ステップS403)、該当する装置模擬処理がある場合にはこれを起動して別スレッドで実行し、この処理の中で新たな指令を装置模擬I/F部21へ送信する(ステップS404、図3のステップS11、S12に対応)。その後、装置模擬プログラム30は装置模擬が終了したか否かを判断し(ステップS405)、終了していない場合はステップS402に戻り、処理が終了している場合はこのフローを終了する。なお、送信する指令が無い場合はステップS401の送信処理を省略できる。
Next, the flow of the apparatus simulation program 30 will be described with reference to FIG.
The apparatus simulation program 30 transmits to the apparatus simulation I / F unit 21 when there is a command (step S401, corresponding to step S02 in FIG. 3), and receives a value change event from the apparatus simulation I / F unit 21 (step S401). S402, corresponding to step S10 in FIG. 3). Then, it is determined whether or not there is a device simulation process whose activation condition is satisfied by the received value change event (step S403). If there is a corresponding device simulation process, it is activated and executed by another thread. In this process, a new command is transmitted to the device simulation I / F unit 21 (corresponding to step S404 and steps S11 and S12 in FIG. 3). Thereafter, the apparatus simulation program 30 determines whether or not the apparatus simulation has ended (step S405). If the apparatus simulation has not ended, the process returns to step S402. If the process has ended, the flow ends. If there is no instruction to transmit, the transmission process in step S401 can be omitted.

本実施の形態によれば、制御プログラム試験システム1は、コントローラ2に制御プログラム20、I/O切替部23、装置模擬I/F部21、実I/O25、及び仮想I/O24を備え、パソコン3に装置模擬プログラム30を備え、制御プログラム20または装置模擬プログラム30からの指令に基づき仮想I/O24に値変化が生じると装置模擬プログラム30が装置模擬処理を行う構成としたことにより、装置模擬プログラム30をパソコン3からコントローラ2にダウンロードすることなく制御プログラム20の制御プログラム試験(制御プログラム20による装置模擬プログラム30の装置模擬処理の実行)を行うことが可能となる。また、開発中にデバッグが何回も必要となる装置模擬プログラム30をコントローラ2にダウンロードする時間を削減できるため、開発工期を短縮できる。
また、装置模擬プログラム30に時間管理の機能を設けることにより、指令を所定の時刻に実行するよう自動制御することもできる。
According to the present embodiment, the control program test system 1 includes a control program 20, an I / O switching unit 23, a device simulation I / F unit 21, a real I / O 25, and a virtual I / O 24 in the controller 2. Since the personal computer 3 is provided with the device simulation program 30 and the device simulation program 30 performs device simulation processing when a value change occurs in the virtual I / O 24 based on a command from the control program 20 or the device simulation program 30, the device The control program test of the control program 20 (execution of the device simulation process of the device simulation program 30 by the control program 20) can be performed without downloading the simulation program 30 from the personal computer 3 to the controller 2. Further, since the time for downloading the device simulation program 30 that requires debugging several times during development to the controller 2 can be reduced, the development period can be shortened.
Further, by providing a time management function in the apparatus simulation program 30, it is possible to automatically control the command to be executed at a predetermined time.

実施の形態2.
本発明を実施するための実施の形態2に係る制御プログラム試験システム1Aを図9〜図12を用いて説明する。構成は実施の形態1と同じで、装置模擬プログラム30Aと装置模擬I/F部21Aの機能が異なる。具体的には、装置模擬プログラム30Aは時間に関する情報を指令(ReadおよびWrite)に付与する機能を有し、装置模擬I/F部21Aはこの指令のリストを受信すると付与された時間情報に基づいて指令をI/O切替部23へ転送する機能を有する。
Embodiment 2. FIG.
A control program test system 1A according to Embodiment 2 for carrying out the present invention will be described with reference to FIGS. The configuration is the same as in the first embodiment, and the functions of the device simulation program 30A and the device simulation I / F unit 21A are different. Specifically, the device simulation program 30A has a function of giving time information to commands (Read and Write), and the device simulation I / F unit 21A receives the command list based on the given time information. And a function of transferring the command to the I / O switching unit 23.

・全体の動作 ・ Overall operation

ここで、制御プログラム試験システム1Aの動作について説明する。
図9は、制御プログラム試験システム1A全体の動作シーケンスを示し、実線は実際の処理を伴う動作を、破線は繰り返し同じ動作に戻る場合を表している。
まず、制御プログラム試験システム1AはI/O切替部23と装置模擬I/F部21Aを起動する。このとき、どちらを先に起動しても良い。次に、装置模擬プログラム30A、制御プログラム20の順に起動する。
Here, the operation of the control program test system 1A will be described.
FIG. 9 shows an operation sequence of the entire control program test system 1A. A solid line represents an operation involving actual processing, and a broken line represents a case where the operation returns repeatedly to the same operation.
First, the control program test system 1A activates the I / O switching unit 23 and the device simulation I / F unit 21A. At this time, either one may be activated first. Next, the apparatus simulation program 30A and the control program 20 are activated in this order.

各機能ブロックを起動させると、制御プログラム試験システム1Aは、コントローラ2Aの装置模擬I/F部21Aからパソコン3Aの装置模擬プログラム30Aへ期間情報をつけて指令リスト取得要求を送信する(ステップS21)。この処理は予め定めた時刻に定期的あるいは不定期に行われる。 When each functional block is activated, the control program test system 1A sends a command list acquisition request with period information from the device simulation I / F unit 21A of the controller 2A to the device simulation program 30A of the personal computer 3A (step S21). . This process is performed regularly or irregularly at a predetermined time.

装置模擬プログラム30Aは、指令リスト取得要求を受信すると指定された期間における指令の実行時刻を決定し、この時刻情報付きの指令リストを作成し(ステップS22)、その結果を装置模擬I/F部21Aへ送信する(ステップS23)。装置模擬I/F部21Aは、受信した指令リストの時刻情報を参照し、指定された時刻になるとI/O切替部23へ指令を送信する(ステップS24)。なお、時刻の計測はコントローラ2A内に設けられたタイマ(図示しない)等を用いて行う。
制御プログラム20は、制御処理(ステップS25)において、データのRead及びWriteの指令をI/O切替部23に送信する(ステップS26)。
なお、制御プログラム20からの指令と装置模擬I/F部21Aからの指令のどちらが先に行われるかは試験対象によって決まる。
When the apparatus simulation program 30A receives the instruction list acquisition request, the apparatus simulation program 30A determines the execution time of the instruction in the designated period, creates an instruction list with this time information (step S22), and uses the result as the apparatus simulation I / F unit. Transmit to 21A (step S23). The device simulation I / F unit 21A refers to the time information of the received command list, and transmits a command to the I / O switching unit 23 when the designated time comes (step S24). The time is measured using a timer (not shown) provided in the controller 2A.
In the control process (step S25), the control program 20 transmits data read and write commands to the I / O switching unit 23 (step S26).
Note that which of the command from the control program 20 and the command from the device simulation I / F unit 21A is performed first depends on the test object.

I/O切替部23は、装置模擬I/F部21Aや制御プログラム20から指令を受信すると実I/O25と仮想I/O24のどちらに入力すべきかI/O切替設定データ部22を参照して判断し、判断結果に基づいて実I/O25または仮想I/O24へ指令を入力する(ステップS27)。そして、実I/O25または仮想I/O24のデータRead及びWriteを行い、Readしたデータを制御プログラム20へ送信する(ステップS28)。 When receiving an instruction from the device simulation I / F unit 21A or the control program 20, the I / O switching unit 23 refers to the I / O switching setting data unit 22 as to which of the actual I / O 25 and virtual I / O 24 should be input. The command is input to the real I / O 25 or the virtual I / O 24 based on the determination result (step S27). Then, the real I / O 25 or virtual I / O 24 is read and written, and the read data is transmitted to the control program 20 (step S28).

I/O切替部23は、また、仮想I/O24を介してデータの読み書きをした結果、この指令が出力指令であって、かつ、この出力指令により値が変化したか否かを判断し(ステップS29)、値が変化している場合は値変化イベントを装置模擬I/F部21Aへ送信する(ステップS30)。 The I / O switching unit 23 also determines whether or not this command is an output command as a result of reading and writing data via the virtual I / O 24 and the value has changed due to this output command ( In step S29), if the value has changed, a value change event is transmitted to the apparatus simulation I / F unit 21A (step S30).

装置模擬I/F部21Aは、この値変化イベントを装置模擬プログラム30Aへ転送する(ステップS31)。
装置模擬プログラム30Aは、値変化イベントを受信すると値変化イベントにより起動条件が満たされた新しい装置模擬処理があるか否かを判断し、起動条件が満たされた装置模擬処理がある場合はこれを起動して別スレッドで実行する(ステップS32)。
The device simulation I / F unit 21A transfers this value change event to the device simulation program 30A (step S31).
Upon receiving the value change event, the device simulation program 30A determines whether or not there is a new device simulation process that satisfies the activation condition by the value change event. If there is a device simulation process that satisfies the activation condition, this is used. Start and execute in another thread (step S32).

装置模擬I/F部21Aは、装置模擬プログラム30Aに対してステップS21で要求した期間の指令リストの取得要求を再度送信し(ステップS33)、装置模擬プログラム30Aは受信した指令リストの取得要求に応答して指定期間における指令リストを指令に時刻を付けて作成し(ステップS34)、装置模擬I/F部21Aへ送信する(ステップS35)。その後、装置模擬プログラム30Aは指令リストにある処理が終了したか否かを判断し、処理が終了していないと判断した場合はステップS31の値変化イベントを受信するより前の状態に戻る。 The device simulation I / F unit 21A transmits again a command list acquisition request for the period requested in step S21 to the device simulation program 30A (step S33), and the device simulation program 30A responds to the received command list acquisition request. In response, a command list for the specified period is created by adding the time to the command (step S34) and transmitted to the device simulation I / F unit 21A (step S35). Thereafter, the apparatus simulation program 30A determines whether or not the process in the command list has been completed. If it is determined that the process has not been completed, the apparatus simulation program 30A returns to the state before receiving the value change event in step S31.

装置模擬I/F部21AはステップS35により指令リストを受信すると、保有していた指令リストを上書きし(ステップS36)、その後、指令リストにある処理が終了したか否かを判断し、処理が終了していないと判断した場合はステップS21の前の状態に戻り、予め設定された所定時刻になると再び指令リストの取得要求を送信し、以後、同様の動作を繰り返す。 Upon receiving the command list in step S35, device simulation I / F unit 21A overwrites the stored command list (step S36), and then determines whether or not the processing in the command list has been completed. When it is determined that the process has not been completed, the process returns to the state before step S21. When a predetermined time set in advance is reached, a command list acquisition request is transmitted again, and thereafter the same operation is repeated.

制御プログラム試験システム1Aは、上記の動作を繰り返し行うことで、装置模擬プログラム30Aが開発に用いたパソコン3Aからコントローラ2Aへのダウンロードすることなく、制御プログラム20の制御プログラム試験を行うことができる。また、指令に時刻情報を付与することにより、タイミング調整が必要な指令の実行時刻を自動制御することもできる。 The control program test system 1A can perform the control program test of the control program 20 by repeatedly performing the above operation without downloading from the personal computer 3A used for development by the apparatus simulation program 30A to the controller 2A. Also, by giving time information to the command, it is possible to automatically control the execution time of the command that requires timing adjustment.

ここで、各機能ブロックそれぞれの動作を、フローチャートを用いて説明する。 Here, the operation of each functional block will be described using a flowchart.

・装置模擬I/F部の動作 ・ Operation of device simulation I / F section

図10は、装置模擬I/F部21Aの動作を示すフローチャートであり、3つのタスクフローで構成されている。 FIG. 10 is a flowchart showing the operation of the apparatus simulation I / F unit 21A, and is composed of three task flows.

フロー1は、パソコン3Aの装置模擬プログラム30Aから定期的に(不定期であってもよい)指定時刻つきの指令を取得するためのフローである。
フロー2は、装置模擬プログラム30Aから取得した指令リストに従い、付与された(指定された)時刻に指令をI/O切替部23へ送信するためのフローである。
フロー3は、I/O切替部23から値変化イベントを受信して装置模擬プログラム30Aへ転送し、次に指令リストの取得要求を送信するまでの期間の指令リストを取得しなおすためのフローである。
Flow 1 is a flow for acquiring a command with a designated time periodically (may be irregular) from the apparatus simulation program 30A of the personal computer 3A.
Flow 2 is a flow for transmitting a command to the I / O switching unit 23 at a given (designated) time in accordance with a command list acquired from the apparatus simulation program 30A.
Flow 3 is a flow for receiving a value change event from the I / O switching unit 23, transferring it to the apparatus simulation program 30A, and reacquiring the command list for the period until the next command list acquisition request is transmitted. is there.

フロー1において、装置模擬I/F部21Aは装置模擬プログラム30Aに対し、所定の期間情報を付して指令リストの取得要求を送信し、装置模擬プログラム30Aから指令リストを受信すると自装置に設けられた保有リストに新たに取得した指令リストを追加する(ステップS501、図9のステップS23に対応)。 In flow 1, the device simulation I / F unit 21A sends a command list acquisition request with predetermined period information to the device simulation program 30A, and receives the command list from the device simulation program 30A. The newly acquired command list is added to the obtained possession list (corresponding to step S501 and step S23 in FIG. 9).

そして装置模擬I/F部21Aのフロー2がスリープ状態であればこれを解除し(ステップS502)、ステップS501で取得した指令リストの最後の指令で指定された時刻より所定時間前までの間、フロー1をスリープ状態にさせる(S503)。ステップS501で取得した指令リストの最後の指令で指定された時刻より所定時間前になるとフロー1のスリープ状態を解除して処理が終了したか否かを判断し(ステップS504)、処理が終了していなければステップS501の前の状態に戻り、処理が終了していればこのフローを終了する。 Then, if the flow 2 of the apparatus simulation I / F unit 21A is in the sleep state, this is canceled (step S502), and until a predetermined time before the time specified by the last command in the command list acquired in step S501, The flow 1 is set to the sleep state (S503). When a predetermined time before the time specified by the last command in the command list acquired in step S501, the sleep state of flow 1 is canceled to determine whether or not the processing is completed (step S504), and the processing is completed. If not, the flow returns to the state before step S501, and if the processing is finished, this flow is finished.

フロー2では、装置模擬I/F部21Aは保有している指令リストに現在の時刻が指定時刻とされた指令があるか否かを判断し(ステップS511)、現在の時刻が指定時刻とされた指令がある場合はこの指令をI/O切替部23へ送信し、この指令を実行させる(ステップS512、図9のステップS24に対応)。 In the flow 2, the apparatus simulation I / F unit 21A determines whether or not there is a command whose current time is designated as the designated time in the retained command list (step S511), and the current time is designated as the designated time. If there is a command, this command is transmitted to the I / O switching unit 23 to execute this command (step S512, corresponding to step S24 in FIG. 9).

現在の時刻が指定時刻とされた指令が無い場合、あるいはステップS512が終了すると、指令リストをチェックして次の指令で指定された時刻までこのフロー2をスリープ状態とする(ステップS513)。次の指令で指定された時刻になるとフロー2のスリープ状態を解除し、処理が終了したか否かを判断し(ステップS514)、処理が終了していなければステップS511の前の状態に戻り、処理が終了していればこのフローを終了する。 When there is no command whose current time is the designated time, or when step S512 ends, the command list is checked and this flow 2 is put into the sleep state until the time designated by the next command (step S513). When the time specified by the next command is reached, the sleep state of flow 2 is canceled, and it is determined whether or not the process has ended (step S514). If the process has not ended, the process returns to the state before step S511, If the processing is finished, this flow is finished.

フロー3では、装置模擬I/F部21AはI/O切替部23からの値変化イベントを受信し(ステップS521、図9のステップS30に対応)、装置模擬プログラム30Aへこれを転送する(ステップS522、図9のステップS31に対応)。そして、次に指令リスト取得要求を送信する所定時間までの間における指令リストを更新するために、装置模擬プログラム30Aへ指令リスト取得要求を送信して新たな指令リストを取得し、保有している指令リストを上書きする(ステップS523、図9のステップS36に対応)。 In flow 3, the device simulation I / F unit 21A receives a value change event from the I / O switching unit 23 (step S521, corresponding to step S30 in FIG. 9), and transfers this to the device simulation program 30A (step S521). S522, corresponding to step S31 in FIG. 9). Then, in order to update the command list until a predetermined time for transmitting the command list acquisition request next time, the command list acquisition request is transmitted to the apparatus simulation program 30A to acquire and hold a new command list. The command list is overwritten (corresponding to step S523, step S36 in FIG. 9).

装置模擬I/F部21Aは、その後、フロー2がスリープ状態にあればこれを解除し(ステップS524)、処理が終了したか否かを判断し(ステップS525)、終了していない場合はステップS521の前の状態に戻り、処理が終了している場合はこのフローを終了する。 Thereafter, if the flow 2 is in the sleep state, the device simulation I / F unit 21A cancels the flow 2 (step S524), determines whether or not the processing is completed (step S525), and if not, performs step If the process returns to the state before S521 and the process is finished, this flow is finished.

・装置模擬プログラムの動作 ・ Operation of device simulation program

次に、図11及び図12を用いて装置模擬プログラム30Aのフローを説明する。図11は1タスクで処理する場合を、図12は2タスクで処理する場合をそれぞれ示している。
図11において、装置模擬プログラム30Aは装置模擬I/F部21Aから指令リストの取得要求または値変化イベントを受信すると(ステップS601、図9のステップS21、S31、S33に対応)、受信したデータは値変化イベントか指令リストの取得要求かを判断し(ステップS602)、値変化イベントの場合はこの値変化イベントにより起動条件が満たされた装置模擬処理があるか否かを判断する(ステップS603)。
Next, the flow of the apparatus simulation program 30A will be described with reference to FIGS. FIG. 11 shows the case of processing with one task, and FIG. 12 shows the case of processing with two tasks.
In FIG. 11, when the apparatus simulation program 30A receives a command list acquisition request or a value change event from the apparatus simulation I / F unit 21A (corresponding to steps S601 and steps S21, S31, and S33 in FIG. 9), the received data is It is determined whether it is a value change event or a command list acquisition request (step S602), and in the case of a value change event, it is determined whether there is a device simulation process in which the activation condition is satisfied by this value change event (step S603). .

該当する装置模擬処理がある場合にはこれを起動して別スレッドで実行し、この処理の中でこれより後の指令を時刻つきで計算する(ステップS604、図9のステップS32に対応)。ステップS601で受信したデータが指令リストの取得要求である場合、指令リスト取得要求で要求した所定期間分の指令リストを装置模擬プログラム30Aの各装置模擬処理から取得し、装置模擬I/F部21Aに送信する(ステップS605、図9のステップS23、S35に対応)。 If there is a corresponding device simulation process, it is activated and executed in a separate thread, and a later command is calculated with time in this process (corresponding to step S604, step S32 in FIG. 9). When the data received in step S601 is a command list acquisition request, a command list for a predetermined period requested by the command list acquisition request is acquired from each device simulation process of the device simulation program 30A, and the device simulation I / F unit 21A. (Corresponding to steps S605 and S23 and S35 in FIG. 9).

値変化イベントによって起動条件が満たされた装置模擬処理が無い場合や装置模擬処理の別スレッドで指令を実行した後、あるいは装置模擬I/F部21Aへ指令を送信した後、装置模擬プログラム30Aは装置模擬処理が終了したか否かを判断し(ステップS606)、装置模擬処理が終了していない場合はステップS601の前の状態に戻り、処理が終了している場合はこのフローを終了する。 When there is no device simulation process in which the activation condition is satisfied by the value change event, or after executing a command in another thread of the device simulation process, or after sending a command to the device simulation I / F unit 21A, the device simulation program 30A It is determined whether or not the apparatus simulation process has ended (step S606). If the apparatus simulation process has not ended, the process returns to the state before step S601, and if the process has ended, this flow ends.

一方、図12に示すように2タスクで処理する場合、装置模擬プログラム30Aはフロー1において装置模擬I/F部21Aから値変化イベントを受信し(ステップS611、図9のステップS31に対応)、この値変化イベントにより起動条件が満たされた装置模擬処理があるか否かを判断する(ステップS612)。該当する装置模擬処理がある場合はこれを起動して別スレッドで実行し、この処理の中でこれより後の指令を時刻つきで計算する(ステップS613、図9のステップS32に対応)。 On the other hand, when processing with two tasks as shown in FIG. 12, the device simulation program 30A receives a value change event from the device simulation I / F unit 21A in flow 1 (corresponding to step S611 and step S31 in FIG. 9), It is determined whether or not there is a device simulation process in which the activation condition is satisfied by this value change event (step S612). If there is a corresponding device simulation process, it is activated and executed in a separate thread, and a later command is calculated with time in this process (corresponding to step S613 and step S32 in FIG. 9).

その後、装置模擬処理が終了したか否かを判断し(ステップS614)、終了していない場合はステップS611の前の状態に戻り、処理が終了している場合はこのフローを終了する。 Thereafter, it is determined whether or not the apparatus simulation process has ended (step S614). If the apparatus simulation process has not ended, the process returns to the state before step S611. If the process has ended, this flow ends.

装置模擬プログラム30Aは、また、図12のフロー2において、装置模擬I/F部21Aから所定期間分の指令リストの取得要求を受信し(ステップS621、図9のステップS21、S33に対応)、要求された指令リストを装置模擬プログラム30Aの各装置模擬処理から取得し、装置模擬I/F部21Aに送信する(ステップS622、図9のステップS23、S35に対応)。装置模擬I/F部21Aへ指令を送信した後、装置模擬プログラム30Aは装置模擬処理が終了したか否かを判断し(ステップS623)、終了していない場合はステップS621の前の状態に戻り、処理が終了している場合はこのフローを終了する。 The apparatus simulation program 30A also receives a command list acquisition request for a predetermined period from the apparatus simulation I / F unit 21A in the flow 2 of FIG. 12 (corresponding to steps S621 and S21 and S33 of FIG. 9), The requested command list is acquired from each device simulation process of the device simulation program 30A and transmitted to the device simulation I / F unit 21A (corresponding to steps S622 and steps S23 and S35 in FIG. 9). After transmitting the command to the device simulation I / F unit 21A, the device simulation program 30A determines whether or not the device simulation processing has ended (step S623), and if not, returns to the state before step S621. If the processing is finished, this flow is finished.

なお、制御プログラム20及びI/O切替部23は実施の形態1と同じであるため、説明を省略する。 Since the control program 20 and the I / O switching unit 23 are the same as those in the first embodiment, description thereof is omitted.

本実施の形態によれば、制御プログラム試験システム1Aは、装置模擬プログラム30Aと装置模擬I/F部21Aの機能を拡張して指令に指定時刻に実行する時刻情報を付与することにより、実施の形態1に記載の効果に加えて、指令を所定の時刻に自動制御で実行させることが可能となる。これは、実施の形態1における制御プログラム30に時間管理の機能を備えた場合と同様の効果を奏するものである。 According to the present embodiment, the control program test system 1A expands the functions of the device simulation program 30A and the device simulation I / F unit 21A, and gives the instruction time information to be executed at the specified time. In addition to the effects described in the first aspect, the command can be executed by automatic control at a predetermined time. This has the same effect as when the control program 30 in the first embodiment has a time management function.

実施の形態3.
本発明を実施するための実施の形態3に係る制御プログラム試験システム1Bを図13〜図18を用いて説明する。図13に示すように、本実施の形態に係る制御プログラム試験システム1Bは、実施の形態2の構成に加えて、装置模擬I/F部21B、I/O切替部23、制御プログラム20それぞれに接続された連携動作タイミング調整部26を備えている。また、その他の構成については、装置模擬I/F部21Bは実施の形態2と機能が一部異なるものの、それ以外は同じであるため説明を省略する。
Embodiment 3 FIG.
A control program test system 1B according to Embodiment 3 for carrying out the present invention will be described with reference to FIGS. As shown in FIG. 13, in addition to the configuration of the second embodiment, the control program test system 1B according to the present embodiment includes a device simulation I / F unit 21B, an I / O switching unit 23, and a control program 20, respectively. A connected operation timing adjustment unit 26 is provided. Other configurations of the device simulation I / F unit 21B are partially the same as those of the second embodiment, but are otherwise the same, and thus the description thereof is omitted.

・全体の動作 ・ Overall operation

ここで、制御プログラム試験システム1Bの動作について説明する。
図14は、制御プログラム試験システム1B全体の動作シーケンスを示し、実線は実際の処理を伴う動作を、破線は繰り返し同じ動作に戻る場合を表している。
まず、制御プログラム試験システム1BはI/O切替部23、装置模擬I/F部21B、連携動作タイミング調整部26を任意の順に起動する。次に、装置模擬プログラム30Aを起動し、制御プログラム20を起動する。
Here, the operation of the control program test system 1B will be described.
FIG. 14 shows an operation sequence of the entire control program test system 1B. A solid line represents an operation involving actual processing, and a broken line represents a case where the operation returns repeatedly to the same operation.
First, the control program test system 1B activates the I / O switching unit 23, the device simulation I / F unit 21B, and the cooperative operation timing adjustment unit 26 in an arbitrary order. Next, the apparatus simulation program 30A is activated and the control program 20 is activated.

各機能ブロックを起動させると、制御プログラム試験システム1Bは、コントローラ2Bの装置模擬I/F部21Bから連携動作タイミング調整部26へ制御プログラム20の停止指令を送信し(ステップS41)、連携動作タイミング調整部26は制御プログラム20を停止するAPI(Application Program Interface)を読んで制御プログラム20を停止する(ステップS42)。なお、連携動作タイミング調整部26は制御プログラムリストを有し、制御プログラム20を止める際にはこれを参照する。 When each functional block is activated, the control program test system 1B transmits a stop command for the control program 20 from the device simulation I / F unit 21B of the controller 2B to the cooperative operation timing adjustment unit 26 (step S41). The adjustment unit 26 reads an API (Application Program Interface) that stops the control program 20, and stops the control program 20 (step S42). The cooperative operation timing adjustment unit 26 has a control program list, which is referred to when the control program 20 is stopped.

その後、連携動作タイミング調整部26は装置模擬I/F部21Bに装置模擬入力時刻停止指令を送信し(ステップS43)、装置模擬I/F部21Bはパソコン3Aの装置模擬プログラム30Aへ所定期間における指令リストを要求する指令リスト取得要求を送信する(ステップS44)。この処理は予め定めた時刻に定期的あるいは不定期に行われる。なお、この装置模擬入力時刻停止指令とは、装置模擬I/F部21B内の内部時刻を停止させる指令である。 Thereafter, the cooperative operation timing adjustment unit 26 transmits a device simulation input time stop command to the device simulation I / F unit 21B (step S43), and the device simulation I / F unit 21B sends the device simulation program 30A of the personal computer 3A to the device simulation program 30A for a predetermined period. A command list acquisition request for requesting a command list is transmitted (step S44). This process is performed regularly or irregularly at a predetermined time. The device simulation input time stop command is a command to stop the internal time in the device simulation I / F unit 21B.

装置模擬プログラム30Aは、指令リスト取得要求を受信すると所定期間における指令の実行時刻を決定し、この時刻情報を付けた指令リストを作成して(ステップS45)装置模擬I/F部21Bへ送信する(ステップS46)。 Upon receiving the command list acquisition request, device simulation program 30A determines the execution time of the command in a predetermined period, creates a command list with this time information (step S45), and transmits it to device simulation I / F unit 21B. (Step S46).

装置模擬I/F部21Bは、指令リストを受信すると連携動作タイミング調整部26へ制御プログラム20の再開指令を送信し(ステップS47)、連携動作タイミング調整部26は制御プログラム20を再開(もしくは開始)するAPIを読んで制御プログラム20を再開(もしくは開始)する(ステップS48)。 When the device simulation I / F unit 21B receives the command list, the device simulation I / F unit 21B transmits a restart command for the control program 20 to the cooperative operation timing adjustment unit 26 (step S47), and the cooperative operation timing adjustment unit 26 restarts (or starts) the control program 20. The control program 20 is restarted (or started) by reading the API to be executed (step S48).

連携動作タイミング調整部26は、ステップS48にて制御プログラム20を再開させた後、装置模擬I/F部21Bからの入力が行われるように、装置模擬I/F部21Bに装置模擬入力時刻進行指令を送信する(ステップS49)。なお、この装置模擬入力時刻進行指令とは、装置模擬I/F部21B内の内部時刻を進行させる指令である。 The cooperative operation timing adjustment unit 26 advances the device simulation input time to the device simulation I / F unit 21B so that the input from the device simulation I / F unit 21B is performed after restarting the control program 20 in step S48. A command is transmitted (step S49). The device simulation input time advance command is a command to advance the internal time in the device simulation I / F unit 21B.

制御プログラム20が再開し、制御処理(ステップS50)により制御プログラム20からI/O切替部23へ指令が送信されると(ステップS51)、I/O切替部23はI/Oを切替える(ステップS52)。連携動作タイミング調整部26へ制御プログラム20の停止指令を送信し(ステップS53)、連携動作タイミング調整部26は制御プログラム20を停止するAPIを読み制御プログラムリストを参照して制御プログラム20を停止し(ステップS54)、制御プログラム20が停止した後にI/O切替部23はデータのReadまたはWriteを行う(ステップS55)。 When the control program 20 is restarted and a command is transmitted from the control program 20 to the I / O switching unit 23 by the control process (step S50) (step S51), the I / O switching unit 23 switches I / O (step S51). S52). A stop command for the control program 20 is transmitted to the cooperative operation timing adjustment unit 26 (step S53), and the cooperative operation timing adjustment unit 26 reads the API for stopping the control program 20, refers to the control program list, and stops the control program 20. (Step S54) After the control program 20 stops, the I / O switching unit 23 reads or writes data (Step S55).

例えば実I/O25への指令の場合、I/O切替部23はこの指令に従って実I/O25を介してデータのReadまたはWriteを行う。仮想I/O24へのWrite指令であれば実I/O25へ書き込んだ後に連携動作タイミング調整部26へ制御プログラム20の停止指令を送信し(ステップS53)、制御プログラム20の停止が完了した後、仮想I/O24にWriteを行う(ステップS55)。また、仮想I/O24へのRead指令であれば、仮想I/O24に対してReadを行う(ステップS55)。 For example, in the case of a command to the real I / O 25, the I / O switching unit 23 reads or writes data via the real I / O 25 according to this command. If it is a write command to the virtual I / O 24, after writing to the real I / O 25, a stop command for the control program 20 is transmitted to the cooperative operation timing adjustment unit 26 (step S53), and after the stop of the control program 20 is completed, Write to the virtual I / O 24 (step S55). If it is a read command to the virtual I / O 24, the virtual I / O 24 is read (step S55).

指令が仮想I/O24へのWrite指令であって、その指令の実行により値変化が発生した場合、I/O切替部23は値変化イベントを装置模擬I/F部21Bに送信する(ステップS57)。 If the command is a write command to the virtual I / O 24 and a value change occurs due to the execution of the command, the I / O switching unit 23 transmits a value change event to the device simulation I / F unit 21B (step S57). ).

また、図示はしていないが、指令が仮想I/O24に対する出力へのWrite指令であって値変化イベントを送信しない場合は、I/O切替部23は連携動作タイミング調整部26に制御プログラム20の再開指令を送信し、連携動作タイミング調整部26は制御プログラム20を再開するAPIを読んでこれを再開する。
その後、連携動作タイミング調整部26は、装置模擬I/F部21Bに装置模擬入力時刻進行指令を送って、装置模擬I/F部21Bの内部時刻を進行させる。
Although not shown, when the command is a write command to output to the virtual I / O 24 and no value change event is transmitted, the I / O switching unit 23 sends a control program 20 to the cooperative operation timing adjustment unit 26. The cooperative operation timing adjustment unit 26 reads the API for resuming the control program 20 and resumes it.
Thereafter, the cooperative operation timing adjustment unit 26 sends a device simulation input time advance command to the device simulation I / F unit 21B to advance the internal time of the device simulation I / F unit 21B.

ステップS57により装置模擬I/F部21Bが値変化イベントを受信した場合、装置模擬I/F部21Bは装置模擬プログラム30Aへこれを転送する(ステップS58)。
装置模擬プログラム30Aは、値変化イベントを受信すると値変化イベントにより起動条件が満たされた新しい装置模擬処理があるか否かを判断し、起動条件が満たされた装置模擬処理がある場合はこれを起動し、指定期間における指令を時刻付きで作成する(ステップS59)。
When the device simulation I / F unit 21B receives the value change event in step S57, the device simulation I / F unit 21B transfers the value change event to the device simulation program 30A (step S58).
Upon receiving the value change event, the device simulation program 30A determines whether or not there is a new device simulation process that satisfies the activation condition by the value change event. If there is a device simulation process that satisfies the activation condition, this is used. Start up and create a command for a specified period with time (step S59).

装置模擬I/F部21Bはその後、ステップS44で要求した期間の指令リストの取得要求を再度送信し(ステップS60)、装置模擬プログラム30Aはこの要求に応答して指令リストを作成し(ステップS61)、装置模擬I/F部21Bへ送信する(ステップS62)。そして、再び指令リストの取得要求や値変化イベントを受信する前の状態に戻る。 Thereafter, the device simulation I / F unit 21B transmits again a command list acquisition request for the period requested in step S44 (step S60), and the device simulation program 30A creates a command list in response to this request (step S61). ) And transmitted to the device simulation I / F unit 21B (step S62). And it returns to the state before receiving a command list acquisition request or a value change event again.

装置模擬I/F部21BはステップS62にて指令リストを受信すると、保有していた指令リストを上書きする(ステップS63)。装置模擬I/F部21Bは、ステップS63にて指令リストを上書きする。その後、制御プログラム20の再開指令を装置模擬I/F部21Bから連携動作タイミング調整部26に送信する(ステップS47)。また、連携動作タイミング調整部26は制御プログラム20を再開し(ステップS48)、装置模擬入力時刻進行指令を装置模擬I/F部21Bに送信する(ステップS49)。そして、ステップS41以降の動作を繰り返す。
その後、装置模擬I/F部21Bは、装置模擬入力時刻進行指令を受信すると、内部時刻を進行させ、ステップS47以降の処理を繰り返す。
Upon receiving the command list in step S62, device simulation I / F unit 21B overwrites the stored command list (step S63). Device simulation I / F unit 21B overwrites the command list in step S63. Thereafter, a restart instruction for the control program 20 is transmitted from the device simulation I / F unit 21B to the cooperative operation timing adjustment unit 26 (step S47). The cooperative operation timing adjustment unit 26 restarts the control program 20 (step S48), and transmits a device simulation input time progression command to the device simulation I / F unit 21B (step S49). Then, the operations after step S41 are repeated.
Thereafter, upon receiving the device simulation input time advance command, device simulation I / F unit 21B advances the internal time and repeats the processing from step S47 onward.

装置模擬I/F部21Bは、また、内部時刻が進行している期間は装置模擬プログラム30Aの装置模擬処理を実行する。具体的には、ステップS46やステップS62にて受信した指令リストに従い、指定時刻より所定時間前になると連携動作タイミング調整部26へ制御プログラム20の再開指令を送信し、連携動作タイミング調整部26が制御プログラム20を再開するAPIを読んで制御プログラム20を再開させる(ステップS48)。なお、ここでいう所定時間とは、装置模擬I/F部21Bから連携動作タイミング調整部26を介して制御プログラム20へ停止指令が到達するのに要する時間である。 The device simulation I / F unit 21B also executes device simulation processing of the device simulation program 30A during the period when the internal time is advancing. Specifically, according to the command list received in step S46 or step S62, when a predetermined time before the specified time comes, a restart command for the control program 20 is transmitted to the cooperative operation timing adjustment unit 26, and the cooperative operation timing adjustment unit 26 The API for resuming the control program 20 is read and the control program 20 is resumed (step S48). The predetermined time referred to here is the time required for the stop command to reach the control program 20 from the device simulation I / F unit 21B via the cooperative operation timing adjustment unit 26.

制御プログラム20を再開させた後、装置模擬I/F部21Bは指定時刻になるとI/O切替部23に指令を送信し(図示しない)、I/O切替部23はステップS51にて制御プログラム20から指令を受信したときと同様に以降の処理を繰り返す。 After resuming the control program 20, the device simulation I / F unit 21B sends a command to the I / O switching unit 23 (not shown) at a designated time, and the I / O switching unit 23 controls the control program in step S51. The subsequent processing is repeated in the same manner as when a command is received from 20.

ここで、各機能ブロックそれぞれの動作を、フローチャートを用いて説明する。 Here, the operation of each functional block will be described using a flowchart.

・装置模擬I/F部の動作 ・ Operation of device simulation I / F section

装置模擬I/F部21Bの動作を4つのタスクフローで実施する場合を図15、図16を用いて説明する。図15はフロー1およびフロー2を、図16はフロー3およびフロー4を示している。 A case where the operation of the apparatus simulation I / F unit 21B is performed in four task flows will be described with reference to FIGS. 15 shows flow 1 and flow 2, and FIG. 16 shows flow 3 and flow 4.

フロー1は、パソコン3Aの装置模擬プログラム30Aから定期的に(不定期であってもい)指定時刻つきの指令を取得するためのフローである。このフローの処理前後において、制御プログラム20の停止指令や再開指令を連携動作タイミング調整部26へ送信する。
フロー2は、装置模擬プログラム30Aから取得した指令リストに従い、付与された(指定された)時刻に指令をI/O切替部23へ送信するためのフローである。指令を送る前に、制御プログラム20の停止指令を連携動作タイミング調整部26へ送信する。
Flow 1 is a flow for acquiring a command with a designated time periodically (even if irregular) from the apparatus simulation program 30A of the personal computer 3A. Before and after the processing of this flow, a stop command and a restart command of the control program 20 are transmitted to the cooperative operation timing adjustment unit 26.
Flow 2 is a flow for transmitting a command to the I / O switching unit 23 at a given (designated) time in accordance with a command list acquired from the apparatus simulation program 30A. Before sending the command, the stop command of the control program 20 is transmitted to the cooperative operation timing adjustment unit 26.

フロー3は、I/O切替部23から値変化イベントを受信して装置模擬プログラム30Aへ転送し、次に指令リストの取得要求を送信するまでの期間の指令リストを取得しなおすためのフローである。この処理後に、制御プログラム20の再開指令を連携動作タイミング調整部26へ送信する。
フロー4は、連携動作タイミング調整部26から装置模擬入力時刻の停止指令または進行指令を受信して装置模擬I/F部21Bの内部時刻を停止または進行再開させるためのフローである。
Flow 3 is a flow for receiving a value change event from the I / O switching unit 23, transferring it to the apparatus simulation program 30A, and reacquiring the command list for the period until the next command list acquisition request is transmitted. is there. After this processing, the restart instruction of the control program 20 is transmitted to the cooperative operation timing adjustment unit 26.
The flow 4 is a flow for receiving a stop command or a progress command of the device simulation input time from the cooperative operation timing adjustment unit 26 and stopping or restarting the internal time of the device simulation I / F unit 21B.

フロー1において、装置模擬I/F部21Bは管理する内部時刻の進行状態を示す装置模擬入力時刻停止中フラグがONかOFFかを確認し(ステップS701)、OFFであれば連携動作タイミング調整部26に制御プログラム20の停止指令を送信する(ステップS702、図14のステップS41に対応)。 In flow 1, the device simulation I / F unit 21B checks whether the device simulation input time stoppage flag indicating the progress of the internal time to be managed is ON or OFF (step S701). A stop command for the control program 20 is transmitted to 26 (corresponding to step S702 and step S41 in FIG. 14).

装置模擬I/F部21Bは、その後、装置模擬プログラム30Aに対して所定の期間情報を付して指令リストの取得要求を送信し(図14のステップS44に対応)、装置模擬プログラム30Aから指令リストを受信すると自装置に設けられた保有リストに新たに取得した指令リストを追加する(ステップS703、図14のステップS46に対応)。そして、制御プログラム20の再開指令を連携動作タイミング調整部26に送信し、完了を待つ(ステップS704、図14のステップS47に対応)。 Thereafter, the device simulation I / F unit 21B sends a command list acquisition request with predetermined period information attached to the device simulation program 30A (corresponding to step S44 in FIG. 14), and commands from the device simulation program 30A. When the list is received, the newly acquired command list is added to the possession list provided in the own apparatus (corresponding to step S703 and step S46 in FIG. 14). Then, the restart instruction of the control program 20 is transmitted to the cooperative operation timing adjustment unit 26 and waits for completion (corresponding to step S704 and step S47 in FIG. 14).

装置模擬I/F部21Bのフロー2がスリープ状態であればこれを解除し(ステップS705)、ステップS703で取得した指令リストの最後の指令で指定された時刻より所定時間前までの間、フロー1をスリープ状態にさせる(ステップS706)。また、上述のステップS701において装置模擬入力時刻停止中フラグがONの場合、ステップS706において、フロー1を所定時間(例えば100ms程度)スリープ状態にさせる。
このとき、装置模擬I/F部21Bが管理する内部時刻は、タイマの現時刻から内部時刻の進行を停止させていた累積時間である累積時刻停止時間を差し引いて計算するものとする。
If the flow 2 of the device simulation I / F unit 21B is in the sleep state, the flow is canceled (step S705), and the flow is performed for a predetermined time before the time specified by the last command in the command list acquired in step S703. 1 is put into a sleep state (step S706). If the apparatus simulation input time suspension flag is ON in step S701 described above, in step S706, the flow 1 is put into a sleep state for a predetermined time (for example, about 100 ms).
At this time, the internal time managed by the apparatus simulation I / F unit 21B is calculated by subtracting the accumulated time stop time, which is the accumulated time in which the progress of the internal time has been stopped, from the current time of the timer.

装置模擬I/F部21Bは、最後の指令で指定された時刻より所定時間前になるとフロー1のスリープ状態を解除して処理が終了したか否かを判断し(ステップS707)、処理が終了していなければステップS701の前の状態に戻り、処理が終了していればこのフローを終了する。なお、ここでいう所定時間とは、装置模擬I/F部21Bから連携動作タイミング調整部26を介して制御プログラム20へ停止指令が到達するのに要する時間である。 The device simulation I / F unit 21B determines whether or not the process is completed by canceling the sleep state of the flow 1 when a predetermined time before the time specified by the last command is reached (step S707). If not, the process returns to the state before step S701, and if the process is completed, the flow ends. The predetermined time referred to here is the time required for the stop command to reach the control program 20 from the device simulation I / F unit 21B via the cooperative operation timing adjustment unit 26.

フロー2では、装置模擬I/F部21Bはタイマの値から算出される内部時刻から算出される装置模擬入力時刻の進行を停止する装置模擬入力時刻停止中フラグがONかOFFかを確認し(ステップS711)、OFFであれば保有している指令リストに現時刻が指定時刻よりも所定時間前の指令があるか否かを判断する(ステップS712)。 In the flow 2, the device simulation I / F unit 21B checks whether the device simulation input time stopping flag for stopping the progress of the device simulation input time calculated from the internal time calculated from the timer value is ON or OFF ( In step S711), if it is OFF, it is determined whether there is a command whose current time is a predetermined time before the specified time in the stored command list (step S712).

現時刻が指令により指定された時刻よりも所定時間前であると判断した場合は制御プログラム20の停止指令を連携動作タイミング調整部26へ送信する(ステップS713)。そして、時間が経過し、現時刻が指定時刻になるとこの指令をI/O切替部23に送信し、この入力を実行させる(ステップS714)。なお、ここでいう所定時間とは、装置模擬I/F部21Bから連携動作タイミング調整部26を介して制御プログラム20へ停止指令を伝達するのに要する時間である。 If it is determined that the current time is a predetermined time before the time specified by the command, a stop command for the control program 20 is transmitted to the cooperative operation timing adjustment unit 26 (step S713). Then, when time elapses and the current time reaches the designated time, this command is transmitted to the I / O switching unit 23 to execute this input (step S714). Here, the predetermined time is a time required for transmitting a stop command from the apparatus simulation I / F unit 21B to the control program 20 via the cooperative operation timing adjustment unit 26.

装置模擬I/F部21Bは、その後、指令リストをチェックし、現時刻が指定時刻より所定時間前の指令が無い場合、次の指令で指定された時刻より所定時間前までこのフロー2をスリープ状態とする(ステップS715)。また、上述のステップS711において装置模擬入力時刻停止中フラグがONの場合、ステップS715では、フロー2を所定時間(例えば100ms程度)スリープ状態にさせる。
このとき、装置模擬I/F部21Bが管理する内部時刻は、タイマの現時刻から内部時刻の進行を停止させていた累積時間である累積時刻停止時間を差し引いて計算するものとする。
The device simulation I / F unit 21B then checks the command list, and if there is no command that is a predetermined time before the specified time, sleeps this flow 2 until the predetermined time before the time specified by the next command. A state is set (step S715). If the apparatus simulation input time suspension flag is ON in step S711 described above, in step S715, the flow 2 is put into a sleep state for a predetermined time (for example, about 100 ms).
At this time, the internal time managed by the apparatus simulation I / F unit 21B is calculated by subtracting the accumulated time stop time, which is the accumulated time in which the progress of the internal time has been stopped, from the current time of the timer.

装置模擬I/F部21Bは、次の指令で指定された時刻より所定時間前になるとフロー2のスリープ状態を解除して処理が終了したか否かを判断し(ステップS716)、処理が終了していなければステップS711の前の状態に戻り、処理が終了していればこのフローを終了する。 The apparatus simulation I / F unit 21B determines whether or not the process is completed by canceling the sleep state of the flow 2 when a predetermined time has elapsed from the time specified by the next command (step S716). If not, the process returns to the state before step S711, and if the process is completed, the flow ends.

フロー3では、装置模擬I/F部21BはI/O切替部23からの値変化イベントを受信し(ステップS721、図14のステップS57に対応)、装置模擬プログラム30Aへこれを転送する(ステップS722、図14のステップS58に対応)。そして、次に指令リスト取得要求を送信する所定時間までの間の指令リストを更新するために、装置模擬プログラム30Aへ指令リスト取得要求を送信して新たな指令リストを取得し、保有している指令リストを上書きする(ステップS723)。 In flow 3, the device simulation I / F unit 21B receives a value change event from the I / O switching unit 23 (corresponding to step S721, step S57 in FIG. 14), and transfers this to the device simulation program 30A (step S721). S722, corresponding to step S58 in FIG. 14). Then, in order to update the command list for a predetermined time until the next command list acquisition request is transmitted, the command list acquisition request is transmitted to the apparatus simulation program 30A to acquire and hold a new command list. The command list is overwritten (step S723).

装置模擬I/F部21Bは、指令リストが更新されると(図14のステップS46、ステップS62)、制御プログラム20の再開指令を連携動作タイミング調整部26へ送信し(ステップS724、図14のステップS47に対応)、フロー2がスリープ状態にあればこれを解除する(ステップS725)。そして、処理が終了したか否かを判断し(ステップS726)、終了していない場合はステップS721の前の状態に戻り、処理が終了している場合はこのフローを終了する。 When the command list is updated (steps S46 and S62 in FIG. 14), the device simulation I / F unit 21B transmits a restart command for the control program 20 to the cooperative operation timing adjustment unit 26 (steps S724 and FIG. 14). Corresponding to step S47), if flow 2 is in the sleep state, it is canceled (step S725). Then, it is determined whether or not the process has been completed (step S726). If the process has not been completed, the process returns to the state before step S721. If the process has been completed, the flow ends.

フロー4では、装置模擬I/F部21Bは連携動作タイミング調整部26から装置模擬入力時刻停止指令を受信し(ステップS731、図14のステップS43に対応)、装置模擬入力時刻停止中フラグをONにし、応答を返す(ステップS732)。 In flow 4, the device simulation I / F unit 21B receives a device simulation input time stop command from the cooperative operation timing adjustment unit 26 (corresponding to step S731 and step S43 in FIG. 14), and turns on the device simulation input time stoppage flag. And a response is returned (step S732).

装置模擬I/F部21Bは、連携動作タイミング調整部26から装置模擬入力時刻進行指令を受信すると(ステップS733、図14のステップS49に対応)、装置模擬入力時刻停止中フラグをOFFにし、装置模擬I/F部21Bのフロー1、フロー2のスリープ状態を解除し、その後、応答を返す(ステップS734)。 When the apparatus simulation I / F unit 21B receives the apparatus simulation input time advance command from the cooperative operation timing adjustment unit 26 (corresponding to step S733, step S49 in FIG. 14), the apparatus simulation input time stop flag is turned OFF, The sleep state of the flow 1 and flow 2 of the simulated I / F unit 21B is canceled, and then a response is returned (step S734).

装置模擬I/F部21Bは、装置模擬入力時刻停止指令受信から装置模擬入力時刻進行指令処理完了までの時間を累積時刻停止時間に加算し(ステップS735)、処理が終了したか否かを判断し(ステップS736)、終了していない場合はステップS731の前の状態に戻り、処理が終了している場合はこのフローを終了する。 The device simulation I / F unit 21B adds the time from the device simulation input time stop command reception to the device simulation input time progress command processing completion to the accumulated time stop time (step S735), and determines whether the processing is completed. (Step S736), the process returns to the state before Step S731 if not completed, and the process ends if the process is completed.

・I/O切替部の動作 ・ Operation of I / O switching unit

次に、図17を用いてI/O切替部23のフローを説明する。
I/O切替部23は、制御プログラム20または装置模擬I/F部21Bから指令を受信すると(ステップS801)、この指令は実I/O25と仮想I/O24のどちらに対する指令かを判断する(ステップS802)。
Next, the flow of the I / O switching unit 23 will be described with reference to FIG.
When the I / O switching unit 23 receives a command from the control program 20 or the device simulation I / F unit 21B (step S801), the I / O switching unit 23 determines whether the command is for the real I / O 25 or the virtual I / O 24 ( Step S802).

実I/O25への指令の場合は指令に従ってデータのReadまたはWriteを行い(ステップS803)、仮想I/O24への指令の場合はWrite指令か否かを判断する(ステップS804)。仮想I/O24へのWrite指令の場合は一旦実I/O25へWriteを行い(ステップS805)、次に、装置模擬I/F部21B以外からの指令で、Write指令か否かを判断する(ステップS806)。 In the case of a command to the real I / O 25, data is read or written according to the command (step S803), and in the case of a command to the virtual I / O 24, it is determined whether or not the command is a write command (step S804). In the case of a write command to the virtual I / O 24, a write to the real I / O 25 is once performed (step S805), and then it is determined whether or not the command is a write command by a command from other than the device simulation I / F unit 21B ( Step S806).

ステップS806の判断の結果、指令が仮想I/O24へのWrite指令の場合、制御プログラム20の停止指令を連携動作タイミング調整部26へ送信して制御プログラム20を停止させ(ステップS807)、ステップS806の判断の結果、指令が仮想I/O24へのWrite指令でない場合はそのまま、指令に従って仮想I/O27にWriteやReadを行う(ステップS808)。 If the result of determination in step S806 is that the command is a write command to the virtual I / O 24, a stop command for the control program 20 is transmitted to the cooperative operation timing adjustment unit 26 to stop the control program 20 (step S807), and step S806 If the command is not a write command to the virtual I / O 24 as a result of the determination, the virtual I / O 27 is directly written or read according to the command (step S808).

その後、指令がWrite指令であり、かつ、このWrite指令により値が変化したか否かを判断し(ステップS809、図14のステップS56に対応)、値変化している場合は装置模擬I/F部21Bへ値変化イベントを送信し(ステップS810、図14のステップS57に対応)このフローを終了する。 Thereafter, it is determined whether or not the command is a Write command and the value is changed by this Write command (corresponding to Step S809 and Step S56 in FIG. 14). If the value is changed, the device simulation I / F The value change event is transmitted to the unit 21B (corresponding to step S810 and step S57 in FIG. 14), and this flow is finished.

ステップS809にて、仮想I/O24のWrite指令であって値変化していない場合、あるいは仮想I/O24へのRead指令の場合、この指令がWrite指令か否かを判断し(ステップS811)、Write指令の場合は制御プログラム20の再開指令を連携動作タイミング調整部26へ送信し、制御プログラム20を再開させて完了を待つ(ステップS812)。ステップS810又はステップS812の後、処理が終了したか否かを判断し(ステップS813)、処理が終了していると判断すればこのフローを終了し、処理が終了していないと判断すればステップS801の前の状態に戻る。 In step S809, if it is a write command for virtual I / O 24 and the value has not changed, or if it is a read command to virtual I / O 24, it is determined whether this command is a write command (step S811). In the case of the Write command, a restart command of the control program 20 is transmitted to the cooperative operation timing adjustment unit 26, and the control program 20 is restarted and waits for completion (step S812). After step S810 or step S812, it is determined whether or not the process has been completed (step S813). If it is determined that the process has been completed, this flow ends. If it is determined that the process has not been completed, step Return to the previous state of S801.

・連携動作タイミング調整部の動作 ・ Operation of coordinated operation timing adjustment unit

続いて、図18を用いて連携動作タイミング調整部26のフローを説明する。
連携動作タイミング調整部26は、コントローラ2B内に備えられた受信停止指令リストが空でなければ受信停止指令リストから、空であれば連携動作タイミング調整部26以外の他のプログラムから制御プログラム20の停止指令を受信する(ステップS901、図14のステップS41に対応)。停止指令を受信すると装置内に設けられた制御プログラムリストを参照して制御プログラム20の処理を停止し(ステップS902)、装置模擬I/F部21Bに装置模擬入力時刻停止指令を送信し、応答が返ってくるのを待つ(ステップS903、図14のステップS43に対応)。そして、停止指令の送り元に停止完了の返信をする(ステップS904)。
Next, the flow of the cooperative operation timing adjustment unit 26 will be described with reference to FIG.
The cooperative operation timing adjustment unit 26 is configured to control the control program 20 from a reception stop command list provided in the controller 2B if the reception stop command list is not empty, and from a program other than the cooperative operation timing adjustment unit 26 if it is empty. A stop command is received (corresponding to step S901, step S41 in FIG. 14). When the stop command is received, the processing of the control program 20 is stopped with reference to the control program list provided in the device (step S902), the device simulation input time stop command is transmitted to the device simulation I / F unit 21B, and the response Is waited for (step S903, corresponding to step S43 in FIG. 14). Then, a stop completion reply is returned to the stop command source (step S904).

連携動作タイミング調整部26はその後、他のプログラムから制御プログラム20の再開指令または停止指令を受信すると(ステップS905)、再開指令を受信したか否かを判断する(ステップS906)。再開指令を受信していない場合は受信停止指令リストに停止指令を追加し(ステップS907)、ステップS905の前の状態に戻る。 Thereafter, when the cooperative operation timing adjustment unit 26 receives a restart command or a stop command of the control program 20 from another program (step S905), it determines whether or not a restart command has been received (step S906). If a restart command has not been received, a stop command is added to the reception stop command list (step S907), and the state before step S905 is restored.

ステップS906で再開指令を受信したと判断した場合、制御プログラムリストを参照して制御プログラム20を再開し(ステップS908)、装置模擬I/F部21Bに装置模擬入力時刻進行指令を送信し、応答が返ってくるのを待つ(ステップS909、図14のステップS49に対応)。その後、再開指令の送り元に再開完了を返信し(ステップS910)、処理が終了したか否かを判断し(ステップS911)、処理が終了していなければステップS901の前の状態に戻り、処理が終了していればこのフローを終了する。 If it is determined in step S906 that the restart command has been received, the control program 20 is restarted with reference to the control program list (step S908), and the device simulation input time advance command is transmitted to the device simulation I / F unit 21B, and the response Is waited for (step S909, corresponding to step S49 in FIG. 14). Thereafter, the completion of restart is returned to the source of the restart command (step S910), and it is determined whether or not the process is completed (step S911). If the process is not completed, the process returns to the state before step S901, and the process is completed. If is finished, this flow is finished.

本実施の形態によれば、制御プログラム試験システム1Bは、連携動作タイミング調整部26を備え、装置模擬をするために必要な動作、例えば装置模擬プログラム30が装置模擬処理を実行する間は制御プログラム20を停止して装置模擬入力時刻を一時停止することにより、実施の形態2に記載の効果に加えて、装置模擬プログラム30Aからの装置模擬入力とコントローラ2上の制御プログラム20の連携動作のタイミングが変わらないようにすることができる。装置模擬プログラム30Aと制御プログラム20の連携動作のタイミングへの影響を回避することができる。これにより、装置模擬プログラム30Aの代わりに実際の被制御装置をコントローラ2Bに接続した場合と同じタイミングで制御プログラムの動作試験を行うことができる。 According to the present embodiment, the control program test system 1B includes the coordinated operation timing adjustment unit 26, and performs a control program while the device simulation program 30 executes a device simulation process, for example, an operation necessary for device simulation. In addition to the effect described in the second embodiment, the timing of the cooperative operation of the apparatus simulation input from the apparatus simulation program 30A and the control program 20 on the controller 2 is stopped by stopping the apparatus simulation input time 20 Can be kept unchanged. The influence on the timing of the cooperative operation between the apparatus simulation program 30A and the control program 20 can be avoided. Thus, the operation test of the control program can be performed at the same timing as when an actual controlled device is connected to the controller 2B instead of the device simulation program 30A.

なお、上記実施の形態1ないし実施の形態3の説明において「〜部」と説明したものは、「〜手段」、「〜回路」、「〜機器」としても良い。すなわち、ソフトウェア、ファームウェア、素子・デバイス・基板・配線などのハードウェア、あるいはこれらの組合せによって実施することができる。
また、上記実施の形態のコントローラ2は、制御プログラム20を試験するための制御プログラム試験装置と言い換えても良い。
また、上記指令はReadとWriteの指令を総称するものである。
In addition, what was described as “to part” in the description of the first to third embodiments may be “to means”, “to circuit”, and “to device”. That is, it can be implemented by software, firmware, hardware such as an element / device / board / wiring, or a combination thereof.
In addition, the controller 2 of the above embodiment may be paraphrased as a control program test apparatus for testing the control program 20.
The above command is a general term for Read and Write commands.

1、1A、1B 制御プログラム試験システム
2、2A、2B コントローラ
20 制御プログラム
21、21A、21B 装置模擬I/F部
22 I/O切替設定データ部
23 I/O切替部
24 仮想I/O
25 実I/O
26 連携動作タイミング調整部
200 記憶媒体
201 RAM
202 CPU
203 コントローラ側I/F部
3、3A、3B パソコン
30、30A 装置模擬プログラム
300 記憶媒体
301 RAM
302 CPU
303 パソコン側I/F部
1, 1A, 1B control program test system 2, 2A, 2B controller
20 Control program
21, 21A, 21B Device simulation I / F section
22 I / O switching setting data section
23 I / O switching part
24 Virtual I / O
25 Real I / O
26 Coordinated operation timing adjustment section
200 storage media
201 RAM
202 CPU
203 Controller side I / F part 3, 3A, 3B PC
30, 30A device simulation program
300 storage media
301 RAM
302 CPU
303 PC side I / F section

Claims (7)

被制御装置を模擬した装置模擬プログラムを有する端末装置に接続され、
前記被制御装置を制御する制御プログラム、
前記被制御装置に対するデータの入出力を実際に行う実インタフェース部、
前記被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、
前記装置模擬プログラム及び前記制御プログラムのいずれか一方からの指令に応じて前記実インタフェース部と前記仮想インタフェース部とを切替える切替部、を備え、
前記切替部は、前記仮想インタフェース部から前記指令を実行し値変化が発生した場合に前記装置模擬プログラムに値変化に関する情報を送信することを特徴とする制御プログラム試験装置。
Connected to a terminal device having a device simulation program that simulates a controlled device;
A control program for controlling the controlled device;
An actual interface unit that actually inputs and outputs data to and from the controlled device;
A virtual interface unit that virtually inputs and outputs data to and from the controlled device;
A switching unit that switches between the real interface unit and the virtual interface unit in response to a command from either the device simulation program or the control program;
The control section test apparatus characterized in that the switching section transmits information related to a value change to the apparatus simulation program when a value change occurs when the command is executed from the virtual interface section.
前記装置模擬プログラムから前記指令を受信し、該指令を前記切替部に送信する装置模擬インタフェース部を備え、
前記装置模擬プログラムは、前記指令に該指令を実行する時刻情報を付して前記装置模擬インタフェース部に送信し、
前記装置模擬インタフェース部は前記時刻情報に基づき前記指令を送信し、
前記切替部は前記指令を受信し、該指令に応じて前記実インタフェース部と前記仮想インタフェース部とを切替えることを特徴とする請求項1に記載の制御プログラム試験装置。
A device simulation interface unit that receives the command from the device simulation program and transmits the command to the switching unit;
The device simulation program attaches time information for executing the command to the command and transmits it to the device simulation interface unit,
The device simulation interface unit transmits the command based on the time information,
The control program test apparatus according to claim 1, wherein the switching unit receives the command and switches the real interface unit and the virtual interface unit according to the command.
前記装置模擬プログラムからの指令が前記仮想インタフェース部への指令である場合に、前記制御プログラムの処理を停止して前記切替部に前記装置模擬プログラムからの指令を実行させるタイミング調整部、を備えたことを特徴とする請求項1に記載の制御プログラム試験装置。 A timing adjustment unit that stops processing of the control program and causes the switching unit to execute a command from the device simulation program when a command from the device simulation program is a command to the virtual interface unit; The control program test apparatus according to claim 1. 被制御装置を模擬した装置模擬プログラムを有する端末装置と、
前記被制御装置を制御する制御プログラム、
前記被制御装置に対するデータの入出力を実際に行う実インタフェース部、
前記被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、
前記装置模擬プログラム及び前記制御プログラムのいずれか一方からの指令に応じて前記実インタフェース部と前記仮想インタフェース部とを切替える切替部、を有し、前記端末装置に接続されたコントローラと、を備え、
前記仮想インタフェース部から前記指令を実行して値変化が発生した場合に、前記切替部が前記装置模擬プログラムに値変化に関する情報を送信することを特徴とする制御プログラム試験システム。
A terminal device having a device simulation program that simulates a controlled device;
A control program for controlling the controlled device;
An actual interface unit that actually inputs and outputs data to and from the controlled device;
A virtual interface unit that virtually inputs and outputs data to and from the controlled device;
A switching unit that switches between the real interface unit and the virtual interface unit in response to a command from one of the device simulation program and the control program, and a controller connected to the terminal device,
The control program test system, wherein when the command is executed from the virtual interface unit and a value change occurs, the switching unit transmits information on the value change to the device simulation program.
前記装置模擬プログラムから前記指令を受信し、該指令を前記切替部に送信する装置模擬インタフェース部を備え、
前記装置模擬プログラムは、前記指令に該指令を実行する時刻情報を付して前記装置模擬インタフェース部に送信し、
前記装置模擬インタフェース部は前記時刻情報に基づき前記指令を送信し、
前記切替部は前記指令を受信し、該指令に応じて前記実インタフェース部と前記仮想インタフェース部とを切替えることを特徴とする請求項4に記載の制御プログラム試験システム。
A device simulation interface unit that receives the command from the device simulation program and transmits the command to the switching unit;
The device simulation program attaches time information for executing the command to the command and transmits it to the device simulation interface unit,
The device simulation interface unit transmits the command based on the time information,
The control program test system according to claim 4, wherein the switching unit receives the command and switches the real interface unit and the virtual interface unit according to the command.
前記コントローラは、前記装置模擬プログラムからの指令が前記仮想インタフェース部への指令である場合に、前記制御プログラムの処理を停止して前記切替部に前記装置模擬プログラムからの指令を実行させるタイミング調整部、を備えたことを特徴とする請求項4に記載の制御プログラム試験システム。 The controller, when a command from the device simulation program is a command to the virtual interface unit, stops the processing of the control program and causes the switching unit to execute a command from the device simulation program The control program test system according to claim 4, further comprising: 被制御装置を制御する制御プログラム、
前記被制御装置に対するデータの入出力を実際に行う実インタフェース部、
前記被制御装置に対するデータの入出力を仮想的に行う仮想インタフェース部、
前記装置模擬プログラム及び前記制御プログラムのいずれか一方からの指令に応じて前記実インタフェース部と前記仮想インタフェース部とを切替える切替部、を有するコントローラと、
前記コントローラに接続され、前記被制御装置を模擬した装置模擬プログラムを有する端末装置と、を備えた制御プログラム試験システムにおいて、
前記制御プログラムまたは前記装置模擬プログラムが前記切替部に向けてデータ入出力に関する指令を送信する指令送信ステップと、
前記指令送信ステップにより送信された前記指令に基づき、前記切替部が前記実インタフェース部と前記仮想インタフェース部とを切替えて前記実インタフェース部または前記仮想インタフェース部に前記指令を実行させる切替ステップと、
前記切替ステップにより前記仮想インタフェース部が前記指令を実行した後、実行された前記指令により値変化が発生したか否かを前記切替部が判断する判断ステップと、
前記判断ステップにより前記切替部が前記値変化が発生したと判断した場合に、前記切替部が前記装置模擬プログラムに対して値変化に関する情報を送信する値変化情報送信ステップと、
前記値変化情報送信ステップにより送信された前記値変化に関する情報を受信した前記装置模擬プログラムが、前記被制御装置を模擬した装置模擬の処理を実行する装置模擬処理ステップと、を備えたことを特徴とする制御プログラムの試験方法。
A control program for controlling the controlled device,
An actual interface unit that actually inputs and outputs data to and from the controlled device;
A virtual interface unit that virtually inputs and outputs data to and from the controlled device;
A controller having a switching unit that switches between the real interface unit and the virtual interface unit in response to a command from one of the device simulation program and the control program;
In a control program test system comprising: a terminal device connected to the controller and having a device simulation program that simulates the controlled device;
A command transmission step in which the control program or the apparatus simulation program transmits a command regarding data input / output to the switching unit;
Based on the command transmitted by the command transmission step, the switching unit switches the real interface unit and the virtual interface unit to cause the real interface unit or the virtual interface unit to execute the command,
A determination step in which the switching unit determines whether or not a value change has occurred due to the executed command after the virtual interface unit has executed the command in the switching step;
A value change information transmitting step in which, when the switching unit determines that the value change has occurred in the determining step, the switching unit transmits information on the value change to the device simulation program;
The apparatus simulation program that has received the information on the value change transmitted in the value change information transmission step includes an apparatus simulation process step of executing an apparatus simulation process that simulates the controlled apparatus. The control program test method.
JP2011164073A 2011-07-27 2011-07-27 Control program test apparatus, control program test system and testing method of control program Withdrawn JP2013029914A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011164073A JP2013029914A (en) 2011-07-27 2011-07-27 Control program test apparatus, control program test system and testing method of control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011164073A JP2013029914A (en) 2011-07-27 2011-07-27 Control program test apparatus, control program test system and testing method of control program

Publications (1)

Publication Number Publication Date
JP2013029914A true JP2013029914A (en) 2013-02-07

Family

ID=47786920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011164073A Withdrawn JP2013029914A (en) 2011-07-27 2011-07-27 Control program test apparatus, control program test system and testing method of control program

Country Status (1)

Country Link
JP (1) JP2013029914A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5673892B1 (en) * 2014-03-20 2015-02-18 株式会社安川電機 Iron making device, iron making method, control system, control method, weighing device and automatic device
JP2017142639A (en) * 2016-02-10 2017-08-17 富士電機株式会社 Network equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5673892B1 (en) * 2014-03-20 2015-02-18 株式会社安川電機 Iron making device, iron making method, control system, control method, weighing device and automatic device
WO2015141001A1 (en) * 2014-03-20 2015-09-24 株式会社安川電機 Ironmaking apparatus, ironmaking method, control system, control method, weighing apparatus and automated apparatus
JP2017142639A (en) * 2016-02-10 2017-08-17 富士電機株式会社 Network equipment

Similar Documents

Publication Publication Date Title
JP6247320B2 (en) System and method for testing a distributed control system of an industrial plant
US10082777B2 (en) CPU unit for PLC, PLC-use system program, recording medium in which PLC-use system program is stored, PLC system, PLC support device, PLC support program, and recording medium in which PLC support program is stored
JP5218585B2 (en) Control device and system program
US20140005805A1 (en) Cpu of plc, system program for plc, and recording medium storing system program for plc
JP4752983B1 (en) PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP7103303B2 (en) Devices, communication modules, application modules and methods
CN110456707B (en) Control device
JP5747584B2 (en) Control device and system program
CN101539866A (en) Information processing device, and method of starting information processing device
JP6433635B1 (en) Simulation apparatus and simulation method
US20170075335A1 (en) Controller and control system
JP5190796B2 (en) Field device and field device software update system using the same
JP2005173747A (en) Memory update system for field apparatus
JP2018055583A (en) Control apparatus, control method and program
US20200278662A1 (en) Communication system, communication method, and information storage medium
JP2013029914A (en) Control program test apparatus, control program test system and testing method of control program
JP6874706B2 (en) How to generate application programs, devices, programs
JP2019079256A (en) Control device, control device control method, information processing program, and recording medium
JP5314959B2 (en) Information processing apparatus, control method therefor, computer program, and storage medium
JP5845629B2 (en) PLC CPU unit, PLC system program, and recording medium storing PLC system program
JP2015141648A (en) programmable controller
JP2015191606A (en) Information processing apparatus, information processing apparatus control method, and information processing apparatus control program
JP7230989B2 (en) Communication system, communication method, and program
JP2014134989A (en) Computer system and computer management method
JP2010009193A (en) Electronic device

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20141007