JP4961589B2 - Network system and slave synchronization method - Google Patents
Network system and slave synchronization method Download PDFInfo
- Publication number
- JP4961589B2 JP4961589B2 JP2007016543A JP2007016543A JP4961589B2 JP 4961589 B2 JP4961589 B2 JP 4961589B2 JP 2007016543 A JP2007016543 A JP 2007016543A JP 2007016543 A JP2007016543 A JP 2007016543A JP 4961589 B2 JP4961589 B2 JP 4961589B2
- Authority
- JP
- Japan
- Prior art keywords
- time
- slave
- start time
- master
- synchronization
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Time-Division Multiplex Systems (AREA)
- Small-Scale Networks (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Description
本発明は、マスタと複数のスレーブが通信回線で接続されたネットワークシステムに関し、特に任意のタイミングで複数スレーブの同期運転を実行するネットワークシステムおよびスレーブ同期方法に関する。 The present invention relates to a network system in which a master and a plurality of slaves are connected by a communication line, and more particularly to a network system and a slave synchronization method for executing a synchronous operation of a plurality of slaves at an arbitrary timing.
従来のネットワークシステムでは、コントローラなどのマスタと、複数のスレーブがネットワークに接続され、特定の通信周期でデータのやり取りを行っている。
図9は従来のネットワークシステムの通信データのやり取りを示す図である。
図9において、マスタとスレーブ間の通信データのやり取りは特定の通信周期(S)で行っている。また、通信にリアルタイム性を持たせるため、ネットワーク上の通信周期(S)をさらに所定のタイムスロット(TS)に区切って、これらのタイムスロット単位で接続されたスレーブ局とそれぞれ通信を行っている。
さらに各スレーブ間の同期を図るために、マスタから通信周期ごとに同期フレーム(SYNC)が発行され、同期フレームを受信した時点でそれぞれのスレーブの内部クロックが同期するように構成されている。
各スレーブはある通信周期で自局宛のデータを受信した場合、次の同期フレームを受信したタイミングで実際にサーボドライブやI/O等のスレーブ対象機器に受信データを渡して、スレーブの制御が開始される構成となっているのが一般的である。
また、一般にマスタとなる上位コントローラの制御周期(T)とネットワーク通信周期は図9に示すように非同期で動作していることが多いため、マスタが指令データを出力してから、実際にスレーブ動作が開始されるまで、(通信同期待ちα)+(通信周期S)の遅れが発生する。
In a conventional network system, a master such as a controller and a plurality of slaves are connected to a network and exchange data at a specific communication cycle.
FIG. 9 is a diagram showing communication data exchange in a conventional network system.
In FIG. 9, communication data is exchanged between a master and a slave in a specific communication cycle (S). Further, in order to provide real-time communication, the communication cycle (S) on the network is further divided into predetermined time slots (TS), and communication is performed with slave stations connected in units of these time slots. .
Further, in order to synchronize the slaves, a synchronization frame (SYNC) is issued from the master for each communication cycle, and the internal clocks of the slaves are synchronized when the synchronization frame is received.
When each slave receives data addressed to itself in a certain communication cycle, the received data is actually passed to the slave target device such as a servo drive or I / O at the timing when the next synchronization frame is received, and the slave control is performed. It is common to have a configuration that starts.
In general, the control cycle (T) of the host controller that is the master and the network communication cycle often operate asynchronously as shown in FIG. 9, so that the slave actually operates after the master outputs the command data. Until (communication waiting α) + (communication cycle S) occurs.
一方、ネットワークに接続されたコントローラ及び、1つ以上のデバイスにおいて、ネットワークを介して制御されるグローバルタイマを設け、このグローバルタイマが示すグローバル時間を用いてコントローラに接続されたデバイス側の周期制御を同期させるように構成しているものがある(例えば特許文献1参照)。
また、無線により配信される時刻情報を利用して複数の数値制御装置を同期運転するものであり、マスタ・スレーブ局にかかわらずに共通に配信される時刻情報を用いて同期を取るように構成しているものもある(例えば特許文献2参照)。
In addition, it is designed to synchronize multiple numerical control devices using time information distributed wirelessly, and to synchronize using time information distributed in common regardless of master / slave stations. There are some (see, for example, Patent Document 2).
従来のネットワークシステムでは、複数のスレーブを同期して動作させるため、各スレーブは実際にマスタから指令データを受け取ってから、次の通信周期開始時の同期フレームを受信した際にスレーブ制御を開始する構成となるが、マスタとなる上位コントローラの制御周期とネットワーク通信周期は図9に示すように非同期で動作していることが多いため、マスタが指令データを出力してから、実際にスレーブ動作が開始されるまで、すべてのスレーブで等しく(通信同期待ちα)+(通信周期S)の遅れが発生するという問題がある。
また、複数のスレーブを同期実行させるタイミングは、常に同期フレームの発行タイミングである通信周期に依存し、それ以外のタイミングではスレーブを同期実行させることができず、通信周期以下の短い時間での同期実行ができないという問題がある。
In the conventional network system, since a plurality of slaves are operated in synchronization, each slave actually receives command data from the master, and then starts slave control when receiving a synchronization frame at the start of the next communication cycle. Although the control cycle of the host controller that is the master and the network communication cycle are often operating asynchronously as shown in FIG. 9, the slave operation is actually performed after the master outputs the command data. There is a problem that a delay of (communication synchronization waiting α) + (communication cycle S) occurs equally in all slaves until it is started.
The timing for synchronous execution of multiple slaves always depends on the communication cycle, which is the synchronization frame issuance timing. At other timings, the slave cannot be synchronously executed, and the synchronization is performed in a short time that is shorter than the communication cycle. There is a problem that it cannot be executed.
また、例えばスレーブの対象機器としてサーボドライブを例として考えた場合、異なる種類のサーボドライブが混在してネットワークに接続されているようなシステムの場合では、開始指令が入力されてから実際に軸動作が開始されるまでの時間がサーボドライブごとにそれぞれ異なる。
このため、このような異なる種類のサーボドライブが混在しているシステムの場合、ネットワークに接続された各サーボドライブが同期フレームを受信したタイミングでそれぞれ同期実行を開始しても、実際の動作開始にバラつきが生じてしまうという問題がある。
また、イーサネット(登録商標)の様な汎用ネットワークを用いてスレーブと非同期で通信を行う必要のある場合には、基準となる同期フレームが存在しないため、リアルタイム処理や接続されたスレーブの同期実行を行うことが非常に困難であるという問題もある。
また、特許文献1に記載の発明では、コントローラ、および各スレーブ局ごとに実際の制御周期を生成する動作周期タイマ以外にもグローバル時間を管理するグローバルタイマが必要であり、システム構成が複雑になるという問題があった。
また、特許文献2に記載の発明では、マスタ・スレーブ局共に配信される時刻情報を外部から記要求する必要があり、やはりシステム構成が複雑になるという問題があった。
Also, for example, when considering a servo drive as an example of a slave target device, in the case of a system in which different types of servo drives are mixed and connected to the network, the axis operation is actually performed after a start command is input. The time until the start is different for each servo drive.
For this reason, in the case of a system in which different types of servo drives are mixed, even if each servo drive connected to the network starts synchronous execution at the timing when the synchronous frame is received, the actual operation starts. There is a problem that variations occur.
In addition, when there is a need to communicate asynchronously with slaves using a general-purpose network such as Ethernet (registered trademark), there is no reference synchronization frame, so real-time processing and synchronized execution of connected slaves There is also the problem that it is very difficult to do.
In addition, the invention described in
In the invention described in Patent Document 2, it is necessary to request the time information distributed from both the master and slave stations from the outside, and there is a problem that the system configuration becomes complicated.
本発明はこのような問題を鑑みてなされたものであり、マスタと複数のスレーブが通信回線で接続されたネットワークシステムにおいて、簡単なシステム構成で、任意のタイミングでスレーブの同期実行を開始できるようにすると共に、異なる種類のスレーブが接続されていても、精度よくこれらの複数のスレーブを同期実行させることができ、さらに非同期通信で送受信を行うネットワークにおいても、同期実行を行うことが可能なネットワークシステムを提供することを目的とする。 The present invention has been made in view of such problems, and in a network system in which a master and a plurality of slaves are connected by a communication line, it is possible to start synchronous execution of slaves at an arbitrary timing with a simple system configuration. In addition, even when different types of slaves are connected, these multiple slaves can be executed synchronously with high accuracy, and even in a network that performs asynchronous transmission and reception, a network that can execute synchronous execution The purpose is to provide a system.
上記問題を解決するため、本発明は次のように構成したのである。
請求項1に記載の発明は、マスタと複数のスレーブが、通信周期内の規定のタイムスロットでそれぞれ通信を行うネットワークシステムにおいて、前記マスタに、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、前記スレーブに出力する指令データ内に前記実行開始時間を設定する開始時間設定部を備え、前記スレーブに、通信時に受信する前記タイムスロット数を計測する受信タイムスロット数計測部と、時間を監視し、前記スレーブ内の対象機器の動作実行を開始させる実行開始時間監視部とを備え、該実行開始時間監視部は、前記受信タイムスロット数計測部が計測したタイムスロット数にタイムスロット間隔を掛けた時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするものである。
また、請求項2に記載の発明は、請求項1に記載のネットワークシステムにおいて、前記マスタに、前記スレーブが指令データを受信してから動作するまでにかかる制御遅れ時間を格納したスレーブ機器制御遅れ情報データベースをさらに備え、前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、前記スレーブ機器制御遅れ情報データベースから抽出した該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
また、請求項3に記載の発明は、請求項1に記載のネットワークシステムにおいて、前記スレーブに前記スレーブが指令データを受信してから動作するまでにかかる制御遅れ時間をあらかじめ記憶しておき、前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして該制御遅れ時間を取得し、前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
In order to solve the above problem, the present invention is configured as follows.
According to the first aspect of the present invention, in a network system in which a master and a plurality of slaves communicate with each other in a prescribed time slot within a communication cycle, the master is grouped with one or more slaves that perform synchronization. And setting the synchronization start time for these groups, and every time command data output to the slave is performed, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, A group execution start time management unit having a value as a new execution start time; and a start time setting unit for setting the execution start time in command data output to the slave, and the slave receives the time during communication. Receive time slot number measurement unit that measures the number of slots, and the target device in the slave that monitors time An execution start time monitoring unit for starting the execution of the operation, and the execution start time monitoring unit receives the time obtained by multiplying the number of time slots measured by the reception time slot number measuring unit by a time slot interval. The execution of the target device in the slave is started when the set time is reached by subtracting from the execution start time in the data.
Further, the invention according to claim 2 is the slave device control delay in which in the network system according to
According to a third aspect of the present invention, in the network system according to the first aspect, a control delay time required for the slave to operate after receiving the command data is stored in the slave in advance. The master requests the control delay time from the slave, acquires the control delay time as a response from the slave, and each time the command execution data output to the slave is performed by the group execution start time management unit, the group And subtracting the time slot number multiplied by the time slot interval from each synchronization start time, further subtracting the control delay time of the corresponding slave, and setting the value as a new execution start time. To do.
また、請求項4に記載の発明は、請求項1に記載のネットワークシステムにおいて、前記スレーブに該スレーブで使用するIO点数やモジュールの設定状況を基に、自分の制御遅れ時間を算出する遅れ時間算出部をさらに備え、前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして前記遅れ時間算出部が算出した制御遅れ時間を取得し、前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
また、請求項5に記載の発明は、請求項1に記載のネットワークシステムにおいて、前記スレーブに、前記受信タイムスロット数計測部に代えて、タイマにより時間を計測するタイマ計測部を備え、前記実行開始時間監視部は、前記タイマ計測部が計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間を演算することを特徴とするものである。
また、請求項6に記載の発明は、マスタと複数のスレーブが、非同期で通信を行うネットワークシステムにおいて、前記マスタに、タイマにより時間を計測するマスタタイマ計測部と、前記マスタと前記スレーブ間の伝送時間を測定する伝送時間測定部と、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間から前記伝送時間と、前記マスタタイマ計測部で測定した経過時間を減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、前記スレーブに伝送する指令データ内に前記実行開始時間を設定する開始時間設定部を備え、前記スレーブに、タイマにより時間を計測するタイマ計測部と、時間を監視し、前記スレーブ内の対象機器の動作実行を制御する実行開始時間監視部とを備え、該実行開始時間監視部は、前記タイマ計測部が計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするものである。
According to a fourth aspect of the present invention, in the network system of the first aspect, the delay time for calculating the control delay time of the slave based on the number of IO points used in the slave and the setting status of the module. The master further includes a calculation unit, the master requests the control delay time from the slave, acquires the control delay time calculated by the delay time calculation unit as a response from the slave, and the group execution start time management unit Each time command data is output to the slave, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, and the control delay time of the corresponding slave is further subtracted. This value is used as a new execution start time.
According to a fifth aspect of the present invention, in the network system according to the first aspect, the slave includes a timer measurement unit that measures time by a timer instead of the reception time slot number measurement unit. The start time monitoring unit subtracts the time measured by the timer measurement unit from the execution start time in the data received by the slave, and calculates a set time.
According to a sixth aspect of the present invention, in a network system in which a master and a plurality of slaves communicate asynchronously, a master timer measuring unit that measures time with a timer is provided between the master and the slave. Each time a transmission time measuring unit that measures transmission time and one or more slaves that perform synchronization, set a synchronization start time for these groups, each time command data output to the slave, The transmission time and the elapsed time measured by the master timer measurement unit are subtracted from the synchronization start time for each group, and the value is transmitted as a new execution start time to the slave. A start time setting unit is provided for setting the execution start time in the command data, and the slave measures time with a timer. A timer measurement unit, and an execution start time monitoring unit that monitors the time and controls the operation execution of the target device in the slave, the execution start time monitoring unit, the time measured by the timer measurement unit, Subtracting from the execution start time in the data received by the slave, the operation execution of the target device in the slave is started when the set time is reached.
また、請求項7に記載の発明は、マスタと複数のスレーブが、通信周期内の規定のタイムスロットでそれぞれ通信を行うネットワークシステムのスレーブ同期方法において、前記マスタは、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、各グループの同期開始時間を設定し、前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算し、その値を新たな実行開始時間として前記スレーブに出力し、前記スレーブは、前記タイムスロット数にタイムスロット間隔を掛けた時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするものである。
また、請求項8に記載の発明は、請求項7に記載のネットワークシステムのスレーブ同期方法において、前記マスタに、前記スレーブが指令データを受信してから動作するまでにかかる制御遅れ時間を格納し、前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
また、請求項9に記載の発明は、請求項7に記載のネットワークシステムのスレーブ同期方法において、前記スレーブに前記スレーブが指令データを受信してから動作するまでにかかる制御遅れ時間をあらかじめ記憶しておき、前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして該制御遅れ時間を取得し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
The invention according to
The invention according to
The invention according to
また、請求項10に記載の発明は、請求項7に記載のネットワークシステムのスレーブ同期方法において、前記スレーブは、該スレーブで使用するIO点数やモジュールの設定状況を基に、自分の制御遅れ時間を算出し、前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして前記スレーブが算出した前記制御遅れ時間を取得し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とするものである。
また、請求項11に記載の発明は、請求項7に記載のネットワークシステムのスレーブ同期方法において、前記スレーブは、自分で計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間を演算することを特徴とするものである。
また、請求項12に記載の発明は、マスタと複数のスレーブが、非同期で通信を行うネットワークシステムのスレーブ同期方法において、前記マスタは、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、各グループの同期開始時間を設定し、前記マスタと前記スレーブ間で通信を行うのにかかる伝送時間を測定し、マスタの経過時間を測定し、前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間から前記伝送時間と前記経過時間を減算し、その値を新たな実行開始時間として前記スレーブに出力し、前記スレーブは、自分で計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするものである。
The invention according to claim 10 is the slave synchronization method of the network system according to
The invention according to claim 11 is the slave synchronization method of the network system according to
The invention according to claim 12 is a slave synchronization method of a network system in which a master and a plurality of slaves communicate asynchronously, wherein the master groups each of the one or more slaves that perform synchronization, Set the synchronization start time for each group, measure the transmission time required for communication between the master and the slave, measure the elapsed time of the master, and output the command data to the slave The transmission time and the elapsed time are subtracted from each synchronization start time, and the value is output as a new execution start time to the slave, and the slave receives the time measured by itself as data received by the slave. The execution start of the target device in the slave is started when the set time is reached. It is an.
請求項1、5、7、11の発明によれば、マスタに、同期実行を行う1つ以上のスレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、スレーブへの指令データ出力を行うごとに、グループごとの同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、スレーブに出力する指令データ内に実行開始時間を設定する開始時間設定部を備え、スレーブに、通信時に受信する前記タイムスロット数を計測する受信タイムスロット数計測部または時間を計測するタイマ計測部と、時間を監視し、スレーブ内の対象機器の動作実行を開始させる実行開始時間監視部とを備え、実行開始時間監視部は、タイムスロット数にタイムスロット間隔を掛けた時間、またはタイマ計測部が計測した時間を、スレーブが受信したデータ内の実行開始時間から減算し、設定時間になった時点でスレーブ内の対象機器の動作実行を開始させるので、簡単なシステム構成で、スレーブがデータを受信してから実際に動作するまでの時間を指定でき、これまで各スレーブ間の同期を取るために、次のネットワーク周期で発行される同期フレームを受信していたタイミングで払い出し動作を行っていたスレーブ動作を任意のタイミングでスレーブの同期実行を開始できる。 According to the first, fifth, seventh, and eleventh aspects of the present invention, one or more slaves that execute synchronization are grouped into the master, and the synchronization start time for these groups is set, and command data output to the slaves Each time, the group execution start time management unit that subtracts the time slot number multiplied by the time slot interval from the synchronization start time for each group and uses the value as the new execution start time, and the command to be output to the slave It has a start time setting unit that sets the execution start time in the data, and monitors the time with a reception time slot number measurement unit that measures the number of time slots received during communication or a timer measurement unit that measures time. An execution start time monitoring unit for starting operation execution of the target device in the slave, and the execution start time monitoring unit counts the number of time slots. Since the time measured by the timer slot or the time measured by the timer measurement unit is subtracted from the execution start time in the data received by the slave, the execution of the operation of the target device in the slave is started when the set time is reached. With a simple system configuration, it is possible to specify the time from when the slave receives data until it actually operates, and to receive synchronization frames issued in the next network cycle to synchronize each slave so far The slave can start synchronous execution at any timing for the slave operation that was performing the payout operation at the timing.
請求項2〜4、8〜10の発明によれば、スレーブが指令データを受信してから動作するまでにかかる制御遅れ時間を考慮し、グループ実行開始時間管理部で、スレーブへの指令データ出力を行うごとに、グループごとの同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの制御遅れ時間をさらに減算し、その値を新たな実行開始時間とするので、接続されているスレーブが同一の種類でなくともスレーブの実行開始時間を一致させることが可能となる。
これにより、対象スレーブ機器がサーボドライブであれば実際の軸動作が、I/O関係であれば実際の出力時のタイミングを非常に精度良く同期させて動作させることが可能となる。
According to the second to fourth and eighth to tenth aspects of the present invention, in consideration of the control delay time required for the slave to operate after receiving the command data, the group execution start time management unit outputs the command data to the slave. Is subtracted by the time slot number multiplied by the time slot interval from the synchronization start time for each group, and the control delay time of the corresponding slave is further subtracted to obtain the new execution start time. Therefore, even if the connected slaves are not of the same type, the execution start times of the slaves can be matched.
As a result, if the target slave device is a servo drive, the actual axis operation can be performed in synchronism with very accurate timing at the time of actual output if it is related to I / O.
請求項6、12の発明によれば、マスタと複数のスレーブが、非同期で通信を行うネットワークシステムにおいて、マスタに、タイマにより時間を計測するマスタタイマ計測部と、マスタとスレーブ間の伝送時間を測定する伝送時間測定部と、同期実行を行う1つ以上のスレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、スレーブへの指令データ出力を行うごとに、グループごとの同期開始時間から伝送時間と、マスタタイマ計測部で測定した経過時間を減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、スレーブに伝送する指令データ内に前記実行開始時間を設定する開始時間設定部を備え、スレーブに、タイマにより時間を計測するタイマ計測部と、時間を監視し、スレーブ内の対象機器の動作実行を制御する実行開始時間監視部とを備え、実行開始時間監視部は、タイマ計測部が計測した時間を、スレーブが受信したデータ内の実行開始時間から減算し、設定時間になった時点でスレーブ内の対象機器の動作実行を開始させるので、非同期通信で送受信を行うネットワークにおいても、同期実行を行うことが可能となる。 According to the inventions of claims 6 and 12, in a network system in which a master and a plurality of slaves communicate asynchronously, a master timer measuring unit that measures time by a timer and a transmission time between the master and the slave. Set the transmission time measurement unit to be measured and one or more slaves that perform synchronization as a group, set the synchronization start time for each group, and start synchronization for each group each time command data is output to the slave. The transmission time and the elapsed time measured by the master timer measurement unit are subtracted from the time, and the group execution start time management unit using the value as a new execution start time, and the execution start time in the command data transmitted to the slave. It has a start time setting unit to set, and a slave timer measurement unit that measures time with a timer, and monitors the time, the slave An execution start time monitoring unit that controls the operation execution of the target device in the device, and the execution start time monitoring unit subtracts the time measured by the timer measurement unit from the execution start time in the data received by the slave. Since the operation execution of the target device in the slave is started at the time, it is possible to execute the synchronization even in a network that performs transmission / reception by asynchronous communication.
以下、本発明の実施形態について、図を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
図1は本発明のネットワークシステムを示すブロック図である。
図1において、1はマスタ、11a〜11eはスレーブであり、その中に実行時間を監視する実行開始時間監視部12と、受信するタイムスロットを計測する受信タイムスロット数計測部16を持つ(なお、スレーブを単に11と記載することもある)。
マスタ1の中には、ネットワークへのデータの出力を行うネットワーク出力部2と、データの演算を行う演算部6がある。
ネットワーク出力部2の中には、スレーブ11の実行開始時間を管理する実行開始時間管理部3a、3bがある。
スレーブ11は同期を取る複数のスレーブ11ごとにグループ化して管理する。2グループに分類した例を示しているので、実行開始時間管理部も第1、第2グループ用の2個ある。
また、4は通信IFメモリにデータを出力するごとにスレーブ11の実行開始時間を設定する開始時間設定部、5は通信のための通信IFメモリである。
演算部6の中には、CPU7とアプリケーション8がある。また、各スレーブ機器の種類が異なる場合のために、各スレーブ機器の制御遅れ時間が記憶されたデータベースとして、スレーブ機器制御遅れ情報データベース9がある。なお、スレーブ機器の種類が同一機種である場合はスレーブ機器制御遅れ情報データベース9は使用しない。
スレーブ11は同期を取る複数がグループ化される。図1の例の場合、11a〜11cで第1グループ、11d〜11eで第2グループを形成する。なお、図1ではグループが2つの場合を例示しているが、2つに限定されるものではない。
FIG. 1 is a block diagram showing a network system of the present invention.
In FIG. 1, 1 is a master, and 11a to 11e are slaves, and have an execution start time monitoring unit 12 for monitoring execution time and a reception time slot number measuring unit 16 for measuring time slots to be received (note that The slave may be simply referred to as 11).
The
The network output unit 2 includes execution start
The slaves 11 are grouped and managed for each of the plurality of slaves 11 to be synchronized. Since an example classified into two groups is shown, there are two execution start time management units for the first and second groups.
4 is a start time setting unit for setting the execution start time of the slave 11 every time data is output to the communication IF memory, and 5 is a communication IF memory for communication.
In the calculation unit 6, there are a
A plurality of slaves 11 that are synchronized are grouped. In the case of the example of FIG. 1, a first group is formed by 11a to 11c, and a second group is formed by 11d to 11e. In addition, although the case where there are two groups is illustrated in FIG. 1, it is not limited to two.
次に、本発明での同期方法についての詳細を説明する。
図2は本発明のスレーブ同期方法のマスタの処理手順を示すフローチャートである。
まず、ステップS1で、マスタ1の図示しないキーボード等により、同期実行を行うスレーブ11をそれぞれまとめてグループ化し、それぞれをグループとして設定する。
次に、ステップS2で、各グループの同期開始時間TGno(no:グループ数)を設定する。この同期開始時間はマスタがグループの最初のスレーブの指令値を出力する時点を0とした値である。なお、この開始時間TGnoについては、スレーブ11の出力の優先度に従って決定するものとする。
つまり、指令データを出力してから、できるだけ早くスレーブ11の同期を開始させたい場合は、同期開始時間TGnoを通信周期よりも小さな値に設定する。
Next, the details of the synchronization method in the present invention will be described.
FIG. 2 is a flowchart showing the processing procedure of the master in the slave synchronization method of the present invention.
First, in step S1, slaves 11 that perform synchronous execution are grouped together using a keyboard (not shown) of
Next, in step S2, the synchronization start time TGno (no: number of groups) of each group is set. This synchronization start time is a value with the time when the master outputs the command value of the first slave of the group as 0. The start time TGno is determined according to the priority of the output of the slave 11.
That is, when it is desired to start synchronization of the slave 11 as soon as possible after outputting the command data, the synchronization start time TGno is set to a value smaller than the communication cycle.
図3は本発明のネットワークシステムの通信データのやり取りを示す図である。
この例では第1スレーブ11a〜第3スレーブ11cの第1グループはできるだけ早く同期実行をさせたいため、TG1として通信周期Sより短い値を設定している。また、第4スレーブ11dと第5スレーブ11eで構成される第2グループの同期開始時間TG2は通信周期Sより長い時間が設定されている。
なお、図3では、通信周期Sを5タイムスロットに分割し、タイムスロットごとに、マスタ1からの指令を第1スレーブ11aから順に送信し、スレーブ11が応答を返している。
FIG. 3 is a diagram showing exchange of communication data in the network system of the present invention.
In this example, the first group of the first slave 11a to the third slave 11c is set to a value shorter than the communication cycle S as TG1 in order to perform synchronization execution as soon as possible. In addition, the synchronization start time TG2 of the second group configured by the fourth slave 11d and the fifth slave 11e is set longer than the communication cycle S.
In FIG. 3, the communication cycle S is divided into five time slots, and for each time slot, the command from the
図2の説明に戻ると、ステップS3で、同期開始時間TGno順に出力を行うスレーブ11の演算順を決定し、ステップS4で、マスタ1は各スレーブ11への指令データを演算する。
次に、ステップS5で、第1、第2グループ実行開始時間管理部3a、3bでは、この同期開始時間TGnoをグループごとに保持すると共に、通信IFメモリ5にデータの出力を行うごとに、以下の実行開始時間RTを各グループごとに算出する。
RT=同期開始時間TGno−タイムスロット間隔TS・n
(n:通信周期内におけるタイムスロット回数。通信周期到達でクリア)
この実行開始時間は同期開始時間で設定された時間までの残り時間を意味し、後述するようにスレーブ11で実行開始時間を演算し、その値が0になったときに実行を開始する。
例えば、タイムスロット間隔が2msで、通信周期が10msのとき、第1グループのTG1が6msだったとする。1回目のタイムスロットではRT=6−2・1=4、2回目のタイムスロットでは、RT=6−2・2=2となる。
次に、ステップS6で、開始時間設定部4で実行開始時間RTをスレーブ11への指令データに設定した後、通信IFメモリ5に書き込んでスレーブ11へ出力を行う。
次にステップS7で全スレーブ11の指令データを出力したかチェックし、出力が終了していれば、ステップS4に戻り次の指令データの演算を行う。また、出力が終了していなければ、ステップS8に進みタイムスロット時間の経過待ちをする。そして時間経過後ステップS9に進みタイムスロット番号を1加算し、ステップS5に進む。
Returning to the description of FIG. 2, in step S3, the calculation order of the slaves 11 to be output is determined in the order of the synchronization start time TGno, and in step S4, the
Next, at step S5, the first and second group execution start
RT = synchronization start time TGno−time slot interval TS · n
(N: Number of timeslots within the communication cycle. Cleared when the communication cycle is reached)
This execution start time means the remaining time until the time set as the synchronization start time, and the execution start time is calculated by the slave 11 as described later, and the execution is started when the value becomes zero.
For example, when the time slot interval is 2 ms and the communication cycle is 10 ms, TG1 of the first group is 6 ms. In the first time slot, RT = 6-2 · 1 = 4, and in the second time slot, RT = 6-2 · 2 = 2.
Next, in step S6, the start time setting unit 4 sets the execution start time RT as command data to the slave 11, and then writes it in the communication IF
Next, in step S7, it is checked whether the command data of all the slaves 11 has been output. If the output has been completed, the process returns to step S4 to calculate the next command data. If the output has not ended, the process proceeds to step S8 to wait for the elapse of the time slot time. Then, after the elapse of time, the process proceeds to step S9 and 1 is added to the time slot number, and the process proceeds to step S5.
次に、スレーブ11が同期を取って実行を開始する手順を説明する。
図4は本発明のネットワークシステムのスレーブ11の構成を示すブロック図である。12は実行開始時間監視部、13はCPU、14はデータ受信部、15は受信バッファ、17はデータ送信部、18は送信バッファ、19はサーボドライブなどの対象スレーブ機器である。
16は受信タイムスロット数計測部で、受信した同期フレームを基準として、通信時に受信するタイムスロット数を計測する。
スレーブ11では、マスタ1からの指令データをデータ受信部14で受信し、受信バッファ15に格納する。
実行開始時間監視部12では、受信タイムスロット数計測部16で取得したタイムスロット数にタイムスロット間隔を掛けた時間を指令データに設定された実行開始時間RTから減算し、設定時間に到達した時点でスレーブ11のCPU13へデータを受け渡し、対象スレーブ機器19の実行を開始する。
例えば、図3で説明すると、タイムスロットが2msで、通信周期が10msのとき、第1グループのTG1が6msだったとする。
第1スレーブ11aは1回目のタイムスロットでRT=4を指令として受け取る。2回目のタイムスロットで第1スレーブ11a内の実行開始時間監視部12でRTの減算を行い、RT=2となり、3回目で0となり、設定時間に到達したと判断できる。
第2スレーブ11bは、2回目のタイムスロットでRT=2を指令として受け取る。3回目のタイムスロットで第2スレーブ11b内の実行開始時間監視部12でRTの減算を行いRT=0となり、設定時間に到達する。
第3スレーブ11cは、3回目のタイムスロットでRT=0を指令として受け取る。
このように第1スレーブ11aから第3スレーブ11cの第1グループのスレーブ11はすべて3回目のタイムスロットでRT=0となり、設定時間に到達し、同期フレームから6msで同期して実行を開始する。
Next, a procedure for the slave 11 to start execution in synchronization will be described.
FIG. 4 is a block diagram showing the configuration of the slave 11 of the network system of the present invention. Reference numeral 12 denotes an execution start time monitoring unit, 13 a CPU, 14 a data receiving unit, 15 a receiving buffer, 17 a data transmitting unit, 18 a transmitting buffer, and 19 a target slave device such as a servo drive.
Reference numeral 16 denotes a reception time slot number measuring unit which measures the number of time slots received during communication with reference to the received synchronization frame.
In the slave 11, the command data from the
The execution start time monitoring unit 12 subtracts the time obtained by multiplying the number of time slots acquired by the reception time slot number measuring unit 16 by the time slot interval from the execution start time RT set in the command data, and reaches the set time. Then, the data is transferred to the
For example, referring to FIG. 3, when the time slot is 2 ms and the communication cycle is 10 ms, TG1 of the first group is 6 ms.
The first slave 11a receives RT = 4 as a command in the first time slot. RT is subtracted by the execution start time monitoring unit 12 in the first slave 11a in the second time slot, RT = 2, and 0 in the third time, so that it can be determined that the set time has been reached.
The second slave 11b receives RT = 2 as a command in the second time slot. In the third time slot, the execution start time monitoring unit 12 in the second slave 11b subtracts RT, RT = 0, and the set time is reached.
The third slave 11c receives RT = 0 as a command in the third time slot.
As described above, all the slaves 11 in the first group from the first slave 11a to the third slave 11c reach RT = 0 in the third time slot, reach the set time, and start executing synchronously in 6 ms from the synchronization frame. .
次に、第2の実施例として、対象スレーブ機器が異なる種類の場合を説明する。
以下に、第1の実施例と異なる部分を中心に動作を説明する。
まず、図1のマスタ1の図示しないキーボード等により、スレーブ機器制御遅れ情報データベース9を使用するように設定する。
図5はスレーブ機器制御遅れ情報データベース9に設定されるデータ例である。ここでは、標準機種に比べNo1の機種は1.5ms、No2の機種は2.4ms、No3の機種は3.0msの制御遅れ時間(SLns、nsは機種番号)が有ることを示している。
マスタ1が各スレーブ11に出力を行う際には、それぞれのスレーブ機器における制御遅れ時間SLnsを考慮した形で値を設定するように構成する。
すなわち、図2のステップS5において、第1、第2グループ実行開始時間管理部3a、3bでは、同期開始時間TGnoをグループごとに管理すると共に、そのグループ内のスレーブ11の制御遅れ時間SLnsをスレーブ機器制御遅れ情報データベース9から取得し、通信IFメモリ5に出力を行う度に、実行開始時間RTを以下の手順で算出するようにしたものである。
RT=同期開始時間TGno−制御遅れ時間SLns−タイムスロット間隔TS・n
(n:通信周期内におけるタイムスロット回数。通信周期到達でクリア)
なお、マスタ1にスレーブ機器制御遅れ情報データベース9を持たずに、各スレーブ11に、制御遅れ時間を記憶し、マスタ1からの要求に対し制御遅れ時間のレスポンスを返す構成をとっても良い。
また、スレーブ11に、遅れ時間を算出する遅れ時間算出部(図示せず)を備え、スレーブ11で使用するIO点数の数や、モジュールの設定状況により遅れ時間を自分で算出する構成としても良い。この場合、マスタ1が制御遅れ時間の要求をスレーブ11に出力すると、スレーブ11の遅れ時間算出部で自分の制御遅れ時間を算出し、レスポンスを返す。
このように、各スレーブ11の制御遅れ時間を考慮した上で指令データを出力することにより、異なる種類のスレーブ11が同期実行を行う場合であっても、実際の動作を精度良く一致させることが可能となる。
Next, as a second embodiment, a case where the target slave devices are of different types will be described.
The operation will be described below with a focus on differences from the first embodiment.
First, the slave device control delay
FIG. 5 shows an example of data set in the slave device control delay
When the
That is, in step S5 of FIG. 2, the first and second group execution start
RT = synchronization start time TGno−control delay time SLns−time slot interval TS · n
(N: Number of timeslots within the communication cycle. Cleared when the communication cycle is reached)
Instead of having the slave device control delay
The slave 11 may be provided with a delay time calculation unit (not shown) for calculating the delay time, and the delay time may be calculated by the number of IO points used by the slave 11 and the module setting status. . In this case, when the
In this way, by outputting the command data in consideration of the control delay time of each slave 11, even when different types of slaves 11 perform synchronous execution, it is possible to match the actual operations with high accuracy. It becomes possible.
次に第3の実施例として、スレーブ11の時間の計測をタイマを使用して行う例を説明する。以下に、第1の実施例と異なる部分を中心に動作を説明する。
図6は本発明のネットワークシステムの第3の実施例のスレーブ11の構成を示すブロック図である。図4の受信タイムスロット数計測部16に代えてタイマ計測部20を備える。
実行開始時間監視部12は自局宛のデータを受信した時点を基準として、タイマ計測部20で経過時間を計測し、指令データに設定されている実行開始時間RTに到達したらスレーブのCPU13に受信データを渡して実行を開始する。
上記の構成とすることで、スレーブ11は指令データを受信してからの相対時間の測定を行えば良いことになるので、タイマの計測時間は短く、特許文献1に記載されているようなグローバルタイマを持つ場合に比べ、自身のタイマ精度で十分な精度を確保できる。
Next, as a third embodiment, an example in which the time of the slave 11 is measured using a timer will be described. The operation will be described below with a focus on differences from the first embodiment.
FIG. 6 is a block diagram showing the configuration of the slave 11 of the third embodiment of the network system of the present invention. A timer measurement unit 20 is provided instead of the reception time slot number measurement unit 16 of FIG.
The execution start time monitoring unit 12 measures the elapsed time with the timer measurement unit 20 based on the time when the data addressed to itself is received, and receives it at the
With the above configuration, the slave 11 only needs to measure the relative time after receiving the command data. Therefore, the measurement time of the timer is short, and the global time as described in
次に、第4の実施例として、通信を行うネットワーク環境として、一般的なイーサネット(登録商標)等の非同期通信を使用した場合を説明する。
以下に、第1の実施例と異なる部分を中心に動作を説明する。
図7は本発明のネットワークシステムの第4の実施例を示すブロック図である。
まず、スイッチングハブ21を用いて、マスタ1−スレーブ11間の通信以外の不要なトラフィックが発生しないようにネットワークを構成しておく。また、非同期なのでタイムスロットはないので、マスタ1に経過時間T(i)測定用のマスタタイマ計測部23を備え、各スレーブ11にデータを出力する時間を算出する。また、伝送にかかる時間を測定する伝送時間測定部22を持つ。
Next, as a fourth embodiment, a case will be described in which asynchronous communication such as general Ethernet (registered trademark) is used as a network environment for communication.
The operation will be described below with a focus on differences from the first embodiment.
FIG. 7 is a block diagram showing a fourth embodiment of the network system of the present invention.
First, a network is configured using the switching hub 21 so that unnecessary traffic other than communication between the
図8は本発明のスレーブ同期方法の第4の実施例のマスタの処理手順を示すフローチャートである。
ステップS11で、マスタ1の図示しないキーボード等により、同期実行を行うスレーブ11をそれぞれまとめてグループ化し、それぞれをグループとして設定する。
次に、ステップS12で、各グループの同期開始時間TGno(no:グループ数)を設定する。
次に、ステップS13で、同期開始時間TGno順に出力を行うスレーブ11の演算順を決定する。ステップS14で、伝送時間測定部22によりマスタ1―スレーブ11間で通信を行うのにかかる時間Lt(n)を測定する。たとえばPING(Packet INternet Groper)コマンド等がこの伝送時間測定に使用できる。
ステップS15で、経過時間T(i)計測用のマスタタイマ計測部23の動作を開始する。ステップS16で、マスタ1は各スレーブ11への指令データを演算する。
次に、ステップS17で、第1、第2グループ実行開始時間管理部3a、3bでは、同期開始時間TGnoをグループごとに管理すると共に、通信IFメモリ5にデータの出力を行うごとに、以下の実行開始時間RTを各グループごとに算出する。
RT=開始時間TGno−伝送時間Lt(n)−経過時間T(i)
次に、ステップS18で、開始時間設定部4で実行開始時間RTをスレーブ11への指令データに設定した後、通信IFメモリ5に書き込んでスレーブ11へ出力を行う。
次にステップS19で全スレーブ11の指令データを出力したかチェックし、出力が終了していなければステップS17に進む。出力が終了していれば、ステップS20で経過時間T(i)をリセットし、ステップS16に戻る。
スレーブ11の実行開始時間監視部12は自局宛のデータを受信した時点を基準として、タイマ計測部20で経過時間を計測し、指令データに設定されている実行開始時間RTに到達したらスレーブのCPU13に受信データを渡して実行を開始する。
このように、指令データの出力時間とスレーブの実行開始時間をマスタのネットワーク出力部において管理することで、汎用的なネットワークを使用しながらリアルタイム性を保ちながら複数のスレーブと同期実行を行うことが可能となる。
FIG. 8 is a flowchart showing the processing procedure of the master in the fourth embodiment of the slave synchronization method of the present invention.
In step S11, the slaves 11 that perform synchronization are grouped together using a keyboard (not shown) of the
Next, in step S12, the synchronization start time TGno (no: number of groups) of each group is set.
Next, in step S13, the calculation order of the slaves 11 that perform output in the order of the synchronization start time TGno is determined. In step S14, the transmission
In step S15, the operation of the master
Next, in step S17, the first and second group execution start
RT = start time TGno−transmission time Lt (n) −elapsed time T (i)
Next, in step S18, the start time setting unit 4 sets the execution start time RT as command data to the slave 11, and then writes it in the communication IF
Next, in step S19, it is checked whether the command data of all slaves 11 has been output. If the output has not ended, the process proceeds to step S17. If the output has been completed, the elapsed time T (i) is reset in step S20, and the process returns to step S16.
The execution start time monitoring unit 12 of the slave 11 measures the elapsed time by the timer measurement unit 20 with reference to the time when the data addressed to the own station is received, and when the execution start time RT set in the command data is reached, The received data is passed to the
In this way, the command data output time and slave execution start time are managed in the master network output unit, so that synchronous execution with multiple slaves can be performed while maintaining real-time performance using a general-purpose network. It becomes possible.
1 マスタ
2 ネットワーク出力部
3a、3b 第1、第2グループ実行開始時間管理部
4 開始時間設定部
5 通信IFメモリ
6 演算部
7、13 CPU
8 アプリケーション
9 スレーブ機器制御遅れ情報データベース
10 ネットワーク
11a〜11e 第1〜第5スレーブ
12 実行開始時間監視部
14 データ受信部
15 受信バッファ
16 受信タイムスロット数計測部
17 データ送信部
18 送信バッファ
19 対象スレーブ機器
20 タイマ計測部
21 スイッチングハブ
22 伝送時間測定部
23 マスタタイマ計測部
30 イーサネット(登録商標)
DESCRIPTION OF
8
Claims (12)
前記マスタに、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、
前記スレーブに出力する指令データ内に前記実行開始時間を設定する開始時間設定部を備え、
前記スレーブに、通信時に受信する前記タイムスロット数を計測する受信タイムスロット数計測部と、
時間を監視し、前記スレーブ内の対象機器の動作実行を開始させる実行開始時間監視部とを備え、
該実行開始時間監視部は、前記受信タイムスロット数計測部が計測したタイムスロット数にタイムスロット間隔を掛けた時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするネットワークシステム。 In a network system in which a master and a plurality of slaves communicate with each other in a specified time slot within a communication cycle,
One or more slaves that perform synchronization are grouped into the master, the synchronization start time for these groups is set, and each time command data is output to the slave, the synchronization start time for each group A group execution start time management unit that subtracts the time slot number from the time slot multiplied by the time slot and sets the value as a new execution start time,
A start time setting unit for setting the execution start time in the command data output to the slave;
In the slave, a reception time slot number measuring unit that measures the number of time slots received during communication,
An execution start time monitoring unit that monitors time and starts operation execution of the target device in the slave,
The execution start time monitoring unit subtracts a time obtained by multiplying the number of time slots measured by the reception time slot number measuring unit by a time slot interval from the execution start time in the data received by the slave, and sets the set time. The network system is characterized in that the execution of the operation of the target device in the slave is started at that time.
前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、前記スレーブ機器制御遅れ情報データベースから抽出した該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項1記載のネットワークシステム。 The master further comprises a slave device control delay information database storing a control delay time taken until the slave operates after receiving the command data.
Each time the group execution start time management unit outputs command data to the slave, it subtracts a time slot number multiplied by a time slot interval from the synchronization start time for each group, and the slave device control delay 2. The network system according to claim 1, wherein the control delay time of the corresponding slave extracted from the information database is further subtracted to set the value as a new execution start time.
前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして該制御遅れ時間を取得し、
前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項1記載のネットワークシステム。 Store in advance the control delay time required for the slave to operate after receiving the command data,
The master requests the control delay time from the slave, acquires the control delay time as a response from the slave,
Each time the group execution start time management unit performs command data output to the slave, the synchronization start time for each group is subtracted from the time slot number multiplied by the time slot interval, and the corresponding slave's 2. The network system according to claim 1, wherein the control delay time is further subtracted to set the value as a new execution start time.
前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして前記遅れ時間算出部が算出した制御遅れ時間を取得し、
前記グループ実行開始時間管理部で、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項1記載のネットワークシステム。 Based on the number of IO points used in the slave and the setting status of the module, the slave further includes a delay time calculation unit that calculates its own control delay time,
The master requests the control delay time from the slave, acquires the control delay time calculated by the delay time calculation unit as a response from the slave,
Each time the group execution start time management unit performs command data output to the slave, the synchronization start time for each group is subtracted from the time slot number multiplied by the time slot interval, and the corresponding slave's 2. The network system according to claim 1, wherein the control delay time is further subtracted to set the value as a new execution start time.
前記実行開始時間監視部は、前記タイマ計測部が計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間を演算することを特徴とする請求項1記載のネットワークシステム。 The slave includes a timer measurement unit that measures time by a timer instead of the reception time slot number measurement unit,
The network according to claim 1, wherein the execution start time monitoring unit subtracts the time measured by the timer measurement unit from the execution start time in the data received by the slave, and calculates a set time. system.
前記マスタに、タイマにより時間を計測するマスタタイマ計測部と、
前記マスタと前記スレーブ間の伝送時間を測定する伝送時間測定部と、
同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、これらのグループについての同期開始時間を設定し、前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間から前記伝送時間と、前記マスタタイマ計測部で測定した経過時間を減算し、その値を新たな実行開始時間とするグループ実行開始時間管理部と、
前記スレーブに伝送する指令データ内に前記実行開始時間を設定する開始時間設定部を備え、
前記スレーブに、タイマにより時間を計測するタイマ計測部と、
時間を監視し、前記スレーブ内の対象機器の動作実行を制御する実行開始時間監視部とを備え、
該実行開始時間監視部は、前記タイマ計測部が計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするネットワークシステム。 In a network system in which a master and multiple slaves communicate asynchronously,
In the master, a master timer measuring unit that measures time by a timer,
A transmission time measuring unit for measuring a transmission time between the master and the slave;
One or more slaves that perform synchronization are grouped, and a synchronization start time is set for these groups, and each time command data is output to the slave, the transmission time is determined from the synchronization start time for each group. And a group execution start time management unit that subtracts the elapsed time measured by the master timer measurement unit and sets the value as a new execution start time,
A start time setting unit for setting the execution start time in the command data transmitted to the slave;
In the slave, a timer measuring unit that measures time by a timer, and
An execution start time monitoring unit for monitoring time and controlling operation execution of the target device in the slave,
The execution start time monitoring unit subtracts the time measured by the timer measurement unit from the execution start time in the data received by the slave, and executes the operation of the target device in the slave at a set time. A network system characterized by starting a network.
前記マスタは、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、
各グループの同期開始時間を設定し、
前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算し、その値を新たな実行開始時間として前記スレーブに出力し、
前記スレーブは、前記タイムスロット数にタイムスロット間隔を掛けた時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、
設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするネットワークシステムのスレーブ同期方法。 In a slave synchronization method of a network system in which a master and a plurality of slaves communicate with each other in a specified time slot within a communication cycle,
The master is a group of one or more slaves that perform synchronization,
Set the synchronization start time for each group,
Every time the command data output to the slave is performed, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, and the value is output to the slave as a new execution start time,
The slave subtracts the time obtained by multiplying the number of time slots by a time slot interval from the execution start time in the data received by the slave,
A slave synchronization method for a network system, wherein operation execution of a target device in the slave is started at a set time.
前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項7記載のネットワークシステムのスレーブ同期方法。 In the master, the control delay time required for the slave to operate after receiving the command data is stored,
Each time the command data is output to the slave, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, and the control delay time of the corresponding slave is further subtracted, 8. The network system slave synchronization method according to claim 7, wherein the value is set as a new execution start time.
前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして該制御遅れ時間を取得し、
前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項7記載のネットワークシステムのスレーブ同期方法。 Store in advance the control delay time required for the slave to operate after receiving the command data,
The master requests the control delay time from the slave, acquires the control delay time as a response from the slave,
Each time the command data is output to the slave, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, and the control delay time of the corresponding slave is further subtracted. 8. The network system slave synchronization method according to claim 7, wherein the value is set as a new execution start time.
前記マスタは、前記スレーブに前記制御遅れ時間を要求し、前記スレーブからのレスポンスとして前記スレーブが算出した前記制御遅れ時間を取得し、
前記スレーブへの指令データ出力を行うごとに、グループごとの前記同期開始時間からタイムスロット数にタイムスロット間隔を掛けた時間だけ減算するとともに、該当するスレーブの前記制御遅れ時間をさらに減算し、その値を新たな実行開始時間とすることを特徴とする請求項7記載のネットワークシステムのスレーブ同期方法。 The slave calculates its own control delay time based on the number of IO points used by the slave and the setting status of the module,
The master requests the control delay time from the slave, acquires the control delay time calculated by the slave as a response from the slave,
Each time the command data is output to the slave, the time of the number of time slots multiplied by the time slot interval is subtracted from the synchronization start time for each group, and the control delay time of the corresponding slave is further subtracted. 8. The network system slave synchronization method according to claim 7, wherein the value is set as a new execution start time.
前記マスタは、同期実行を行う1つ以上の前記スレーブをそれぞれグループとし、
各グループの同期開始時間を設定し、
前記マスタと前記スレーブ間で通信を行うのにかかる伝送時間を測定し、
マスタの経過時間を測定し、
前記スレーブへの指令データ出力を行うたびに、グループごとの前記同期開始時間から前記伝送時間と前記経過時間を減算し、その値を新たな実行開始時間として前記スレーブに出力し、
前記スレーブは、自分で計測した時間を、前記スレーブが受信したデータ内の前記実行開始時間から減算し、
設定時間になった時点で前記スレーブ内の対象機器の動作実行を開始させることを特徴とするネットワークシステムのスレーブ同期方法。 In a slave synchronization method of a network system in which a master and a plurality of slaves communicate asynchronously,
The master groups each of the one or more slaves that perform synchronization,
Set the synchronization start time for each group,
Measure the transmission time taken to communicate between the master and the slave,
Measure the elapsed time of the master,
Every time command data output to the slave, the transmission time and the elapsed time are subtracted from the synchronization start time for each group, the value is output to the slave as a new execution start time,
The slave subtracts the time measured by itself from the execution start time in the data received by the slave,
A slave synchronization method for a network system, wherein operation execution of a target device in the slave is started at a set time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007016543A JP4961589B2 (en) | 2007-01-26 | 2007-01-26 | Network system and slave synchronization method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007016543A JP4961589B2 (en) | 2007-01-26 | 2007-01-26 | Network system and slave synchronization method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008187235A JP2008187235A (en) | 2008-08-14 |
JP4961589B2 true JP4961589B2 (en) | 2012-06-27 |
Family
ID=39730011
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007016543A Expired - Fee Related JP4961589B2 (en) | 2007-01-26 | 2007-01-26 | Network system and slave synchronization method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4961589B2 (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5184597B2 (en) | 2010-09-06 | 2013-04-17 | 株式会社日立産機システム | Communication control apparatus and communication / control system |
JP5664250B2 (en) * | 2011-01-11 | 2015-02-04 | 日本電気株式会社 | Communication control system, apparatus, method and program |
JP6431492B2 (en) * | 2016-02-12 | 2018-11-28 | 日本電信電話株式会社 | Cooperation instruction device, cooperation instruction program, and cooperation instruction method |
CN113872867B (en) * | 2021-09-09 | 2023-04-07 | 淮阴工学院 | Method for improving data recovery speed of electronic voter |
CN116149250B (en) * | 2022-12-20 | 2024-06-21 | 西北核技术研究所 | A high time precision instruction synchronization method for multiple PLC controllers based on hard timer |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001177570A (en) * | 1999-12-17 | 2001-06-29 | Mitsubishi Electric Corp | Communication network system, and slave unit, master unit, repeater and synchronization controlling method in communication network system |
JP3807301B2 (en) * | 2001-12-20 | 2006-08-09 | 松下電器産業株式会社 | Motor drive device |
JP4107110B2 (en) * | 2003-03-07 | 2008-06-25 | オムロン株式会社 | Fieldbus system, connection confirmation method, and master |
JP4241343B2 (en) * | 2003-11-26 | 2009-03-18 | 富士電機システムズ株式会社 | Transmission timing determination method, bus usage right arbitration method, network system, program |
-
2007
- 2007-01-26 JP JP2007016543A patent/JP4961589B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2008187235A (en) | 2008-08-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5184597B2 (en) | Communication control apparatus and communication / control system | |
US8850058B2 (en) | Ethernet-based data transmission method, ethernet nodes and control system | |
US9906320B2 (en) | Industrial network apparatus and data communication method | |
KR102013617B1 (en) | Method and apparatus for synchronizing time | |
JP6192995B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, COMMUNICATION METHOD, AND COMPUTER PROGRAM | |
EP2222003B1 (en) | Field control system | |
EP2715557B1 (en) | Method for improving accuracy in computation of one-way transfer time for network time synchronization | |
KR102148943B1 (en) | Programmable controller system and controller therefor | |
JP6428805B2 (en) | Arithmetic device, control device and control method | |
KR101636496B1 (en) | Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method | |
US9154249B2 (en) | System and method for synchronizing wireless devices without sending timestamp data | |
JP4961589B2 (en) | Network system and slave synchronization method | |
JP5328076B2 (en) | Method and control system for synchronizing sub-units in time, and sub-unit capable of time synchronization | |
US12140932B2 (en) | Industrial device supporting multiple time synchronization protocols | |
KR102291573B1 (en) | Synchronization method and system among multiple MCUs in EtherCAT-based slave system | |
CN107402534A (en) | Adjusting method, EtherCAT main websites and computer-readable recording medium | |
WO2022185589A1 (en) | Information processing device, method, and program | |
KR20170135384A (en) | Apparatus for distributed clock synchronization based on EtherCAT, method thereof and computer recordable medium storing the method | |
JP2014146877A (en) | Communication system and time synchronization | |
CN103441832A (en) | Clock synchronization method, system and equipment based on PTP | |
US20180013506A1 (en) | Communication device, communication system, and method for synchronised transmission of telegrams | |
KR101243434B1 (en) | Synchronization method for fieldbus using gateway and synchronization system for fieldbus using gateway | |
JP2017068353A (en) | Numerical control system having synchronous control function between unit | |
KR20150058943A (en) | OPTIMAL PHASING OF NODES SEARCH SYSTEM FOR EtherCAT | |
KR100597436B1 (en) | Apparatus and Method for Synchronizing Cycle Time in Wireless 1394 System |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091120 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120210 |
|
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: 20120222 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20120302 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120306 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150406 Year of fee payment: 3 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20130708 |
|
A072 | Dismissal of procedure |
Free format text: JAPANESE INTERMEDIATE CODE: A072 Effective date: 20131023 |
|
LAPS | Cancellation because of no payment of annual fees |