JP7654268B2 - Program execution control system and program execution control device - Google Patents
Program execution control system and program execution control device Download PDFInfo
- Publication number
- JP7654268B2 JP7654268B2 JP2022199027A JP2022199027A JP7654268B2 JP 7654268 B2 JP7654268 B2 JP 7654268B2 JP 2022199027 A JP2022199027 A JP 2022199027A JP 2022199027 A JP2022199027 A JP 2022199027A JP 7654268 B2 JP7654268 B2 JP 7654268B2
- Authority
- JP
- Japan
- Prior art keywords
- command
- terminal
- control
- control device
- program
- 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.)
- Active
Links
- 238000004088 simulation Methods 0.000 claims description 28
- 238000010586 diagram Methods 0.000 description 17
- 238000000034 method Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 3
- 238000005401 electroluminescence Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Description
本発明は、作成されたプログラムを制御するプログラム実行制御システムおよびプログラム実行制御装置に関する。 The present invention relates to a program execution control system and a program execution control device that control created programs.
コンピュータプログラミングの普及に伴い、例えば若年層が制御対象装置を制御するための制御プログラムを生成するプログラミングを学習する際、より効率的に学習できるツールが切望されている。
それを実現するためには、ネットワークを介した複数の端末間で、作成したプログラムを共有し、互いに実行状況を確認可能な環境が必要となる。
As computer programming becomes more widespread, there is a strong demand for tools that enable young people to learn programming more efficiently, for example, to generate control programs for controlling devices to be controlled.
To achieve this, an environment is required in which created programs can be shared between multiple terminals via a network and execution status can be checked by each other.
特許文献1には、第1メインプログラムでスタンドアロンプログラムを実行し、第1端末で実行されている第1メインプログラムと第2端末で実行されている第2メインプログラムによって第1端末と第2端末との間のネットワーク接続を確立するステップと、ネットワーク接続によって第1端末から第2端末への画像情報の伝送及び第2端末から第1端末への第2操作命令の伝送を実現するステップとを含むスタンドアロンプログラムの実行方法に関する技術が開示されている。
しかしながら、特許文献1に記載のスタンドアロンプログラムの実行方法では、第1端末から第2端末への画像情報を伝送したり、第2端末から第1端末への第2操作命令を伝送したりするが、第1端末や第2端末にそれぞれ制御装置や制御対象機器などの制御対象は接続されておらず、第1端末や第2端末のうち他方の端末に接続された制御対象を制御することが困難であった。
However, in the method of executing a standalone program described in
本発明は、上記問題点に鑑みてなされたものであり、他方の端末に接続された制御対象を制御するプログラム実行制御システムおよびプログラム実行制御装置を提供することを目的とする。 The present invention has been made in consideration of the above problems, and aims to provide a program execution control system and a program execution control device that control a control target connected to another terminal.
上記目的を解決するため、本発明に係るプログラム実行制御システムの第1の特徴は、
第1制御プログラムを実行する第1制御装置と接続された第1端末と、第2制御プログラムを実行する第2制御装置と接続された第2端末とがネットワークを介して接続された命令実行制御システムであって、
前記第1端末は、
外部入力された命令が前記第1制御プログラムに対する第1命令か否かを判定する第1命令判定手段と、
前記第1命令であると判定された場合に、前記第1制御装置に前記第1命令を実行させるとともに、前記第1命令でないと判定された場合に、前記命令を前記第2端末に送信する第1命令制御手段と、を備え、
前記第2端末は、
外部入力された命令が前記第2制御プログラムに対する第2命令か否かを判定する第2命令判定手段と、
前記第2命令であると判定された場合に、前記第2制御装置に前記第2命令を実行させるとともに、前記第2命令でないと判定された場合に、前記命令を前記第1端末に送信する第2命令制御手段と、を備えた
ことにある。
In order to achieve the above object, a first feature of the program execution control system according to the present invention is to
An instruction execution control system in which a first terminal connected to a first control device that executes a first control program and a second terminal connected to a second control device that executes a second control program are connected via a network,
The first terminal is
a first command determination means for determining whether or not an externally input command is a first command for the first control program;
a first command control means for causing the first control device to execute the first command when it is determined that the command is the first command, and for transmitting the command to the second terminal when it is determined that the command is not the first command,
The second terminal is
a second command determination means for determining whether or not an externally input command is a second command for the second control program;
and a second command control means for causing the second control device to execute the second command when it is determined that the command is the second command, and for transmitting the command to the first terminal when it is determined that the command is not the second command.
本発明に係るプログラム実行制御システムおよびプログラム実行制御装置によれば、他方の制御装置に接続された制御対象機器を制御することができる。 The program execution control system and program execution control device according to the present invention can control a controlled device connected to another control device.
以下、本発明の実施の形態について、図面を参照して説明する。各図面を通じて同一若しくは同等の部位や構成要素には、同一若しくは同等の符号を付している。ただし、図面は模式的なものであり、現実のものとは異なることに留意すべきである。また、図面相互間においても互いの寸法の関係や比率が異なる部分が含まれている。 The following describes an embodiment of the present invention with reference to the drawings. The same or equivalent parts and components are designated with the same or equivalent reference numerals throughout the drawings. However, it should be noted that the drawings are schematic and may differ from the actual product. In addition, the drawings may include parts with different dimensional relationships and ratios.
また、以下に示す実施の形態は、この発明の技術的思想を具体化するための装置等を例示するものであって、この発明の技術的思想は、各構成部品の配置等を下記のものに特定するものでない。この発明の技術的思想は、特許請求の範囲において、種々の変更を加えることができる。 The embodiments shown below are merely examples of devices that embody the technical ideas of this invention, and the technical ideas of this invention do not specify the arrangement of each component part as described below. The technical ideas of this invention can be modified in various ways within the scope of the claims.
以下、本発明を実施するための形態について図面を参照して説明する。 Below, the embodiment of the present invention will be described with reference to the drawings.
<実施例1>
図1は、本発明の実施例1に係るプログラム実行制御システム100の構成を説明した図であり、図2は、本発明の実施例1に係るプログラム実行制御システム100における情報の流れを模式的に示した説明図である。
Example 1
FIG. 1 is a diagram illustrating the configuration of a program
図1に示すように、プログラム実行制御システム100は、第1端末1と、第2端末2と、表示部3と、入力部4と、制御装置5と、制御対象機器6と、表示部7と、入力部8と、制御装置9と、制御対象機器10とを備えており、第1端末1と、第2端末2とは、ネットワークNTを介して接続されている。
As shown in FIG. 1, the program
プログラム実行制御システム100は、例えば、コンピュータプログラミング(以下、プログラミングという)の学習として使用可能なシステムである。第1端末1と第2端末2、表示部3と表示部7、入力部4と入力部8、制御装置5と制御装置9、制御対象機器6と制御対象機器10は、それぞれ同一の構成を有するため、第1端末1、表示部3、入力部4、制御装置5、および制御対象機器6について説明する。
The program
第1端末1は、タブレット型コンピュータ、高機能携帯電話(所謂、スマートフォン)、ノート型コンピュータ、デスクトップ型コンピュータ等のコンピュータを用いて構成される。ここでは、第1端末1として、デスクトップ型コンピュータを用いた例について説明する。詳細は後述する。
The
表示部3は、有機EL(electroluminescence)ディスプレイや、液晶ディスプレイ等の画像出力装置を備え、第1端末1から供給された出力信号に基づいて、命令生成表示画面など各種画面を表示する。
The
入力部4は、マウスやキーボード等の入力部を備えており、ユーザ操作により命令などの入力信号を生成して第1端末1へ供給する。
The
制御装置5は、第1端末1にて制御される装置である。また、制御装置5は、その機能上、制御手段51と、記憶手段52とを備えている。制御装置5と第1端末1とは、有線又は無線の通信方法で通信することが可能である。有線通信としては、例えば、USB(Universal Serial Bus)等の様々な規格に準拠した通信方法を用いることが可能である。無線通信としては、IEEE(Institute of Electrical and Electronics Engineers)802.15.1(所謂、Bluetooth)やIEEE802.11(所謂、Wi-Fi)等の様々な規格に準拠した通信方法を用いることが可能である。
The
記憶手段52は、例えば、不揮発性半導体などで構成されており、制御対象機器6を制御するための第1制御プログラムが記憶している。制御手段51は、例えば、CPU(Central Processing Unit)などの演算装置で構成されており、記憶手段52から第1制御プログラムを読み込み、読み込んだ第1制御プログラムを実行することにより、第1端末1から供給される第1命令に基づいて、制御対象機器6を制御することが可能となる。
The storage means 52 is composed of, for example, a non-volatile semiconductor, and stores a first control program for controlling the controlled
制御対象機器6は、第1制御プログラムを実行する制御装置5にて制御される装置である。制御対象機器6は、制御装置5にて認識可能な所定の規格に準拠していれば様々な装置を用いることが可能である。ここでは、LED(Light Emitting Diode)等の発光素子を8×8のマトリクス状に配置したLEDボードを用いる例について説明する。なお、制御対象機器6としては、LEDボードに限らず、8セグメントのLED、命令に基づく画像を表示する装置、命令に基づく音声を出力する装置、命令に基づく動作を行う玩具用又は産業用ロボット、命令に基づき値を取得するセンサー装置等の様々な装置を制御対象機器6として用いることが可能である。制御装置5と制御対象機器6とは、有線又は無線の通信方法で通信することが可能である。有線通信としては、例えば、汎用I/Oポート、USB(Universal Serial Bus)、IEEE(Institute of Electrical and Electronics Engineers)1394等の様々な規格に準拠した通信方法を用いることが可能である。無線通信としては、IEEE802.15.1(所謂、Bluetooth)やIEEE802.11(所謂、Wi-Fi)等の様々な規格に準拠した通信方法を用いることが可能である。
The controlled
第1端末1は、実行制御プログラムを実行することにより、その機能上、命令生成手段11と、命令判定手段12と、通信手段13と、命令制御手段14と、表示制御手段15とを有する。
By executing the execution control program, the
命令生成手段11は、入力部4によるユーザ入力に基づいて、制御対象機器6や制御対象機器10に対する命令を生成する。例えば、制御対象機器6が有するLEDボードを1000(ミリ秒)の間点灯させる命令を生成したり、制御対象機器10が有するLEDボードを500(ミリ秒)の間点灯させた後に500(ミリ秒)の間消灯させることで点滅させる命令を生成したりする。また、命令生成手段11は、第1制御プログラムに対応する第1命令と、第2制御プログラムに対応する第2命令との両方を生成することができる。例えば、ユーザが、入力部4から制御対象機器6を選択して命令を生成する操作を行った場合、命令生成手段11は、第1制御プログラムに対応する第1命令を生成し、入力部4から制御対象機器10を選択して命令を生成する操作を行った場合、命令生成手段11は、第2制御プログラムに対応する第2命令を生成する。
The command generating means 11 generates commands for the controlled
命令判定手段12は、外部入力された命令、すなわち、第2端末2から送信された命令、や命令生成手段11により生成された命令が第1制御プログラムに対応する第1命令か否かを判定する。ここで、第1制御プログラムとは、制御対象機器6を制御するために制御手段51が実行するプログラムである。制御手段51により第1制御プログラムが実行された状態で、第1制御プログラムに対応する第1命令が第1端末1から供給されることにより、制御対象機器6を供給された命令に基づいて制御することができる。命令生成手段11により生成された命令が第1制御プログラムに対応する第1命令か否かは、例えば、第1制御プログラムに対応するキーワードを定めておき、そのキーワードが入力された場合に、第1制御プログラムに対応すると判定するようにしてもよい。また、予め命令生成手段11により生成された命令が第1制御プログラムに対応する第1命令のリストを第1端末1の内部メモリに保存しておき、命令判定手段12は、命令生成手段11により生成された命令がリストにある場合に、第1制御プログラムに対応すると判定するようにしてもよい。また、第1制御プログラムを実行する制御装置5にIPアドレスやMACアドレスを設定するようにしてもよいし、トークンや暗号化情報を設定するようにしてもよいし、任意のネットワーク内で識別可能な情報を設定するようにしてもよく、命令とともに送信されたこれらいずれかの情報に基づいて第1制御プログラムに対応するか否かを判定するようにしてもよい。
The command determination means 12 determines whether an externally input command, i.e., a command transmitted from the
制御手段51により第1制御プログラムが実行されることにより、制御手段51は供給された第1命令を実行することが可能となる。一方で、命令生成手段11により生成された命令が第1命令ではない場合、制御手段51に供給されたとしても、制御手段51は供給された命令を実行することはできない。 When the control means 51 executes the first control program, the control means 51 is able to execute the supplied first command. On the other hand, if the command generated by the command generating means 11 is not the first command, even if it is supplied to the control means 51, the control means 51 cannot execute the supplied command.
通信手段13は、第2端末2と間で命令を送受信するインターフェイスである。命令を送信する際、通信手段13は、第2端末2を一意に識別可能な識別情報に基づいて、命令を第2端末2へ送信する。なお、ここでは、第1端末1と第2端末2とがネットワークNTを介して接続された例について説明するが、制御装置の接続台数は2台に限らない。3台以上の制御装置が接続されている場合、接続されたそれぞれの制御装置の識別情報に基づいて命令を送信することも可能であり、また、ネットワークNTに接続された制御装置の全てに命令を送信することも可能である。識別情報は、例えばIPアドレスやMACアドレスでもよいし、キーワードなど任意のネットワーク内で識別可能な情報であってもよく、制御装置を識別可能な情報であればどのようなものでもよい。
The communication means 13 is an interface for sending and receiving commands to and from the
命令制御手段14は、命令判定手段12により第1命令であると判定された場合に、制御装置5に第1命令を実行させる。また、命令制御手段14は、命令判定手段12により第1命令ではないと判定された場合に、その命令は、第2制御プログラムに対する第2命令であると判定し、宛先を第2端末2としてその命令を第2端末2に送信する。
When the command determination means 12 determines that the command is the first command, the command control means 14 causes the
命令制御手段14は、第2端末2から受信した命令が第1命令であると判定された場合に、制御装置5に第1命令を実行させる。
When the command received from the
表示制御手段15は、表示部3に命令生成表示画面など各種画面を表示させる。具体的には、表示制御手段15は、命令生成手段11により生成された命令や第2端末2から送信された命令を命令生成表示画面に表示させたり、制御装置5から受信した制御対象機器6の状態情報を表示部3に表示させたりする。
The display control means 15 causes the
図3(a)は、本発明の実施例1に係るプログラム実行制御システム100が備える表示部3に表示された命令生成表示画面の一例を示した図であり、(b)は、本発明の実施例1に係るプログラム実行制御システム100が備える表示部7に表示された命令生成表示画面の一例を示した図である。ここでは、第1端末1において、第1命令と第2命令とが生成された例を挙げて説明する。
FIG. 3(a) is a diagram showing an example of an instruction generation display screen displayed on the
図3(a)に示すように、命令生成表示画面には、命令P110として、「プログラム連携先にキーワード“a1”を送信」する命令文が表示されている。ここでは、このキーワード“a1”が第1端末1を示している。そのため、命令P110は、第1命令として、制御装置5において実行されることになる。
As shown in FIG. 3(a), the command generation display screen displays a command statement "Send keyword "a1" to the program link destination" as command P110. Here, this keyword "a1" indicates the
命令P110の次に、命令P120が生成されている。命令P120は、「プログラム連携先にキーワード“b1”として命令を送信」する命令文である。ここでは、このキーワード“b1”が第2端末2を示している。
Following command P110, command P120 is generated. Command P120 is a command statement that "sends a command to the program link destination as keyword "b1". In this case, the keyword "b1" indicates the
命令P120には、送信するための命令P121~P123を含んでいる。命令P121は、「組込LED(PA1)を“ON”」とする命令であり、命令P122は、「一時停止(1000)ミリ秒」とする命令であり、命令P123は、「組込LED(PA1)を“OFF”」とする命令である。これら命令P121~P123が第2端末2に送信されることにより、第2端末2に接続された制御装置9が制御対象機器10を制御することで、LEDボードを1000(ミリ秒)の間、点灯させることができる。
Command P120 includes commands P121 to P123 to be transmitted. Command P121 is a command to "turn the built-in LED (PA1) ON", command P122 is a command to "pause (1000) milliseconds", and command P123 is a command to "turn the built-in LED (PA1) OFF". By transmitting these commands P121 to P123 to the
命令P130は、送信された命令P110の送信先の宛先が第1端末1であるので、命令P110を受信する命令として表示されている。命令生成表示画面には、命令P130として、「プログラム連携先にキーワード“a1”を受信」する命令文が表示されている。命令P130は、命令P131を含んでいる。命令P131は、「文字列“キーワードを受信”を表示」する命令であり、この命令が実行されることにより、第1端末1に接続された制御装置5が制御対象機器6を制御することで、LEDボード上に“キーワードを受信”が表示される。
Since the destination of the transmitted command P110 is the
第2端末2では、図3(b)に示すように、命令生成表示画面に、命令P220として、「プログラム連携先よりキーワード“b1”を受信」する命令文が表示されている。
On the
命令P220は、命令P221~P223を含んでいる。命令P221は、「文字列“受信したプログラム命令を実行”を表示」する命令文である。命令P222は、受信した命令P121~P123を実行する命令文である。これにより、第2端末2に接続された制御装置9が制御対象機器10を制御することで、LEDボードを1000(ミリ秒)の間、点灯させることができる。命令P223は、「文字列“受信したプログラム命令を終了」を表示する命令文である。
Command P220 includes commands P221 to P223. Command P221 is a command statement that "displays the character string "Execute received program command". Command P222 is a command statement that executes the received commands P121 to P123. As a result, the
以上のように、本発明の実施例1に係るプログラム実行制御システム100によれば、第1端末1は、外部入力された命令が第1制御プログラムに対する第1命令か否かを判定する命令判定手段12と、第1命令であると判定された場合に、制御装置5に第1命令を実行させるとともに、第1命令でないと判定された場合に、命令を第2端末2に送信する命令制御手段14とを有する。
As described above, according to the program
これにより、ネットワークNTを介して第1端末1から第2端末2に接続された制御対象(制御装置9および制御対象機器10)をリアルタイムに制御することができる。また、逆に、ネットワークNTを介して第2端末2から第1端末1に接続された制御対象(制御装置5および制御対象機器6)をリアルタイムに制御することができる。そのため、例えば、第1端末1を操作しているユーザと、第2端末2を操作しているユーザとで同時進行でプログラムの作成を行っている場合、第1端末1側で作成された第2命令を制御対象(制御装置9および制御対象機器10)で実行させることができるので、第2端末2を操作しているユーザにとってプログラミングの理解が進み習得が早くなる。また、その逆に第2端末2側で作成された第1命令を制御対象(制御装置5および制御対象機器6)で実行させることができるので、第1端末1Aを操作しているユーザにとってプログラミングの理解が進み習得が早くなる。すなわち、プログラミングの互学互習を実現することができる。
This allows the
図4は、本発明の実施例1に係るプログラム実行制御システム100における処理内容を示したフローチャートである。
Figure 4 is a flowchart showing the processing performed by the program
図4に示すように、ステップS101において、第1端末1は、ユーザ操作に基づいてプロジェクトを作成または既に作成済みであるプロジェクトを選択する。
As shown in FIG. 4, in step S101, the
ステップS103において、第1端末1は、第2端末2からの接続要求を受信する。このとき、第2端末2からは、第2端末2を一意に識別する識別情報と、任意で暗号鍵が送信される。
In step S103, the
ステップS105において、ユーザが入力部4から、制御するための命令群であるプログラムを作成したり、表示部3に表示されたプログラムを編集したりする。これにより、命令生成手段11が命令を生成しプロジェクトを更新する。
In step S105, the user uses the
ステップS107において、第1端末1は、プログラムを開始する。
In step S107, the
ステップS109において、第1端末1の命令判定手段12は、命令生成手段11により生成された命令が通信命令か否かを判定する。具体的には、命令判定手段12は、命令生成手段11により生成された命令が第1制御プログラムに対応する第1命令である場合には通信命令ではないと判定し、命令生成手段11により生成された命令が第1制御プログラムに対応する第1命令でない場合には通信命令であると判定する。
In step S109, the command determination means 12 of the
通信命令であると判定された場合(ステップS109;YES)、ステップS111において、命令制御手段14は、通信手段13を介して、宛先をネットワークNTに接続された全ての端末、または指定された宛先の端末に命令を送信する。ここでは、命令を暗号鍵で暗号化した後、暗号化された命令を第2端末2に送信している。
If it is determined that the command is a communication command (step S109; YES), in step S111, the command control means 14 transmits the command via the communication means 13 to all terminals connected to the network NT or to a terminal with a specified destination. Here, the command is encrypted with an encryption key, and then the encrypted command is transmitted to the
一方、通信命令でないと判定された場合(ステップS109;NO)、ステップS113において、命令制御手段14は、制御装置5に第1命令を実行させる。
On the other hand, if it is determined that the command is not a communication command (step S109; NO), in step S113, the command control means 14 causes the
また、ステップS115において、第2端末2から命令を受信した場合(YES)、ステップS117において、命令制御手段14は、受信した通信命令(ここでは、第1命令)を制御装置5に実行させる。
Also, if a command is received from the
そして、ステップS107において開始したプログラムを構成する一連の命令の実行が終了するまで、ステップS109~S117を繰り返し実行する。 Then, steps S109 to S117 are repeatedly executed until the execution of the series of instructions that make up the program started in step S107 is completed.
ステップS219において、ステップS107において開始したプログラムを構成する一連の命令の実行が終了するとプログラムを終了する。 In step S219, when execution of the series of instructions that make up the program started in step S107 is completed, the program is terminated.
また、第2端末2でも同様に、ステップS201において、第2端末2は、ユーザ操作に基づいてプロジェクトを作成または既に作成済みであるプロジェクトを選択する。
Similarly, in step S201, the
ステップS203において、第2端末2は、第1端末1からの接続要求を送信する。このとき、第1端末1からは、第1端末1を一意に識別する識別情報と、任意で暗号鍵が送信される。
In step S203, the
ステップS205において、ユーザが入力部8から命令の集合であるプログラムを作成したり、表示部7に表示された命令の集合であるプログラムを編集したりする。これにより、命令生成手段21が命令を生成しプロジェクトを更新する。
In step S205, the user creates a program, which is a set of instructions, from the
ステップS207において、第2端末2は、プログラムを開始する。
In step S207, the
ステップS209において、第1端末1から命令を受信した場合(YES)、ステップS211において、命令制御手段24は、受信した通信命令(ここでは、第2命令)を制御装置9に実行させる。
If a command is received from the
また、ステップS213において、第2端末2の命令判定手段22は、命令生成手段21により生成された命令が通信命令か否かを判定する。具体的には、命令判定手段22は、命令生成手段21により生成された命令が第2制御プログラムに対応する第2命令である場合には通信命令ではないと判定し、命令生成手段21により生成された命令が第2制御プログラムに対応する第2命令でない場合には通信命令であると判定する。
In addition, in step S213, the command determination means 22 of the
通信命令であると判定された場合(ステップS213;YES)、ステップS115において、命令制御手段24は、通信手段23を介して、宛先をネットワークNTに接続された全ての端末、または指定された宛先の端末に命令を送信する。ここでは、命令を暗号鍵で暗号化した後、暗号化された命令を第1端末1に送信している。
If it is determined that the command is a communication command (step S213; YES), in step S115, the command control means 24 transmits the command via the communication means 23 to all terminals connected to the network NT or to a terminal with a specified destination. Here, the command is encrypted with an encryption key, and then the encrypted command is transmitted to the
一方、通信命令でないと判定された場合(ステップS213;NO)、ステップS217において、命令制御手段24は、制御装置9に第2命令を実行させる。
On the other hand, if it is determined that the command is not a communication command (step S213; NO), in step S217, the command control means 24 causes the
そして、ステップS207において開始したプログラムを構成する一連の命令の実行が終了するまで、ステップS209~S217を繰り返し実行する。 Then, steps S209 to S217 are repeatedly executed until the execution of the series of instructions that make up the program started in step S207 is completed.
ステップS219において、ステップS207において開始したプログラムを構成する一連の命令の実行が終了するとプログラムを終了する。 In step S219, when execution of the series of instructions that make up the program started in step S207 is completed, the program is terminated.
<実施例2>
本発明の実施例2では、本発明の実施例1に係るプログラム実行制御システム100に、シミュレーション手段をさらに備えた構成を例に挙げて説明する。
Example 2
In the second embodiment of the present invention, a configuration in which a simulation means is further provided in the program
図5は、本発明の実施例2に係るプログラム実行制御システム101の構成を説明した図であり、図6は、本発明の実施例2に係るプログラム実行制御システム101における情報の流れを模式的に示した説明図である。 Figure 5 is a diagram illustrating the configuration of a program execution control system 101 according to a second embodiment of the present invention, and Figure 6 is a diagram illustrating a schematic diagram of the flow of information in the program execution control system 101 according to the second embodiment of the present invention.
図5に示すように、プログラム実行制御システム101は、第1端末1Aと、第2端末2Aと、表示部3と、入力部4と、制御装置5と、制御対象機器6と、表示部7と、入力部8と、制御装置9と、制御対象機器10とを備えており、第1端末1Aと、第2端末2Aとは、ネットワークNTを介して接続されている。
As shown in FIG. 5, the program execution control system 101 includes a first terminal 1A, a
これらの構成のうち、表示部3と、入力部4と、制御装置5と、制御対象機器6と、表示部7と、入力部8と、制御装置9と、制御対象機器10とは、本発明の実施例1に係るプログラム実行制御システム100が備える各構成と同一構成を有するので、説明を省略する。
Of these components, the
第1端末1Aは、タブレット型コンピュータ、高機能携帯電話(所謂、スマートフォン)、ノート型コンピュータ、デスクトップ型コンピュータ等のコンピュータを用いて構成される。ここでは、第1端末1Aとして、デスクトップ型コンピュータを用いた例について説明する。詳細は後述する。 The first terminal 1A is configured using a computer such as a tablet computer, a high-function mobile phone (a so-called smartphone), a notebook computer, or a desktop computer. Here, an example using a desktop computer as the first terminal 1A will be described. Details will be provided later.
第1端末1Aは、その機能上、命令生成手段11と、命令判定手段12と、通信手段13と、命令制御手段14Aと、表示制御手段15とを有している。これらの構成のうち、命令生成手段11と、命令判定手段12と、通信手段13と、表示制御手段15とについては、本発明の実施例1に係るプログラム実行制御システム100が備える各構成と同一構成を有するので、説明を省略する。
The first terminal 1A has, in terms of its functions, a command generation means 11, a command determination means 12, a communication means 13, a command control means 14A, and a display control means 15. Of these components, the command generation means 11, the command determination means 12, the communication means 13, and the display control means 15 have the same configurations as the respective components of the program
命令制御手段14Aは、命令判定手段12により命令生成手段11が生成した命令が第1命令であると判定された場合に、制御装置5に第1命令を実行させるとともに、第1命令をネットワークNTを介して第2端末2Aに送信する。このとき、第2端末2Aに送信する第1命令は、次の命令が一次停止を含む命令であるか否かや、制御装置5の判断結果に依存して実行する命令かなどの所定のルールに基づいて纏められ命令群として送信される。
When the command determination means 12 determines that the command generated by the command generation means 11 is the first command, the command control means 14A causes the
また、命令制御手段14Aは、命令判定手段12により、命令生成手段11が生成した命令が第1命令でないと判定された場合に、この命令をネットワークNTを介して第2端末2Aに送信する。
In addition, when the command determination means 12 determines that the command generated by the command generation means 11 is not the first command, the command control means 14A transmits this command to the
さらに、命令制御手段14Aは、第2端末2Aから受信した命令が第1命令であると判定された場合に、制御装置5に第1命令を実行させるとともに、第1命令をネットワークNTを介して第2端末2Aに送信する。
Furthermore, when the command control means 14A determines that the command received from the
第2端末2Aは、タブレット型コンピュータ、高機能携帯電話(所謂、スマートフォン)、ノート型コンピュータ、デスクトップ型コンピュータ等のコンピュータを用いて構成される。ここでは、第2端末2Aとして、デスクトップ型コンピュータを用いた例について説明する。詳細は後述する。
The
第2端末2Aは、その機能上、命令生成手段21と、命令判定手段22と、通信手段23と、命令制御手段24Aと、表示制御手段25と、シミュレーション手段30とを有している。これらの構成のうち、命令生成手段21と、命令判定手段22と、通信手段23と、表示制御手段25とについては、本発明の実施例1に係るプログラム実行制御システム100が備える命令生成手段11と、命令判定手段12と、通信手段13と、表示制御手段15とそれぞれ同一構成を有するので、説明を省略する。
The
命令制御手段24Aは、第1端末1Aから送信された命令が第1命令である場合に、シミュレーション手段30に第1命令を実行させる。 When the command sent from the first terminal 1A is the first command, the command control means 24A causes the simulation means 30 to execute the first command.
また、命令制御手段24Aは、第1端末1Aから送信された命令が第1命令ではない場合、第2命令であると判定して、この命令を制御装置9に命令を実行させる。
In addition, if the command sent from the first terminal 1A is not the first command, the command control means 24A determines that it is the second command and causes the
命令制御手段24Aは、命令生成手段21により生成された命令が第2命令であると判定された場合に、制御装置9に第2命令を実行させるとともに、第2命令でないと判定された場合に、第1命令であると判定して、この命令を第1端末1に送信する。
When the command generated by the command generating means 21 is determined to be the second command, the command control means 24A causes the
シミュレーション手段30は、制御装置5と制御装置5により制御される制御対象機器6とをシミュレーションする。すなわち、第1命令を受信することにより、ソフトウェア上で制御装置5と制御対象機器6のように動作する。
The simulation means 30 simulates the
図7(a)は、本発明の実施例2に係るプログラム実行制御システム101が備える表示部3に表示された命令生成表示画面の一例を示した図であり、(b)は、本発明の実施例2に係るプログラム実行制御システム101が備える表示部7に表示されたシミュレーション実行画面の一例を示した図である。ここでは、第1端末1において、第1命令と第2命令が生成された例を挙げて説明する。
FIG. 7(a) is a diagram showing an example of an instruction generation display screen displayed on the
第2端末2からキーワード“a1”として、命令が送信されると、図7(a)に示すように、命令生成表示画面には、命令P320として、「プログラム連携先にキーワード“a1”として命令を受信」する命令文が表示されてる。ここでは、このキーワード“a1”が第1端末1を示している。
When a command is sent from the
命令P320は、送信するための命令P321~P323を含んでいる。命令P321は、「文字列“受信したプログラム命令を実行”を表示」する命令であり、命令P322は、受信したプログラムを実行する命令であり、命令P323は、「文字列“受信したプログラム命令を終了”を表示」する命令である。 Command P320 includes commands P321 to P323 for transmission. Command P321 is a command to "display the character string 'Execute received program command'", command P322 is a command to execute the received program, and command P323 is a command to "display the character string 'End received program command'".
第1端末1が命令P320を受信すると、第1端末1は受信した命令P320を制御装置5に実行させる。例えば、命令P322が、LEDボードを1000(ミリ秒)の間、点灯させる命令である場合、制御装置5は、この命令に従って制御対象機器6のLEDボードを1000(ミリ秒)の間、点灯させる。
When the
その後、第1端末1は、ネットワークNTを介して命令P320を第2端末2へ送信する。第2端末2では、シミュレーション手段30が、命令P320を実行する。これにより、図7(b)に示すように、制御対象機器6のLEDボードをシミュレーションしている画像101に1000(ミリ秒)の間、点灯させる。
Then, the
図8は、本発明の実施例2に係るプログラム実行制御システム101における処理内容を示したフローチャートである。 Figure 8 is a flowchart showing the processing performed in the program execution control system 101 according to the second embodiment of the present invention.
図8に示すように、ステップS301において、第1端末1Aは、プログラムを開始すると、ステップS303において、命令制御手段14Aは、命令生成手段11により生成された命令群であるソースコード、または第2端末2Aから送信された命令群であるソースコードを読み込む。ここでは、第1命令の命令群であるソースコードを読み込んだ場合を例に挙げて説明する。
As shown in FIG. 8, in step S301, the first terminal 1A starts the program, and in step S303, the command control means 14A reads source code, which is a group of commands generated by the command generation means 11, or source code, which is a group of commands transmitted from the
ステップS305において、命令制御手段14Aは、次の命令を抽出する。これにより、プログラムに含まれる命令を1つずつ抽出することができる。 In step S305, the command control means 14A extracts the next command. This makes it possible to extract the commands contained in the program one by one.
ステップS307において、命令制御手段14Aは、次の命令が一次停止を含む命令であるか否かを判定する。ここで、一次停止を含む命令とは、処理を一次停止させる命令や、実行終了までに所定の時間を要する命令などのことをいう。 In step S307, the command control means 14A determines whether the next command is a command that includes a temporary stop. Here, a command that includes a temporary stop refers to a command that temporarily stops processing or a command that requires a certain amount of time to complete execution.
次の命令が一次停止を含む命令である場合(ステップS307;YES)、ステップS309において、命令制御手段14Aは、次の命令のソースコードを内部メモリにスタックする。 If the next instruction is an instruction that includes a temporary pause (step S307; YES), in step S309, the instruction control means 14A stacks the source code of the next instruction in the internal memory.
一方、次の命令が一次停止を含む命令ではない場合(ステップS307;NO)、ステップS311において、命令制御手段14Aは、例えば、IF文などの条件分岐処理や、for~while文等の繰り返し処理など制御装置5の判断結果に依存して実行する命令か否か判定する。
On the other hand, if the next command does not include a temporary pause (step S307; NO), in step S311, the command control means 14A determines whether the command is to be executed depending on the judgment result of the
制御装置5の判断結果に依存して実行する命令である場合(ステップS311;YES)、ステップS319において、命令制御手段14Aは、制御装置5に第1命令を実行させた後、内部メモリにスタックした第1命令のソースコードを送信して内部メモリの第1命令を消去する。
If the command is one that is executed depending on the result of the judgment of the control device 5 (step S311; YES), in step S319, the command control means 14A causes the
一方、制御装置5の判断結果に依存しない命令である場合(ステップS311;NO)、ステップS313において、命令制御手段14Aは、次の第1命令のソースコードを内部メモリにスタックした後、ステップS315において、命令制御手段14Aは、制御装置5に第1命令を実行させる。
On the other hand, if the command does not depend on the judgment result of the control device 5 (step S311; NO), in step S313, the command control means 14A stacks the source code of the next first command in the internal memory, and then in step S315, the command control means 14A causes the
ステップS317において、命令制御手段14Aは、次の命令があるか否かを判定する。 In step S317, the command control means 14A determines whether or not there is a next command.
次の命令がある場合(ステップS317;YES)、処理をステップS305に移行する。 If there is a next command (step S317; YES), the process proceeds to step S305.
一方、次の命令がない場合(ステップS317;NO)、命令制御手段14Aは、内部メモリにスタックした第1命令のソースコードを送信した後、内部メモリの第1命令を消去する。 On the other hand, if there is no next instruction (step S317; NO), the instruction control means 14A transmits the source code of the first instruction stacked in the internal memory and then erases the first instruction from the internal memory.
ステップS331において、第1端末1Aは、ステップS301において開始したプログラムを終了し、プログラムの終了を第2端末2Aへ通知する。
In step S331, the first terminal 1A ends the program started in step S301 and notifies the
一方、第2端末2Aでは、ステップS401において、第1端末1Aのプログラムが開始されると、シミュレーション手段30にシミュレーション開始命令を送信する。これにより、シミュレーション手段30は、制御装置5と制御装置5により制御される制御対象機器6とのシミュレーションを開始する。
On the other hand, in step S401, when the program of the first terminal 1A is started, the
ステップS405において、第2端末2の命令判定手段22は、命令生成手段21により生成された命令が通信命令であると判定された場合、命令制御手段24Aは、通信手段23を介して、宛先をネットワークNTに接続された全ての端末、または指定された宛先の端末に命令を送信する。ここでは、命令を暗号鍵で暗号化した後、暗号化された命令を第1端末1Aに送信している。
In step S405, if the command determination means 22 of the
また、ステップS407において、第1端末1Aから第1命令を受信すると、シミュレーション手段30が第1命令を実行する。 Furthermore, in step S407, when the first command is received from the first terminal 1A, the simulation means 30 executes the first command.
ステップS409において、第1端末1Aから、プログラムの終了が通知されると、第2端末2Aは、プログラムを終了すると共に、ステップS411において、シミュレーション手段30によるシミュレーションを停止する。
When the first terminal 1A notifies the
以上のように、本発明の実施例2に係るプログラム実行制御システム101によれば、第1端末1Aが、第1命令であると判定された場合に、制御装置5に第1命令を実行させるとともに第1命令を第2端末2Aに送信し、第1命令でないと判定された場合に、命令を第2端末2Aに送信する命令制御手段14Aを備え、第2端末2Aが、制御装置5と制御装置5により制御される制御対象機器6とをシミュレーションするシミュレーション手段30と、第1端末1Aから送信された命令が第1命令である場合に、シミュレーション手段30に第1命令を実行させ、第1端末1Aから送信された命令が第2命令である場合に、制御装置9に第2命令を実行させる命令制御手段24Aを備える。
As described above, according to the program execution control system 101 of the second embodiment of the present invention, the first terminal 1A includes a command control means 14A that, if it is determined that the command is the first command, causes the
これにより、第2端末2Aは、制御装置5と制御対象機器6とをシミュレーションすることができるので、例えば、ユーザが入力部4から制御対象機器6のLEDボードを点滅させる命令を送信すると共に、表示部7に表示された制御対象機器6に対してもLEDボードを点滅させる命令を送信することができる。また、ユーザが入力部8から制御対象機器6のLEDボードを点滅させる命令を送信することで、第1端末1Aからシミュレーション手段30がシミュレーションしている制御対象機器6のLEDボードを点滅させる命令を受信する。これにより、制御対象機器6と、シミュレーション手段30がシミュレーションしている制御対象機器6の制御状態を同一にすることができる。
As a result, the
そのため、例えば、第1端末1Aを操作しているユーザが、第2端末2Aを操作しているユーザにプログラミング指導を行っている場合、第1端末1A側で作成された命令とその命令が実行された場合の制御対象機器6の制御状態をリアルタイムで共有しながら、プログラミングできるので、第2端末2Aを操作しているユーザはプログラミングの理解が進み習得が早くなる。
Therefore, for example, when a user operating the first terminal 1A is providing programming guidance to a user operating the
なお、本発明の実施例2に係るプログラム実行制御システム101では、入力部4が、ユーザ操作により命令などの入力信号を生成して第1端末1へ供給したが、これに限らず、制御装置5に直接入力可能な入力部を備える構成としてもよい。この入力部は、ユーザ操作により命令などの入力信号を生成して第1端末1へ供給する入力装置でもよいし、各種機器の位置や、点灯状態、対象物の温度や圧力などを検出するセンサであってもよい。これにより、さまざまな入力情報を加味して、制御装置5が制御対象機器6を制御することが可能となる。
In the program execution control system 101 according to the second embodiment of the present invention, the
1,1A 第1端末
2,2A 第2端末
3,7 表示部
4,8 入力部
5,9 制御装置
6,10 制御対象機器
11 命令生成手段
12 命令判定手段
13 通信手段
14,14A 命令制御手段
15 表示制御手段
21 命令生成手段
22 命令判定手段
23 通信手段
24 命令制御手段
24A 命令制御手段
25 表示制御手段
30 シミュレーション手段
51 制御手段
52 記憶手段
100,101 プログラム実行制御システム
1,
Claims (4)
前記第1端末は、
外部入力された命令が前記第1制御プログラムに対する第1命令か否かを判定する第1命令判定手段と、
前記第1命令であると判定された場合に、前記第1制御装置に前記第1命令を実行させるとともに前記第1命令を前記第2端末に送信し、前記第1命令でないと判定された場合に、前記命令を前記第2端末に送信する第1命令制御手段と、を備え、
前記第2端末は、
前記第1制御装置と前記第1制御装置により制御される制御対象機器とをシミュレーションするシミュレーション手段と、
前記第1端末から送信された命令が前記第1命令である場合に、前記シミュレーション手段に前記第1命令を実行させ、前記第1端末から送信された命令が前記第2命令である場合に、前記第2制御装置に前記第2命令を実行させる第2命令制御手段と、を備えた
ことを特徴とするプログラム実行制御システム。 A program execution control system in which a first terminal connected to a first control device that executes a first control program and a second terminal connected to a second control device that executes a second control program are connected via a network,
The first terminal is
a first command determination means for determining whether or not an externally input command is a first command for the first control program;
a first command control means for causing the first control device to execute the first command and transmitting the first command to the second terminal when it is determined that the command is the first command, and for transmitting the command to the second terminal when it is determined that the command is not the first command,
The second terminal is
a simulation means for simulating the first control device and a control target device controlled by the first control device;
and second command control means for causing the simulation means to execute the first command when the command transmitted from the first terminal is the first command, and for causing the second control device to execute the second command when the command transmitted from the first terminal is the second command.
ことを特徴とする請求項1記載のプログラム実行制御システム。 2. The program execution control system according to claim 1, wherein the first command for the simulation means among the commands transmitted to the second terminal is grouped according to a predetermined rule and transmitted as a group of commands.
外部入力された命令が前記第1制御プログラムに対する第1命令か否かを判定する第1命令判定手段と、
前記第1命令であると判定された場合に、前記第1制御装置に前記第1命令を実行させるとともに前記シミュレーション手段にシミュレーションさせるために前記第1命令を前記第2端末に送信し、前記第1命令でないと判定された場合に、前記命令を前記第2端末に送信する第1命令制御手段と、
を備えたことを特徴とする第1端末。 a second terminal including a simulation means for simulating a first control device that executes a first control program and a control target device controlled by the first control device; and a first terminal connected to the first control device via a network ,
a first command determination means for determining whether or not an externally input command is a first command for the first control program;
a first command control means for transmitting the first command to the second terminal when it is determined that the command is the first command and for causing the first control device to execute the first command and for causing the simulation means to perform a simulation , and for transmitting the command to the second terminal when it is determined that the command is not the first command;
A first terminal comprising:
前記第1制御装置と前記第1制御装置により制御される制御対象機器とをシミュレーションするシミュレーション手段と、a simulation means for simulating the first control device and a control target device controlled by the first control device;
前記第1端末から送信された命令が前記第1制御プログラムに対する第1命令である場合に、前記シミュレーション手段に前記第1命令を実行させ、前記第1端末から送信された命令が前記第2命令である場合に、前記第2制御装置に前記第2命令を実行させる第2命令制御手段と、second instruction control means for causing the simulation means to execute the first instruction when the instruction transmitted from the first terminal is a first instruction for the first control program, and for causing the second control device to execute the second instruction when the instruction transmitted from the first terminal is the second instruction;
を備えたことを特徴とする第2端末。A second terminal comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022199027A JP7654268B2 (en) | 2022-12-14 | 2022-12-14 | Program execution control system and program execution control device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022199027A JP7654268B2 (en) | 2022-12-14 | 2022-12-14 | Program execution control system and program execution control device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2024084875A JP2024084875A (en) | 2024-06-26 |
JP7654268B2 true JP7654268B2 (en) | 2025-04-01 |
Family
ID=91616447
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022199027A Active JP7654268B2 (en) | 2022-12-14 | 2022-12-14 | Program execution control system and program execution control device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7654268B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016012172A (en) | 2014-06-27 | 2016-01-21 | オムロン株式会社 | Communication system, programmable display, information processing device, operation control method, information processing method, and program |
US20170289290A1 (en) | 2016-03-31 | 2017-10-05 | International Business Machines Corporation | Selective token clash checking for a data write |
JP2022517562A (en) | 2019-05-30 | 2022-03-09 | ▲騰▼▲訊▼科技(深▲セン▼)有限公司 | How to run standalone programs, appliances, devices and computer programs |
-
2022
- 2022-12-14 JP JP2022199027A patent/JP7654268B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016012172A (en) | 2014-06-27 | 2016-01-21 | オムロン株式会社 | Communication system, programmable display, information processing device, operation control method, information processing method, and program |
US20170289290A1 (en) | 2016-03-31 | 2017-10-05 | International Business Machines Corporation | Selective token clash checking for a data write |
JP2022517562A (en) | 2019-05-30 | 2022-03-09 | ▲騰▼▲訊▼科技(深▲セン▼)有限公司 | How to run standalone programs, appliances, devices and computer programs |
Also Published As
Publication number | Publication date |
---|---|
JP2024084875A (en) | 2024-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5646685B2 (en) | LIGHTING DEVICE CONTROL METHOD AND COMPUTER PROGRAM THEREOF | |
JP6506802B2 (en) | Industrial process control management method and apparatus based on industrial internet operating system | |
Lotsaris et al. | AR based robot programming using teaching by demonstration techniques | |
JP6895128B2 (en) | Robot control device, simulation method, and simulation program | |
KR20220128655A (en) | Systems and methods for using virtual/augmented reality for interaction with collaborative robots in manufacturing or industrial environments | |
CN105252533A (en) | Robot interactive system, cloud computing platform, user terminal and robot | |
JP2011238041A (en) | Programming apparatus and programming method | |
TW201712455A (en) | Device, program, and method for creating monitoring image | |
JP7654268B2 (en) | Program execution control system and program execution control device | |
CN109696832B (en) | Method for supporting an installation process of an automated system | |
KR20170097388A (en) | Smart home system using arduino and cross platform | |
KR102113757B1 (en) | Web-Based Robot Programming System and Method | |
WO2022009764A1 (en) | Setting code generating device, industrial machine, setting code generating method, and setting code generating program | |
KR20190089561A (en) | Cloud-based device emulation system and method thereof | |
Song et al. | AUGMENTED BRICKS an onsite AR immersive design to fabrication framework for masonry structures | |
JP7444407B2 (en) | Program execution system, control device and control program | |
JP7696650B2 (en) | A smart block capable of supplying power and recognizing its position and its control system | |
JP2016038876A (en) | Image input device, image output device, and image input/output system | |
KR102098369B1 (en) | Remote cooperation apparatus and system based on synchronization between devices | |
US9412053B1 (en) | Method, apparatus and system for projecting light for user guidance | |
JP7209907B1 (en) | Information processing device, control system, information processing method, and program | |
CN112615941A (en) | Network control laboratory system based on Android operating system | |
JP6939662B2 (en) | Programming support device, programming support method and program | |
KR102414065B1 (en) | Coding education system of arduino | |
KR101572501B1 (en) | Device and method for training wired and wireless communication interface programs for internet of things |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240826 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20240826 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20241120 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20241225 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20250307 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20250312 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7654268 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |