JP2007228462A - Slave unit - Google Patents

Slave unit Download PDF

Info

Publication number
JP2007228462A
JP2007228462A JP2006049660A JP2006049660A JP2007228462A JP 2007228462 A JP2007228462 A JP 2007228462A JP 2006049660 A JP2006049660 A JP 2006049660A JP 2006049660 A JP2006049660 A JP 2006049660A JP 2007228462 A JP2007228462 A JP 2007228462A
Authority
JP
Japan
Prior art keywords
communication
signal
comparison value
value
timer
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.)
Granted
Application number
JP2006049660A
Other languages
Japanese (ja)
Other versions
JP4645476B2 (en
Inventor
Yoshihiro Fujisaki
好洋 藤崎
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2006049660A priority Critical patent/JP4645476B2/en
Publication of JP2007228462A publication Critical patent/JP2007228462A/en
Application granted granted Critical
Publication of JP4645476B2 publication Critical patent/JP4645476B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To continuously carry out control operation of a slave unit even when communication data are omitted. <P>SOLUTION: A slave unit comprises: a timer 11 which is cleared by a communication timing signal 5, a comparison value setting means 12, a comparator 13 which outputs a matching signal 14, and an initiation signal generating means 15 for outputting a slave control initiation signal 16 when the communication timing signal 5 or the matching signal 14 is inputted. When the communication timing signal 5 is inputted, a timer value corresponding to the time adding a timing margin Tm to one communication cycle is set as a comparison value 12a and when the matching signal 14 is inputted, a value adding a timer value corresponding to one communication cycle to the present comparison value 12a is set as a new comparison value 12a. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、マスタ装置からスレーブ装置へのコマンドの伝送をサイクリック通信で行う制御システムにおいて、通信サイクルに同期した制御を行うスレーブ装置に関する。   The present invention relates to a slave device that performs control in synchronization with a communication cycle in a control system that transmits commands from a master device to a slave device by cyclic communication.

近年、高機能化や省配線化などを目的として、制御システムの各装置間の情報伝送に通信を用いることが広く行われるようになってきている。図6はこれを表したブロック図で、マスタ装置Mとスレーブ装置S間が通信線Lで結ばれており、マスタ装置Mから送信されたコマンドが通信線Lを介してスレーブ装置Sに伝わりスレーブ装置Sを制御する構成になっている。なお、通常は1台のマスタ装置Mに複数台のスレーブ装置Sが接続されるのが普通であるが、説明を容易にするため、本図ではスレーブ装置Sが1台の例を模式的に示している。   In recent years, communication has been widely used for information transmission between devices of a control system for the purpose of higher functionality and reduced wiring. FIG. 6 is a block diagram showing this. The master device M and the slave device S are connected by a communication line L, and a command transmitted from the master device M is transmitted to the slave device S via the communication line L. The apparatus S is configured to be controlled. Normally, a plurality of slave devices S are normally connected to one master device M. However, for ease of explanation, an example in which one slave device S is schematically shown in FIG. Show.

一般に通信ではノイズ等により通信異常が発生し得るが、この時、単にデータが化ける場合だけではなく、状況によってはその周期のデータが抜けて消失することもある。用途によってはこの通信データ抜けは問題にならない場合もあるが、リアルタイム制御を目的としてサイクリック通信を行う場合には問題となることが多い。   In general, a communication abnormality may occur due to noise or the like in communication, but at this time, not only data may be garbled but also data in that cycle may be lost due to circumstances. Depending on the application, this missing communication data may not be a problem, but it is often a problem when performing cyclic communication for the purpose of real-time control.

例えば、サーボ制御のようなモーションコントロールを行う場合では、通信データ抜けが発生した周期のスレーブ装置の制御演算を停止すると動作が不安定になってしまう。したがって、通信データ抜けが生じた周期においても制御演算を継続して実行できるようにすることが重要となる。単純に受信した時に制御演算を実行したのでは、通信データ抜けが生じた周期の制御演算が欠落してしまうので、この解決策として、例えば、特許文献1に示すような制御が行われてきた。   For example, in the case of performing motion control such as servo control, the operation becomes unstable if the control calculation of the slave device in the cycle in which the communication data dropout occurs is stopped. Therefore, it is important that the control calculation can be continuously executed even in a cycle in which communication data is lost. If the control calculation is executed when simply received, the control calculation of the cycle in which the communication data is lost is lost. Therefore, as a solution, for example, control as shown in Patent Document 1 has been performed. .

図7はこの制御構成を示すブロック図であり、スレーブ装置Sの内部に構成されるものである。図7において、タイマ1はタイマ周期指令2に基づいた周期で動作する。そして起動信号生成手段3はこのタイマ1の出力値を用いてタイマ1の周期に同期したパルス信号を生成し、スレーブ制御起動信号4として出力する。   FIG. 7 is a block diagram showing this control configuration, which is configured inside the slave device S. In FIG. 7, the timer 1 operates in a cycle based on the timer cycle command 2. The start signal generating means 3 generates a pulse signal synchronized with the period of the timer 1 using the output value of the timer 1 and outputs it as a slave control start signal 4.

このスレーブ制御起動信号4によって制御演算を周期的に起動し、この演算処理の中でマスタ装置Mからの動作指令データが制御に反映される。また、通信タイミング信号5は通信サイクルに同期したタイミング基準となるパルス信号で、例えば通信フレームの受信完了信号などがこれに用いられる。   The control calculation is periodically started by the slave control activation signal 4, and the operation command data from the master device M is reflected in the control during the calculation process. The communication timing signal 5 is a pulse signal serving as a timing reference synchronized with the communication cycle. For example, a communication frame reception completion signal is used for this.

この通信タイミング信号5とスレーブ制御起動信号4が遅延時間検出手段6に入力され、通信タイミング信号5に対するスレーブ制御起動信号4の遅延時間7を測定して出力する。そして、基準遅延時間8と遅延時間7の差に制御ゲイン9を乗じた結果に基準タイマ周期10を加算したものがタイマ周期指令2となるように構成されている。なお、基準タイマ周期10には通信周期に相当する値が予め設定されている。   The communication timing signal 5 and the slave control activation signal 4 are input to the delay time detecting means 6, and the delay time 7 of the slave control activation signal 4 with respect to the communication timing signal 5 is measured and output. The result obtained by multiplying the difference between the reference delay time 8 and the delay time 7 by the control gain 9 and adding the reference timer period 10 is the timer period command 2. Note that a value corresponding to the communication cycle is preset in the reference timer cycle 10.

この構成において、通信タイミング信号5を基準にしたスレーブ起動信号4の遅延時間7が基準遅延時間8よりも短い場合には、制御ゲイン9の出力値が正となるのでタイマ1は基準タイマ周期10、すなわち通信周期よりも長い周期で動作する。これによりスレーブ制御起動信号4の周期も通信周期より長くなって、遅延時間7が基準遅延時間8に近づくように作用する。   In this configuration, when the delay time 7 of the slave activation signal 4 based on the communication timing signal 5 is shorter than the reference delay time 8, the output value of the control gain 9 becomes positive, so that the timer 1 has a reference timer period 10 That is, it operates at a cycle longer than the communication cycle. As a result, the period of the slave control activation signal 4 also becomes longer than the communication period, so that the delay time 7 approaches the reference delay time 8.

この結果、やがて遅延時間7が基準遅延時間8と一致すると制御ゲイン9の出力値がゼロになるので、タイマ1は基準タイマ周期10、すなわち通信周期で動作するようになり、ここで安定化する。逆に、遅延時間7が基準遅延時間8よりも長い場合には、制御ゲイン9の出力値が負となるのでタイマ1は通信周期よりも短い周期で動作する。これによりスレーブ制御起動信号4の周期も通信周期よりも短くなって遅延時間7が基準遅延時間8に近づくように作用し、やがて遅延時間7が基準遅延時間8と一致する。   As a result, when the delay time 7 eventually coincides with the reference delay time 8, the output value of the control gain 9 becomes zero, so that the timer 1 operates in the reference timer period 10, that is, the communication period, and is stabilized here. . On the other hand, when the delay time 7 is longer than the reference delay time 8, the output value of the control gain 9 becomes negative, so that the timer 1 operates at a cycle shorter than the communication cycle. As a result, the cycle of the slave control activation signal 4 also becomes shorter than the communication cycle, so that the delay time 7 approaches the reference delay time 8, and the delay time 7 eventually coincides with the reference delay time 8.

このように、閉ループ制御の働きにより、常に遅延時間7が基準遅延時間8と一致するように動作し、この結果、スレーブ制御起動信号4は通信タイミング信号5に同期する。特に、基準遅延時間8をゼロに設定した場合には、遅延時間7もゼロになるように制御されるので通信タイミング信号5とスレーブ制御起動信号4のタイミングは一致する。   As described above, the operation of the closed loop control always operates so that the delay time 7 coincides with the reference delay time 8. As a result, the slave control activation signal 4 is synchronized with the communication timing signal 5. In particular, when the reference delay time 8 is set to zero, the delay time 7 is controlled to be zero, so the timing of the communication timing signal 5 and the slave control activation signal 4 coincide.

ここで、通信データ抜けが生じた場合は、その周期の通信タイミング信号5も欠落するが、この通信タイミング信号5ではなくタイマ1を基準にしてスレーブ制御起動信号4は生成されるので、この場合でも制御演算を継続して実行することができる。この停止することなく連続して実行される制御演算の中で、通信データ抜けが発生した場合には閉ループ制御処理を停止してタイマ周期指令2を保持する操作を行えば、タイマ1の動作が不安定になることもない。
特開2003−189654号公報
Here, when communication data is lost, the communication timing signal 5 of that cycle is also lost, but the slave control activation signal 4 is generated based on the timer 1 instead of this communication timing signal 5, so in this case However, the control calculation can be executed continuously. If the communication data is lost in the control calculation that is continuously executed without stopping, the operation of the timer 1 can be performed by stopping the closed-loop control process and holding the timer cycle command 2. There is no instability.
JP 2003-189654 A

しかし、このような従来のスレーブ装置には、閉ループ制御を行っているが故に制御ゲイン9の適切な調整が不可欠であり、このゲイン調整を行う作業が面倒であるという課題がある。   However, since such a conventional slave device performs closed loop control, appropriate adjustment of the control gain 9 is indispensable, and there is a problem that the work of performing this gain adjustment is troublesome.

ゲイン調整の際に閉ループ制御の安定性を判断するには、ステップ応答のような時間軸の収束波形を観測するのが一般的であるが、スレーブ装置の制御はソフトウェアで構成されることが多いので、各部の信号波形を観測するには工夫が必要となる。   To determine the stability of closed-loop control during gain adjustment, it is common to observe a time-axis convergent waveform such as a step response, but slave device control is often configured by software. Therefore, it is necessary to devise in order to observe the signal waveform of each part.

例えば、D/Aコンバータを実装してオシロスコープで観測したり、あるいは、各部のデータを時系列にメモリに保存しておき、後で読み出してパーソナルコンピュータ上に表示させるなどの方法を行うが、いずれの方法も面倒である。   For example, a D / A converter is mounted and observed with an oscilloscope, or data of each part is stored in a memory in time series and later read out and displayed on a personal computer. The method is also troublesome.

本発明はこのような従来の課題を解決するものであり、閉ループ制御を用いずに、通信データ抜けが生じた場合でも制御演算を継続して実行できるスレーブ装置の提供を目的とする。   The present invention solves such a conventional problem, and an object of the present invention is to provide a slave device capable of continuously executing a control operation even when communication data is lost without using closed loop control.

上記課題を解決するために本発明は、通信タイミング信号でクリアされるタイマと、比較値を設定する比較値設定手段と、タイマ値と比較値を比較して両者の値が一致した時に一致信号を出力する比較器と、通信タイミング信号もしくは一致信号が入力されればスレーブ制御起動信号を出力する起動信号生成手段とを備え、前記比較値設定手段は、通信タイミング信号が入力された時には通信1周期分にタイミングマージンを加えた時間に相当するタイマ値を比較値として設定し、また、一致信号が入力された時には通信1周期分に相当するタイマ値を現在の比較値に加算した値を新たな比較値として設定し、さらに、前記タイミングマージンは通信周期の最大変動幅よりも大なる値として構成している。   In order to solve the above problems, the present invention provides a timer that is cleared by a communication timing signal, a comparison value setting means for setting a comparison value, and a match signal when the timer value and the comparison value are compared and the values match. And a start signal generating means for outputting a slave control start signal when a communication timing signal or a coincidence signal is input, and the comparison value setting means is configured to communicate 1 when a communication timing signal is input. A timer value corresponding to the time obtained by adding the timing margin to the period is set as a comparison value. When a coincidence signal is input, a value obtained by adding the timer value corresponding to one communication period to the current comparison value is newly set. Further, the timing margin is configured as a value larger than the maximum fluctuation width of the communication cycle.

本発明のスレーブ装置によれば、従来例のような閉ループ制御の構成ではないので面倒
な制御ゲインの調整は不要である。また、基本的には通信タイミング信号でスレーブ装置の制御演算を起動する構成であるが、通信タイミング信号が得られない場合は一致信号によりスレーブ装置の制御演算を起動するため、通信データ抜けが生じた場合においてもスレーブ装置の制御を継続できる。
According to the slave device of the present invention, since it is not a closed loop control configuration as in the conventional example, troublesome adjustment of the control gain is unnecessary. Basically, the slave device control calculation is started by the communication timing signal, but if the communication timing signal is not obtained, the slave device control calculation is started by the coincidence signal, so communication data loss occurs. In this case, the slave device can continue to be controlled.

また、比較値が予め設定された上限値以上になった場合に、タイムアウト異常処理を実行する構成としたことにより、通信機器で不可欠なタイムアウトの検出処理を別途独立して設ける必要がなく、スレーブ装置の構成を簡単にすることができる。   In addition, when the comparison value exceeds the preset upper limit value, the timeout abnormality process is executed, so that it is not necessary to provide a separate timeout detection process that is indispensable in the communication device, and the slave The configuration of the apparatus can be simplified.

本発明は、通信タイミング信号でクリアされるタイマと、比較値を設定する比較値設定手段と、タイマ値と比較値を比較して両者の値が一致した時に一致信号を出力する比較器と、通信タイミング信号もしくは一致信号が入力されればスレーブ制御起動信号を出力する起動信号生成手段とを備え、前記比較値設定手段は、通信タイミング信号が入力された時には通信1周期分にタイミングマージンを加えた時間に相当するタイマ値を比較値として設定し、また、一致信号が入力された時には通信1周期分に相当するタイマ値を現在の比較値に加算した値を新たな比較値として設定し、さらに、前記タイミングマージンは通信周期の最大変動幅よりも大なる値とする構成としている。   The present invention includes a timer that is cleared by a communication timing signal, a comparison value setting means that sets a comparison value, a comparator that compares the timer value and the comparison value and outputs a match signal when both values match, And a start signal generating means for outputting a slave control start signal when a communication timing signal or a coincidence signal is input, and the comparison value setting means adds a timing margin to one communication cycle when the communication timing signal is input. Set a timer value corresponding to the specified time as a comparison value, and when a coincidence signal is input, set a value obtained by adding a timer value corresponding to one communication cycle to the current comparison value as a new comparison value, Further, the timing margin is set to a value larger than the maximum fluctuation range of the communication cycle.

また、比較値が予め設定された上限値以上になった場合に、タイムアウト異常処理を実行する構成としている。   Further, when the comparison value is equal to or greater than a preset upper limit value, a timeout abnormality process is executed.

以下、本発明の実施例について図面を用いて説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は実施例1の制御構成を示すブロック図である。通信タイミング信号5はタイマ11をクリアするように接続されており、さらにこのタイミングで比較値12aを設定するために比較値設定手段12にも接続されている。   FIG. 1 is a block diagram illustrating a control configuration of the first embodiment. The communication timing signal 5 is connected so as to clear the timer 11, and is further connected to the comparison value setting means 12 in order to set the comparison value 12a at this timing.

なお、通信タイミング信号5は図7に示す従来例の説明に使用したものと同じなので、同一符号を付与している。   The communication timing signal 5 is the same as that used in the description of the conventional example shown in FIG.

タイマ値11aと比較値12aは比較器13で比較がなされ、両者の値が一致した時に一致信号14が出力される。この一致信号14と通信タイミング信号5は起動信号生成手段15に入力され、両信号の論理和をとってスレーブ制御起動信号16として出力される。そして、この信号でスレーブ装置の制御演算を起動するように構成されている。   The timer value 11a and the comparison value 12a are compared by the comparator 13, and a coincidence signal 14 is output when the two values coincide. The coincidence signal 14 and the communication timing signal 5 are input to the activation signal generation means 15, and the logical sum of both signals is output as the slave control activation signal 16. And it is comprised so that the control calculation of a slave apparatus may be started with this signal.

また、一致信号14は比較値設定手段12にも入力されており、したがって、比較値設定手段12は通信タイミング信号5の入力時と一致信号14の入力時という2種類のタイミングで比較値12aを設定する。   Further, the coincidence signal 14 is also input to the comparison value setting means 12, and therefore the comparison value setting means 12 outputs the comparison value 12a at two kinds of timings, that is, when the communication timing signal 5 is inputted and when the coincidence signal 14 is inputted. Set.

図2は比較値設定手段12の動作を示すフローチャートである。入力信号が通信タイミング信号5の場合には比較値12aをC1に設定し、また、入力信号が一致信号14の場合には、現在の比較値12aにKTcを加えたものを新たな比較値12aとして設定する。   FIG. 2 is a flowchart showing the operation of the comparison value setting means 12. When the input signal is the communication timing signal 5, the comparison value 12a is set to C1, and when the input signal is the coincidence signal 14, the current comparison value 12a plus KTc is used as the new comparison value 12a. Set as.

ここで、C1とKTcは下記の数式に基づいており、式1において、Tcは通信周期、Tmはタイミングマージン、Kは時間をタイマ値に変換するための係数である。よって、C1は通信周期TcにタイミングマージンTmを加えた時間に相当するタイマ値を、また、KTcは通信周期Tcに相当するタイマ値をそれぞれ表している。   Here, C1 and KTc are based on the following formula, where Tc is a communication period, Tm is a timing margin, and K is a coefficient for converting time into a timer value. Therefore, C1 represents a timer value corresponding to the time obtained by adding the timing margin Tm to the communication cycle Tc, and KTc represents a timer value corresponding to the communication cycle Tc.

したがって、現在の比較値12aにKTcを加えたものを新たな比較値12aとして設定する操作は、現在の比較値12aがC1であればC2に、C2であればC3にというように順に増大させていくことに等しい。式1には例としてC4までしか記していないが、それ以上に増大させる場合も同様の演算が行われる。   Therefore, the operation of setting a value obtained by adding KTc to the current comparison value 12a as a new comparison value 12a is sequentially increased to C2 if the current comparison value 12a is C1, and to C3 if the current comparison value 12a is C2. It is equivalent to going. Although only C4 is shown as an example in Equation 1, the same calculation is performed when the number is further increased.

Figure 2007228462
Figure 2007228462

図3は全体の動作を示すタイムチャートである。タイミングt1からt3までは正常に通信フレーム17を受信しているので通信タイミング信号5が出力されており、この信号でスレーブ装置の制御演算が起動する。同時に、この信号によりタイマ値11aがクリアされるので、このt1からt3の期間においてはタイマ値11aが比較値12a以上になることはない。次に、t4のタイミングでは、通信フレーム17が抜けたので通信タイミング信号5は出力されない。   FIG. 3 is a time chart showing the overall operation. Since the communication frame 17 is normally received from the timing t1 to the timing t3, the communication timing signal 5 is output, and the control calculation of the slave device is started by this signal. At the same time, since the timer value 11a is cleared by this signal, the timer value 11a does not become the comparison value 12a or more during the period from t1 to t3. Next, at the timing of t4, since the communication frame 17 has been lost, the communication timing signal 5 is not output.

このためタイマ値11aはクリアされることなく増加して、タイミングマージンTmを経過した時点で比較値12aと一致し、一致信号14が出力される。この信号でスレーブ装置の制御演算が起動するので、通信データ抜けが発生しても制御を継続することができる。   Therefore, the timer value 11a increases without being cleared, and coincides with the comparison value 12a when the timing margin Tm elapses, and the coincidence signal 14 is output. Since the control operation of the slave device is activated by this signal, control can be continued even if communication data is lost.

また、この時に比較値12aがC1からC2に変化(a部)して、次回の比較に備える。そして、次のタイミングt5では通信フレームを再び正常に受信したので、通信タイミング信号5が出力される。   At this time, the comparison value 12a changes from C1 to C2 (part a) to prepare for the next comparison. Since the communication frame is normally received again at the next timing t5, the communication timing signal 5 is output.

これにより、比較値12aはC2からC1に変化(b部)して初期状態に戻る。なお、特に図示していないが、電源投入時にはタイマ11は停止状態にあり、その後に最初の通信フレーム17を受信した時点、すなわち、最初の通信タイミング信号5の出力時点からタイマ11が動作を開始するように構成している。   As a result, the comparison value 12a changes from C2 to C1 (part b) and returns to the initial state. Although not specifically shown, the timer 11 is in a stopped state when the power is turned on, and the timer 11 starts operating from the time when the first communication frame 17 is received after that, that is, from the time when the first communication timing signal 5 is output. It is configured to do.

こうすることで、電源投入後の通信フレーム17が受信されない期間に、意図せぬ一致信号14が出力されないようにしている。   In this way, an unintended coincidence signal 14 is prevented from being output during a period in which the communication frame 17 after power-on is not received.

通信フレーム17を受信する周期は常に一定というわけではなく、現実には僅かながら変動が生じるので、これによる問題が生じないようにタイミングマージンTmを設定する必要がある。   The period for receiving the communication frame 17 is not always constant, and actually varies slightly, so it is necessary to set the timing margin Tm so as not to cause a problem due to this.

なお、ここで言う変動とは通信周期Tc自体の誤差のことではなく、動作中の揺らぎ、すなわちジッタを意味し、これは特に、通信経路に中継装置を配置したような場合に大きくなるものである。   Note that the fluctuation referred to here is not an error in the communication cycle Tc itself, but means fluctuation during operation, that is, jitter, which is particularly large when a relay device is arranged in the communication path. is there.

図4は通信タイミング信号5の周期の変動を示しており、上側が通信周期が基準値Tcである場合、また、下側は最大値Tcmaxになった場合である。   FIG. 4 shows the fluctuation of the cycle of the communication timing signal 5, where the upper side is when the communication cycle is the reference value Tc, and the lower side is when the maximum value Tcmax is reached.

タイミングマージンTmは、TcmaxからTcを減算した結果である最大変動幅Tdmaxよりも大きくなるように設定する。これにより、変動のために通信フレーム17の受信が遅れた場合に、間違って一致信号14が出力されてしまう不具合を回避できる。   The timing margin Tm is set to be larger than the maximum fluctuation range Tdmax that is the result of subtracting Tc from Tcmax. Thereby, when reception of the communication frame 17 is delayed due to fluctuation, it is possible to avoid a problem that the coincidence signal 14 is erroneously output.

なお、一致信号14でスレーブ装置の制御演算を起動する場合には、通信タイミング信号5で起動する場合に比べてタイミングマージンTmの時間だけ制御演算の起動が遅れることになるが、一般にタイミングマージンTmは通信周期Tcに対して十分に短い時間となるので、この遅れは制御にほとんど影響を与えない。   When the control operation of the slave device is activated by the coincidence signal 14, the activation of the control operation is delayed by the time of the timing margin Tm as compared with the case of activation by the communication timing signal 5, but generally the timing margin Tm Since this is a sufficiently short time with respect to the communication cycle Tc, this delay hardly affects the control.

以上のように、実施例1の構成によれば、通信フレーム17を正常に受信した場合には通信タイミング信号5が出力され、また、通信データ抜けが生じた場合には一致信号14が出力されることにより、これらの信号を用いてスレーブ装置の制御演算を途切れることなく継続して起動することができる。   As described above, according to the configuration of the first embodiment, the communication timing signal 5 is output when the communication frame 17 is normally received, and the coincidence signal 14 is output when communication data is lost. Thus, the control calculation of the slave device can be continuously started without interruption using these signals.

また、構成要素には従来例で存在した制御ゲインが無いので、面倒なゲイン調整は不要である。加えて、本構成要素のタイマ11や比較器13は一般的な制御用CPUに内蔵されていることが多いため、特別なハードウェアを必要としない。   In addition, since the component does not have the control gain existing in the conventional example, troublesome gain adjustment is unnecessary. In addition, since the timer 11 and the comparator 13 of this component are often built in a general control CPU, no special hardware is required.

通信タイミング信号5や一致信号14でスレーブ装置の制御演算を起動するのには、個別に割り込みを行いそれぞれの割り込み処理の中で制御演算を実行すればよく、そうすれば、起動信号生成手段15にも特別なハードウェアを必要としない。   In order to start the control operation of the slave device by the communication timing signal 5 or the coincidence signal 14, it is only necessary to individually interrupt and execute the control operation in each interrupt processing, and then the start signal generating means 15 Even no special hardware is required.

さらに、比較器設定手段12はソフトウェアで構成可能であるので、結局、必要な部品はCPUのみとなり、低コストで実現可能である。   Furthermore, since the comparator setting means 12 can be configured by software, after all, the necessary components are only the CPU, which can be realized at low cost.

なお、説明を簡単にするために、通信タイミング信号5と同じタイミングでスレーブ装置の制御演算を起動する構成としたが、通信タイミング信号5もしくは出力であるスレーブ制御起動信号16の後段に遅延手段を介在させても構わない。こうすれば、従来例と同様に通信タイミング信号5の出力からスレーブ制御起動までの間に任意の遅延時間を設けることができ、応用の自由度が高まる。   In order to simplify the explanation, the control operation of the slave device is activated at the same timing as the communication timing signal 5, but a delay means is provided at the subsequent stage of the communication timing signal 5 or the slave control activation signal 16 that is the output. It may be interposed. By so doing, an arbitrary delay time can be provided between the output of the communication timing signal 5 and the slave control activation as in the conventional example, and the degree of freedom of application is increased.

また、一致信号14による制御演算の起動を割り込みで行う場合には、電源投入後の最初の通信タイミング信号5の出力時点で割り込みを許可する方法をとれば、電源投入後すぐにタイマ11を動作させても問題はない。この方法は、タイマ11の起動、停止が自由にはできない場合に有効となる。   In addition, when the control calculation is activated by the coincidence signal 14 by an interrupt, the timer 11 is operated immediately after the power is turned on if the interrupt is permitted when the first communication timing signal 5 is output after the power is turned on. There is no problem even if you let it. This method is effective when the timer 11 cannot be started and stopped freely.

さらに、比較器13が、一致ではなくタイマ値11aが比較値12a以上となったこと、あるいは超えたことを検出し、この変化タイミングを一致信号14の代わりとして使用してもよいことは言うまでもない。   Furthermore, it is needless to say that the comparator 13 may detect that the timer value 11a is not equal but the timer value 11a is equal to or greater than the comparison value 12a, and this change timing may be used in place of the coincidence signal 14. .

通信を用いた制御システムでは、断線等が生じた場合にこれを確実に検出してスレーブ装置を安全に停止させなければならないが、これにはタイムアウトの検出で行うのが一般的である。このタイムアウトの検出機能を付加したのが実施例2である。   In a control system using communication, when a disconnection or the like occurs, it is necessary to reliably detect this and stop the slave device safely. This is generally performed by detecting a timeout. In the second embodiment, this time-out detection function is added.

図5は実施例2における比較値設定手段12の動作を示すフローチャートである。図5において、点線で囲んだ部分が実施例1の説明に用いた図2から追加された部分である。
入力信号が一致信号14であった場合に、現在の比較値12aが予め設定された上限値以上であるかどうかを判断し、上限値以上であった場合にはタイマ11を停止してタイムアウト異常処理を実行する。そうではない場合には実施例1に示した処理を行う構成になっている。
FIG. 5 is a flowchart showing the operation of the comparison value setting means 12 in the second embodiment. In FIG. 5, a portion surrounded by a dotted line is a portion added from FIG. 2 used in the description of the first embodiment.
When the input signal is the coincidence signal 14, it is determined whether or not the current comparison value 12a is greater than or equal to a preset upper limit value. Execute the process. Otherwise, the process shown in the first embodiment is performed.

実施例1の説明に用いた図3において、t7以降のタイミングに本実施例の動作を示している。なお、ここでは、比較値12aの上限値が予めC4に設定されている。タイミングt7以降では通信フレーム17の受信がないので、すでに説明した通りに一致信号14が通信タイミング信号5を補うように出力され、また、比較値12aがC1からC2(c部)、C2からC3(d部)、C3からC4(e部)と順に増加する。   In FIG. 3 used for the description of the first embodiment, the operation of the present embodiment is shown at timings after t7. Here, the upper limit value of the comparison value 12a is set in advance to C4. Since the communication frame 17 is not received after the timing t7, the coincidence signal 14 is output so as to supplement the communication timing signal 5 as described above, and the comparison value 12a is C1 to C2 (part c), and C2 to C3. (D part) and increase in order from C3 to C4 (e part).

そしてタイミングt10においても通信フレーム17が受信されないため、それまでと同様に一致信号14が出力されるが、比較値12aが上限値であるC4になっているためこれ以上には比較値を増加せず、タイマ11を停止(f部)させてタイムアウト異常処理を実行する。本図ではタイムアウト異常処理の一部として、タイムアウト検出信号18をLからHに変化させている例を示している。   Since the communication frame 17 is not received at the timing t10, the coincidence signal 14 is output as before. However, since the comparison value 12a is the upper limit C4, the comparison value is increased further. First, the timer 11 is stopped (part f) and timeout abnormality processing is executed. This figure shows an example in which the timeout detection signal 18 is changed from L to H as part of timeout abnormality processing.

以上の動作により、タイムアウト検出時間は、事前に設定された上限値C4に相当する時間となる。   With the above operation, the timeout detection time becomes a time corresponding to the preset upper limit value C4.

本構成によれば、単にタイムアウトの検出機能を実現するだけではなく、一致信号14の出力タイミングを生成するタイマ11をタイムアウトの検出用としても利用しているので、タイムアウトの検出専用に独立したタイマを設けなくて済むという利点がある。   According to this configuration, the timer 11 that generates the output timing of the coincidence signal 14 is used not only for realizing the time-out detection function but also for time-out detection. Therefore, an independent timer dedicated to time-out detection is used. There is an advantage that it is not necessary to provide.

また、実施例1に対して付加した部分、すなわち、図5の点線で囲んだ部分はソフトウェアで構成できるので、実施例1と同じコストで実現できる。   Further, since the portion added to the first embodiment, that is, the portion surrounded by the dotted line in FIG. 5 can be configured by software, it can be realized at the same cost as the first embodiment.

なお、一致信号14による制御演算の起動を割り込みで行う場合には、タイムアウト検出時にタイマ11を停止する処理に代えて、割り込みを禁止する処理としても構わない。   Note that when the control calculation is activated by the coincidence signal 14 by an interrupt, the interrupt may be prohibited instead of the process of stopping the timer 11 when a timeout is detected.

本発明の実施例1における制御ブロック図Control block diagram in Embodiment 1 of the present invention 本発明の実施例1における比較値設定手段12のフローチャートThe flowchart of the comparison value setting means 12 in Example 1 of this invention. 本発明の実施例1および実施例2における動作を示すタイムチャートThe time chart which shows the operation | movement in Example 1 and Example 2 of this invention 本発明の実施例1におけるタイミングマージンTmの説明図Explanatory drawing of timing margin Tm in Example 1 of this invention 本発明の実施例2における比較値設定手段12のフローチャートThe flowchart of the comparison value setting means 12 in Example 2 of this invention. 通信を用いた制御システムの模式図Schematic diagram of a control system using communication 従来例における制御ブロック図Control block diagram in the conventional example

符号の説明Explanation of symbols

5 通信タイミング信号
11 タイマ
12 比較値設定手段
13 比較器
14 一致信号
15 起動信号生成手段
16 スレーブ制御起動信号

5 Communication timing signal 11 Timer 12 Comparison value setting means 13 Comparator 14 Match signal 15 Start signal generation means 16 Slave control start signal

Claims (2)

通信タイミング信号でクリアされるタイマと、比較値を設定する比較値設定手段と、タイマ値と比較値を比較して両者の値が一致した時に一致信号を出力する比較器と、通信タイミング信号もしくは一致信号が入力されればスレーブ制御起動信号を出力する起動信号生成手段とを備え、前記比較値設定手段は、通信タイミング信号が入力された時には通信1周期分にタイミングマージンを加えた時間に相当するタイマ値を比較値として設定し、また、一致信号が入力された時には通信1周期分に相当するタイマ値を現在の比較値に加算した値を新たな比較値として設定し、さらに、前記タイミングマージンは通信周期の最大変動幅よりも大なる値としたことを特徴とするスレーブ装置。 A timer that is cleared by a communication timing signal, a comparison value setting means for setting a comparison value, a comparator that compares the timer value and the comparison value and outputs a coincidence signal, and a communication timing signal or An activation signal generating means for outputting a slave control activation signal when a coincidence signal is input, and the comparison value setting means corresponds to a time obtained by adding a timing margin to one communication period when a communication timing signal is input The timer value to be set is set as a comparison value, and when a coincidence signal is input, a value obtained by adding the timer value corresponding to one communication cycle to the current comparison value is set as a new comparison value. A slave device characterized in that the margin is a value larger than the maximum fluctuation range of the communication cycle. 比較値が予め設定された上限値以上になった場合に、タイムアウト異常処理を実行することを特徴とする請求項1記載のスレーブ装置。

2. The slave device according to claim 1, wherein timeout abnormality processing is executed when the comparison value is equal to or greater than a preset upper limit value.

JP2006049660A 2006-02-27 2006-02-27 Slave device Active JP4645476B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006049660A JP4645476B2 (en) 2006-02-27 2006-02-27 Slave device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006049660A JP4645476B2 (en) 2006-02-27 2006-02-27 Slave device

Publications (2)

Publication Number Publication Date
JP2007228462A true JP2007228462A (en) 2007-09-06
JP4645476B2 JP4645476B2 (en) 2011-03-09

Family

ID=38549786

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006049660A Active JP4645476B2 (en) 2006-02-27 2006-02-27 Slave device

Country Status (1)

Country Link
JP (1) JP4645476B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011035439A (en) * 2009-07-29 2011-02-17 Toyota Motor Corp Synchronous communication system
US8837516B2 (en) 2011-04-14 2014-09-16 Canon Kabushiki Kaisha Communication apparatus, communication system, communication apparatus control method and non-transitory computer-readable storage medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9883474B2 (en) 2013-07-19 2018-01-30 Mitsubishi Electric Corporation Ring-shaped synchronous network system and time slave station

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07303100A (en) * 1994-05-10 1995-11-14 Fuji Electric Co Ltd Signal synchronization control circuit
JPH08288937A (en) * 1995-04-10 1996-11-01 Fujitsu Ltd Frame pulse generating circuit
JP2000049599A (en) * 1998-07-27 2000-02-18 Nec Eng Ltd Frame phase synchronizing circuit
JP2002281006A (en) * 2001-03-22 2002-09-27 Nec Eng Ltd Timing signal generating circuit
JP2005094933A (en) * 2003-09-18 2005-04-07 Fuji Electric Fa Components & Systems Co Ltd Motor driving device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07303100A (en) * 1994-05-10 1995-11-14 Fuji Electric Co Ltd Signal synchronization control circuit
JPH08288937A (en) * 1995-04-10 1996-11-01 Fujitsu Ltd Frame pulse generating circuit
JP2000049599A (en) * 1998-07-27 2000-02-18 Nec Eng Ltd Frame phase synchronizing circuit
JP2002281006A (en) * 2001-03-22 2002-09-27 Nec Eng Ltd Timing signal generating circuit
JP2005094933A (en) * 2003-09-18 2005-04-07 Fuji Electric Fa Components & Systems Co Ltd Motor driving device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011035439A (en) * 2009-07-29 2011-02-17 Toyota Motor Corp Synchronous communication system
US8837516B2 (en) 2011-04-14 2014-09-16 Canon Kabushiki Kaisha Communication apparatus, communication system, communication apparatus control method and non-transitory computer-readable storage medium

Also Published As

Publication number Publication date
JP4645476B2 (en) 2011-03-09

Similar Documents

Publication Publication Date Title
EP2743793B1 (en) Circuit control system and method for dynamically adjusting voltage and frequency
US8866431B2 (en) Motor drive control apparatus
JP4935369B2 (en) Servo system
EP3392724B1 (en) Synchronization control method and synchronization control system for a plurality of controlled components
JP4645476B2 (en) Slave device
KR100958811B1 (en) Delay locked loop circuit
JP2011083841A (en) Robot control device, robot control system, and robot control method
JP3372430B2 (en) Synchronous control device
JP2005094933A (en) Motor driving device
JP2011191874A (en) Data signal transmission and reception method
JP2008254518A (en) On-vehicle communication device
JP2015130613A (en) communication system
KR102495030B1 (en) A receiving apparatus for recovering clock failure and transmission system including the same
JP2011130231A (en) Device and method for setting parameter
JP2010160713A (en) Field control device and field control method
JP2008236178A (en) Serial data receiving circuit
JP2015204484A (en) Bus communication system and master communication device
KR100440975B1 (en) Method and apparatus for transmission of serial data
US20170185216A1 (en) Synchronization Method and Touch Signal Processing System Using the Same
US10291443B2 (en) Serial communications unit and communication method for serial communications unit
JP2008252864A (en) Semiconductor device and method for driving the same
WO2021241220A1 (en) Communication device, communication method, and program
JP2002123301A (en) Controller
JP2005276121A (en) Serial encoder conversion apparatus and network servo system comprising same
JP2010206929A (en) Motor control device and position control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071218

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20091127

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100817

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101018

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101122

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131217

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4645476

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131217

Year of fee payment: 3