JP6249665B2 - Simulation device, simulation method, and program - Google Patents

Simulation device, simulation method, and program Download PDF

Info

Publication number
JP6249665B2
JP6249665B2 JP2013160906A JP2013160906A JP6249665B2 JP 6249665 B2 JP6249665 B2 JP 6249665B2 JP 2013160906 A JP2013160906 A JP 2013160906A JP 2013160906 A JP2013160906 A JP 2013160906A JP 6249665 B2 JP6249665 B2 JP 6249665B2
Authority
JP
Japan
Prior art keywords
simulator
message
simulation
notified
time
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
Application number
JP2013160906A
Other languages
Japanese (ja)
Other versions
JP2015032120A (en
Inventor
真 関口
真 関口
倉片 恵弘
恵弘 倉片
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013160906A priority Critical patent/JP6249665B2/en
Publication of JP2015032120A publication Critical patent/JP2015032120A/en
Application granted granted Critical
Publication of JP6249665B2 publication Critical patent/JP6249665B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はシミュレーション装置に関する。より詳細には、複数のシミュレータのシミュレータ間のメッセージ交換および時間同期をとることで、統合シミュレーション環境を実現するシミュレーション装置に関する。   The present invention relates to a simulation apparatus. More specifically, the present invention relates to a simulation apparatus that realizes an integrated simulation environment by exchanging messages and synchronizing time among a plurality of simulators.

メカトロニクス製品の開発において、様々な製品の挙動をコンピュータなどの仮想環境上で再現するシミュレーション技術が取り入れられている。例えば機構解析、構造解析に代表されるメカ系シミュレーションやアナログ物理回路シミュレーション、デジタル論理回路シミュレーションといったエレキ系シミュレーションである。あるいはモデリング言語を用いたソフトウェア系シミュレーションなどである。例えば、CPUを模擬するISS(Instruction Set Simulator:命令セットシミュレータ)やUML (Unified Modeling Language: 統一モデリング言語)などである。このような各シミュレーションを実施するシミュレータは企業が自社の製品開発に向けて用意したり、あるいは企業向けにソフトウェア開発会社が販売するなど、多種多様存在する。   In the development of mechatronics products, simulation technology that reproduces the behavior of various products on a virtual environment such as a computer is adopted. For example, an electric system simulation such as a mechanism system simulation, a mechanical system simulation represented by a structural analysis, an analog physical circuit simulation, or a digital logic circuit simulation. Or software-based simulation using a modeling language. For example, an ISS (Instruction Set Simulator) or UML (Unified Modeling Language) that simulates a CPU. There are a wide variety of simulators that execute such simulations, such as companies preparing for their own product development, or software development companies selling to companies.

こういったメカ・エレキ・ソフトといった技術分野に対し、それぞれの技術者達が各技術領域の品質を作り上げるためにシミュレータを用いている。最近の製品開発においては、より実製品に近い動作を再現させるため、特許文献1に示されるように、これらのシミュレーションを連携する技術開発が行われている。具体的には機構シミュレータのモーター制御をデジタル論理回路シミュレータからの信号通知によって行い、また回路の制御をISSで制御するといった使われ方である。   For such technical fields such as mechanical, electric, and software, each engineer uses a simulator to create quality in each technical field. In recent product development, in order to reproduce an operation closer to an actual product, as shown in Patent Document 1, technology development that links these simulations has been performed. Specifically, the motor control of the mechanism simulator is performed by signal notification from the digital logic circuit simulator, and the control of the circuit is controlled by the ISS.

このように様々な技術分野を対象にした複数のシミュレーション連携を行うためには、各シミュレータがそれぞれ独自の仮想時刻を保持していることに注意し、シミュレータ間の時間同期を取らなければならない。つまり、シミュレータAがシミュレータBからの信号通知を受け入れるタイミングは、シミュレータBがその信号を送信するタイミングとならない場合がある。そこで、このシミュレータBからの信号通知をシミュレータAが受け入れるタイミングでシミュレータAに信号を送出する必要性が生じる。このように、あるシミュレータが、そのシミュレータの独自のタイミングで、他のシミュレータとの間の信号の送受信を行うように制御することを、時間同期を取ると称する。   In order to perform a plurality of simulation linkages targeting various technical fields in this way, it is necessary to pay attention to the fact that each simulator has its own virtual time, and to synchronize the time between the simulators. That is, the timing at which the simulator A accepts the signal notification from the simulator B may not be the timing at which the simulator B transmits the signal. Therefore, it becomes necessary to send a signal to the simulator A at a timing when the simulator A accepts the signal notification from the simulator B. In this way, control that a certain simulator performs transmission and reception of signals with another simulator at a timing unique to the simulator is referred to as time synchronization.

このような独自の仮想時刻を持つ複数のシミュレータの時間同期を取る方法として、特許文献2に示されるように、各シミュレータとは別に各シミュレータ間の時間同期および制御信号の送受信を管理するシミュレータ管理部を設ける技術が知られている。   As a method of time synchronization of a plurality of simulators having such unique virtual times, simulator management that manages time synchronization and transmission / reception of control signals separately from each simulator as shown in Patent Document 2 A technique for providing a part is known.

特開2011−107962号公報JP 2011-107962 A 特許第3621392号明細書Japanese Patent No. 3621392

しかしながら特許文献2で示されるように、互いに異なる仮想時刻を持つ複数のシミュレータに対して時間同期を取る場合、それぞれの同期タイミングによっては、互いに通知する制御信号が伝達されない事態が発生する。すなわち、制御信号の取りこぼしが発生する。   However, as shown in Patent Document 2, when time synchronization is performed for a plurality of simulators having different virtual times, depending on the respective synchronization timings, a situation may occur in which control signals to be notified to each other are not transmitted. That is, the control signal is lost.

本発明に係るシミュレーション装置は、複数のシミュレータを連携するシミュレーション装置であって、前記複数のシミュレータから送信されるメッセージを記録する記録手段と、前記記録手段に記録されたメッセージを連携する他のシミュレータに通知したか否かを示すパラメータであって、前記他のシミュレータの同期間隔と前記メッセージの送信元のシミュレータの同期間隔との違いに基づくパラメータに基づいて前記記録手段に記録されたメッセージを加工する加工手段と、前記加工されたメッセージを、連携する他のシミュレータに送信する送信手段とを有することを特徴とする。 The simulation apparatus according to the present invention is a simulation apparatus that links a plurality of simulators, and is a recording unit that records messages transmitted from the plurality of simulators, and another simulator that links the messages recorded in the recording unit A message recorded in the recording means based on a parameter based on a difference between the synchronization interval of the other simulator and the synchronization interval of the simulator of the message transmission source. And processing means that transmits the processed message to another simulator that cooperates.

本発明によれば、通信のオーバーヘッドを増やすことなく信号の取りこぼしを防止することが可能となる。   According to the present invention, it is possible to prevent signal loss without increasing communication overhead.

信号が伝達しない例を示すシーケンス図である。It is a sequence diagram which shows the example which a signal does not transmit. メカシミュレータおよびメカ部品の例を示す図である。It is a figure which shows the example of a mechanical simulator and a mechanical component. 実施例1に係るシミュレーション装置の構成の例を示す図である。1 is a diagram illustrating an example of a configuration of a simulation apparatus according to a first embodiment. 実施例1に係る事前準備の動作フローの一例を示す図である。FIG. 6 is a diagram illustrating an example of an operation flow for advance preparation according to the first embodiment. 実施例1に係るシミュレーション参加要求メッセージと、記録されるメッセージの例とを示す図である。It is a figure which shows the simulation participation request message which concerns on Example 1, and the example of the message recorded. 実施例1に係る連結定義を行う画面の例と加工方法を指定する画面の例とを示す図である。It is a figure which shows the example of the screen which performs the connection definition which concerns on Example 1, and the example of the screen which designates a processing method. 実施例1に係るシミュレーション実行の動作フローを示す図である。FIG. 10 is a diagram illustrating an operation flow of simulation execution according to the first embodiment. 実施例1に係るシミュレーション開始要求メッセージと、最初の同期要求メッセージと、最初の同期要求メッセージ受信時におけるメッセージ記録内容との例を示す図である。It is a figure which shows the example of the message recording content at the time of the simulation start request message which concerns on Example 1, the first synchronization request message, and the first synchronization request message. 実施例1に係る同期タイミングを示す図である。It is a figure which shows the synchronous timing which concerns on Example 1. FIG. 実施例1に係る同期要求メッセージと記録されるメッセージの例を示す図である。FIG. 6 is a diagram illustrating an example of a synchronization request message and a message recorded according to the first embodiment. 実施例1に係るメカシミュレータ時刻880ms、ソフトウェアシミュレータ時刻900msにおけるメッセージ記録内容の例を示す図である。It is a figure which shows the example of the message recording content in the mechanical simulator time 880ms which concerns on Example 1, and software simulator time 900ms. 実施例1に係るメカシミュレータ時刻960ms、ソフトウェアシミュレータ時刻960msにおける同期要求メッセージと、それらのメッセージの記録内容の例を示す図である。It is a figure which shows the example of the synchronization request message in mechanical simulator time 960ms and software simulator time 960ms which concern on Example 1, and the recording content of those messages. 実施例1に係るメカシミュレータ時刻960msに通知されるシミュレーション進行メッセージの例と、シミュレータ間で送受信される信号の例を示す図である。It is a figure which shows the example of the simulation progress message notified at the mechanical simulator time 960ms which concerns on Example 1, and the example of the signal transmitted / received between simulators. 取りこぼしがあったことを表示する画面の例と加工内容を表示する画面の例とを示す図である。It is a figure which shows the example of the screen which displays that there was overwriting, and the example of the screen which displays the process content. 実施例4に係るシミュレーション装置の構成の例を示す図である。FIG. 10 is a diagram illustrating an example of a configuration of a simulation apparatus according to a fourth embodiment. 実施例4に係るシミュレーション実行の動作フローを示す図である。FIG. 10 is a diagram illustrating an operation flow of simulation execution according to a fourth embodiment. 実施例4に係るシミュレーション演算の動作フローを示す図である。FIG. 10 is a diagram illustrating an operation flow of a simulation calculation according to the fourth embodiment. 実施例4に係る同期タイミングおよび内部演算タイミングの例を示す図である。It is a figure which shows the example of the synchronous timing which concerns on Example 4, and an internal calculation timing. 実施例4に係るメカシミュレータの時刻880msにおけるメカシミュレータのメッセージ記録内容の例と、係るシミュレータ間で送受信される信号の例を示す図である。It is a figure which shows the example of the message recording content of the mechanical simulator in the time of 880ms of the mechanical simulator which concerns on Example 4, and the example of the signal transmitted / received between the simulators concerned. 実施例5に係るシミュレータの内部演算動作の例を示す図である。FIG. 10 is a diagram illustrating an example of an internal calculation operation of a simulator according to a fifth embodiment. 実施例5に係るシミュレーション装置の構成を示す図である。FIG. 10 is a diagram illustrating a configuration of a simulation apparatus according to a fifth embodiment. 実施例5に係るシミュレーション演算の動作フローを示す図である。FIG. 10 is a diagram illustrating an operation flow of a simulation calculation according to the fifth embodiment. 実施例5に係るメカシミュレータ時刻940msおよび960msにおけるメッセージ記録内容の例と、シミュレータ間で送受信される信号の例を示す図である。It is a figure which shows the example of the message recording content in mechanical simulator time 940ms and 960ms which concerns on Example 5, and the example of the signal transmitted / received between simulators. 実施例6に係るシミュレーション装置の構成の例を示す図である。FIG. 10 is a diagram illustrating an example of a configuration of a simulation apparatus according to a sixth embodiment. 実施例6に係るシミュレーション参加要求メッセージの例を示す図である。It is a figure which shows the example of the simulation participation request message which concerns on Example 6. FIG. 実施例6に係るシミュレーション実行の動作フローを示す図である。FIG. 10 is a diagram illustrating an operation flow of simulation execution according to a sixth embodiment. 実施例6に係るの同期タイミングを示す図である。It is a figure which shows the synchronous timing which concerns on Example 6. FIG. 実施例6に係るメッセージ記録部に記録されているメッセージの例を示す図である。It is a figure which shows the example of the message currently recorded on the message recording part which concerns on Example 6. FIG.

<シミュレータに制御信号が伝達されない例>
まず、発明を実施するための形態を説明する前に、前述した、同期タイミングによってはシミュレータに制御信号が伝達されない事態についての具体例を説明する。
<Example of control signal not being transmitted to simulator>
First, before describing a mode for carrying out the invention, a specific example of the above-described situation in which a control signal is not transmitted to a simulator depending on synchronization timing will be described.

図1は2つのシミュレータが互いに信号を交換しながら時間同期を取る際の通信シーケンスを示している。シミュレータ管理部は、シミュレータ1とシミュレータ2との間の時間同期および制御信号の送受信を管理する。ここではシミュレータ1は仮想時刻880ms、960msで時間同期を取り、シミュレータ2は仮想時刻840ms、900ms、960msで時間同期を取ると仮定している。すなわち、各シミュレータは上記の仮想時刻でそれぞれ他のシミュレータとの信号のやり取りを行うと仮定している。なお、以下、本明細書では仮想時刻のことを単に時刻と表記する場合がある。   FIG. 1 shows a communication sequence when two simulators take time synchronization while exchanging signals with each other. The simulator management unit manages time synchronization and transmission / reception of control signals between the simulator 1 and the simulator 2. Here, it is assumed that the simulator 1 takes time synchronization at virtual times 880 ms and 960 ms, and the simulator 2 takes time synchronization at virtual times 840 ms, 900 ms and 960 ms. That is, it is assumed that each simulator exchanges signals with other simulators at the above virtual time. In the following description, virtual time may be simply expressed as time.

図1においてシミュレータ2の出力信号をシミュレータ1に通知する動作に着目すると、まずシミュレータ2の仮想時刻840msの出力信号がシミュレータ管理部に通知される。この信号はシミュレータ1の仮想時刻880msの同期タイミングでシミュレータ管理部からシミュレータ1に通知される。続いて、シミュレータ2の仮想時刻900msの出力信号がシミュレータ管理部に通知される。しかしながら次にシミュレータ1が同期を取る仮想時刻が960msであり、この仮想時刻はシミュレータ2も同期を取るタイミングである。このことからシミュレータ2が仮想時刻900msでシミュレータ管理部に通知した出力信号は次に960msで通知する出力信号にて上書きされてしまう。すなわち、図1に示される通り、シミュレータ2の仮想時刻900msの出力信号はシミュレータ1に通知されずに消えてしまう。   Focusing on the operation of notifying the simulator 1 of the output signal of the simulator 2 in FIG. 1, first, the simulator 2 is notified of the output signal of the simulator 2 at the virtual time 840 ms. This signal is notified from the simulator management unit to the simulator 1 at the synchronization timing of the virtual time 880 ms of the simulator 1. Subsequently, an output signal of the virtual time 900 ms of the simulator 2 is notified to the simulator management unit. However, the virtual time at which the simulator 1 next synchronizes is 960 ms, and this virtual time is the timing at which the simulator 2 also synchronizes. Therefore, the output signal notified to the simulator management unit by the simulator 2 at the virtual time of 900 ms is overwritten by the output signal notified next at 960 ms. That is, as shown in FIG. 1, the output signal of the virtual time 900 ms of the simulator 2 disappears without being notified to the simulator 1.

互いに通知する制御信号が正しく伝達されない場合についての具体例を示すため、ここではシミュレーション対象の製品としてベルトコンベアーを例にとって説明する。図2はこのベルトコンベアーの機構動作を模擬するメカシミュレータであり、図1のシミュレータ1に相当する。また、図1のシミュレータ2として、ベルトコンベアーを制御するプログラムの動作を模擬するソフトウェアシミュレータを想定する。   In order to show a specific example of a case where control signals to be notified to each other are not correctly transmitted, here, a belt conveyor will be described as an example of a simulation target product. FIG. 2 is a mechanical simulator that simulates the mechanism operation of the belt conveyor, and corresponds to the simulator 1 of FIG. Further, a software simulator that simulates the operation of a program for controlling the belt conveyor is assumed as the simulator 2 in FIG.

図2に示すメカシミュレータのベルトコンベアーにはローラー1にモーターが備え付けられている。このモーターはソフトウェアシミュレータから通知されるモーター駆動開始割り込み信号がLowからHighに変化(立ち上がりエッジと呼ばれる)すると回転を始める。このモーターの回転に伴い、ローラー1が回転し、さらにベルトおよびローラー2が連動して動作する。そしてベルトの動きに合わせてベルト上の荷物が運ばれる。   The belt conveyor of the mechanical simulator shown in FIG. This motor starts rotating when the motor drive start interrupt signal notified from the software simulator changes from low to high (called a rising edge). As the motor rotates, the roller 1 rotates, and the belt and the roller 2 operate in conjunction with each other. The baggage on the belt is carried along with the movement of the belt.

さらに、荷物が指定位置に到達したことを通知するために位置センサーを設け、メカシミュレータは、このセンサー信号をソフトウェアシミュレータに通知する。   Furthermore, a position sensor is provided to notify that the package has reached the designated position, and the mechanical simulator notifies the software simulator of this sensor signal.

このような構成において、仮に図1のシミュレータ2に相当するソフトウェアシミュレータが仮想時刻840msまではモーター駆動開始割り込み信号の値をLowとして出力する。そして、仮想時刻900msでHigh、仮想時刻960ms以降は再びLowを出力すると仮定する。この仮定においてソフトウェアシミュレータの仮想時刻900msの出力信号は図1で説明したように、仮想時刻960msの信号で上書きされてしまう。すなわち仮想時刻900msで出力されるHighの信号がLowで上書きされてしまう。結果、メカシミュレータはモーター駆動開始割り込み信号の値がLowである信号をシミュレータ管理部から受信し続けることになり、所望の信号レベルを得ることができない。これはメカシミュレータがソフトウェアシミュレータからのモーター駆動開始のための割り込み信号を受け付けることが出来ていないことを意味しており、ベルトコンベアーは動作しない。このように信号によっては1回の取りこぼしによって製品の動作を再現できなくなる問題が生ずる。製品の動作として成立させるためには、正確な時間ではなくても製品規格通りに順序を守って確実に信号を伝えることが重要になる。   In such a configuration, a software simulator corresponding to the simulator 2 in FIG. 1 outputs the value of the motor drive start interrupt signal as Low until the virtual time 840 ms. It is assumed that High is output at a virtual time of 900 ms, and Low is output again after the virtual time of 960 ms. Under this assumption, the output signal of the virtual time 900 ms of the software simulator is overwritten with the signal of the virtual time 960 ms as described in FIG. That is, the High signal output at the virtual time of 900 ms is overwritten with Low. As a result, the mechanical simulator continues to receive a signal whose motor drive start interrupt signal value is Low from the simulator management unit, and cannot obtain a desired signal level. This means that the mechanical simulator cannot accept the interrupt signal for starting the motor drive from the software simulator, and the belt conveyor does not operate. In this way, depending on the signal, there is a problem that the operation of the product cannot be reproduced by a single oversight. In order to establish the operation of the product, it is important to reliably transmit signals in accordance with the product standard even if it is not an accurate time.

このような問題に対する一般的な解決手法として、同期間隔を十分に細かくすることが考えられるがその場合は細かくした分だけ通信回数が増えるため全体としての処理のオーバーヘッドが増加するという別の問題が生まれる。同期間隔を半分にすれば通信回数は2倍である。   As a general solution to such a problem, it is conceivable to make the synchronization interval sufficiently fine. In this case, however, there is another problem that the processing overhead as a whole increases because the number of communication increases by the finer amount. to be born. If the synchronization interval is halved, the number of communications is doubled.

後述する実施例では複数のシミュレータを連携する際に発生する前述した問題を鑑み、通信のオーバーヘッドを増やすことなく信号の取りこぼしを防止するシミュレーション装置を提供する。   In an embodiment to be described later, in view of the above-described problems that occur when a plurality of simulators are linked, a simulation apparatus that prevents signal loss without increasing communication overhead is provided.

以下、本発明にかかる実施例を詳細に説明する。   Hereinafter, embodiments according to the present invention will be described in detail.

実施例1について、先に構成について説明し、続いて手順について説明する。
<構成の説明>
図3は実施例1に係るシミュレーション装置300の構成の一例を示す図である。図3に示されるようにシミュレーション装置300は、コンピュータによって実現され得る。シミュレーション装置300は、シミュレータ管理部310と、メカ部品320と、メカシミュレータ330と、ソフトウェア部品340と、ソフトウェアシミュレータ350と、バス360とを有する。
The configuration of the first embodiment will be described first, followed by the procedure.
<Description of configuration>
FIG. 3 is a diagram illustrating an example of the configuration of the simulation apparatus 300 according to the first embodiment. As shown in FIG. 3, the simulation apparatus 300 can be realized by a computer. The simulation apparatus 300 includes a simulator management unit 310, a mechanical component 320, a mechanical simulator 330, a software component 340, a software simulator 350, and a bus 360.

メカ部品320やソフトウェア部品340は、シミュレーション対象の製品挙動を模擬するためのシミュレーション部品の一例である。シミュレーション部品とは例えば機構シミュレータであれば3D-CAD(Computer Aided Design)で作成された3D形状データや重力や摩擦など3D形状データに付加される物理現象データから構成される。ソフトウェアシミュレータであれば、コンピュータプログラムなどから構成される。   The mechanical part 320 and the software part 340 are examples of simulation parts for simulating the behavior of a product to be simulated. For example, in the case of a mechanism simulator, the simulation part is composed of 3D shape data created by 3D-CAD (Computer Aided Design) and physical phenomenon data added to 3D shape data such as gravity and friction. If it is a software simulator, it consists of a computer program.

シミュレータ管理部310は、通信部311、メッセージ記録部312、同期管理部313、連結関係管理部314、加工部315、および加工方法指定部316を有する。   The simulator management unit 310 includes a communication unit 311, a message recording unit 312, a synchronization management unit 313, a connection relationship management unit 314, a processing unit 315, and a processing method designation unit 316.

メカシミュレータ330は、部品読み込み部331、シミュレーション実行部332、仮想時刻管理部333、メッセージ記録部334、および通信部335を有する。   The mechanical simulator 330 includes a component reading unit 331, a simulation execution unit 332, a virtual time management unit 333, a message recording unit 334, and a communication unit 335.

ソフトウェアシミュレータ350は、部品読み込み部351、シミュレーション実行部352、仮想時刻管理部353、メッセージ記録部354、および通信部355を有する。   The software simulator 350 includes a component reading unit 351, a simulation execution unit 352, a virtual time management unit 353, a message recording unit 354, and a communication unit 355.

メカシミュレータ330とソフトウェアシミュレータ350とは、扱うシミュレータ部品が異なる点を除けば構成としては共通のものとして説明することが可能であるので、以下ではメカシミュレータ330の構成について説明する。   The mechanical simulator 330 and the software simulator 350 can be described as having the same configuration except that the simulator parts to be handled are different, and therefore the configuration of the mechanical simulator 330 will be described below.

部品読み込み部331は、シミュレーション対象の製品挙動を模擬するシミュレーション部品であるメカ部品320を読み込む。   The component reading unit 331 reads a mechanical component 320 that is a simulation component that simulates the behavior of a product to be simulated.

シミュレーション実行部332は、部品読み込み部331によって読み込まれたシミュレーション部品であるメカ部品320に応じて製品挙動を模擬するためのシミュレーション演算を行う。またシミュレーション実行部332は、他のシミュレータから通知される制御信号を受け付け、シミュレーション演算を行い、演算によって他のシミュレータへの制御信号を生成する。これらの制御信号はメッセージに格納され、メッセージ記録部334にて管理される。メッセージの具体例は後述する動作の説明にて示す。   The simulation execution unit 332 performs a simulation operation for simulating product behavior according to the mechanical component 320 that is a simulation component read by the component reading unit 331. Moreover, the simulation execution part 332 receives the control signal notified from another simulator, performs a simulation calculation, and produces | generates the control signal to another simulator by calculation. These control signals are stored in a message and managed by the message recording unit 334. A specific example of the message will be described in the description of the operation described later.

仮想時刻管理部333は、シミュレーション実行部332のシミュレーション演算によって進む仮想時刻を管理する。また仮想時刻管理部333は他のシミュレータと時間同期をとる仮想時刻の決定も行う。この決定はシミュレータによって異なる。例えば予め指定された時刻ごとであったり、シミュレーション実行部332が生成する他のシミュレータへの制御信号に変化があった場合などである。   The virtual time management unit 333 manages the virtual time that is advanced by the simulation calculation of the simulation execution unit 332. The virtual time management unit 333 also determines a virtual time that is time-synchronized with other simulators. This decision depends on the simulator. For example, it is every time specified in advance or when there is a change in a control signal to another simulator generated by the simulation execution unit 332.

メッセージ記録部334は通信部335を介して送受信されるメッセージを管理する。メッセージには各シミュレータが持つ仮想時刻や複数のシミュレータ間で送受信される制御信号などが含まれる。   The message recording unit 334 manages messages transmitted / received via the communication unit 335. The message includes a virtual time of each simulator, a control signal transmitted / received between a plurality of simulators, and the like.

通信部335はシミュレータ管理部310とバス360を介してメッセージを送受信するための通信を行う。   The communication unit 335 performs communication for transmitting and receiving messages via the simulator management unit 310 and the bus 360.

次に、シミュレータ管理部310の構成について説明する。   Next, the configuration of the simulator management unit 310 will be described.

通信部311は、複数のシミュレータ(メカシミュレータ330、ソフトウェアシミュレータ350)とバス360を介してメッセージを送受信するための通信を行う。   The communication unit 311 communicates with a plurality of simulators (mechanism simulator 330 and software simulator 350) for transmitting and receiving messages via the bus 360.

メッセージ記録部312は、複数のシミュレータと送受信を行うメッセージを管理する。メッセージには複数のシミュレータから通知された仮想時刻や各シミュレータ間で互いに通知する制御信号を含む。またそのメッセージが、連結する他のシミュレータに通知されたか否かを示すパラメータも含む。具体例は後述する。   The message recording unit 312 manages messages to be transmitted / received to / from a plurality of simulators. The message includes a virtual time notified from a plurality of simulators and a control signal notified to each other between the simulators. It also includes a parameter indicating whether the message has been notified to another simulator to be connected. Specific examples will be described later.

同期管理部313は、複数のシミュレータが保持する仮想時刻を比較することで時刻の同期をとる。具体的にはメッセージ記録部312を参照し、各シミュレータが持つ仮想時刻を比較することで最も遅い時刻を持つシミュレータを特定し、そのシミュレータに対してのみ進行を指示する。具体的な動作は後述する。   The synchronization management unit 313 synchronizes time by comparing virtual times held by a plurality of simulators. Specifically, referring to the message recording unit 312, the simulator having the latest time is identified by comparing the virtual times of the simulators, and only the simulator is instructed to proceed. Specific operation will be described later.

連結関係管理部314は、複数のシミュレータの連結関係を定義する。この定義によってどのシミュレータの制御信号をどのシミュレータに通知すべきかが判断できる。   The connection relationship management unit 314 defines a connection relationship between a plurality of simulators. With this definition, it is possible to determine which simulator control signal should be notified to which simulator.

加工部315は、制御信号の取りこぼしを防ぐために複数のシミュレータ間で送受信される制御信号を、加工方法指定部316によって指定される加工方法に基づいて加工する。   The processing unit 315 processes a control signal transmitted / received between a plurality of simulators based on a processing method specified by the processing method specifying unit 316 in order to prevent the control signal from being missed.

加工方法指定部316は、制御信号の取りこぼしを防ぐために複数のシミュレータ間で送受信される制御信号をどのように加工するかを指定する。   The processing method designation unit 316 designates how to process control signals transmitted and received between a plurality of simulators in order to prevent the control signals from being missed.

バス360は、各シミュレータおよびシミュレータ管理部310間での情報をやり取りする。   The bus 360 exchanges information between each simulator and the simulator management unit 310.

シミュレーション装置300は、シミュレータ管理部310、メカシミュレータ330、およびソフトウェアシミュレータ350の各構成を、RAMに格納されたコンピュータプログラムをCPUが読み込んで実行することによって実現する。   The simulation apparatus 300 realizes each configuration of the simulator management unit 310, the mechanical simulator 330, and the software simulator 350 when the CPU reads and executes a computer program stored in the RAM.

なお、図3の例においては、シミュレーション装置300を1台のコンピュータ上で構成する例を用いて説明したが、複数のコンピュータを介してシミュレーション装置を構成してもよい。すなわち、図3のバス360の代わりにLANに代表されるネットワーク回線を用いて各シミュレータを構成する各コンピュータと、シミュレータ管理部を構成するコンピュータとを接続してもよい。このように、複数の分散されたコンピュータによってシミュレーション装置が実現されてもよい。   In the example of FIG. 3, the simulation apparatus 300 is described as being configured on one computer, but the simulation apparatus may be configured via a plurality of computers. That is, each computer constituting each simulator may be connected to the computer constituting the simulator management unit using a network line represented by a LAN instead of the bus 360 in FIG. In this way, the simulation apparatus may be realized by a plurality of distributed computers.

また各シミュレータは必ずしもコンピュータ上で模擬するシミュレータである必要はない。シミュレータの一部あるいは全部を実製品やFPGA (Field Programmable Gate Array)などの検証用モジュールに置き換えて構成しても良い。   Each simulator does not necessarily have to be a simulator simulated on a computer. A part or all of the simulator may be replaced with a verification module such as an actual product or FPGA (Field Programmable Gate Array).

このような構成において具体的にどのようにシミュレーションが実施されるかの一例を説明する。   An example of how the simulation is specifically performed in such a configuration will be described.

<動作の説明>
本実施例では、まず事前準備ステップを行い、その後、シミュレーション実行ステップを行う。
<Description of operation>
In the present embodiment, a preliminary preparation step is first performed, and then a simulation execution step is performed.

事前準備ステップの詳細について図4のフローを用いて説明する。図4のフローは、RAMなどに格納されたプログラムをCPUが実行することによって実現される。なおより詳細には、ステップS401〜S403はメカシミュレータ330およびソフトウェアシミュレータ350に関する処理であり、ステップS404〜S406はシミュレータ管理部310に関する処理である。   Details of the advance preparation step will be described with reference to the flowchart of FIG. The flow in FIG. 4 is realized by the CPU executing a program stored in the RAM or the like. More specifically, steps S401 to S403 are processes related to the mechanical simulator 330 and the software simulator 350, and steps S404 to S406 are processes related to the simulator management unit 310.

ステップS401では、シミュレーション装置300は、連携するシミュレータを起動する。すなわちシミュレーション装置300は、メカシミュレータ330およびソフトウェアシミュレータ350を起動する。   In step S401, the simulation apparatus 300 activates a simulator that cooperates. That is, the simulation apparatus 300 activates the mechanical simulator 330 and the software simulator 350.

ステップS402では、ステップS401で起動した各シミュレータがシミュレーション部品を読み込む。メカシミュレータ330は、図2に示されるようにベルトコンベアーの形状などの機構情報からなるメカ部品320を読み込む。ソフトウェアシミュレータ350はベルトコンベアーを制御するためのソフトウェア部品340を読み込む。   In step S402, each simulator activated in step S401 reads a simulation part. As shown in FIG. 2, the mechanical simulator 330 reads a mechanical part 320 including mechanism information such as the shape of the belt conveyor. The software simulator 350 reads a software component 340 for controlling the belt conveyor.

ステップS403では、各シミュレータがシミュレータ管理部310にシミュレーション参加要求メッセージを通知する。図5は、各シミュレータからシミュレータ管理部310に対して通知されるシミュレーション参加要求メッセージと、シミュレータ管理部310において記録されるメッセージの例とを示す図である。シミュレーション参加要求メッセージの内容は、図5(a)および(b)に示すように、参加を意味するメッセージ種別(Connect)501、仮想時刻502、外部に出力したい信号とその初期値503および入力を受け付けたい信号の一覧504を含む。図5(a)はメカシミュレータ330が通知するシミュレーション参加要求メッセージである。出力する信号である位置センサー信号の初期値としてLowが設定されており、入力を受け付けたい信号としてモーター駆動割り込み信号を指定している。図5(b)はソフトウェアシミュレータ350が通知するシミュレーション参加要求メッセージである。出力する信号であるモーター駆動開始割り込み信号の初期値としてLowが設定されており、入力を受け付けたい信号として位置センサー信号を指定している。また、図5(a)および図5(b)に示すシミュレーション参加要求メッセージには、通知元505と通知先506とを示す値がそれぞれ指定されている。たとえば図5(a)に示すメカシミュレータから通知されるメッセージの例では、通知元505としてメカシミュレータが指定され、通知先506としてシミュレータ管理部が指定されている。なお、図5に示すメッセージは、これらの情報が互いに識別可能であればいずれの形式であってもよい。たとえば、通知元505にはシミュレータ識別子のみ指定されていてもよく、入力を受け付けたい信号504には単に信号種別を特定するための値が指定されているような形式であってもよい。以下、本明細書で説明する各種のメッセージについても同様である。   In step S403, each simulator notifies the simulator management unit 310 of a simulation participation request message. FIG. 5 is a diagram illustrating a simulation participation request message notified from each simulator to the simulator management unit 310 and an example of a message recorded in the simulator management unit 310. As shown in FIGS. 5A and 5B, the contents of the simulation participation request message include a message type (Connect) 501 indicating participation, a virtual time 502, a signal to be output to the outside, its initial value 503, and input. A list 504 of signals to be received is included. FIG. 5A shows a simulation participation request message notified by the mechanical simulator 330. Low is set as the initial value of the position sensor signal, which is the signal to be output, and the motor drive interrupt signal is specified as the signal to receive input. FIG. 5B is a simulation participation request message notified by the software simulator 350. Low is set as the initial value of the motor drive start interrupt signal, which is an output signal, and the position sensor signal is specified as a signal to be received. In the simulation participation request messages shown in FIGS. 5A and 5B, values indicating the notification source 505 and the notification destination 506 are specified. For example, in the example of the message notified from the mechanical simulator shown in FIG. 5A, the mechanical simulator is specified as the notification source 505, and the simulator management unit is specified as the notification destination 506. The message shown in FIG. 5 may be in any format as long as these pieces of information can be distinguished from each other. For example, only the simulator identifier may be specified in the notification source 505, or the signal 504 that is desired to accept an input may have a format in which a value for simply specifying the signal type is specified. The same applies to various messages described in the present specification.

図4のフローチャートに戻り、処理の説明を続ける。ステップS404では、シミュレータ管理部310は、ステップS403で各シミュレータから通知される参加要求メッセージを受信し、そのメッセージをメッセージ記録部312に記録する。記録されるメッセージは図5(c)および(d)に示すように、受信したメッセージに含まれる仮想時刻551およびシミュレータからの出力信号の一覧553である。また制御信号の取りこぼしを防ぐため、その仮想時刻551におけるメッセージをまだ連結先のシミュレータに通知していないことを示すパラメータ(Send”送信先シミュレータ名”=FALSE)552も記録する。この「送信先シミュレータ名」には、後述するステップS405で説明する連結定義が行われたシミュレータ名が指定されることになる。連結とは、あるシミュレータと別のシミュレータとを結びつけることであり、具体的には、あるシミュレータから通知されるメッセージを、どのシミュレータに対して送信するかを、シミュレータ管理部310において定義付けするものである。詳細については後述する。図5(c)はメカシミュレータ330から通知された参加要求メッセージをシミュレータ管理部310がメッセージ記録部312に記録する内容である。図5(d)は同様にソフトウェアシミュレータ350から通知された参加要求メッセージをシミュレータ管理部310がメッセージ記録部312に記録する内容である。以下、連結先のシミュレータに通知されていないメッセージのことを未通知のメッセージと呼び、通知されたメッセージを通知済みのメッセージと呼ぶ。メッセージ記録部312においては、図5(c)および(d)に示すように、各シミュレータごとに、各シミュレータから通知されるメッセージを、仮想時刻および通知の有無を示すパラメータと関連付けて記録する。   Returning to the flowchart of FIG. 4, the description of the processing will be continued. In step S404, the simulator management unit 310 receives the participation request message notified from each simulator in step S403, and records the message in the message recording unit 312. As shown in FIGS. 5C and 5D, the message to be recorded is a virtual time 551 included in the received message and a list 553 of output signals from the simulator. In order to prevent the control signal from being missed, a parameter (Send “destination simulator name” = FALSE) 552 indicating that the message at the virtual time 551 has not been notified to the simulator at the connection destination is also recorded. In this “destination simulator name”, the name of the simulator for which the connection definition described in step S405 described later is performed is designated. Linking refers to linking a simulator to another simulator. Specifically, the simulator management unit 310 defines to which simulator a message notified from a certain simulator is transmitted. It is. Details will be described later. FIG. 5C shows the content of the participation request message notified from the mechanical simulator 330 being recorded in the message recording unit 312 by the simulator management unit 310. FIG. 5D shows the content of the participation request message notified from the software simulator 350 similarly recorded in the message recording unit 312 by the simulator management unit 310. Hereinafter, a message not notified to the connection destination simulator is referred to as an unnotified message, and a notified message is referred to as a notified message. In the message recording unit 312, as shown in FIGS. 5C and 5D, for each simulator, a message notified from each simulator is recorded in association with a parameter indicating the virtual time and presence / absence of notification.

図4のフローチャートに戻り、処理の説明を続ける。ステップS405ではシミュレータ管理部310の連結関係管理部314が連結定義を行う。連結定義はメッセージ記録部312に記録されたメッセージから、参加要求を出したシミュレータとその入出力信号の一覧を元に連結関係を定義する。すなわち制御信号の通知元と通知先を定義する。例えば連結関係管理部314は、図6(a)に示すような画面を用いてシミュレータの出力信号(通知元)と入力信号(通知先)とを関連付ける。設定1ではモーター駆動割り込み信号をソフトウェアシミュレータ350からメカシミュレータ330に通知する連結定義を行っている。設定2では位置センサー信号をメカシミュレータ330からソフトウェアシミュレータ350に通知する連結定義を行っている。なお、図6(a)に示すように、連結関係管理部314は、連結定義をユーザからの指定によって設定してもよい。あるいは、各シミュレータから通知される参加要求メッセージに含まれる情報に基づいて自動的に設定してもよい。   Returning to the flowchart of FIG. 4, the description of the processing will be continued. In step S405, the connection relationship management unit 314 of the simulator management unit 310 performs connection definition. The connection definition is based on a message recorded in the message recording unit 312 and defines a connection relationship based on a list of simulators that have made a participation request and their input / output signals. That is, the control signal notification source and notification destination are defined. For example, the connection relationship management unit 314 associates an output signal (notification source) and an input signal (notification destination) of the simulator using a screen as shown in FIG. In setting 1, a linkage definition for notifying a motor drive interrupt signal from the software simulator 350 to the mechanical simulator 330 is performed. In setting 2, a connection definition for notifying the position sensor signal from the mechanical simulator 330 to the software simulator 350 is performed. Note that, as illustrated in FIG. 6A, the connection relationship management unit 314 may set the connection definition according to designation from the user. Or you may set automatically based on the information contained in the participation request message notified from each simulator.

図4のフローチャートに戻り、処理の説明を続ける。ステップS406ではシミュレータ管理部310の加工方法指定部316が、メッセージの加工方法を指定する。メッセージの加工方法の指定はメッセージ記録部312に記録された各シミュレータが出力する信号をどのように加工するかを選択する。例えば図6(b)に示すような画面を用いてユーザからの指定を受け付ける。加工方法には、最大値、最小値、平均値、積分などの選択肢があり、信号の性質に合わせて加工方法を選択できる。図6(b)の設定1ではソフトウェアシミュレータ350が出力するモーター駆動割り込み信号に対して最大値を取得する加工方法を指定している。これは、たとえばソフトウェアシミュレータ350からシミュレータ管理部310に通知されたモーター駆動割り込み信号を、シミュレータ管理部310からメカシミュレータに送信する際に、その信号値を変更(すなわち加工)する方法を指定する。また設定2ではメカシミュレータ330が出力する位置センサー信号に対して最大値を取得する加工方法を指定している。なお、加工方法はシミュレーション途中で変更しても良い。   Returning to the flowchart of FIG. 4, the description of the processing will be continued. In step S406, the processing method designation unit 316 of the simulator management unit 310 designates a message processing method. The message processing method is specified by selecting how to process the signal output by each simulator recorded in the message recording unit 312. For example, the designation from the user is accepted using a screen as shown in FIG. The processing method has options such as maximum value, minimum value, average value, and integration, and the processing method can be selected according to the nature of the signal. In setting 1 in FIG. 6B, a processing method for obtaining the maximum value for the motor drive interrupt signal output from the software simulator 350 is specified. For example, when a motor drive interrupt signal notified from the software simulator 350 to the simulator management unit 310 is transmitted from the simulator management unit 310 to the mechanical simulator, a method for changing (that is, processing) the signal value is designated. In setting 2, a machining method for obtaining a maximum value for the position sensor signal output from the mechanical simulator 330 is designated. The processing method may be changed during the simulation.

以上で事前準備は完了である。続いてシミュレーション実行手順の詳細について図7のフローを用いて説明する。   The advance preparation is complete. Next, details of the simulation execution procedure will be described with reference to the flowchart of FIG.

ステップS701では、シミュレータ管理部310はシミュレーション開始要求メッセージを各シミュレータに通知する。シミュレーション開始要求メッセージの内容を図8(a)および(b)に示す。図8(a)はシミュレータ管理部310からメカシミュレータ330に対して通知するメッセージである。メッセージには開始を意味するメッセージ種別(Start)901、仮想時刻902、参加要求メッセージで指定した、メカシミュレータ330が入力を受け付けたい信号の一覧903が含まれる。この信号一覧に含まれる値に関してはステップS405で定義された連結定義を元に決定している。図8(b)は同様にシミュレータ管理部310からソフトウェアシミュレータ350に対して通知するメッセージである。なお、シミュレーション開始要求メッセージを送信したシミュレータ管理部310は、後述するステップS704で同期要求メッセージが通知されるまで待機する。またステップS404で未通知として記録したメッセージ(すなわち、図5(c)および(d)のメッセージ)を通知済み(Send”送信先シミュレータ名”=TRUE)に更新する。   In step S701, the simulator management unit 310 notifies each simulator of a simulation start request message. The contents of the simulation start request message are shown in FIGS. FIG. 8A shows a message notified from the simulator management unit 310 to the mechanical simulator 330. The message includes a message type (Start) 901 indicating start, a virtual time 902, and a list 903 of signals that the mechanical simulator 330 wants to accept input specified by the participation request message. The values included in this signal list are determined based on the connection definition defined in step S405. FIG. 8B similarly shows a message notified from the simulator management unit 310 to the software simulator 350. The simulator management unit 310 that has transmitted the simulation start request message waits until a synchronization request message is notified in step S704 described later. In addition, the message recorded as unnotified in step S404 (that is, the messages in FIGS. 5C and 5D) is updated to notified (Send “destination simulator name” = TRUE).

ステップS702では、各シミュレータはステップS701でシミュレータ管理部310から通知されたシミュレーション開始要求メッセージを各メッセージ記録部334、354)に記録する。   In step S702, each simulator records the simulation start request message notified from the simulator management unit 310 in step S701 in each message recording unit 334, 354).

ステップS703では、各シミュレータのシミュレーション実行部332、352は、ステップS702で記録されたメッセージを元にシミュレーション演算を開始する。このシミュレーション演算は各シミュレータの仮想時刻管理部333および353が決定した、同期をとる時刻まで進行する。   In step S703, the simulation execution units 332 and 352 of each simulator start simulation calculation based on the message recorded in step S702. This simulation calculation proceeds until the synchronization time determined by the virtual time management units 333 and 353 of each simulator.

ステップS704では各シミュレータが、同期をとる時刻までシミュレーションの実行を進行すると同期要求メッセージをシミュレータ管理部310に通知する。同期要求メッセージの内容の例を図8(c)および(d)に示す。同期要求メッセージには同期要求を意味するメッセージ種別(Sync)911、進行した仮想時刻912、シミュレーション演算によって生成された出力信号913、および入力を受け付けたい信号の一覧914を含む。図8(c)はメカシミュレータ330からシミュレータ管理部310に通知される同期要求メッセージであり、仮想時刻80msにおける位置センサー信号の値がLowであることを示している。また図8(d)は同様にソフトウェアシミュレータ350からシミュレータ管理部310に通知されるメッセージであり、時刻60msにおけるモーター駆動割り込み信号の値がLowであることを示している。   In step S704, each simulator notifies the simulator management unit 310 of a synchronization request message when the execution of the simulation proceeds until the time of synchronization. Examples of the contents of the synchronization request message are shown in FIGS. 8 (c) and 8 (d). The synchronization request message includes a message type (Sync) 911 indicating a synchronization request, an advanced virtual time 912, an output signal 913 generated by a simulation calculation, and a list 914 of signals to be accepted. FIG. 8C is a synchronization request message notified from the mechanical simulator 330 to the simulator management unit 310, and indicates that the value of the position sensor signal at the virtual time of 80 ms is Low. Similarly, FIG. 8D is a message notified from the software simulator 350 to the simulator management unit 310, and shows that the value of the motor drive interrupt signal at time 60 ms is Low.

なお、シミュレータ管理部310に同期要求メッセージを通知した各シミュレータは、後述するステップS710のシミュレーション進行メッセージあるいはステップS711のシミュレーション終了メッセージが通知されるまで待機する。後述するように、同期要求メッセージに含めた、入力を受け付けたい信号の入力がシミュレータ管理部310からのシミュレーション進行メッセージに含まれて通知される。よって、各シミュレータは、シミュレーション進行メッセージが通知されるまでは、シミュレーションを進行せずに待機する。なお、シミュレーション終了メッセージが通知された場合には、そのままシミュレーションを終了することになる。   Each simulator that has notified the simulator management unit 310 of the synchronization request message stands by until a simulation progress message in step S710 described later or a simulation end message in step S711 is notified. As will be described later, an input of a signal to be accepted included in the synchronization request message is included in the simulation progress message from the simulator management unit 310 and notified. Therefore, each simulator waits without proceeding with the simulation until a simulation progress message is notified. If a simulation end message is notified, the simulation is ended as it is.

ステップS705ではシミュレータ管理部310はステップS704で通知された同期要求メッセージをメッセージ記録部312に記録する。メッセージ記録部312で記録されるメッセージは図5(c)および(d)に示す参加要求メッセージの記録時から図8(e)および(f)に示されるメッセージに更新される。更新される内容はステップS704で通知された同期要求メッセージに基づいた仮想時刻821および出力信号の一覧823である。また制御信号の取りこぼしを防ぐため、その仮想時刻におけるメッセージが未通知であることを示すパラメータ822も記録する。なお、先に説明したように、シミュレーション参加要求時に記録した仮想時刻0の通知の有無を示すパラメータ825が通知済み(TRUE)に更新されている。このように、未通知であることを示すパラメータは、後述するようにシミュレーション進行メッセージにおいてその仮想時刻におけるメッセージが通知される場合には、メッセージが通知済みであること示すパラメータに変更される。   In step S705, the simulator management unit 310 records the synchronization request message notified in step S704 in the message recording unit 312. The message recorded in the message recording unit 312 is updated to the message shown in FIGS. 8E and 8F from the time when the participation request message shown in FIGS. 5C and 5D is recorded. The contents to be updated are the virtual time 821 and the output signal list 823 based on the synchronization request message notified in step S704. In order to prevent the control signal from being missed, a parameter 822 indicating that the message at the virtual time has not been notified is also recorded. As described above, the parameter 825 indicating whether or not the virtual time 0 is recorded, which is recorded at the time of requesting to participate in the simulation, is updated to “TRUE”. Thus, when the message at the virtual time is notified in the simulation progress message as described later, the parameter indicating that the message has not been notified is changed to a parameter indicating that the message has been notified.

ステップS706では、シミュレータ管理部310はステップS404で記録された参加要求メッセージを通知した全てのシミュレータから同期要求メッセージを受信していなければ、次の同期要求メッセージを受信するまで待機する。たとえば、図8の例では、シミュレータ管理部310は、図8(d)に示す同期要求メッセージを仮想時刻60msで受信した時点では、メカシミュレータ330から同期要求メッセージを受信していないので、待機をしていることになる。なお、同期要求メッセージに応答して後述するシミュレーション進行メッセージをシミュレータ管理部310が通知した場合には、その通知先のシミュレータからの同期要求メッセージについては受信していないとの状態に変更となる。すなわち、ステップS706は、シミュレータ管理部310が未対応の同期要求メッセージを全てのシミュレータから受信した状態であるかを判定する処理であるともいえる。   In step S706, if the simulator management unit 310 has not received the synchronization request message from all the simulators that have notified the participation request message recorded in step S404, the simulator management unit 310 waits until the next synchronization request message is received. For example, in the example of FIG. 8, the simulator management unit 310 does not receive the synchronization request message from the mechanical simulator 330 when it receives the synchronization request message shown in FIG. Will be. When the simulator management unit 310 notifies a simulation progress message to be described later in response to the synchronization request message, the state is changed to a state in which the synchronization request message from the notification destination simulator is not received. That is, it can be said that step S706 is a process for determining whether or not the simulator management unit 310 has received an unsupported synchronization request message from all the simulators.

全てのシミュレータから同期要求メッセージを受信した場合、ステップS707では同期管理部313は、ステップS705で記録された図8(e)および(f)に示す同期要求メッセージを参照し、各シミュレータの仮想時刻を比較する。比較する仮想時刻は図8(e)および(f)の仮想時刻821と824のように、各シミュレータが通知した最新の同期要求メッセージに基づいて記録されたメッセージである。比較によって最も進行が遅れているシミュレータ、すなわち最も小さい仮想時刻を持つシミュレータを特定する。仮に図8(e)および(f)に示すメッセージであれば、メカシミュレータ330は80ms、ソフトウェアシミュレータ350は60msであることからソフトウェアシミュレータ350の進行が最も遅れていると特定できる。なお、最も小さい仮想時刻を持つシミュレータは1つとは限らない。比較した時刻が同時刻である場合は両方のシミュレータを最も進行が遅れているシミュレータとして特定する。またシミュレータが3つ以上ある場合も同様に、1つ以上の最も遅れている仮想時刻を持つシミュレータが特定される。   When synchronization request messages have been received from all the simulators, in step S707, the synchronization management unit 313 refers to the synchronization request messages shown in FIGS. 8E and 8F recorded in step S705, and determines the virtual time of each simulator. Compare The virtual time to be compared is a message recorded based on the latest synchronization request message notified by each simulator, such as virtual times 821 and 824 in FIGS. 8 (e) and 8 (f). The simulator with the slowest progress, that is, the simulator with the smallest virtual time is identified by comparison. If the messages shown in FIGS. 8E and 8F are used, the mechanical simulator 330 is 80 ms, and the software simulator 350 is 60 ms. Therefore, it can be determined that the progress of the software simulator 350 is most delayed. Note that the simulator having the smallest virtual time is not necessarily one. If the compared times are the same time, both simulators are identified as the simulators that are the most delayed. Similarly, when there are three or more simulators, one or more simulators having the most delayed virtual time are identified.

ステップS708ではシミュレータ管理部310は、必要に応じてステップS406で指定した加工方法に基づき同期要求メッセージの加工を行い、最も進行が遅れているシミュレータに通知するメッセージを決定する。なお、ステップS708のメッセージの加工処理には、加工対象となるメッセージの抽出処理と、抽出したメッセージを加工する処理とが含まれる。ステップS708では、加工対象となるメッセージを抽出するものの、実際に加工しない場合も含まれる。ステップS708で実際にメッセージを加工する場合とは、後述するように所定の条件に合致した場合である。換言すれば、所定の条件に合致しない場合には、ステップS708においては実際の加工処理を実行しない。   In step S708, the simulator management unit 310 processes the synchronization request message based on the processing method designated in step S406 as necessary, and determines a message to be notified to the simulator that is most delayed. Note that the message processing processing in step S708 includes processing for extracting a message to be processed and processing for processing the extracted message. In step S708, although the message to be processed is extracted, the case where the message is not actually processed is also included. The case where the message is actually processed in step S708 is a case where a predetermined condition is met as will be described later. In other words, if the predetermined condition is not met, the actual processing is not executed in step S708.

メッセージの加工はまず加工対象の抽出を次に示す2つの条件に基づき行う。第一の条件は、シミュレータ管理部310からメッセージを受信する側のシミュレータの仮想時刻以前の仮想時刻を持つ、シミュレータ管理部310に通知されたメッセージである。ここで、メッセージを受信する側のシミュレータとは、上述したステップS708で特定された最も進行の後れているシミュレータである。つまり、ステップS708では、最も進行の遅れているシミュレータからの同期要求メッセージに応答した同期進行メッセージ(後述)に含める信号を加工する処理となる。そして、その同期進行メッセージで入力を受け付けたいメッセージのうち、メッセージを受信する側のシミュレータの仮想時刻よりも以前の仮想時刻を持つメッセージが加工対象となる。第二の条件はメッセージ記録部312に記録されているメッセージの中の通知が行われたか否かを表すパラメータを参照し、未通知であるメッセージ(Send”送信先シミュレータ名”=FALSE)のみである。そして、この2つを満たすメッセージが2つ以上ある場合は、その2つ以上のメッセージを対象に加工し、通知するメッセージを生成する。1つの場合は取りこぼしにならないことを意味し、加工を行わず、そのメッセージを通知する。1つもない場合は、通知が行われたか否かを示すパラメータを参照し、通知が行われたメッセージの中で最新の仮想時刻を持つメッセージを通知する。この場合も取りこぼしにはならない。   Message processing is performed first based on the following two conditions. The first condition is a message notified to the simulator management unit 310 having a virtual time before the virtual time of the simulator that receives the message from the simulator management unit 310. Here, the simulator that receives the message is the most advanced simulator identified in step S708 described above. That is, in step S708, the processing is to process a signal to be included in a synchronization progress message (described later) in response to the synchronization request message from the simulator that is most delayed. Of the messages that are desired to be accepted by the synchronization progress message, a message having a virtual time earlier than the virtual time of the simulator on the message receiving side is processed. The second condition refers to a parameter indicating whether or not the notification in the message recorded in the message recording unit 312 has been performed, and is only an unreported message (Send “destination simulator name” = FALSE). is there. If there are two or more messages that satisfy the two, the two or more messages are processed and a notification message is generated. In one case, it means that it will not be missed, and no message is processed and the message is notified. If there is none, a parameter indicating whether or not notification is made is referred to, and a message having the latest virtual time is notified among the notified messages. In this case, it will not be missed.

図8(e)および(f)を例にとって説明する。最も進行の遅れているシミュレータ、すなわち同期進行メッセージを受信する側のシミュレータはソフトウェアシミュレータ350である。そして、図8(f)を参照すると受信側のソフトウェアシミュレータの仮想時刻は60msである。この時刻よりも前の仮想時刻を持つ第一の条件を満たすメッセージは、図8(e)を参照すると、メカシミュレータが参加要求時に通知したメッセージ925のみである。この時刻のメッセージはステップS701で通知済みに設定されているため、第二の条件を満たさない。つまり、2つの条件を満たすメッセージが1つもない場合に相当する。したがって、通知が行われたメッセージの中で最新の仮想時刻を持つメッセージを通知することになる。したがって、ソフトウェアシミュレータに仮想時刻60msにおいて通知される同期進行メッセージは、メカシミュレータの通知済みの最新の仮想時刻0msを持つメッセージが選択される。すなわちメカシミュレータ330の仮想時刻0msにおける位置センサー信号Lowがソフトウェアシミュレータ350に通知される。   Description will be made with reference to FIGS. 8E and 8F. The simulator with the slowest progress, that is, the simulator that receives the synchronization progress message is the software simulator 350. Then, referring to FIG. 8F, the virtual time of the software simulator on the receiving side is 60 ms. The message that satisfies the first condition having the virtual time before this time is only the message 925 notified by the mechanical simulator when the participation request is made, with reference to FIG. Since the message at this time is set to be notified in step S701, the second condition is not satisfied. That is, this corresponds to the case where no message satisfies the two conditions. Therefore, a message having the latest virtual time is notified among the notified messages. Therefore, as the synchronization progress message notified to the software simulator at the virtual time of 60 ms, the message having the latest virtual time of 0 ms that has been notified by the mechanical simulator is selected. That is, the position sensor signal Low at the virtual time 0 ms of the mechanical simulator 330 is notified to the software simulator 350.

ステップS709ではシミュレーションの終了時刻に到達したかの判定を行う。終了時刻に到達したかの判定は利用者が終了指示を出したか否かで判定しても良いし、予め終了時刻を決めておいても良い。   In step S709, it is determined whether the simulation end time has been reached. Whether the end time has been reached may be determined based on whether the user has issued an end instruction, or the end time may be determined in advance.

シミュレーションの終了時刻に到達していない場合、シミュレータ管理部310はステップS710において、ステップS707で特定した進行の遅いシミュレータに対してシミュレーション進行メッセージを通知する。シミュレーション進行メッセージにはシミュレーション進行を意味するメッセージ種別(Sync-Ack)、および同期要求メッセージで指定した入力を受け付けたい信号の一覧が含まれる。ここで、シミュレータ管理部310から通知されるシミュレーション進行メッセージには、ステップS704で指定した入力を受け付けたい位置センサー信号に対して、ステップS708で決定した値(図8(e)の場合にはLow)が設定される。すなわち、ステップS708の加工処理を経て得られた値が、入力を受け付けたい信号の値として設定され、シミュレータ管理部310から各シミュレータに通知される。なお、シミュレータ管理部310のメッセージ記録部312は、通知したメッセージを通知済み(Send”送信先シミュレータ名”=TRUE)に更新する。   If the simulation end time has not been reached, in step S710, the simulator management unit 310 notifies the simulation progress message to the slow progressing simulator specified in step S707. The simulation progress message includes a message type (Sync-Ack) meaning simulation progress and a list of signals for which input specified by the synchronization request message is accepted. Here, in the simulation progress message notified from the simulator management unit 310, the value determined in step S708 with respect to the position sensor signal for which the input specified in step S704 is to be received (Low in the case of FIG. 8E). ) Is set. That is, the value obtained through the processing in step S708 is set as the value of the signal for which input is to be accepted, and is notified from the simulator management unit 310 to each simulator. The message recording unit 312 of the simulator management unit 310 updates the notified message to “Notified” (Send “destination simulator name” = TRUE).

シミュレーションの終了時刻に到達している場合、ステップS711においてシミュレータ管理部310は、各シミュレータに対してシミュレーション終了メッセージを通知し、シミュレーション実行を終了する。シミュレーション終了メッセージにはシミュレーション終了を意味するメッセージ種別(Exit)、進行した仮想時刻、および同期要求メッセージで指定した入力を受け付けたい信号の一覧が含まれる。なお、メッセージ記録部312は、上記のステップS710と同様に、通知されたメッセージおよびステップS708で加工対象になったメッセージを通知済みを意味するパラメータ(Send”送信先シミュレータ名”=TRUE)に更新する。   If the simulation end time has been reached, in step S711, the simulator management unit 310 notifies each simulator of a simulation end message and ends the simulation execution. The simulation end message includes a message type (Exit) indicating the end of the simulation, a virtual time at which the simulation has been completed, and a list of signals that are desired to accept the input specified in the synchronization request message. Note that the message recording unit 312 updates the notified message and the message to be processed in step S708 to a parameter (Send “destination simulator name” = TRUE) meaning that notification has been made, as in step S710 above. To do.

ステップS710にてシミュレータ管理部310から通知されたシミュレーション進行メッセージを受信したシミュレータは、ステップS703にて、通知されたメッセージを入力としてシミュレーションを継続する。そしてシミュレーションが次の同期タイミングまで進行すると、各シミュレータは同期要求メッセージをシミュレータ管理部310に通知する(ステップS704)。   In step S710, the simulator that has received the simulation progress message notified from the simulator management unit 310 continues the simulation with the notified message as an input in step S703. When the simulation progresses to the next synchronization timing, each simulator notifies the simulator management unit 310 of a synchronization request message (step S704).

<具体的な動作説明>
メッセージの加工によって得られる本実施例の効果を図9を用いて具体的に示す。図9はシミュレータ管理部310と2つのシミュレータ(メカシミュレータ330およびソフトウェアシミュレータ350)とが通信を行うタイミングを示している。図9は、図7のステップS703〜ステップS710を継続して繰り返し、メカシミュレータ330は時刻880msまで、またソフトウェアシミュレータ350は時刻900msまでシミュレーションが進んでいる状況を仮定する。なお、直前の時刻840msにおいてソフトウェアシミュレータ350からシミュレータ管理部310に対して通知される同期要求メッセージを図10(a)に示す。またシミュレータ管理部310が、通知された図10(a)で示す同期要求メッセージを記録した内容を図10(b)に示す。
<Specific operation explanation>
The effect of the present embodiment obtained by processing the message will be specifically described with reference to FIG. FIG. 9 shows the timing at which the simulator management unit 310 and the two simulators (mechanism simulator 330 and software simulator 350) communicate. In FIG. 9, steps S703 to S710 in FIG. 7 are continuously repeated, and it is assumed that the simulation progresses until the time 880 ms for the mechanical simulator 330 and the time 900 ms for the software simulator 350. FIG. 10A shows a synchronization request message notified from the software simulator 350 to the simulator management unit 310 at the immediately preceding time 840 ms. FIG. 10B shows the contents recorded by the simulator management unit 310 in the notified synchronization request message shown in FIG.

この時、ステップS704にて図9の時刻880ms(910)でメカシミュレータ330がシミュレータ管理部310に通知する同期要求メッセージを図10(c)に示す。また同じく図9の時刻900ms(940)でソフトウェアシミュレータ350がシミュレータ管理部310に通知する同期要求メッセージを図10(d)に示す。図10(b)および(d)に示されるように、ソフトウェアシミュレータ350は時刻840msまで出力するモーター駆動開始割り込み信号がLowであり、時刻900msで初めてHighになる動作を想定している。   FIG. 10C shows a synchronization request message that the mechanical simulator 330 notifies the simulator management unit 310 at step S704 at time 880 ms (910) in FIG. Similarly, FIG. 10D shows a synchronization request message that the software simulator 350 notifies the simulator management unit 310 at time 900 ms (940) in FIG. As shown in FIGS. 10B and 10D, the software simulator 350 assumes an operation in which the motor drive start interrupt signal output until time 840 ms is Low and becomes High for the first time at 900 ms.

次に、メカシミュレータ330は時刻880msまで、またソフトウェアシミュレータ350は時刻900msまでシミュレーションが進んでいる状況での説明を続ける。なお、ステップS705では各シミュレータから同期要求メッセージの通知を受けたシミュレータ管理部310は通知されたメッセージをメッセージ記録部312に記録している。このときの、各シミュレータ毎にシミュレータ管理部310のメッセージ記録部312に記録されているメッセージを図11に示す。図11(a)は、メカシミュレータ330からの時刻880msのメッセージを記録したものでり、図11(b)はソフトウェアシミュレータ350からの時刻900msのメッセージを記録したものである。   Next, the explanation is continued in the situation where the simulation is progressing until the time of 880 ms for the mechanical simulator 330 and the simulation is performed until the time of 900 ms for the software simulator 350. In step S705, the simulator management unit 310 that has received the notification of the synchronization request message from each simulator records the notified message in the message recording unit 312. The messages recorded in the message recording unit 312 of the simulator management unit 310 for each simulator at this time are shown in FIG. FIG. 11A shows a message recorded at a time of 880 ms from the mechanical simulator 330, and FIG. 11B shows a message recorded at a time of 900 ms from the software simulator 350.

ステップS707ではメカシミュレータ330の最新の仮想時刻880ms(1101)およびソフトウェアシミュレータ350の最新の仮想時刻900ms(1113)を比較し、進行が遅れているシミュレータとしてメカシミュレータ330を特定する。   In step S707, the latest virtual time 880ms (1101) of the mechanical simulator 330 and the latest virtual time 900ms (1113) of the software simulator 350 are compared, and the mechanical simulator 330 is specified as a simulator whose progress is delayed.

続いてステップS708では、シミュレータ管理部310は、進行が遅れているメカシミュレータ330を、メッセージが受信される側のシミュレータであると特定し、メカシミュレータに対して通知されるメッセージを加工する。すなわち、ソフトウェアシミュレータ350からの同期要求メッセージを記録した、図11(b)に示されるメッセージを加工して行われる。加工対象となるメッセージは第一の条件を満たす仮想時刻880ms以下のメッセージ、かつ第二の条件を満たす未通知のメッセージである。ここでは、ソフトウェアシミュレータ350の出力信号において加工対象となるメッセージが時刻840ms(1112)のみである。したがって、同期タイミング910の応答として時刻840msのメッセージに含まれる信号値がそのままシミュレーション進行メッセージに含まれてメカシミュレータに通知される(ステップS710)。またこの時、メッセージ記録部312はソフトウェアシミュレータの時刻840msのメッセージ(図11(b)の1112)を通知済み(TRUE)に更新する。   Subsequently, in step S708, the simulator management unit 310 identifies the mechanical simulator 330 whose progress is delayed as the simulator on which the message is received, and processes the message notified to the mechanical simulator. That is, it is performed by processing the message shown in FIG. 11B in which the synchronization request message from the software simulator 350 is recorded. The message to be processed is a message with a virtual time of 880 ms or less that satisfies the first condition, and an unnotified message that satisfies the second condition. Here, the message to be processed in the output signal of the software simulator 350 is only the time 840 ms (1112). Accordingly, as a response to the synchronization timing 910, the signal value included in the message at time 840 ms is directly included in the simulation progress message and notified to the mechanical simulator (step S710). At this time, the message recording unit 312 updates the message (1112 in FIG. 11B) of the software simulator at time 840 ms to be notified (TRUE).

続いて進行メッセージを受信したメカシミュレータ330は次の同期タイミングである960ms(920)までシミュレーションを進め(ステップS703)、シミュレータ管理部310に対して同期要求メッセージを通知する(ステップS704)。メカシミュレータから時刻960msで通知されるメッセージを図12(a)に示す。   Subsequently, the mechanical simulator 330 that has received the progress message advances the simulation to the next synchronization timing of 960 ms (920) (step S703), and notifies the simulator management unit 310 of the synchronization request message (step S704). A message notified from the mechanical simulator at a time of 960 ms is shown in FIG.

図12(a)に示す同期要求メッセージの通知を受けたシミュレータ管理部310は、通知されたメッセージをメッセージ記録部312に記録する(ステップS705)。記録されたメッセージを図12(c)の1202に示す。この時のシミュレータ管理部310は、メカシミュレータ330の時刻960ms(1202)およびソフトウェアシミュレータ350の時刻900ms(図11(b)の1113)を比較する。そして、遅れているシミュレータとしてソフトウェアシミュレータ350を特定する(ステップS707)。   Upon receiving the notification of the synchronization request message shown in FIG. 12A, the simulator management unit 310 records the notified message in the message recording unit 312 (step S705). The recorded message is shown at 1202 in FIG. The simulator management unit 310 at this time compares the time 960 ms (1202) of the mechanical simulator 330 with the time 900 ms (1113 of FIG. 11B) of the software simulator 350. Then, the software simulator 350 is specified as a delayed simulator (step S707).

続いて図11(a)に示されるメッセージを加工する(ステップS708)。加工対象となるメッセージは第一の条件を満たす仮想時刻900ms以下のメッセージ、かつ第二の条件を満たす未通知のメッセージである。すなわち、仮想時刻880ms(図11(a)の1101)のみであることから、このメッセージがそのまま通知される。またこの時、メッセージ記録部312は時刻880msのメッセージ(図11(a)の1101)を通知済みに更新する。したがって、図12(c)の1201の時刻880msのメッセージが通知済みとなっている。   Subsequently, the message shown in FIG. 11A is processed (step S708). The message to be processed is a message with a virtual time of 900 ms or less that satisfies the first condition, and an unnotified message that satisfies the second condition. That is, since the virtual time is only 880 ms (1101 in FIG. 11A), this message is notified as it is. At this time, the message recording unit 312 updates the message at time 880 ms (1101 in FIG. 11A) to be notified. Therefore, the message at the time 880 ms at 1201 in FIG.

同様に進行メッセージを受信したソフトウェアシミュレータ350は次の同期タイミングである960msまでシミュレーションを進め(ステップS703)、シミュレータ管理部310に対して同期要求メッセージを通知する(ステップS704)。通知されるメッセージを図12(b)に示す。図12(b)に示されるように、ソフトウェアシミュレータ350は仮想時刻960msで出力するモーター駆動開始割り込み信号をLowに戻す動作を想定している。   Similarly, the software simulator 350 that has received the progress message advances the simulation to the next synchronization timing of 960 ms (step S703), and notifies the simulator management unit 310 of the synchronization request message (step S704). The message to be notified is shown in FIG. As shown in FIG. 12B, the software simulator 350 assumes an operation of returning the motor drive start interrupt signal output at the virtual time 960 ms to Low.

通知を受けたシミュレータ管理部310は通知されたメッセージをメッセージ記録部312に記録する(ステップS705)。記録されたメッセージを図12(d)の1213に示す。   Upon receiving the notification, the simulator management unit 310 records the notified message in the message recording unit 312 (step S705). The recorded message is shown at 1213 in FIG.

続いてステップS707では、メカシミュレータ330の仮想時刻とソフトウェアシミュレータ350の仮想時刻とを比較する。図12(c)および(d)からメカシミュレータ330の仮想時刻960ms(1202)およびソフトウェアシミュレータ350の仮想時刻960ms(1213)は、どちらも960msまで進んでおり同じ仮想時刻であること。したがって、両シミュレータに対してシミュレーション進行メッセージを通知する処理を行うことになる。   Subsequently, in step S707, the virtual time of the mechanical simulator 330 and the virtual time of the software simulator 350 are compared. From FIGS. 12C and 12D, the virtual time 960 ms (1202) of the mechanical simulator 330 and the virtual time 960 ms (1213) of the software simulator 350 both advance to 960 ms and are the same virtual time. Therefore, processing for notifying both simulators of the simulation progress message is performed.

ステップS708ではソフトウェアシミュレータ350に対して通知するメッセージの加工を行う。加工対象となるメッセージは第一の条件から仮想時刻960ms以下、かつ第二の条件から未通知を満たすメッセージである。この条件を満たすメッセージは仮想時刻960ms(1202)のみであることから、メカシミュレータからの時刻960msのメッセージがそのまま通知される。同様に、メカシミュレータ330に対して通知するソフトウェアシミュレータ350の出力信号についても確認する。加工対象となるメッセージは第一の条件から960ms以下、かつ第二の条件から未通知を満たすメッセージである。この条件を満たすメッセージは、仮想時刻900ms(1212)と仮想時刻960ms(1213)の2つが存在する。このことから、この2つの仮想時刻における信号に対してステップS406で定義された方法である最大値を取得する加工を行い、加工したメッセージをメカシミュレータに通知する(ステップS710)。通知されるメッセージを図13(a)に示す。図13(a)に示される通り、メカシミュレータ330にモーター駆動開始割り込み信号としてHigh(1212)とLow(1213)のうちの最大値であるHighが通知される(1301)。なおメッセージ記録部312はステップS710では加工対象となったメッセージを含め、通知されたメッセージ(すなわち、1202、1212、1213)を通知済みに更新する。   In step S708, the message notified to the software simulator 350 is processed. The message to be processed is a message that satisfies the virtual time of 960 ms or less from the first condition and satisfies the unnotified from the second condition. Since the message satisfying this condition is only the virtual time 960 ms (1202), the message at the time 960 ms from the mechanical simulator is notified as it is. Similarly, the output signal of the software simulator 350 notified to the mechanical simulator 330 is also confirmed. The message to be processed is a message that satisfies 960 ms or less from the first condition and satisfies unnotified from the second condition. There are two messages that satisfy this condition: virtual time 900 ms (1212) and virtual time 960 ms (1213). Therefore, processing for obtaining the maximum value, which is the method defined in step S406, is performed on the signals at these two virtual times, and the processed message is notified to the mechanical simulator (step S710). The message to be notified is shown in FIG. As shown in FIG. 13A, the mechanical simulator 330 is notified of the maximum value of High (1212) and Low (1213) as a motor drive start interrupt signal (1301). In step S710, the message recording unit 312 updates the notified messages (that is, 1202, 1212, and 1213) including the message to be processed to be notified.

以上の動作のようにソフトウェアシミュレータ350がモーターの駆動を開始するための割り込み信号を出力すると仮定すれば、その波形は図13(b−1)に示さる。この結果、メカシミュレータ330は図13(b−2))に示すように所望の信号レベルを得ることができる。これによってモーターの駆動が開始され、連動して荷物が運ばれる。   Assuming that the software simulator 350 outputs an interrupt signal for starting driving the motor as described above, the waveform thereof is shown in FIG. 13 (b-1). As a result, the mechanical simulator 330 can obtain a desired signal level as shown in FIG. As a result, the driving of the motor is started, and the cargo is carried in conjunction.

このように、これまで通知されなかった信号を記録しておき、予め指定した加工方法によって加工することで、信号の取りこぼしを防ぐことができるようになる。   As described above, signals that have not been notified so far are recorded and processed by a processing method designated in advance, thereby preventing signal loss.

加工方法は本実施例のように信号レベルであれば最大値や最小値などがあり、信号パルス数であれば積分などもある。加工方法は加工対象となる信号に合わせて任意に選択できる。   The processing method includes a maximum value and a minimum value if the signal level is the same as in this embodiment, and includes integration if the number of signal pulses. The processing method can be arbitrarily selected according to the signal to be processed.

実施例1で述べたように割り込み信号のような1回の取りこぼしが製品の動作として大きく影響する場合は取りこぼしが許されない。一方、信号によっては必ずしも加工する必要が無い場合もある。例えば連続性を持つ信号や1回の同期での変化量が小さい信号であれば取りこぼしがあっても動作として大きな影響が無い。一般的にはこういった信号が混在する。このような場合において、加工が必要か否かを見極めるためにはどのような取りこぼしがあるかを可視化する必要がある。   As described in the first embodiment, when one missing such as an interrupt signal greatly affects the operation of the product, the missing is not permitted. On the other hand, depending on the signal, it may not always be necessary to process the signal. For example, if there is a continuity signal or a signal with a small change amount in one synchronization, even if it is missed, there is no significant influence on the operation. In general, these signals are mixed. In such a case, in order to ascertain whether or not processing is necessary, it is necessary to visualize what kind of missing is present.

実施例2では、シミュレータ管理部は伝達されない信号がある場合に、その伝達されない信号を利用者に提示するシミュレーション装置を提供する。提示方法としては、ディスプレイに表示したり、音声で通知したりするなど、各種の方法がある。   In the second embodiment, when there is a signal that is not transmitted, the simulator management unit provides a simulation device that presents the signal that is not transmitted to the user. As a presentation method, there are various methods such as displaying on a display or notifying by voice.

提示は、シミュレーション参加要求メッセージや同期要求メッセージがシミュレータから通知された場合に記録されるメッセージ記録部312を参照することで実現できる。実施例1で示したようにメッセージ記録部312にはメッセージが通知済みか未通知かを示すパラメータを保持しているため、メッセージの加工ステップS708で確認できる。具体的にはステップS708で述べた加工対象となるメッセージが2つ以上あるかどうかを判別する。ある場合は取りこぼしが発生することを示す。図12(d)の場合を例にとると、時刻900ms(1212)と時刻960ms(1213)の2つのメッセージが加工対象である。従来であれば最新の時刻960ms(1213)のメッセージのみが通知され、時刻900ms(1212)のメッセージが取りこぼし対象となる。すなわち加工対象となるメッセージがあった場合に、そのメッセージから最新の仮想時刻を持つメッセージを取り除いたメッセージが取りこぼされることを意味する。   The presentation can be realized by referring to the message recording unit 312 that is recorded when a simulation participation request message or a synchronization request message is notified from the simulator. As shown in the first embodiment, since the message recording unit 312 holds a parameter indicating whether the message has been notified or not notified, it can be confirmed in the message processing step S708. Specifically, it is determined whether or not there are two or more messages to be processed described in step S708. If there is, it indicates that a missing item will occur. Taking the case of FIG. 12D as an example, two messages at time 900 ms (1212) and time 960 ms (1213) are to be processed. Conventionally, only the message at the latest time 960 ms (1213) is notified, and the message at time 900 ms (1212) is a target to be missed. That is, when there is a message to be processed, a message obtained by removing a message having the latest virtual time from the message is missed.

取りこぼされるメッセージは図14(a)に示すように記録内容をリアルタイムで表示装置に表示しても良いし、記録装置に保存し、後から確認できるようにしても良い。図14(a)では取りこぼしがあるメッセージをリアルタイムで表示装置の画面に表示している例を示している。   As shown in FIG. 14A, the message to be missed may be displayed on the display device in real time, or may be stored in the recording device so that it can be confirmed later. FIG. 14A shows an example in which a message that has been missed is displayed on the screen of the display device in real time.

本実施例によれば、利用者は記録内容を確認することで、どのタイミングでどんな取りこぼしがあったかを確認できる。一度目のシミュレーションでは加工を行わず、取りこぼしがあったかどうか、またどんな信号の取りこぼしがあったかの確認を行い、二度目以降のシミュレーションでは必要に応じて信号の加工を実施することもできる。   According to the present embodiment, the user can confirm what has been missed at which timing by confirming the recorded contents. In the first simulation, processing is not performed, it is confirmed whether or not a signal has been missed, and what kind of signal has been missed. In the second and subsequent simulations, signal processing can be performed as necessary.

実施例1では割り込み信号の取りこぼしを防ぐために時系列に1つ以上の信号に対して最大値を取る加工の例を示した。加工方法は最大値だけではなく、合計や平均値など様々な加工が考えられる。様々な加工方法が考えられる一方で、加工方法の指定を誤ると適切な信号が通知されないという状況が発生する。   In the first embodiment, an example of processing that takes a maximum value for one or more signals in time series in order to prevent interruption of an interrupt signal is shown. The processing method is not limited to the maximum value, and various processing such as total and average values can be considered. While various processing methods can be considered, a situation occurs in which an appropriate signal is not notified if the processing method is incorrectly specified.

実施例3では、どのような信号がどのように加工されたかを利用者に提示するシミュレーション装置を提供する。   The third embodiment provides a simulation device that presents to a user what signals have been processed and how.

加工ステップS708でメッセージを加工する際に加工内容を記録することで実現できる。図12(d)を例にとると時刻900ms(1212)と時刻960ms(1213)の2つのメッセージが加工対象であり、それぞれのモーター駆動開始割り込み信号がHighおよびLowであることからHighに加工される。   This can be realized by recording the processing content when processing the message in processing step S708. Taking FIG. 12D as an example, two messages at time 900 ms (1212) and time 960 ms (1213) are to be processed, and since the motor drive start interrupt signals are High and Low, they are processed to High. The

加工されるメッセージは記録した内容は図14(b)に示すようにリアルタイムで表示装置に表示しても良いし、記録装置に保存し、後から確認できるようにしても良い。   As shown in FIG. 14B, the recorded content of the message to be processed may be displayed on the display device in real time, or may be stored in the recording device so that it can be confirmed later.

実施例1で説明したシミュレーションではタイミングのずれは生じるものの、割り込み信号のような重要な信号を取りこぼすことなく通知することが出来た。しかしながら、より精度を高めるために通知タイミングのずれを小さくすることが望ましい。   In the simulation described in the first embodiment, although a timing shift occurs, notification can be made without missing an important signal such as an interrupt signal. However, it is desirable to reduce the difference in notification timing in order to improve accuracy.

同期間隔を小さくすることでタイミングのずれも小さくすることができるが、同期間隔を小さくした分だけ通信の回数が増えることになる。すなわち、シミュレーションの実行に必要な処理時間が増加する。   Although the timing deviation can be reduced by reducing the synchronization interval, the number of communication increases by the amount of the synchronization interval being reduced. That is, the processing time required for executing the simulation increases.

一方、一般的に同期間隔はシミュレータが内部で演算する最小時間単位よりも大きい。例えばデジタル回路シミュレータであれば、回路が持つクロック(例えば100MHz、100,000,000分の1秒)単位で内部的な回路状態の演算を行う。そして、外部に出力する制御信号が変化するタイミング(例えば数クロック〜数十クロック程度)で同期を取る。   On the other hand, the synchronization interval is generally larger than the minimum time unit that the simulator calculates internally. For example, in the case of a digital circuit simulator, an internal circuit state calculation is performed in units of clocks (for example, 100 MHz, 100,000,000 / second) possessed by the circuit. And it synchronizes at the timing (for example, about several clocks-about several tens clocks) when the control signal output outside changes.

実施例4では、この性質を利用して取りこぼしを無くし、かつ遅延を小さくするシミュレーション装置を提供する。   In the fourth embodiment, a simulation apparatus is provided that makes use of this property to eliminate missing and reduce delay.

<構成の説明>
図15は実施例4における構成の例を示す図である。実施例1で説明した図3と比較して、メカシミュレータ1530とソフトウェアシミュレータ1550に、メッセージ選定部1536とメッセージ選定部1556とがそれぞれ含まれている。また、シミュレータ管理部1510からは、図3で示す加工部315と加工方法指定部316とが除かれている。
<Description of configuration>
FIG. 15 is a diagram illustrating an example of a configuration according to the fourth embodiment. Compared to FIG. 3 described in the first embodiment, the mechanical simulator 1530 and the software simulator 1550 include a message selection unit 1536 and a message selection unit 1556, respectively. Further, from the simulator management unit 1510, the processing unit 315 and the processing method designation unit 316 shown in FIG.

その他の構成としては、図3で示したものと同様の構成とすることができる。   Other configurations can be the same as those shown in FIG.

なお、図15の各シミュレータのメッセージ記録部1534と1554とは、実施例1と同様に通信部を介して送受信されるメッセージの管理に加え、メッセージがシミュレーション演算に用いられたか否かを示すパラメータを管理する。   Note that the message recording units 1534 and 1554 of each simulator in FIG. 15 are parameters that indicate whether or not the message has been used for simulation calculation in addition to the management of messages transmitted and received via the communication unit as in the first embodiment. Manage.

メッセージ選定部1536、1556は、シミュレーション実行部1532、1552が演算に用いる、他のシミュレータから通知されたメッセージの選定を行う。詳細は後述する。   The message selection units 1536 and 1556 select messages notified from other simulators used by the simulation execution units 1532 and 1552 for calculation. Details will be described later.

シミュレータ管理部のメッセージ記録部1512は、前述した複数のシミュレータ部と送受信を行うメッセージを管理する。ただし実施例1とは通知するメッセージが異なる。詳細は動作の説明で述べる。なお、実施例1と同様に説明を簡易にするためシミュレータを2つとしている。   The message recording unit 1512 of the simulator management unit manages messages that are transmitted to and received from the plurality of simulator units described above. However, the notification message is different from that in the first embodiment. Details will be described in the explanation of the operation. As in the first embodiment, two simulators are used to simplify the description.

<動作の説明>
実施例4の事前準備の動作フローは、実施例1で説明した図4のうち、加工方法を指定するステップS406を除いた処理を行う。
<Description of operation>
The operation flow of the preliminary preparation in the fourth embodiment performs the process of FIG. 4 described in the first embodiment except for step S406 for specifying the processing method.

図16は、実施例4のシミュレーション実行の動作フローの一例を示す図である。図16に示すステップS1601からS1611は、実施例1の図7に示すステップS708を除き、同様の動作フローである。図7に示すメッセージの加工ステップS708は本実施例では行わない。その代わり、本実施例ではステップS1603およびステップS1610におけるメッセージの扱い方を変更し、遅延を小さくする。   FIG. 16 is a diagram illustrating an example of an operation flow of simulation execution according to the fourth embodiment. Steps S1601 to S1611 shown in FIG. 16 are the same operation flow except for step S708 shown in FIG. 7 of the first embodiment. The message processing step S708 shown in FIG. 7 is not performed in this embodiment. Instead, in this embodiment, the way of handling messages in steps S1603 and S1610 is changed to reduce the delay.

先にステップS1610におけるシミュレーション進行メッセージの扱い方の変更について説明する。図7に示すステップS710では、最も進行が遅れているシミュレータからの同期要求信号に応答するシミュレーション進行メッセージを送信する処理を行う例について説明した。図16のステップS1610ではメッセージの仮想時刻に関わらず、まだ通知されていない信号全てをシミュレータ管理部1510から各シミュレータに通知する。どのような通知が行われるかは後の具体的な動作説明で述べる。   First, a change in how the simulation progress message is handled in step S1610 will be described. In step S710 illustrated in FIG. 7, the example in which the process of transmitting the simulation progress message in response to the synchronization request signal from the simulator with the slowest progress has been described. In step S1610 in FIG. 16, all signals not yet notified are notified from the simulator management unit 1510 to each simulator regardless of the virtual time of the message. What kind of notification is performed will be described later in the specific operation description.

続いてステップS1603では、各シミュレータのメッセージ記録部1534、1554に記録されたメッセージから、シミュレーション実行部1532、1552は外部からの入力信号として使用するメッセージを選択する。このとき、シミュレーション実行部1532、1552は、仮想時刻管理部1533、1553が管理する仮想時刻を元に使用するメッセージを選択する。具体的な動作について図17のフロー図を用いて説明する。図 18はステップS1603の詳細な動作フローを示している。   In step S1603, the simulation execution units 1532 and 1552 select a message to be used as an external input signal from the messages recorded in the message recording units 1534 and 1554 of each simulator. At this time, the simulation execution units 1532 and 1552 select a message to be used based on the virtual time managed by the virtual time management units 1533 and 1553. A specific operation will be described with reference to the flowchart of FIG. FIG. 18 shows a detailed operation flow of step S1603.

ステップS1750では、各シミュレータはシミュレータ管理部1510から通知されたシミュレーション進行メッセージをメッセージ記録部1534、1554に記録する。   In step S1750, each simulator records the simulation progress message notified from the simulator management unit 1510 in the message recording units 1534 and 1554.

ステップS1751では、メッセージ選定部1536、1556がメッセージ記録部1534、1554で記録しているメッセージの中から次のステップS1752のシミュレーション演算で用いられる、外部シミュレータからの入力信号を選択する。入力信号は自身の現在の仮想時刻を超えない仮想時刻を有するメッセージが選択される。   In step S1751, the message selection units 1536 and 1556 select an input signal from the external simulator that is used in the next simulation calculation in step S1752 from the messages recorded by the message recording units 1534 and 1554. As the input signal, a message having a virtual time that does not exceed its current virtual time is selected.

ステップS1752では、ステップS1751で選択した入力信号を元にシミュレーション内部演算を行う。一般的にシミュレータはシミュレーション対象に合わせて、同期間隔よりも細かく仮想時刻を進めながらシミュレーション演算を行う。以下、このシミュレーション演算のことを内部演算と呼ぶ。   In step S1752, a simulation internal calculation is performed based on the input signal selected in step S1751. In general, a simulator performs a simulation calculation while advancing virtual time more finely than the synchronization interval in accordance with the simulation target. Hereinafter, this simulation calculation is referred to as an internal calculation.

ステップS1753では、ステップS1752で内部演算を行った結果、仮想時刻が同期タイミングに到達したか否かを判定する。到達した場合はシミュレーション演算を終了し、ステップS1604の処理に移る。到達していない場合はS1751に戻り、同様の動作を繰り返す。   In step S1753, it is determined whether the virtual time has reached the synchronization timing as a result of performing the internal calculation in step S1752. When it reaches, the simulation calculation is terminated, and the process proceeds to step S1604. If not, the process returns to S1751 to repeat the same operation.

以上のようにシミュレーション内部演算が行われる度に、入力信号として採用すべきメッセージを見直すことで遅延を少なくすることができる。   As described above, the delay can be reduced by reviewing the message to be adopted as the input signal each time the simulation internal calculation is performed.

<具体的な動作説明>
具体的な動作について以下に述べる。具体的な動作について実施例1と同様に、メカシミュレータ1530は時刻880msまでシミュレーションが進み、シミュレータ管理部1510に対して同期要求メッセージを通知した時点まで動作したものと仮定する。またソフトウェアシミュレータ1550は時刻900msまでシミュレーションが進み、シミュレータ管理部1510に対して同期要求メッセージを通知した時点まで動作したものと仮定する。
<Specific operation explanation>
Specific operation will be described below. As for the specific operation, similarly to the first embodiment, it is assumed that the mechanical simulator 1530 operates until the time when the simulation progresses to the time of 880 ms and the synchronization request message is notified to the simulator management unit 1510. Further, it is assumed that the software simulator 1550 has been operated up to the time of 900 ms and has been operated until the time when the simulator management unit 1510 is notified of the synchronization request message.

この時点でのシミュレータ管理部1510の保持するメッセージ記録部1512に記録されているメッセージは、実施例1で説明した図11(a)および(b)と一部を除いて同じメッセージとなる。異なる点は、図11(b)の時刻840msのメッセージが、本実施例では通知済みとなっている点である。通知済みになっている理由については後述する。   The messages recorded in the message recording unit 1512 held by the simulator management unit 1510 at this point are the same except for some of the messages shown in FIGS. 11A and 11B described in the first embodiment. The difference is that the message at time 840 ms in FIG. 11B is already notified in this embodiment. The reason why it has been notified will be described later.

またメカシミュレータ1530は図18に示すように内部的に10ms単位で内部演算を行い、80ms単位で他のシミュレータと同期を取ることを仮定している。   Further, it is assumed that the mechanical simulator 1530 internally performs internal computation in units of 10 ms as shown in FIG. 18 and synchronizes with other simulators in units of 80 ms.

この仮定の下、続く処理を説明する。   The following process will be described under this assumption.

ステップS1607では、同期要求メッセージを受け付けたシミュレータ管理部1510は仮想時刻を比較する。ここではメカシミュレータ1530の仮想時刻880msとソフトウェアシミュレータ1550の仮想時刻900msを比較し、最も遅れているシミュレータをメカシミュレータ1530に特定する。   In step S1607, the simulator management unit 1510 that has received the synchronization request message compares virtual times. Here, the virtual time 880 ms of the mechanical simulator 1530 and the virtual time 900 ms of the software simulator 1550 are compared, and the most delayed simulator is specified as the mechanical simulator 1530.

ステップS1610では通知するシミュレーション進行メッセージは、それぞれのシミュレータが保持する仮想時刻に関係なく、未通知であるメッセージを全て通知する。図11の例で説明する。なお、実施例4では、上述したように図11の時刻840msは通知済み(TRUE)になっているものとする。ここで、最も遅れているメカシミュレータに時刻880msで通知されるシミュレーション進行メッセージには、ソフトウェアシミュレータの時刻900msの信号が含まれる。なお、シミュレータ管理部1510には、それぞれのシミュレータからの同期要求メッセージが通知され、記録されている点に留意されたい。。従って、メカシミュレータの時刻880msに対応するシミュレーション進行メッセージとしてソフトウェアシミレータの時刻900msに対応する信号を含めることができる。したがって、図11の例では、メカシミュレータの時刻880msの同期要求メッセージに応答するシミュレーション進行メッセージに、未通知の信号であるソフトウェアシミュレータの時刻900msの信号(1113)が含まれることになる。また、シミュレータ管理部1510のメッセージ記録部1512は、この場合、図11の1113を通知済みに更新する。実施例4の説明で、図11の1112が既に通知済みになっていた理由はこれと同じ理由である。すなわち本実施例における仮定では、メカシミュレータ1530の時刻800msに対するシミュレーション進行メッセージで既に通知していたためである(図18の1803参照)。   The simulation progress message to be notified in step S1610 notifies all unreported messages regardless of the virtual time held by each simulator. This will be described with reference to the example of FIG. In the fourth embodiment, as described above, it is assumed that the time 840 ms in FIG. 11 is notified (TRUE). Here, the simulation progress message notified to the most delayed mechanical simulator at 880 ms includes a signal at 900 ms of the software simulator. It should be noted that the simulator management unit 1510 is notified and recorded the synchronization request message from each simulator. . Therefore, a signal corresponding to the time 900 ms of the software simulator can be included as a simulation progress message corresponding to the time 880 ms of the mechanical simulator. Therefore, in the example of FIG. 11, the simulation progress message responding to the synchronization request message of the mechanical simulator at the time 880 ms includes the signal (1113) of the software simulator at the time 900 ms that is an unreported signal. In this case, the message recording unit 1512 of the simulator management unit 1510 updates 1113 in FIG. In the description of the fourth embodiment, the reason why 1112 in FIG. 11 has already been notified is the same reason. In other words, the assumption in this embodiment is that the mechanical simulator 1530 has already notified the simulation progress message for the time 800 ms (see 1803 in FIG. 18).

続いて図17を用いてシミュレーション進行メッセージの通知を受けたメカシミュレータ1530の動作について説明する。   Next, the operation of the mechanical simulator 1530 that has received the notification of the simulation progress message will be described with reference to FIG.

ステップS1750では、メカシミュレータ1530は、通知されたシミュレーション進行メッセージをメッセージ記録部1534に記録する。記録されるメッセージの例を図 19(a)に示す。図19(a)の1920に示されるようにシミュレーション進行メッセージに基づいて入力を受け付けたい信号の値が記録される。ここでは、時刻880msの同期要求メッセージの応答でソフトウェアシミュレータの時刻900msのメッセージが記録される。   In step S1750, the mechanical simulator 1530 records the notified simulation progress message in the message recording unit 1534. An example of the recorded message is shown in FIG. As shown at 1920 in FIG. 19A, the value of a signal to be received based on the simulation progress message is recorded. Here, a message of 900 ms of the software simulator is recorded in response to the synchronization request message of 880 ms.

ステップS1751では、メッセージ選定部1536は、シミュレーション演算に用いるメッセージを選択する。選択の方法はメカシミュレータ1530が持つ仮想時刻とステップS1750で記録されたメッセージとに基づいて行う。この時点でメカシミュレータ1530が持つ仮想時刻は、同期要求メッセージを通知した880msである。実施例1で説明したように、各シミュレータは同期要求メッセージを通知した後は、同期進行メッセージまたは終了メッセージを受信するまで待機している点に留意されたい。したがって、メッセージ選定部1536は、この880msを超えない最新の仮想時刻を持つメッセージを参照する。図19(a)を参照すると時刻880msを超えないメッセージは時刻840msにおけるメッセージ1910である。すなわち、時刻840msのメッセージが選択される。   In step S1751, the message selection unit 1536 selects a message used for the simulation calculation. The selection method is performed based on the virtual time held by the mechanical simulator 1530 and the message recorded in step S1750. At this time, the virtual time of the mechanical simulator 1530 is 880 ms when the synchronization request message is notified. As described in the first embodiment, it should be noted that each simulator waits until receiving a synchronization progress message or an end message after notifying the synchronization request message. Therefore, the message selection unit 1536 refers to the message having the latest virtual time not exceeding 880 ms. Referring to FIG. 19A, the message that does not exceed time 880 ms is the message 1910 at time 840 ms. That is, a message at time 840 ms is selected.

ステップS1752では、ステップS1751で選択されたメッセージを元に、10ms分の内部演算を行う。すなわち、メカシミュレータ1530のシミュレーション実行部1532はモーターの駆動開始割り込み信号の入力をメッセージ2010に含まれるLowとして内部演算を行う。ここでは内部演算によって仮想時刻が890msまで進むことになる(図18の1801参照)。   In step S1752, an internal calculation for 10 ms is performed based on the message selected in step S1751. That is, the simulation execution unit 1532 of the mechanical simulator 1530 performs an internal calculation by setting the input of the motor drive start interrupt signal to Low included in the message 2010. Here, the virtual time advances to 890 ms by internal calculation (see 1801 in FIG. 18).

ステップS1753では同期タイミングに到達したかの判定を行う。メカシミュレータ1530は次の同期タイミングが仮想時刻960msであることから、ここでは同期タイミングに到達していない。このためステップS1751から再度、処理を継続する。   In step S1753, it is determined whether the synchronization timing has been reached. The mechanical simulator 1530 does not reach the synchronization timing here because the next synchronization timing is the virtual time 960 ms. For this reason, the processing is continued again from step S1751.

続くステップS1751では再度、メカシミュレータが持つ仮想時刻890msを超えないメッセージ(図19(a)の1910)が選択される。この選択されたメッセージを元に10ms分の内部演算を行い、仮想時刻が900msまで進む(図18の1802参照)。ここでも同期タイミングである仮想時刻960msに到達していないことから、再度ステップS1751からの処理を継続する。   In the subsequent step S1751, a message (1910 in FIG. 19A) that does not exceed the virtual time 890 ms of the mechanical simulator is selected again. Based on the selected message, an internal calculation for 10 ms is performed, and the virtual time advances to 900 ms (see 1802 in FIG. 18). Again, since the virtual time 960 ms, which is the synchronization timing, has not been reached, the processing from step S1751 is continued again.

続くステップS1751では、メカシミュレータが持つ仮想時刻が900msであることから、選択されるメッセージは仮想時刻900msを越えない最新の仮想時刻を持つ図19(a)のメッセージ1920である。   In subsequent step S1751, since the virtual time of the mechanical simulator is 900 ms, the selected message is the message 1920 in FIG. 19A having the latest virtual time not exceeding the virtual time 900 ms.

すなわちメカシミュレータ1530は仮想時刻900msから、モーター駆動開始割り込み信号をLowからHighに切り替えて10ms分の内部演算を行う(ステップS1752)。   That is, the mechanical simulator 1530 performs an internal calculation for 10 ms by switching the motor drive start interrupt signal from low to high from the virtual time of 900 ms (step S1752).

以降、次の同期タイミングである仮想時刻960msまでステップS1751からステップSS1753を繰り返し、シミュレーション演算動作を終了する。   Thereafter, steps S1751 to S1753 are repeated until the next synchronization timing, which is the virtual time of 960 ms, and the simulation calculation operation ends.

このような動作により、図19(b−1)に示されるソフトウェアシミュレータ1550の出力信号に対して、メカシミュレータ1530は図19(b−2)に示されるように所望の信号を受け付けることができる。図19(b)は、実施例1で説明した図13(b)と比較してメカシミュレータのモータ駆動割り込みの信号の遅延が小さくなっていることがわかる。   By such an operation, the mechanical simulator 1530 can accept a desired signal as shown in FIG. 19 (b-2) with respect to the output signal of the software simulator 1550 shown in FIG. 19 (b-1). . FIG. 19B shows that the delay of the motor drive interrupt signal of the mechanical simulator is smaller than that in FIG. 13B described in the first embodiment.

本実施例によると取りこぼしを無くし、かつ遅延を小さくするシミュレーション装置の提供が可能である。   According to the present embodiment, it is possible to provide a simulation device that eliminates missing and reduces delay.

実施例4では内部演算間隔が同期間隔よりも小さい場合に有効な形態を説明した。しかしながら内部演算間隔が同期間隔と比べて十分に小さくない場合には取りこぼしが発生する事態が生じる。   In the fourth embodiment, the mode effective when the internal calculation interval is smaller than the synchronization interval has been described. However, when the internal calculation interval is not sufficiently smaller than the synchronization interval, a situation occurs in which the overwriting occurs.

例えば図20で示すような同期タイミングおよび内部演算タイミングを持つシミュレータの場合にシミュレータ間で取りこぼしが発生する。ここでは実施例4で説明したソフトウェアシミュレータは900msの同期タイミングのみが940msにずれた場合を仮定している。つまりソフトウェアシミュレータは仮想時刻940msで初めてモーター駆動割り込み信号がHighになり、960ms以降はLowに戻る。またメカシミュレータの内部演算は図20に示すように40ms単位で行われることを仮定している。   For example, in the case of a simulator having synchronization timing and internal calculation timing as shown in FIG. Here, the software simulator described in the fourth embodiment assumes that only the synchronization timing of 900 ms is shifted to 940 ms. In other words, the motor simulator interrupt signal becomes high for the first time at a virtual time of 940 ms, and the software simulator returns to low after 960 ms. Further, it is assumed that the internal calculation of the mechanical simulator is performed in units of 40 ms as shown in FIG.

この図20において、メカシミュレータは時刻880msでソフトウェアシミュレータから時刻940msの出力信号を受信する。実施例4と同様にメカシミュレータはソフトウェアシミュレータの時刻840msの出力信号を外部からの入力としてシミュレーション演算を行う。メカシミュレータは内部演算を進める上で時刻940msを過ぎたところからソフトウェアシミュレータの時刻940msの出力信号を用いて演算を進めたい。しかし、ここで示すメカシミュレータは880ms、920ms、960msのタイミングで内部演算を進めているため、940msを過ぎるのは次の同期タイミングである960msとなる。時刻960msではソフトウェアシミュレータから時刻960msの出力信号が新たに通知されるため、940msの信号が取りこぼしになってしまう。   In FIG. 20, the mechanical simulator receives an output signal at time 940 ms from the software simulator at time 880 ms. Similar to the fourth embodiment, the mechanical simulator performs a simulation calculation using the output signal of the software simulator at time 840 ms from the outside. The mechanical simulator wants to advance the calculation using the output signal at the time 940 ms of the software simulator from the time when the time 940 ms has passed in advance of the internal calculation. However, since the mechanical simulator shown here advances the internal calculation at timings of 880 ms, 920 ms, and 960 ms, the next synchronization timing is 960 ms after 940 ms. At time 960 ms, the output signal at time 960 ms is newly notified from the software simulator, so the signal at 940 ms is missed.

実施例5では、このような場合であっても取りこぼしを防ぐシミュレーション装置を提供する。   In the fifth embodiment, a simulation apparatus is provided that prevents missing even in such a case.

<構成の説明>
図21は実施例5にかかる構成図を示す。実施例4の図15に示す構成と比較して、各シミュレータからメッセージ選定部が除かれ、加工方法指定部2136、2156と、加工部2137、2157とが各シミュレータに追加されている。
<Description of configuration>
FIG. 21 shows a configuration diagram according to the fifth embodiment. Compared with the configuration shown in FIG. 15 of the fourth embodiment, the message selection unit is removed from each simulator, and processing method designation units 2136 and 2156 and processing units 2137 and 2157 are added to each simulator.

図21に示す各構成は、実施例4で説明したものと同様の処理を行うことができるので、重複する説明は省略する。   Since each configuration shown in FIG. 21 can perform the same processing as that described in the fourth embodiment, a duplicate description is omitted.

加工方法指定部2136、2156は取りこぼしを防ぐため、シミュレーション演算に用いるメッセージを加工する方法を指定する。   The processing method designating units 2136 and 2156 designate a method for processing a message used for the simulation calculation in order to prevent missing.

加工部2137、2157は取りこぼしを防ぐため、シミュレーション演算に用いるメッセージを加工する。   The processing units 2137 and 2157 process a message used for simulation calculation in order to prevent missing.

なお、実施例4と同様に説明を簡易にするためシミュレータを2つとしている。   As in the case of the fourth embodiment, two simulators are used for simplicity of explanation.

<動作の説明>
本実施例における動作手順について説明する。まず、実施例4と同様に事前準備の動作フローを行う。なお、フローの流れとしては、実施例1で説明した図4のフローチャートと同様の処理とすることができる。ただし、本実施例では、加工方法の指定がシミュレータ管理部ではなく、各シミュレータ側で行われる点で、実施例1の処理とは相違する。
<Description of operation>
The operation procedure in the present embodiment will be described. First, the preparatory operation flow is performed as in the fourth embodiment. The flow of the flow can be the same processing as the flowchart of FIG. 4 described in the first embodiment. However, the present embodiment is different from the processing of the first embodiment in that the processing method is specified not on the simulator management unit but on each simulator side.

次に、シミュレーション実行の動作フローについて説明する。実施例5のシミュレーション実行の動作フローは、実施例4の図16にと同様の動作フローである。ただし、ステップS1603で行われるシミュレーション演算の動作が異なる。実施例5におけるステップS1603で行われる動作の詳細フローを図22に示す。この図22を元にシミュレーション演算処理の詳細を説明する。   Next, the operation flow of simulation execution will be described. The operation flow of the simulation execution of the fifth embodiment is the same as that shown in FIG. 16 of the fourth embodiment. However, the operation of the simulation calculation performed in step S1603 is different. FIG. 22 shows a detailed flow of the operation performed in step S1603 in the fifth embodiment. Details of the simulation calculation processing will be described with reference to FIG.

ステップS2250では各シミュレータは通知されたシミュレーション進行メッセージをメッセージ記録部2134、2154に記録する。この時、記録するメッセージには未使用であることを示すパラメータを含める。未使用とは、後に続くシミュレーション内部演算ステップS2252において、内部演算に用いられるメッセージとして使用されていないことを示す。逆に内部演算に用いられたメッセージには使用済みを意味するパラメータを保持する。詳細は後述する。   In step S2250, each simulator records the notified simulation progress message in the message recording units 2134 and 2154. At this time, a parameter indicating that the message is not used is included in the message to be recorded. “Unused” indicates that it is not used as a message used for internal calculation in the subsequent simulation internal calculation step S2252. Conversely, the message used for the internal calculation holds a parameter indicating used. Details will be described later.

ステップS2251では各シミュレータの加工部2137、2157がメッセージの加工を行う。加工の前準備として加工対象となるメッセージが存在するかを確認する。この確認は、実施例1で説明した図7のステップS708において未通知メッセージを未使用に、通知済みメッセージを使用済みに読み替えた処理と同等である。すなわちメッセージの加工は次に示す2つの条件に基づき加工対象の抽出を行う。第一の条件はメッセージを受信する側のシミュレータの仮想時刻よりも以前の仮想時刻を持つメッセージである。第二の条件は未使用を意味するパラメータを保持するメッセージのみである。この2つを満たすメッセージが2つ以上ある場合は、その2つ以上のメッセージを対象に加工する。1つ以下の場合は加工を行わない。なお、加工は事前準備の動作フローで指定された方法を元に行われる。なお、本実施例では、実施例1と異なり各シミュレータ内での内部演算を考慮する点に留意されたい。すなわち、本実施例では、第一の条件の受信する側のシミュレータの仮想時刻は、内部演算によって変化する点に留意されたい。   In step S2251, the processing units 2137 and 2157 of each simulator process the message. Check whether there is a message to be processed as preparation before processing. This confirmation is equivalent to the processing in which the unreported message is replaced with unused and the notified message is replaced with used in step S708 of FIG. 7 described in the first embodiment. That is, message processing is performed by extracting processing objects based on the following two conditions. The first condition is a message having a virtual time earlier than the virtual time of the simulator on the message receiving side. The second condition is only a message that holds a parameter that means unused. If there are two or more messages that satisfy these two, process the two or more messages. If the number is less than 1, no processing is performed. The processing is performed based on the method specified in the preparatory operation flow. Note that, in this embodiment, unlike the first embodiment, internal calculations in each simulator are considered. That is, in this embodiment, it should be noted that the virtual time of the simulator on the receiving side of the first condition is changed by an internal calculation.

ステップS2252では、実施例4と同様に内部演算に採用するメッセージを決定する。メッセージの決定はステップS2251で加工が行われたか否かによって異なる。加工が行われた場合は加工結果を入力信号として選択する。加工が行われなかった場合は実施例4と同様に、メッセージ記録部2134、2154で記録しているメッセージの中で自身の仮想時刻を超えないメッセージを入力信号として選択する。加工の対象になったメッセージあるいは選択されたメッセージには、使用済であることを示すパラメータで上書きする。   In step S2252, the message to be used for the internal calculation is determined as in the fourth embodiment. The determination of the message differs depending on whether or not processing has been performed in step S2251. When processing is performed, the processing result is selected as an input signal. When the processing is not performed, as in the fourth embodiment, a message that does not exceed its own virtual time among the messages recorded by the message recording units 2134 and 2154 is selected as an input signal. The message to be processed or the selected message is overwritten with a parameter indicating that it has been used.

ステップS2253ではステップS2252で決定した入力信号を元に内部演算を行う。   In step S2253, internal calculation is performed based on the input signal determined in step S2252.

ステップS2254ではステップS2253でシミュレーション演算を行った結果、仮想時刻が同期タイミングに到達したか否かを判定する。到達した場合はシミュレーション演算を終了し、ステップS1604の処理に移る。到達していない場合はS2251に戻り、同様の動作を繰り返す。   In step S2254, it is determined whether or not the virtual time has reached the synchronization timing as a result of the simulation calculation in step S2253. When it reaches, the simulation calculation is terminated, and the process proceeds to step S1604. If not, the process returns to S2251 and repeats the same operation.

以上のように内部演算が行われる度に、入力信号として採用すべきメッセージに取りこぼしになる信号がある場合にメッセージを加工することで取りこぼしを防ぐことができる。   As described above, every time an internal operation is performed, if there is a signal to be missed in the message to be adopted as the input signal, the message can be prevented from being missed.

<具体的な動作>
具体的な動作について説明する。
<Specific operation>
A specific operation will be described.

実施例1と同様に、事前に各シミュレータの加工方法指定部2136、2156によって各信号に対する加工方法を指定する。ここでは実施例1と同様に最大値を指定することとする。また実施例4と同様にメカシミュレータ2130は仮想時刻880ms、ソフトウェアシミュレータ2150は仮想時刻900msまでシミュレーションが進んだものと仮定する。すなわち、これらの仮想時刻において各シミュレータがシミュレータ管理部2110に対して同期要求メッセージを通知した時点まで動作したものと仮定し、これに続く処理を説明する。なお同期タイミングおよび演算間隔は図20に示す通りである。   As in the first embodiment, the processing method for each signal is specified in advance by the processing method specifying units 2136 and 2156 of each simulator. Here, the maximum value is designated as in the first embodiment. Similarly to the fourth embodiment, it is assumed that the simulation has progressed to the virtual time 880 ms for the mechanical simulator 2130 and the virtual time 900 ms for the software simulator 2150. That is, it is assumed that each simulator has been operated up to the time when the simulator management unit 2110 is notified of the synchronization request message at these virtual times, and the subsequent processing will be described. The synchronization timing and calculation interval are as shown in FIG.

ステップS2250では実施例4と同じくメカシミュレータ2130は仮想時刻880msにおいて、ソフトウェアシミュレータ2150から仮想時刻940msの出力信号を含むシミュレーション進行メッセージを受信する(2108)。この受信したメッセージをメッセージ記録部2134に記録する。図23(a)は、メカシミュレータの時刻940msにおけるメッセージの記録内容を示す図である。この時、図23(a)に示されるように記録するメッセージには未使用であることを示すパラメータ(2304)を含める。なおソフトウェアシミュレータ2150の仮想時刻840msの信号(2301)は、図20に示すように、メカシミュレータ2130が時刻800msの時に通知を受けている(2307)。よって、メカシミュレータの時刻840ms(2302)の内部演算で既に使用済みであることから、図23(a)では使用済みを示すパラメータが記録されている。   In step S2250, the mechanical simulator 2130 receives the simulation progress message including the output signal of the virtual time 940ms from the software simulator 2150 at the virtual time 880ms as in the fourth embodiment (2108). The received message is recorded in the message recording unit 2134. FIG. 23A is a diagram showing the recorded contents of the message at the time 940 ms of the mechanical simulator. At this time, as shown in FIG. 23A, the message to be recorded includes a parameter (2304) indicating that it is not used. As shown in FIG. 20, the signal (2301) of the virtual time 840 ms of the software simulator 2150 is notified when the mechanical simulator 2130 is time 800 ms (2307). Therefore, since it has already been used in the internal calculation at the time 840 ms (2302) of the mechanical simulator, a parameter indicating that it has been used is recorded in FIG.

ステップS2251ではステップS2250で記録されたメッセージ(すなわち、図23(a)で示すメッセージ)の加工を行う。しかし第一の条件である時刻880ms以下、かつ第二の条件である未使用のメッセージは存在しない。加工対象となるメッセージが存在しないことから加工は行わない。   In step S2251, the message recorded in step S2250 (that is, the message shown in FIG. 23A) is processed. However, there is no unused message which is the first condition and below time 880 ms and which is the second condition. Processing is not performed because there is no message to be processed.

ステップS2252では後に続くシミュレーション内部演算に用いる外部からの入力信号用メッセージを決定する。S2251で加工が行われなかったことから、メッセージ記録部2134に記録される時刻840msのメッセージ(図23(a)の2301)を決定する。   In step S2252, an external input signal message used for subsequent simulation internal computation is determined. Since no processing has been performed in S2251, a message (2301 in FIG. 23A) at 840 ms recorded in the message recording unit 2134 is determined.

ステップS2253では、ステップS2252で決定されたメッセージ2301を用いてシミュレーション内部演算を行う。すなわちモーター駆動開始割り込み信号としてLowの値をシミュレーション演算に用いる。演算は図20に従って行われ、仮想時刻が920msまで進む(2001)。   In step S2253, the simulation internal calculation is performed using the message 2301 determined in step S2252. That is, the low value is used for the simulation calculation as the motor drive start interrupt signal. The calculation is performed according to FIG. 20, and the virtual time advances to 920 ms (2001).

ステップS2254では同期タイミングに到達したか否かの判定を行う。メカシミュレータ2130の次の同期タイミングは960msであり、現在の仮想時刻が920msであることから同期タイミングに到達していない。このため再度、ステップS2251からの処理を繰り返す。   In step S2254, it is determined whether or not the synchronization timing has been reached. The next synchronization timing of the mechanical simulator 2130 is 960 ms, and since the current virtual time is 920 ms, the synchronization timing has not been reached. For this reason, the processing from step S2251 is repeated again.

続くステップS2251ではメッセージの加工を行う。メカシミュレータ2130の仮想時刻920msにおいても、加工対象となる第一の条件である時刻920ms以下、かつ第二の条件である未使用を満たすメッセージが存在しないため、加工は行わない。   In subsequent step S2251, the message is processed. Even at the virtual time 920 ms of the mechanical simulator 2130, the processing is not performed because there is no message that satisfies the first condition, ie, the time 920 ms or less, and the second condition that is not used.

続くステップS2252では同様にメッセージ記録部2134に記録される時刻840msのメッセージ(図23(a)の2301)が決定される。   In the subsequent step S2252, a message (2301 in FIG. 23A) of the time 840 ms recorded in the message recording unit 2134 is determined in the same manner.

続くステップS2253では同様にステップS2252で決定されたメッセージを用いてシミュレーション内部演算を行う。すなわちモーター駆動開始割り込み信号としてLowの値をシミュレーション演算に用いる。演算は図20に従って行われ、仮想時刻が960msまで進む(2004)。   In the subsequent step S2253, similarly, the simulation internal calculation is performed using the message determined in step S2252. That is, the low value is used for the simulation calculation as the motor drive start interrupt signal. The calculation is performed according to FIG. 20, and the virtual time advances to 960 ms (2004).

ここでステップS2254では同期タイミングに到達したかの判定を行う。ここでは同期タイミングに到達していることからシミュレーション演算処理を終了する。   In step S2254, it is determined whether the synchronization timing has been reached. Here, since the synchronization timing has been reached, the simulation calculation process is terminated.

続いてこれまでと同様にメカシミュレータ2130が同期要求メッセージを通知する(ステップS1605)。続いてシミュレータ管理部2110は通知された同期要求メッセージを記録する(ステップS1606)。続いてメカシミュレータ2130の仮想時刻960msとソフトウェアシミュレータの仮想時刻940msの比較(ステップS1607)によって、ソフトウェアシミュレータ2150に対してシミュレーション進行メッセージを通知する(S1610)。   Subsequently, the mechanical simulator 2130 notifies the synchronization request message as before (step S1605). Subsequently, the simulator management unit 2110 records the notified synchronization request message (step S1606). Subsequently, a simulation progress message is notified to the software simulator 2150 by comparing the virtual time 960ms of the mechanical simulator 2130 and the virtual time 940ms of the software simulator (step S1607) (S1610).

続いてシミュレーション進行メッセージを受信したソフトウェアシミュレータ2150はシミュレーション演算を行い、次の同期タイミングである仮想時刻960msまで進める(ステップS1603)。時刻960msに到達すると、ソフトウェアシミュレータ2150は、シミュレータ管理部2110に対して同期要求メッセージを通知する(ステップS1603)。同期要求メッセージの通知を受けたシミュレータ管理部2110は通知されたメッセージをメッセージ記録部2112に記録する(ステップS1605)。   Subsequently, the software simulator 2150 that has received the simulation progress message performs a simulation calculation and advances to the virtual time 960 ms which is the next synchronization timing (step S1603). When the time 960 ms is reached, the software simulator 2150 notifies the simulator management unit 2110 of a synchronization request message (step S1603). Upon receiving the notification of the synchronization request message, the simulator management unit 2110 records the notified message in the message recording unit 2112 (step S1605).

続いてステップS1607ではシミュレータ管理部2110は仮想時刻の比較を行う。ここではメカシミュレータ2130およびソフトウェアシミュレータ2150が共に仮想時刻960msを保持していることから両方のシミュレータが最も進行の遅いシミュレータとして特定される。   In step S1607, the simulator management unit 2110 compares virtual times. Here, since both the mechanical simulator 2130 and the software simulator 2150 hold the virtual time of 960 ms, both simulators are specified as the slowest progressing simulator.

続いてステップS1610ではメカシミュレータ2130およびソフトウェアシミュレータ2150の両方にシミュレーション進行メッセージを通知する。   In step S1610, a simulation progress message is notified to both the mechanical simulator 2130 and the software simulator 2150.

以下、メカシミュレータ2130に着目して説明するとステップS1603の詳細処理(図22)におけるステップS2250において、シミュレータ管理部2110から通知されたメッセージをメッセージ記録部2134に記録する。ここで記録されたメッセージを図23(b)に示す。図23(b)に示されるように図23(a)からソフトウェアシミュレータの仮想時刻960msのメッセージ(2309)が追加されている。また未使用を示すパラメータが記録されている(2310)。   The following description will be given focusing on the mechanical simulator 2130. In step S2250 in the detailed processing of FIG. 22 (FIG. 22), the message notified from the simulator management unit 2110 is recorded in the message recording unit 2134. The message recorded here is shown in FIG. As shown in FIG. 23 (b), a software simulator virtual time 960ms message (2309) is added from FIG. 23 (a). In addition, a parameter indicating unused is recorded (2310).

ステップS2251ではメッセージの加工を行う。まずは前述した条件に基づき図23(b)を参照して加工対象を抽出する。第一の条件である仮想時刻960ms以下、かつ第二の条件である未使用のメッセージは時刻940ms(2307)および時刻960ms(2309)の2つ存在する。対象となるメッセージが2つ存在することから、事前定義処理で指定した加工方法に基づいてメッセージを加工する。ここでは、それぞれの時刻におけるモーター駆動開始割り込み信号の値がHigh(2308)とLow(2309)であり、また加工方法として最大値を取得することを事前に指定していることから、Highに加工される。   In step S2251, the message is processed. First, a processing target is extracted with reference to FIG. There are two unused messages of the first condition, the virtual time 960 ms or less, and the second condition, a time 940 ms (2307) and a time 960 ms (2309). Since there are two target messages, the message is processed based on the processing method specified in the predefined process. Here, the values of the motor drive start interrupt signal at each time are High (2308) and Low (2309), and since the maximum value is specified as the processing method in advance, it is processed to High. Is done.

ステップS2252で続くシミュレーション内部演算に用いられる入力信号用のメッセージが決定される。ここでは加工されたモーター駆動開始割り込み信号Highが選択される。   In step S2252, the message for the input signal used for the simulation internal calculation that follows is determined. Here, the processed motor drive start interrupt signal High is selected.

また時刻940ms(図23(b)の2307)および時刻960ms(図23(b)の2309)のメッセージが加工されたことから、未使用(図23(b)の2308および2310)を使用済みに更新する。   Also, since the messages at time 940 ms (2307 in FIG. 23B) and time 960 ms (2309 in FIG. 23B) have been processed, unused (2308 and 2310 in FIG. 23B) become used. Update.

同様の処理を続けると、メカシミュレータ2130は内部演算によって時刻1000msに進む(図23の2305参照)。この時刻では、加工対象となるメッセージが無いため時刻1000msを越えない時刻960msのメッセージが内部演算に使用される。すなわちモーター駆動開始割り込み信号Lowが内部演算に用いられる。   If the same processing is continued, the mechanical simulator 2130 advances to time 1000 ms by internal calculation (see 2305 in FIG. 23). At this time, since there is no message to be processed, a message of time 960 ms that does not exceed time 1000 ms is used for internal computation. That is, the motor drive start interrupt signal Low is used for internal calculation.

このような動作により、ソフトウェアシミュレータ2150が図23(c−1)に示す信号を出力していた場合、メカシミュレータ2130は図23(c−2)に示す所望の信号を受信することになり、目的の取りこぼしを防ぐことができている。   With such an operation, when the software simulator 2150 outputs the signal shown in FIG. 23 (c-1), the mechanical simulator 2130 receives the desired signal shown in FIG. 23 (c-2). The target is not missed.

また実施例2および3と同様に、利用者は取りこぼし対象となったメッセージや加工結果を図14(a)および(b)のような画面を用いて確認できる。   Further, as in the second and third embodiments, the user can confirm the message and the processing result that have been overlooked using the screens as shown in FIGS. 14 (a) and 14 (b).

実施例4や5に示すシミュレーション装置は、実施例1と比較して内部演算間隔によってはタイミング遅延を小さくできるという長所がある。その一方で、対象のシミュレータに対して個別にメッセージを管理・加工する仕組みを組み込むコストが必要になるという短所がある。この実施例4や5に示すシミュレータ側でのメッセージの管理・加工を、メッセージ調整機能と称する。特に市販されているシミュレータは改良が困難であり、組み込めるシミュレータと組み込めないシミュレータが混在する場合があり得る。   The simulation apparatuses shown in the fourth and fifth embodiments have an advantage that the timing delay can be reduced depending on the internal calculation interval as compared with the first embodiment. On the other hand, there is a disadvantage that it is necessary to incorporate a mechanism for managing and processing messages individually for the target simulator. Message management / processing on the simulator side shown in the fourth and fifth embodiments is referred to as a message adjustment function. In particular, a commercially available simulator is difficult to improve, and a simulator that can be incorporated and a simulator that cannot be incorporated may coexist.

この混在の可能性を鑑みて、利用者が適したシミュレーション構成を選択できることが望ましい。そこで本実施例では、利用者が連携するシミュレータに応じてシミュレーション構成を選択できるシミュレーション装置について説明する。   In view of this possibility of mixing, it is desirable that the user can select a suitable simulation configuration. Therefore, in this embodiment, a simulation apparatus capable of selecting a simulation configuration according to a simulator with which a user cooperates will be described.

<構成の説明>
図24は本実施例における構成の例である。この図24の例ではメカシミュレータ2430は実施例4や5示したメカシミュレータ(1530および2130)とは異なりメッセージ選定部、加工方法指定部、加工部を持たない。一方、ソフトウェアシミュレータ2450は実施例5で示したソフトウェアシミュレータ2150と同様の構成である。すなわちメカシミュレータ2430は実施例4および5の構成に対応しておらず、またソフトウェアシミュレータ2450は実施例5で示したシミュレータの構成に対応していることを示している。
<Description of configuration>
FIG. 24 shows an example of the configuration of this embodiment. In the example of FIG. 24, unlike the mechanical simulators (1530 and 2130) shown in the fourth and fifth embodiments, the mechanical simulator 2430 does not have a message selection unit, a processing method designation unit, and a processing unit. On the other hand, the software simulator 2450 has the same configuration as the software simulator 2150 shown in the fifth embodiment. That is, the mechanical simulator 2430 does not correspond to the configurations of the fourth and fifth embodiments, and the software simulator 2450 corresponds to the configuration of the simulator shown in the fifth embodiment.

なお、以降の説明では実施例4および5のどちらかの構成に対応しているシミュレータのことを対応済みのシミュレータと呼び、対応していないことを未対応のシミュレータと省略する。   In the following description, a simulator that supports either of the configurations of the fourth and fifth embodiments is referred to as a supported simulator, and a simulator that does not support it is omitted as an unsupported simulator.

シミュレータ管理部2410は、実施例1で説明した構成に加えて、切替部2417を有する。シミュレータ管理部2410は、次に説明する切替部2417によって、メッセージの管理方法を実施例1で示したメッセージ記録部312あるいは実施例5で示したメッセージ記録部2112の動作に切り替える。   The simulator management unit 2410 includes a switching unit 2417 in addition to the configuration described in the first embodiment. The simulator management unit 2410 switches the message management method to the operation of the message recording unit 312 shown in the first embodiment or the message recording unit 2112 shown in the fifth embodiment by a switching unit 2417 described below.

切替部2417は、連携する各シミュレータが対応済みか否かでメッセージ記録部2412が管理するメッセージを切り替える。例えばメッセージ記録部2412は未対応であるシミュレータに対しては、取りこぼしを防ぐために加工部2415で加工を行った上でメッセージを通知する。対応済みのシミュレータに対しては、メッセージの仮想時刻に関係なく未送信であれば通知を行う。対応済みのシミュレータについてはシミュレータ側でメッセージを加工あるいは内部演算に用いるメッセージの選択を行う。   The switching unit 2417 switches the message managed by the message recording unit 2412 depending on whether or not each of the linked simulators has been supported. For example, the message recording unit 2412 notifies the unsupported simulator of a message after processing by the processing unit 2415 in order to prevent missing. If the simulator has not yet been sent, a notification is sent to the corresponding simulator. For supported simulators, the message is processed on the simulator side or used for internal computation.

具体的な動作は以下の説明で述べる。なお、これまでの説明と同様にシミュレータは2つとは限らない。   Specific operations will be described in the following description. Note that the number of simulators is not limited to two as described above.

<動作の説明>
最初に事前準備の動作フローについて説明する。実施例6における動作フローは、図4に示すフローと同じである。ただし、一部異なる処理がある。以下、異なる処理を中心に説明する。
<Description of operation>
First, the preparatory operation flow will be described. The operation flow in the sixth embodiment is the same as the flow shown in FIG. However, there are some different processes. In the following, different processes will be mainly described.

本実施例においては、ステップS403では各シミュレータはシミュレータ管理部2410にシミュレーション参加要求メッセージを通知する。参加要求メッセージには自身のシミュレータが対応済みか否かを示すパラメータ(SIM_COR)を含める。図25は参加要求メッセージの例である。図25に示される通り、参加要求メッセージには対応済みか否かを表すパラメータ(SIM_COR)2501を含む。図25(a)ではメカシミュレータ2430は未対応(SIM_COR=FALSE)であり、図25(b)ではソフトウェアシミュレータは対応済み(SIM_COR=TRUE)であることが示されている。このように各シミュレータは対応済みか否かをシミュレータ管理部2410に通知する。   In this embodiment, each simulator notifies the simulator management unit 2410 of a simulation participation request message in step S403. The participation request message includes a parameter (SIM_COR) indicating whether or not its own simulator has been supported. FIG. 25 is an example of a participation request message. As shown in FIG. 25, the participation request message includes a parameter (SIM_COR) 2501 indicating whether or not it has been handled. FIG. 25A shows that the mechanical simulator 2430 is not supported (SIM_COR = FALSE), and FIG. 25B shows that the software simulator is supported (SIM_COR = TRUE). In this way, each simulator notifies the simulator management unit 2410 whether or not it has been handled.

ステップS406では加工方法の指定を行う。本実施例ではシミュレータ管理部2410が有する加工方法指定部2416およびソフトウェアシミュレータ2450が有する加工方法指定部2456の両方で加工方法を指定する。なお対応済みのシミュレータが複数ある場合はその全てのシミュレータで加工方法を指定する。   In step S406, a processing method is designated. In this embodiment, the machining method is designated by both the machining method designation unit 2416 of the simulator management unit 2410 and the machining method designation unit 2456 of the software simulator 2450. If there are multiple compatible simulators, the processing method is specified for all the simulators.

図26は、実施例6のシミュレーション実行の動作フローを示す図である。ステップS2601からS2607は、実施例5で説明した図16のステップS1601からS1607と同様の動作フローである。   FIG. 26 is a diagram illustrating an operation flow of the simulation execution according to the sixth embodiment. Steps S2601 to S2607 are the same operation flow as steps S1601 to S1607 of FIG. 16 described in the fifth embodiment.

ステップS2612では、シミュレータ管理部2410は、ステップS2607において特定される進行の遅いシミュレータが対応済みか否かで次のメッセージの加工ステップS2608を行うかどうかを切り替える。対応済みであればシミュレータ側でメッセージの取りこぼしを管理するため加工を行わない。未対応であればシミュレータ管理部2410で取りこぼしを防ぐため加工部2415でメッセージを加工する。加工の動作については実施例1と同様の処理である。   In step S2612, the simulator management unit 2410 switches whether or not the next message processing step S2608 is performed depending on whether or not the slow progressing simulator specified in step S2607 has been supported. If it has already been handled, no processing will be performed on the simulator to manage message loss. If it is not supported, the message is processed by the processing unit 2415 in order to prevent the simulator management unit 2410 from missing it. The processing operation is the same as in the first embodiment.

ステップS2609およびS2611は実施例5で説明した図16のステップS1609およびS1611と同様の処理である。   Steps S2609 and S2611 are the same processes as steps S1609 and S1611 of FIG. 16 described in the fifth embodiment.

ステップS2610では、シミュレータ管理部2410は各シミュレータにシミュレーション進行メッセージを通知する。ただし通知するメッセージは切替部2417によって切り替えられる。対応済みのシミュレータに対しては実施例4および5で示したようにメッセージの仮想時刻に関わらず、未送信のメッセージは全て通知する。未対応の場合には実施例1で示したように通知先のシミュレータの仮想時刻を超えない最新のメッセージを通知する。   In step S2610, the simulator management unit 2410 notifies each simulator of a simulation progress message. However, the message to be notified is switched by the switching unit 2417. As shown in the fourth and fifth embodiments, all the unsent messages are notified to the supported simulators, regardless of the virtual time of the messages. If not supported, the latest message not exceeding the virtual time of the notification destination simulator is notified as shown in the first embodiment.

シミュレーション進行メッセージの通知を受けたシミュレータは自身が対応済みか否かによってシミュレーション演算の動作が切り替わる。対応済みのシミュレータであれば実施例4あるいは5と同様のシミュレーション演算を行う。未対応の場合には実施例1と同様に途中で内部演算に用いるメッセージを切り替えることなくシミュレーション演算を行う。   The operation of the simulation calculation is switched depending on whether or not the simulator that has received the notification of the simulation progress message is already supported. If the simulator is already compatible, the same simulation calculation as in the fourth or fifth embodiment is performed. If not supported, the simulation calculation is performed without switching the message used for the internal calculation in the same way as in the first embodiment.

以上の動作によって切り替えを実現する。   Switching is realized by the above operation.

<具体的な動作>
具体的な動作を図27に示されるタイミングで同期および内部演算が行われる場合を例に、ソフトウェアシミュレータ2450の出力信号をメカシミュレータ2430に通知するメッセージに着目して説明する。ここではメカシミュレータ2430は200ms毎、ソフトウェアシミュレータ2450は60ms毎に同期を行い、またメカシミュレータ2430は50ms間隔で内部演算を行うことを仮定している。またソフトウェアシミュレータは時刻900msでのみモーター駆動開始割り込み信号をHighで出力し、それ以外の時刻ではLowを出力することを仮定している。さらにこれまでの説明と同様に、加工方法として最大値を取得することを指定している場合を例として説明する。
<Specific operation>
A specific operation will be described focusing on a message for notifying the mechanical simulator 2430 of the output signal of the software simulator 2450, taking as an example the case where synchronization and internal calculation are performed at the timing shown in FIG. Here, it is assumed that the mechanical simulator 2430 synchronizes every 200 ms, the software simulator 2450 synchronizes every 60 ms, and the mechanical simulator 2430 performs internal calculation at intervals of 50 ms. It is also assumed that the software simulator outputs a motor drive start interrupt signal at high only at time 900ms and outputs low at other times. Furthermore, similarly to the description so far, the case where the maximum value is specified as the processing method will be described as an example.

<メカシミュレータが未対応である場合について>
メカシミュレータ2430が未対応である場合について、メカシミュレータ2430の時刻1000msに通知されるシミュレーション進行メッセージに着目して説明する。
<When the mechanical simulator is not supported>
The case where the mechanical simulator 2430 is not supported will be described by focusing on the simulation progress message notified at the time 1000 ms of the mechanical simulator 2430.

この時(図27の2705)、ステップS2605でシミュレータ管理部2410のメッセージ記録部2412に記録されている、ソフトウェアシミュレータ2450から通知されたメッセージを図28に示す。   At this time (2705 in FIG. 27), the message notified from the software simulator 2450 recorded in the message recording unit 2412 of the simulator management unit 2410 in step S2605 is shown in FIG.

ステップS2612ではメカシミュレータ2430が未対応であることから続くメッセージの加工をS2608で行う。   In step S2612, since the mechanical simulator 2430 is not supported, the subsequent message is processed in step S2608.

ステップS2608では、まず、シミュレータ管理部2410は図28に示すメッセージ記録部2412の内容から加工対象のメッセージを抽出する。ここではソフトウェアシミュレータ2450の時刻840ms(2802)、900ms(2803)、960ms(2804)における3つの出力信号が加工対象である。順にLow、High、Lowの信号値であることから、その最大値であるHighに加工される。   In step S2608, first, the simulator management unit 2410 extracts a message to be processed from the contents of the message recording unit 2412 shown in FIG. Here, three output signals at time 840 ms (2802), 900 ms (2803), and 960 ms (2804) of the software simulator 2450 are to be processed. Since the signal values are Low, High, and Low in this order, they are processed to the maximum value, High.

続くステップS2610でメカシミュレータ2430に、S2408で加工されたメッセージが通知される。すなわちメカシミュレータ2430はモーター駆動開始割り込み信号としてHighの値を受け取りシミュレーションを進めることができる。   In subsequent step S2610, the mechanical simulator 2430 is notified of the message processed in S2408. That is, the mechanical simulator 2430 can receive the High value as the motor drive start interrupt signal and proceed with the simulation.

<メカシミュレータが対応済みである場合について>
次にメカシミュレータが対応済みである場合について、説明する。ここではメカシミュレータ2430の時刻800ms(図27の2701)および1000ms(図27の2705)に通知されるシミュレーション進行メッセージとシミュレーション演算動作に着目して説明する。
<When the mechanical simulator is already supported>
Next, the case where the mechanical simulator is already supported will be described. Here, a description will be given focusing on a simulation progress message and a simulation calculation operation notified at the time 800 ms (2701 in FIG. 27) and 1000 ms (2705 in FIG. 27) of the mechanical simulator 2430.

メカシミュレータ2430の仮想時刻800ms(図27の2701)において、ステップS2612ではメカシミュレータ2430が対応済みであることから、シミュレータ管理部2410はメッセージの加工は行わずに、次のステップに進む。   At the virtual time 800 ms (2701 in FIG. 27) of the mechanical simulator 2430, since the mechanical simulator 2430 has already been supported in step S2612, the simulator management unit 2410 proceeds to the next step without processing the message.

ステップS2710ではシミュレータ管理部2410はメカシミュレータ2430に対して未通知である時刻840msのメッセージを通知する。また、この時、時刻840msのメッセージが保持する未送信であることを示すパラメータは通知済みに上書きされる。以下、実施例5と同様の動作が行われる。   In step S2710, the simulator management unit 2410 notifies the mechanical simulator 2430 of an unreported message at time 840 ms. At this time, the parameter indicating that the message of time 840 ms is not transmitted is overwritten with the notification. Thereafter, the same operation as in the fifth embodiment is performed.

以上のように本実施例によれば、連携するシミュレータに合わせて最適な構成を提供できる。     As described above, according to the present embodiment, an optimum configuration can be provided in accordance with the simulator to be linked.

Claims (12)

複数のシミュレータを連携するシミュレーション装置であって、
前記複数のシミュレータから送信されるメッセージを記録する記録手段と、
前記記録手段に記録されたメッセージを連携する他のシミュレータに通知したか否かを示すパラメータであって、前記他のシミュレータの同期間隔と前記メッセージの送信元のシミュレータの同期間隔との違いに基づくパラメータに基づいて前記記録手段に記録されたメッセージを加工する加工手段と、
前記加工されたメッセージを、連携する他のシミュレータに送信する送信手段と
を有することを特徴とするシミュレーション装置。
A simulation device that links a plurality of simulators,
Recording means for recording messages transmitted from the plurality of simulators;
A parameter indicating whether or not the message recorded in the recording means has been notified to another simulator associated with the message , based on the difference between the synchronization interval of the other simulator and the synchronization interval of the simulator from which the message is transmitted Processing means for processing a message recorded in the recording means based on parameters ;
A simulation apparatus comprising: a transmission unit configured to transmit the processed message to another simulator that cooperates.
前記加工手段は、前記複数のシミュレータからの同期要求メッセージをそれぞれ受信した時点で前記加工を行うことを特徴とする請求項1に記載のシミュレーション装置。   The simulation apparatus according to claim 1, wherein the processing unit performs the processing at the time of receiving synchronization request messages from the plurality of simulators. 前記送信手段は、各シミュレータから送信される同期要求メッセージに応答して、前記加工されたメッセージを送信することを特徴とする請求項1または2に記載のシミュレーション装置。   The simulation apparatus according to claim 1, wherein the transmission unit transmits the processed message in response to a synchronization request message transmitted from each simulator. 前記加工手段は、前記加工されたメッセージを受信するシミュレータの仮想時刻以前の仮想時刻を有するメッセージのうち、前記連携する他のシミュレータに通知していないことを示すパラメータを有するメッセージが2つ以上ある場合に、該2つ以上あるメッセージに対して前記加工を行うことを特徴とする請求項3に記載のシミュレーション装置。   The processing means has two or more messages having a parameter indicating that notification is not made to other linked simulators among messages having a virtual time before the virtual time of the simulator that receives the processed message. The simulation apparatus according to claim 3, wherein the processing is performed on the two or more messages. 前記加工手段は、前記2つ以上あるメッセージに含まれる値を共通の値に加工することを特徴とする請求項4に記載のシミュレーション装置。   The simulation apparatus according to claim 4, wherein the processing unit processes a value included in the two or more messages into a common value. 前記加工手段は、前記加工したメッセージの前記パラメータを、通知済みに変更することを特徴とする請求項4または5に記載のシミュレーション装置。   The simulation apparatus according to claim 4, wherein the processing unit changes the parameter of the processed message to “notified”. 前記加工手段による加工方法を指定する加工方法指定手段をさらに有することを特徴とする請求項1から6のいずれか一項に記載のシミュレーション装置。   The simulation apparatus according to claim 1, further comprising a processing method specifying unit that specifies a processing method by the processing unit. 前記加工手段によって加工された内容を提示する提示手段をさらに有することを特徴とする請求項1から7のいずれか一項に記載のシミュレーション装置。   The simulation apparatus according to claim 1, further comprising a presentation unit that presents the content processed by the processing unit. 複数のシミュレータを連携するシミュレーション装置であって、
前記複数のシミュレータから送信されるメッセージを記録する記録手段と、
前記記録したメッセージを通知する先のシミュレータが、通知されるメッセージの調整機能を有するか否かを判定する判定手段と、
前記判定手段で前記メッセージの調整機能を有さないと判定したシミュレータからの同期要求メッセージに応答してメッセージを通知する場合に、
前記記録手段に記録されたメッセージを、連携する他のシミュレータに通知したか否かを示すパラメータであって、前記他のシミュレータの同期間隔と前記メッセージの送信元のシミュレータの同期間隔との違いに基づくパラメータに基づいて前記記録手段に記録されたメッセージを加工する加工手段と、
前記加工されたメッセージを、連携する他のシミュレータに送信する送信手段と
を有することを特徴とするシミュレーション装置。
A simulation device that links a plurality of simulators,
Recording means for recording messages transmitted from the plurality of simulators;
A determination means for determining whether or not the simulator to which the recorded message is notified has a function of adjusting the notified message;
When notifying the message in response to the synchronization request message from the simulator determined to have no adjustment function of the message in the determination means,
This is a parameter indicating whether or not the message recorded in the recording means has been notified to another simulator to be linked, and the difference between the synchronization interval of the other simulator and the synchronization interval of the simulator of the message transmission source Processing means for processing a message recorded in the recording means based on a parameter based thereon;
A simulation apparatus comprising: a transmission unit configured to transmit the processed message to another simulator that cooperates.
前記判定手段は、前記複数のシミュレータからの参加要求メッセージに含まれるパラメータに基づいて前記判定を行うことを特徴とする請求項に記載のシミュレーション装置。 The simulation apparatus according to claim 9 , wherein the determination unit performs the determination based on a parameter included in participation request messages from the plurality of simulators. 複数のシミュレータを連携するシミュレーション方法であって、
前記複数のシミュレータから送信されるメッセージを記録する記録ステップと、
前記記録したメッセージを通知する先のシミュレータが、通知されるメッセージの調整機能を有するか否かを判定する判定ステップと、
前記判定ステップにおいて前記メッセージの調整機能を有さないと判定したシミュレータからの同期要求メッセージに応答してメッセージを通知する場合に、
前記記録ステップにおいて記録されたメッセージを、連携する他のシミュレータに通知したか否かを示すパラメータであって、前記他のシミュレータの同期間隔と前記メッセージの送信元のシミュレータの同期間隔との違いに基づくパラメータに基づいて前記記録ステップにおいて記録されたメッセージを加工する加工ステップと、
前記加工されたメッセージを、連携する他のシミュレータに送信する送信ステップと
を有することを特徴とするシミュレーション方法。
A simulation method for linking multiple simulators,
A recording step of recording messages transmitted from the plurality of simulators;
A determination step of determining whether or not the simulator to which the recorded message is notified has a function of adjusting the notified message;
When notifying the message in response to the synchronization request message from the simulator that has been determined not to have the message adjustment function in the determination step,
This is a parameter indicating whether the message recorded in the recording step has been notified to other simulators that cooperate with each other, and the difference between the synchronization interval of the other simulator and the synchronization interval of the simulator from which the message is transmitted A processing step for processing the message recorded in the recording step based on a parameter based thereon;
And a transmission step of transmitting the processed message to another simulator that cooperates.
コンピュータを、請求項1から10のいずれか一項に記載のシミュレーション装置として機能させるためのプログラム。   The program for functioning a computer as a simulation apparatus as described in any one of Claims 1-10.
JP2013160906A 2013-08-02 2013-08-02 Simulation device, simulation method, and program Active JP6249665B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013160906A JP6249665B2 (en) 2013-08-02 2013-08-02 Simulation device, simulation method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013160906A JP6249665B2 (en) 2013-08-02 2013-08-02 Simulation device, simulation method, and program

Publications (2)

Publication Number Publication Date
JP2015032120A JP2015032120A (en) 2015-02-16
JP6249665B2 true JP6249665B2 (en) 2017-12-20

Family

ID=52517388

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013160906A Active JP6249665B2 (en) 2013-08-02 2013-08-02 Simulation device, simulation method, and program

Country Status (1)

Country Link
JP (1) JP6249665B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6719222B2 (en) * 2016-02-03 2020-07-08 キヤノン株式会社 Simulation equipment
WO2017149641A1 (en) * 2016-03-01 2017-09-08 三菱電機株式会社 Simulator
JP6496278B2 (en) * 2016-06-27 2019-04-03 ファナック株式会社 Simulation system
JP2018036945A (en) 2016-09-01 2018-03-08 オムロン株式会社 Simulator linkage device, control method of simulator linkage device, information processing program, and record medium
JP6855861B2 (en) * 2017-03-22 2021-04-07 日本電気株式会社 Virtual time distribution system, virtual time distribution device, virtual time distribution method, and program

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3621392B2 (en) * 2002-07-05 2005-02-16 三菱電機株式会社 Integrated simulation system and program
JP2006350549A (en) * 2005-06-14 2006-12-28 Hitachi Ltd Integrated simulation system
US20080091403A1 (en) * 2006-10-16 2008-04-17 Harrison Gregory A Large Training System Simulation Using Dynamic Network Entities
JP2008134993A (en) * 2006-10-23 2008-06-12 Mitsubishi Electric Corp Simulation management apparatus, simulation management method and program
JP5448768B2 (en) * 2009-12-10 2014-03-19 キヤノン株式会社 Information processing apparatus and control method thereof
JP2012128567A (en) * 2010-12-14 2012-07-05 Mitsubishi Electric Corp Integrated simulation system and integrated simulation synchronization control method

Also Published As

Publication number Publication date
JP2015032120A (en) 2015-02-16

Similar Documents

Publication Publication Date Title
JP6249665B2 (en) Simulation device, simulation method, and program
US20190147130A1 (en) Generating clock signals for a cycle accurate, cycle reproducible fpga based hardware accelerator
CN104376127B (en) A kind of data manipulation method and device
CN102685239B (en) Distribution type rendering method
CN105574109A (en) Database synchronizing method and equipment and system
JP5456202B2 (en) Master device, slave device, and time synchronization method
JP6188115B2 (en) Method for identifying fieldbus devices in a control system
JP2022527232A (en) Mini-program processing methods, devices, equipment and storage media
CN104427169A (en) Remote support apparatus, electronic apparatus, remote support method
US20190265668A1 (en) Simulation device and simulation method
CN110941665A (en) Data synchronization method, data synchronization device and data synchronization equipment between nodes
CN110334150A (en) Monitor method, monitor terminal and the system of master-slave database synchronizing relay
CN104092766A (en) Synchronous operation starting method, device and system
CN113711511A (en) Industrial equipment supporting multi-time synchronization protocol
JP2017228977A (en) Log information creation device, log information creation method, log information creation program, and information processing system
CN109660310B (en) Clock synchronization method and device, computing equipment and computer storage medium
CN104363257A (en) User interface data refreshing method and equipment
CN104808976B (en) File sharing method
JP4733695B2 (en) Method and apparatus for simulation of automated systems
JP6937626B2 (en) How to synchronize the controller device and the redundant system
JP6141542B2 (en) Control system
CN111638749A (en) Simulation system synchronization method, simulation device and system
US20200042336A1 (en) Method and system for simulating a robotic program of an industrial robot
CN117784759A (en) Test equipment and method for vehicle controller
CN110071834A (en) A kind of cloud management platform switching method and apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160603

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170808

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171010

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20171121

R151 Written notification of patent or utility model registration

Ref document number: 6249665

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151