JP5202271B2 - Slave device and program - Google Patents

Slave device and program Download PDF

Info

Publication number
JP5202271B2
JP5202271B2 JP2008317789A JP2008317789A JP5202271B2 JP 5202271 B2 JP5202271 B2 JP 5202271B2 JP 2008317789 A JP2008317789 A JP 2008317789A JP 2008317789 A JP2008317789 A JP 2008317789A JP 5202271 B2 JP5202271 B2 JP 5202271B2
Authority
JP
Japan
Prior art keywords
slave
operation cycle
master
cycle
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008317789A
Other languages
Japanese (ja)
Other versions
JP2010140372A (en
Inventor
清史 竹内
琢 鴫原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP2008317789A priority Critical patent/JP5202271B2/en
Publication of JP2010140372A publication Critical patent/JP2010140372A/en
Application granted granted Critical
Publication of JP5202271B2 publication Critical patent/JP5202271B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Numerical Control (AREA)

Description

本発明は、マスタ装置と、制御対象物を制御するスレーブ装置とが接続されたシステムにおいて、スレーブ装置が制御対象物を制御する技術に関し、例えば、モーションコントローラとモータを制御するサーボアンプが通信線で接続されたモーションコントロールシステムにおいて、モータを位置指令で制御する技術に関する。   The present invention relates to a technology in which a slave device controls a control object in a system in which a master device and a slave device that controls the control object are connected. For example, a servo amplifier that controls a motion controller and a motor is a communication line. The present invention relates to a technique for controlling a motor with a position command in a motion control system connected by.

以下、マスタ装置と、制御対象物を制御するスレーブ装置とが接続されたシステムの例として、モーションコントローラ(以下、マスタ装置、またはマスタと呼ぶ)とモータを制御するサーボアンプ(以下、スレーブ装置、またはスレーブと呼ぶ)が通信線で接続されたモーションコントロールシステムについて説明する。   Hereinafter, as an example of a system in which a master device and a slave device that controls an object to be controlled are connected, a motion controller (hereinafter referred to as a master device or a master) and a servo amplifier that controls a motor (hereinafter referred to as a slave device, A motion control system in which a slave is connected by a communication line will be described.

モーションコントロールシステムでは、同期通信を行うためにマスタの動作周期とスレーブの動作周期を一致させることが望まれるものの、異なるメーカのマスタとスレーブを組み合わせて動作させる等の理由により、マスタとスレーブの動作周期が一致しないシステムを構築するケースも存在する。   In motion control systems, it is desirable to match the master operation cycle with the slave operation cycle in order to perform synchronous communication. There are cases where a system with a non-matching period is constructed.

ここで、マスタの動作周期とは、マスタがスレーブに指令を与え、各スレーブからの応答を受信して受信後の処理を完了するまでの一連の動作に要する時間を指す。
また、スレーブの動作周期とは、スレーブがマスタからの指令を受信してモータを駆動し、逆に応答情報をマスタに送信するまでの一連の動作に要する時間を指す。
Here, the operation cycle of the master refers to the time required for a series of operations until the master gives a command to the slave, receives a response from each slave, and completes the processing after reception.
The operation cycle of the slave indicates a time required for a series of operations until the slave receives a command from the master, drives the motor, and conversely transmits response information to the master.

本明細書では、マスタがスレーブに与える指令を位置指令(モータの回転量についての指令)、スレーブがマスタに応答する情報をモータの現在位置情報とする。
なお以降の記述では、基本的に位置指令時の動作についてのみ述べ、現在位置を応答するときの動作は、データを送受する方向が異なる以外は位置指令時と同様の動作となるため説明を省略する。
In this specification, a command given to the slave by the master is a position command (command about the amount of rotation of the motor), and information that the slave responds to the master is current position information of the motor.
In the following description, only the operation at the time of position command is basically described, and the operation at the time of responding the current position is the same as that at the time of position command except that the direction of data transmission / reception is different, so the description is omitted. To do.

マスタとスレーブの動作周期が一致していないシステムでは、各スレーブはマスタから受信した最新の位置指令を用いてモータを制御するのが一般的である。
そのときの動作を説明するにあたり、スレーブの一般的な構成を図4に示す。
In a system in which the operation periods of the master and slave do not match, it is common for each slave to control the motor using the latest position command received from the master.
In explaining the operation at that time, a general configuration of the slave is shown in FIG.

スレーブ500は、ネットワーク400を介してマスタ200に接続されている。
また、スレーブ500は、制御対象物であるモータ300に接続されている。
スレーブ500において、502は、スレーブの動作周期を制御する周期制御部である。
また、503は、タイマ部である。
504は、ネットワーク400側から来る周期信号を監視して適宜スレーブの動作周期をリセットする周期リセット部である。
505は、タイマ部503から受け取るタイマ値からスレーブの周期を検出して他の処理部に伝える周期検出部である。
507は、ネットワーク側から来る周期信号を受信したり、スレーブとネットワーク間のデータの送受を行うネットワーク通信部である。
509は、ネットワーク通信部6から受信したデータを元にモータ300を駆動するモータ制御部である。
The slave 500 is connected to the master 200 via the network 400.
The slave 500 is connected to a motor 300 that is a controlled object.
In the slave 500, a cycle control unit 502 controls the operation cycle of the slave.
Reference numeral 503 denotes a timer unit.
Reference numeral 504 denotes a periodic reset unit that monitors a periodic signal coming from the network 400 side and appropriately resets the operation period of the slave.
Reference numeral 505 denotes a cycle detection unit that detects the cycle of the slave from the timer value received from the timer unit 503 and transmits it to other processing units.
A network communication unit 507 receives a periodic signal coming from the network side and transmits / receives data between the slave and the network.
Reference numeral 509 denotes a motor control unit that drives the motor 300 based on data received from the network communication unit 6.

次に、図4に示すスレーブ500の動作について説明する。   Next, the operation of the slave 500 shown in FIG. 4 will be described.

スレーブ500内部のネットワーク通信部507は、マスタ200の動作周期に同期してネットワーク400から位置指令を受信する。
ネットワーク通信部507は受信した位置指令をスレーブの動作周期に同期してモータ制御部509に送り、これを受け取ったモータ制御部509は、その情報を元にモータ300を駆動する。
The network communication unit 507 inside the slave 500 receives a position command from the network 400 in synchronization with the operation cycle of the master 200.
The network communication unit 507 sends the received position command to the motor control unit 509 in synchronization with the operation cycle of the slave, and the motor control unit 509 that has received this drives the motor 300 based on the information.

周期リセット部504は、スレーブの動作周期を制御する。
また、タイマ部503は、タイマ値を周期検出部505へ伝え、周期検出部505は、タイマ値を参照して、予めスレーブの動作周期として定めた時間が経過するごとに周期の開始タイミングを示す周期信号をモータ制御部509へ送る。
一方で、ネットワーク通信部507は、マスタの動作周期が一定時間経過するごとにマスタ200から周期リセット信号を受信し、これを周期制御部502内部の周期リセット部504に送る。
周期リセット部504は、周期リセット信号を受信したら周期検出部505にリセットするように指令を与え、これを受信した周期検出部505は、それまで自身で管理していたスレーブ500の動作周期の開始タイミングをリセットする。
ただし、この周期リセットは、マスタ200とスレーブ500の動作周期が一致していないシステムにおいては、マスタ200の動作周期とスレーブの動作周期が一致するタイミングでのみリセットすることが考えられる。
The cycle reset unit 504 controls the operation cycle of the slave.
In addition, the timer unit 503 transmits the timer value to the cycle detection unit 505, and the cycle detection unit 505 refers to the timer value and indicates the start timing of the cycle every time that is set as a slave operation cycle in advance. A periodic signal is sent to the motor control unit 509.
On the other hand, the network communication unit 507 receives a cycle reset signal from the master 200 every time the master operation cycle elapses for a certain time, and sends this to the cycle reset unit 504 inside the cycle control unit 502.
When the cycle reset unit 504 receives the cycle reset signal, the cycle reset unit 504 gives an instruction to reset the cycle detection unit 505, and the cycle detection unit 505 that has received the command resets the start of the operation cycle of the slave 500 that has been managed by itself. Reset timing.
However, in the system in which the operation cycles of the master 200 and the slave 500 do not coincide with each other, this cycle reset may be reset only at a timing at which the operation cycle of the master 200 and the operation cycle of the slave coincide.

以上のように、ネットワーク通信部507は、マスタ200と同期するためにマスタの動作周期に同期してネットワーク400と通信し、ネットワーク通信部507とモータ制御部509はスレーブの動作周期に同期して通信を行う。   As described above, the network communication unit 507 communicates with the network 400 in synchronization with the operation cycle of the master in order to synchronize with the master 200, and the network communication unit 507 and the motor control unit 509 synchronize with the operation cycle of the slave. Communicate.

マスタとスレーブの動作周期が一致しないモーションコントロールシステムでの位置指令の伝わり方を図5に示す。
右方向が時刻の経過を表しており、マスタXの行はマスタ200の動作周期での位置指令、つまり図4におけるネットワーク通信部507がマスタ200の動作周期で位置指令を受信するタイミングおよび値の変化の例を示している。
また、スレーブYの行はスレーブ500の動作周期での位置指令、つまり図4におけるモータ制御部509がスレーブ500の動作周期で、ネットワーク通信部507から位置指令を受信するタイミングおよび値の変化の例を示している。
このスレーブYの位置指令の値は、スレーブの動作周期の開始時刻(周期ごとの四角の枠の左側の縦線の位置)の時点における、マスタXの動作周期での位置指令を参照したものである。
また、ΔTはスレーブの周期間における位置指令の差分を示している。
FIG. 5 shows how position commands are transmitted in a motion control system in which the operation cycles of the master and slave do not match.
The right direction represents the lapse of time, and the row of master X indicates the position command in the operation cycle of the master 200, that is, the timing and value at which the network communication unit 507 in FIG. 4 receives the position command in the operation cycle of the master 200. An example of change is shown.
The row of the slave Y is a position command in the operation cycle of the slave 500, that is, an example of timing and value change when the motor control unit 509 in FIG. 4 receives the position command from the network communication unit 507 in the operation cycle of the slave 500. Is shown.
The value of the slave Y position command refers to the position command in the operation cycle of the master X at the start time of the slave operation cycle (the position of the vertical line on the left side of the square frame for each cycle). is there.
Further, ΔT represents a position command difference between the slave cycles.

なお、モーションコントローラシステムの別の例として、特許文献1に記載のものがある。
特開2006−236243号公報
In addition, there exists a thing of patent document 1 as another example of a motion controller system.
JP 2006-236243 A

図5で示したように、マスタとスレーブの動作周期が一致していない場合は、マスタ側が一定の速度でモータを回すために周期ごとの位置指令データの増加分を一定にした場合であっても、スレーブがモータへ与える位置指令値の増加量(ΔT)は一定とならない。
故に周期ごとのモータの回転数に差が出てしまい、回転ムラが発生してしまうといった課題がある。
As shown in FIG. 5, when the operation cycle of the master and the slave does not match, the increase in the position command data for each cycle is constant in order for the master side to rotate the motor at a constant speed. However, the increase amount (ΔT) of the position command value given to the motor by the slave is not constant.
Therefore, there is a problem that a difference occurs in the number of rotations of the motor for each period, and uneven rotation occurs.

本発明は、このような課題を解決することを主な目的の一つとしており、マスタ装置とスレーブ装置の動作周期が異なっていても、スレーブ動作周期間の制御値の差が一定となるようにようにして、制御対象物の動作上のムラを発生させないことを主な目的とする。   One of the main objects of the present invention is to solve such a problem, and even if the operation cycle of the master device and that of the slave device are different, the difference in control values between the slave operation cycles is constant. Thus, the main object is not to cause unevenness in the operation of the controlled object.

本発明に係るスレーブ装置は、
所定のマスタ動作周期で動作するマスタ装置に接続され、前記マスタ動作周期と異なるスレーブ動作周期で所定の制御対象物の制御を行うスレーブ装置であって、
前記マスタ装置がマスタ動作周期単位で生成した前記制御対象物の制御のための数値である制御指令値を受信する受信部と、
前記マスタ動作周期と前記スレーブ動作周期とが一致するタイミングからの経過時間に基づいて、スレーブ動作周期ごとに、前記マスタ動作周期単位の制御指令値をスレーブ動作周期単位の数値に補正する指令値補正部と、
スレーブ動作周期ごとに、前記指令値補正部により補正された補正値を用いて前記制御対象物の制御を行う制御部とを有することを特徴とする。
The slave device according to the present invention is
A slave device that is connected to a master device that operates at a predetermined master operation cycle and controls a predetermined control object at a slave operation cycle different from the master operation cycle,
A receiving unit that receives a control command value that is a numerical value for controlling the control object generated by the master device in units of a master operation cycle;
Command value correction for correcting the control command value in the master operation cycle unit to the value in the slave operation cycle unit for each slave operation cycle based on the elapsed time from the timing when the master operation cycle and the slave operation cycle match And
And a control unit that controls the control object using the correction value corrected by the command value correction unit for each slave operation cycle.

本発明によれば、マスタ装置とスレーブ装置の動作周期が異なっていても、スレーブ動作周期間で制御値の差が一定となるようにように補正するので、動作上のムラを発生させることなく制御対象物を円滑に制御することができる。   According to the present invention, even if the operation cycle of the master device and that of the slave device are different, correction is performed so that the difference in the control value is constant between the slave operation cycles. The controlled object can be controlled smoothly.

実施の形態1.
本実施の形態に係るスレーブ装置の構成例を図1に示す。
Embodiment 1 FIG.
A configuration example of the slave device according to the present embodiment is shown in FIG.

図1において、スレーブ装置100(以下、スレーブという)は、ネットワーク400を介してマスタ装置200(以下、マスタという)に接続されている。
マスタ200とスレーブ100は、動作周期が異なる。マスタ200の動作周期をマスタ動作周期といい、スレーブ100の動作周期をスレーブ動作周期という。
また、スレーブ100は、制御対象物であるモータ300に接続されている。
In FIG. 1, a slave device 100 (hereinafter referred to as a slave) is connected to a master device 200 (hereinafter referred to as a master) via a network 400.
The master 200 and the slave 100 have different operation cycles. The operation cycle of the master 200 is called a master operation cycle, and the operation cycle of the slave 100 is called a slave operation cycle.
The slave 100 is connected to a motor 300 that is a control target.

スレーブ100において、102は、スレーブ100の動作周期を制御する周期制御部である。
103は、タイマ部である。
104は、ネットワーク400側から来る周期信号を監視して適宜スレーブ100の動作周期をリセットする周期リセット部である。
105は、タイマ部103から受け取るタイマ値からスレーブの周期を検出して他の処理部に伝える周期検出部である。
106は、周期検出部105から受信する周期信号の回数をカウントして他の処理部に伝える周期カウンタ部である。
In the slave 100, 102 is a cycle control unit that controls the operation cycle of the slave 100.
Reference numeral 103 denotes a timer unit.
Reference numeral 104 denotes a periodic reset unit that monitors a periodic signal coming from the network 400 side and appropriately resets the operation period of the slave 100.
Reference numeral 105 denotes a cycle detection unit that detects the cycle of the slave from the timer value received from the timer unit 103 and transmits it to other processing units.
Reference numeral 106 denotes a cycle counter unit that counts the number of cycle signals received from the cycle detection unit 105 and transmits it to other processing units.

107は、ネットワークからの周期信号を受信したり、スレーブとネットワーク間のデータの送受を行うネットワーク通信部である。
ネットワーク通信部107は、マスタ200がマスタ動作周期単位で生成したモータ300の制御のための数値である位置指令(制御指令値)を受信する。ネットワーク通信部107は、受信部及び送信部の例である。
A network communication unit 107 receives a periodic signal from the network and transmits / receives data between the slave and the network.
The network communication unit 107 receives a position command (control command value) that is a numerical value for controlling the motor 300 generated by the master 200 in units of master operation cycles. The network communication unit 107 is an example of a reception unit and a transmission unit.

108は、ネットワーク通信部107から受信した位置指令を、周期カウンタ部106によって補正を行うデータ補正部である。
データ補正部108は、マスタ動作周期とスレーブ動作周期とが一致するタイミングからの経過時間に基づいて、スレーブ動作周期ごとに、マスタ動作周期単位の位置指令をスレーブ動作周期単位の位置指令に補正する。データ補正部108は、前後のスレーブ動作周期間の補正値の差が略一定となる数値にて各スレーブ動作周期の補正値を算出する。
また、データ補正部108は、モータ300の現在の状態を示す数値であるモータの現在位置(状態値)をマスタ動作周期に適合するように補正する。つまり、データ補正部108は、マスタ動作周期とスレーブ動作周期とが一致するタイミングからの経過時間に基づいて、マスタ動作周期ごとに、スレーブ動作周期単位で取得されたモータの現在位置をマスタ動作周期単位の数値に補正する。データ補正部108は、前後のスレーブ動作周期間の差が略一定となる現在位置の値から各マスタ動作周期の補正値を算出する。
データ補正部108の補正値算出手順は後述する。
データ補正部108は、指令値補正部及び状態値補正値の例である。
A data correction unit 108 corrects the position command received from the network communication unit 107 by the cycle counter unit 106.
The data correction unit 108 corrects the position command in the master operation cycle unit to the position command in the slave operation cycle unit for each slave operation cycle based on the elapsed time from the timing when the master operation cycle and the slave operation cycle match. . The data correction unit 108 calculates a correction value for each slave operation cycle with a numerical value at which the difference between the correction values between the previous and next slave operation cycles is substantially constant.
Further, the data correction unit 108 corrects the current position (state value) of the motor, which is a numerical value indicating the current state of the motor 300, so as to match the master operation cycle. In other words, the data correction unit 108 uses the elapsed time from the timing at which the master operation cycle and the slave operation cycle coincide with each other as the master operation cycle for the current position of the motor acquired in units of slave operation cycles for each master operation cycle. Correct to the unit value. The data correction unit 108 calculates a correction value for each master operation cycle from the value of the current position where the difference between the previous and next slave operation cycles is substantially constant.
The correction value calculation procedure of the data correction unit 108 will be described later.
The data correction unit 108 is an example of a command value correction unit and a state value correction value.

109は、データ補正部108から受信した補正後のデータを元にサーボモータを駆動するモータ制御部である。
モータ制御部109は、スレーブ動作周期ごとに、データ補正部108により補正された補正値を用いて制御対象物であるモータ300の制御を行う。
モータ制御部109は、制御部の例である。
Reference numeral 109 denotes a motor control unit that drives the servo motor based on the corrected data received from the data correction unit 108.
The motor control unit 109 controls the motor 300 that is a control target using the correction value corrected by the data correction unit 108 for each slave operation cycle.
The motor control unit 109 is an example of a control unit.

次に、本実施の形態に係るスレーブ100がマスタ動作周期の位置指令の値からスレーブ動作周期の補正値を算出する動作について説明する。   Next, an operation in which the slave 100 according to the present embodiment calculates the correction value of the slave operation cycle from the value of the position command of the master operation cycle will be described.

スレーブ100内部のネットワーク通信部107は、マスタ200の動作周期に同期してネットワーク400から位置指令を受信する。
ネットワーク通信部107は、受信した位置指令をデータ補正部108に送り、データ補正部108は位置指令を現在のスレーブ動作周期で最適な値に補正し、これをモータ制御部109に送る。
データ補正部108から補正値を受け取ったモータ制御部109は、補正値を元にモータ300を駆動する。
これらネットワーク通信部107、データ補正部108およびモータ制御部109の間の通信はスレーブの動作周期に同期して行われる。
The network communication unit 107 inside the slave 100 receives a position command from the network 400 in synchronization with the operation cycle of the master 200.
The network communication unit 107 sends the received position command to the data correction unit 108, and the data correction unit 108 corrects the position command to an optimal value in the current slave operation cycle, and sends this to the motor control unit 109.
Upon receiving the correction value from the data correction unit 108, the motor control unit 109 drives the motor 300 based on the correction value.
Communication among the network communication unit 107, the data correction unit 108, and the motor control unit 109 is performed in synchronization with the operation cycle of the slave.

周期リセット部104は、スレーブ100の動作周期を制御する。
タイマ部103は、タイマ値を周期検出部105へ伝え、周期検出部105は、タイマ値を参照して、予めスレーブ100の動作周期として定めた時間が経過するごとに周期の開始タイミングを示す周期信号を周期カウンタ部106、データ補正部108、およびモータ制御部109へ送る。
周期カウンタ部106は、周期の数をカウントする。
ここで、カウンタ値の上限をC_maxとし、C_maxの次は0としてカウントを繰り返す。
なお、C_maxの値は、マスタ200とスレーブ100の動作周期が一致するタイミングから、次に一致するタイミングまでに要するスレーブ動作周期の周期数から1を引いたものである。C_maxの値の詳細は、図2を参照して後述する。
The cycle reset unit 104 controls the operation cycle of the slave 100.
The timer unit 103 transmits a timer value to the cycle detection unit 105, and the cycle detection unit 105 refers to the timer value and indicates a cycle start timing every time a predetermined time as the operation cycle of the slave 100 elapses. The signal is sent to the period counter unit 106, the data correction unit 108, and the motor control unit 109.
The period counter unit 106 counts the number of periods.
Here, counting is repeated by setting the upper limit of the counter value to C_max and setting C_max to 0 next.
The value of C_max is obtained by subtracting 1 from the number of slave operation cycles required from the timing when the operation cycles of the master 200 and the slave 100 match to the next match. Details of the value of C_max will be described later with reference to FIG.

データ補正部108は、カウンタ値を元にネットワーク通信部107から受信する位置指令の値を補正する。
この補正方法については、後ほど図2を用いて説明する。
一方で、ネットワーク通信部107は、マスタの動作周期が一定時間経過するごとにマスタ200から周期リセット信号を受信し、これを周期制御部102内部の周期リセット部104に送る。
周期リセット部104は、マスタ200とスレーブ100の動作周期が一致するタイミングで周期リセット信号を受信したときのみ、周期検出部105および周期カウンタ部に指令を与え、これを受信した周期検出部105は、それまで自身で管理していたスレーブの動作周期の開始タイミングをリセットし、また周期カウンタ部106はカウンタ値を0にリセットする。
The data correction unit 108 corrects the position command value received from the network communication unit 107 based on the counter value.
This correction method will be described later with reference to FIG.
On the other hand, the network communication unit 107 receives a cycle reset signal from the master 200 every time the master operation cycle elapses, and sends this to the cycle reset unit 104 inside the cycle control unit 102.
The cycle reset unit 104 gives a command to the cycle detection unit 105 and the cycle counter unit only when the cycle reset signal is received at a timing when the operation cycles of the master 200 and the slave 100 coincide with each other. Then, the start timing of the operation cycle of the slave that has been managed by itself is reset, and the cycle counter unit 106 resets the counter value to 0.

以上のように、ネットワーク通信部107は、マスタ200と同期するためにマスタの動作周期に同期してネットワーク11と通信するのに対し、ネットワーク通信部107とデータ制御部8、およびデータ制御部8とモータ制御部109はスレーブの動作周期に同期して通信を行う。   As described above, the network communication unit 107 communicates with the network 11 in synchronization with the master operation cycle in order to synchronize with the master 200, whereas the network communication unit 107, the data control unit 8, and the data control unit 8 The motor control unit 109 communicates in synchronization with the operation cycle of the slave.

続いて、図1のデータ補正部108内部で行うスレーブ動作周期ごとの位置指令の補正の方法について説明する。
データ補正部108では、マスタ200とスレーブ100の動作周期の開始時刻が一致する時点を基準として補正を行う。そのイメージを図2に示す。
Next, a method for correcting the position command for each slave operation cycle performed in the data correction unit 108 in FIG. 1 will be described.
The data correction unit 108 performs correction based on the time point at which the start times of the operation cycles of the master 200 and the slave 100 coincide. The image is shown in FIG.

まずは、図2で示した記号について説明する。
図2において、TMはマスタの動作周期である。
TSはスレーブの動作周期である。
T_LCMは、TMとTSが一致する周期、つまりTMとTSの最小公倍数となる周期である。
また、TMおよびTSがそれぞれT_LCMまでに必要な周期数をそれぞれNM,NSとした場合、T_LCM=TM×NM=TS×NSの関係が成り立つ。
図2では、NM=4、NS=9のときの例を示している。
First, the symbols shown in FIG. 2 will be described.
In FIG. 2, TM is the operation cycle of the master.
TS is the operation cycle of the slave.
T_LCM is a period in which TM and TS coincide, that is, a period that is the least common multiple of TM and TS.
Further, when TM and TS each have NM and NS as the number of periods required until T_LCM, the relationship of T_LCM = TM × NM = TS × NS is established.
FIG. 2 shows an example when NM = 4 and NS = 9.

また、図2において、T1はTMとTSの開始時刻が一致するタイミングであり、次に一致するタイミングをT2とする。
マスタ200におけるT1からT2までの周期の番号をX_k,X_k+1,X_k+2...X_k+mで表しており、各周期における位置指令の値をM_k,M_k+1,M_k+2...M_k+mで表す。
先にも述べたとおり、図2はNM=4であるときの例を示しているため、m=3となる。
また、X_k−1はX_kの前の周期の番号を示している。
In FIG. 2, T1 is the timing at which the start times of TM and TS match, and the next matching timing is T2.
The cycle numbers from T1 to T2 in the master 200 are set to X_k, X_k + 1, X_k + 2. . . X_k + m, and position command values in each cycle are represented by M_k, M_k + 1, M_k + 2. . . It represents with M_k + m.
As described above, since FIG. 2 shows an example when NM = 4, m = 3.
X_k-1 indicates the cycle number before X_k.

スレーブについても同様に、T1からT2までの周期の番号を、Y_l,Y_l+1,Y_l+2...Y_l+nで表しており、各周期における位置指令を、S_l,S_l+1,S_l+2...S_l+nで表す。
図2は、NS=9であるときの例を示しているため、n=8となる。
なお、先の図1の説明にあった周期カウンタ部106でのカウンタの上限C_maxは上記nと等しい。
Similarly for the slaves, the cycle numbers from T1 to T2 are assigned Y_l, Y_l + 1, Y_l + 2,. . . Y_l + n, and position commands in each cycle are represented by S_l, S_l + 1, S_l + 2. . . It represents with S_l + n.
Since FIG. 2 shows an example when NS = 9, n = 8.
Note that the upper limit C_max of the counter in the period counter unit 106 described in FIG. 1 is equal to n.

次に、図2を用いて、あるスレーブ動作周期Y_j(j=l〜l+8)における位置指令の補正値S_jの求め方を説明する。
位置指令の補正値S_jは、スレーブ動作周期Y_jにおける基準値BS_jと調整値HS_jから求められ、S_j=BS_j+HS_jの関係式が成り立つものとする。
Next, how to obtain the position command correction value S_j in a certain slave operation cycle Y_j (j = 1 to 1 + 8) will be described with reference to FIG.
The correction value S_j of the position command is obtained from the reference value BS_j and the adjustment value HS_j in the slave operation cycle Y_j, and the relational expression S_j = BS_j + HS_j is established.

位置指令の補正値S_jの基準値BS_jは、スレーブ動作周期Y_jの開始時刻までにマスタ200の動作周期で受信した最新の位置指令M_i(i=k〜k+3)の1周期前の値M_i−1に等しい。
例えば、図2において、補正値S_l+1の基準値BS_l+1は、位置指令M_k−1である(最新の位置指令M_iはM_kであり、その1周期前の位置指令はM_k−1である)。
The reference value BS_j of the position command correction value S_j is a value M_i−1 one cycle before the latest position command M_i (i = k to k + 3) received in the operation cycle of the master 200 by the start time of the slave operation cycle Y_j. be equivalent to.
For example, in FIG. 2, the reference value BS_l + 1 of the correction value S_l + 1 is the position command M_k−1 (the latest position command M_i is M_k, and the position command one cycle before is M_k−1).

続いて、調整値HSの求め方について説明する。
あるスレーブ動作周期Y_jでの位置指令の調整値HS_jは、スレーブ動作周期Y_jの開始時刻までにマスタ動作周期で受信した最新の位置指令M_i(同時進行マスタ動作周期X_iの位置指令)と、その1周期前の位置指令の値M_i−1、および補正変数PT_jから算出する。
関係式は、HS_j=(M_i−M_i−1)×PT_jとする。
Next, how to determine the adjustment value HS will be described.
The adjustment value HS_j of the position command in a certain slave operation cycle Y_j is the latest position command M_i (position command of the simultaneous progress master operation cycle X_i) received in the master operation cycle before the start time of the slave operation cycle Y_j, and 1 It is calculated from the position command value M_i-1 before the cycle and the correction variable PT_j.
The relational expression is HS_j = (M_i−M_i−1) × PT_j.

補正変数PT_jは、スレーブ動作周期Y_jの開始時刻(Ys_jとする)から、X_i(同時進行マスタ動作周期:Y_jの開始時刻までにマスタの動作周期で受信した最新の位置指令M_iの周期)の開始時刻(Xs_iとする)を差し引き、それをTMで割った値である。
よって、PT_j=(Ys_j−Xs_i)/TMで表される。
The correction variable PT_j is the start of X_i (simultaneous progress master operation cycle: the cycle of the latest position command M_i received in the master operation cycle before the start time of Y_j) from the start time (Ys_j) of the slave operation cycle Y_j. This is a value obtained by subtracting the time (Xs_i) and dividing it by TM.
Therefore, PT_j = (Ys_j−Xs_i) / TM.

以上を踏まえ、図2におけるY_l〜Y_l+8を求めると次のようになる。   Based on the above, Y_l to Y_l + 8 in FIG. 2 are obtained as follows.

S_l=M_k−1+(M_k−M_k−1)×(Ys_l−Xs_k)/TM
S_l+1=M_k−1+(M_k−M_k−1)×(Ys_l+1−Xs_k)/TM
S_l+2=M_k−1+(M_k−M_k−1)×(Ys_l+2−Xs_k)/TM
S_l+3=M_k+(M_k+1−M_k)×(Ys_l+3−Xs_k+1)/TM
S_l+4=M_k+(M_k+1−M_k)×(Ys_l+4−Xs_k+1)/TM
S_l+5=M_k+1+(M_k+2−M_k+1)×(Ys_l+5−Xs_k+2)/TM
S_l+6=M_k+1+(M_k+2−M_k+1)×(Ys_l+6−Xs_k+2)/TM
S_l+7=M_k+2+(M_k+3−M_k+2)×(Ys_l+7−Xs_k+3)/TM
S_l+8=M_k+2+(M_k+3−M_k+2)×(Ys_l+8−Xs_k+3)/TM
S_l = M_k-1 + (M_k-M_k-1) * (Ys_l-Xs_k) / TM
S_l + 1 = M_k−1 + (M_k−M_k−1) × (Ys_l + 1−Xs_k) / TM
S_l + 2 = M_k-1 + (M_k-M_k-1) * (Ys_l + 2-Xs_k) / TM
S_l + 3 = M_k + (M_k + 1−M_k) × (Ys_l + 3−Xs_k + 1) / TM
S_l + 4 = M_k + (M_k + 1−M_k) × (Ys_l + 4-Xs_k + 1) / TM
S_l + 5 = M_k + 1 + (M_k + 2-M_k + 1) × (Ys_l + 5-Xs_k + 2) / TM
S_l + 6 = M_k + 1 + (M_k + 2-M_k + 1) × (Ys_l + 6-Xs_k + 2) / TM
S_l + 7 = M_k + 2 + (M_k + 3-M_k + 2) × (Ys_l + 7−Xs_k + 3) / TM
S_l + 8 = M_k + 2 + (M_k + 3-M_k + 2) × (Ys_l + 8−Xs_k + 3) / TM

図2では、T_LCM=TM×4=TS×9の関係が成り立つため、PT_jを次のような分数で表すことも可能である。   In FIG. 2, since the relationship of T_LCM = TM × 4 = TS × 9 is established, PT_j can be expressed by the following fraction.

S_l=M_k−1+(M_k−M_k−1)×0/9
S_l+1=M_k−1+(M_k−M_k−1)×4/9
S_l+2=M_k−1+(M_k−M_k−1)×8/9
S_l+3=M_k+(M_k+1−M_k)×3/9
S_l+4=M_k+(M_k+1−M_k)×7/9
S_l+5=M_k+1+(M_k+2−M_k+1)×2/9
S_l+6=M_k+1+(M_k+2−M_k+1)×6/9
S_l+7=M_k+2+(M_k+3−M_k+2)×1/9
S_l+8=M_k+2+(M_k+3−M_k+2)×5/9
S_l = M_k−1 + (M_k−M_k−1) × 0/9
S_l + 1 = M_k−1 + (M_k−M_k−1) × 4/9
S_l + 2 = M_k−1 + (M_k−M_k−1) × 8/9
S_l + 3 = M_k + (M_k + 1−M_k) × 3/9
S_l + 4 = M_k + (M_k + 1−M_k) × 7/9
S_l + 5 = M_k + 1 + (M_k + 2-M_k + 1) × 2/9
S_l + 6 = M_k + 1 + (M_k + 2-M_k + 1) × 6/9
S_l + 7 = M_k + 2 + (M_k + 3-M_k + 2) × 1/9
S_l + 8 = M_k + 2 + (M_k + 3-M_k + 2) × 5/9

このPT_jの求め方をS_l+1のときを例として説明する。
T_LCMの時間を1で表したとき、Ys_l+1=4/36,Xs_k=0/36,TM=9/36であるため、(Ys_l+1−Xs_k)/TM=(4/36−0/36)/9/36=4/9となる。
他のPT_jについても同様に求めることが可能である。
The method for obtaining PT_j will be described by taking S_l + 1 as an example.
When the time of T_LCM is represented by 1, Ys_l + 1 = 4/36, Xs_k = 0/36, and TM = 9/36, so (Ys_l + 1−Xs_k) / TM = (4 / 36-0 / 36) / 9 / 36 = 4/9.
The other PT_j can be obtained similarly.

図3は、マスタ200とスレーブ100の動作周期が一致しないモーションコントロールシステムで、本実施に係るスレーブ100を使用したときの位置指令の伝わり方を示している。   FIG. 3 shows how position commands are transmitted when the slave 100 according to the present embodiment is used in a motion control system in which the operation cycles of the master 200 and the slave 100 do not match.

右方向が時刻の経過を表しており、マスタXの行はマスタ200の動作周期での位置指令、つまり図1におけるネットワーク通信部107がマスタ200の動作周期で位置指令を受信するタイミングおよび値の変化の例を示している。
また、スレーブYの行はスレーブ100の動作周期での位置指令、つまり図1におけるモータ制御部109がスレーブ100の動作周期で、データ補正部108から位置指令を受信するタイミングおよび値の変化の例を示している。
また、ΔTはスレーブの動作周期間における位置指令の差分を示している。
The right direction represents the passage of time, and the row of master X indicates the position command in the operation cycle of the master 200, that is, the timing and value of the network communication unit 107 in FIG. 1 receiving the position command in the operation cycle of the master 200. An example of change is shown.
The row of slave Y is a position command in the operation cycle of the slave 100, that is, an example of timing and value change when the motor control unit 109 in FIG. 1 receives the position command from the data correction unit 108 in the operation cycle of the slave 100. Is shown.
Further, ΔT indicates a difference in position command between slave operation cycles.

図3の通り、マスタ側が一定の速度でモータを回すことを考えて周期ごとの位置指令データの増加分を一定にしたとき、スレーブ100がモータ300へ与える位置指令値の増加量(ΔT)が一定となる。
故に周期ごとのモータの回転数に差が出ず、回転ムラが発生しない。
なお、図3では、スレーブYの値を小数点以下は省略して表記しているので、一部スレーブYとΔTの値が完全には一致していない箇所があるが、ΔTの値が一定であることには変わりない。
As shown in FIG. 3, when the increase in the position command data for each cycle is made constant considering that the master side rotates the motor at a constant speed, the increase amount (ΔT) of the position command value that the slave 100 gives to the motor 300 is It becomes constant.
Therefore, there is no difference in the number of rotations of the motor for each cycle, and no rotation unevenness occurs.
In FIG. 3, since the value of slave Y is shown with the decimal part omitted, there are some portions where the slave Y and the value of ΔT do not completely match, but the value of ΔT is constant. It does not change.

このように、本実施の形態によれば、マスタとスレーブの動作周期が一致していない環境において、スレーブは、ネットワークの通信周期と自身の動作周期が一致するタイミングを基準とし、周期ごとに受信する位置指令を基準からの経過時間の情報を元にデータを補正することで、一定速度で回転ムラなくモータを駆動させることが可能である。
また、モータの回転ムラを回避することができるので、モータの消費電力を抑えることができ、また、モータを円滑に駆動させることができるので、モータの寿命を長くすることができる。
As described above, according to the present embodiment, in an environment where the operation cycle of the master and the slave does not match, the slave receives each cycle based on the timing at which the communication cycle of the network matches its own operation cycle. By correcting the data based on the information on the elapsed time from the reference based on the position command to be performed, it is possible to drive the motor at a constant speed and without uneven rotation.
In addition, since uneven rotation of the motor can be avoided, the power consumption of the motor can be suppressed, and the motor can be driven smoothly, so that the life of the motor can be extended.

次に、本実施の形態に係るスレーブ100がマスタ200のモータ300の現在位置を通知する際の動作を説明する。   Next, an operation when the slave 100 according to the present embodiment notifies the current position of the motor 300 of the master 200 will be described.

スレーブ100がマスタ200に現在位置を通知する動作は、基本的に、スレーブ100がマスタ動作周期による位置指令をスレーブ動作周期の補正値に変換する動作の逆である。
つまり、データ補正部108は、マスタ動作周期とスレーブ動作周期とが一致するタイミングからの経過時間に基づいて、マスタ動作周期ごとに、スレーブ動作周期単位で取得されたモータの現在位置をマスタ動作周期単位の数値に補正する。
マスタ動作周期単位の補正値の具体的な算出方法は、以下の通りである。
The operation in which the slave 100 notifies the master 200 of the current position is basically the reverse of the operation in which the slave 100 converts the position command based on the master operation cycle into a correction value for the slave operation cycle.
In other words, the data correction unit 108 uses the elapsed time from the timing at which the master operation cycle and the slave operation cycle coincide with each other as the master operation cycle for the current position of the motor acquired in units of slave operation cycles for each master operation cycle. Correct to the unit value.
A specific method of calculating the correction value in units of the master operation cycle is as follows.

図2で説明したマスタからスレーブの位置指令M_i,S_jをスレーブからマスタへの位置情報とする。その場合の算出式は以下の通りである。
M_k=S_l−1+(S_l−S_l−1)×(Xs_k−Ys_l)/TM
M_k+1=S_l+1+(S_l+2−S_l+1)×(Xs_k+1−Ys_l+2)/TM
M_k+2=S_l+3+(S_l+4−S_l+3)×(Xs_k+2−Ys_l+4)/TM
M_k+3=S_l+5+(S_l+6−S_l+5)×(Xs_k+3−Ys_l+6)/TM
The master-to-slave position commands M_i and S_j described in FIG. 2 are used as position information from the slave to the master. The calculation formula in that case is as follows.
M_k = S_l-1 + (S_l-S_l-1) * (Xs_k-Ys_l) / TM
M_k + 1 = S_l + 1 + (S_l + 2-S_l + 1) × (Xs_k + 1−Ys_l + 2) / TM
M_k + 2 = S_l + 3 + (S_l + 4-S_l + 3) × (Xs_k + 2-Ys_l + 4) / TM
M_k + 3 = S_l + 5 + (S_l + 6-S_l + 5) × (Xs_k + 3-Ys_l + 6) / TM

図2では、T_LCM=TM×4=TS×9の関係が成り立つため、PT_iを次のような分数で表すことも可能である。   In FIG. 2, since the relationship of T_LCM = TM × 4 = TS × 9 is established, PT_i can be represented by the following fraction.

M_k=S_l−1+(S_l−S_l−1)×0/4
M_k+1=S_l+1+(S_l+2−S_l+1)×1/4
M_k+2=S_l+3+(S_l+4−S_l+3)×2/4
M_k+3=S_l+5+(S_l+6−S_l+5)×3/4
M_k = S_l−1 + (S_l−S_l−1) × 0/4
M_k + 1 = S_l + 1 + (S_l + 2-S_l + 1) × 1/4
M_k + 2 = S_l + 3 + (S_l + 4-S_l + 3) × 2/4
M_k + 3 = S_l + 5 + (S_l + 6-S_l + 5) × 3/4

このように、本実施の形態によれば、マスタとスレーブの動作周期が一致していない環境において、マスタ動作周期単位をスレーブ動作周期単位の補正値に直してモータを制御するとともに、スレーブ動作周期単位で制御しているモータの現在位置をマスタ動作周期単位の値に変換するため、マスタ動作周期ごとの正確なモータの現在位置をマスタに通知することができる。   As described above, according to the present embodiment, in an environment where the operation cycles of the master and slave do not match, the master operation cycle unit is changed to the correction value of the slave operation cycle unit to control the motor, and the slave operation cycle Since the current position of the motor controlled in units is converted into a value in units of master operation cycles, the accurate current position of the motor for each master operation cycle can be notified to the master.

以上、本実施の形態では、モーションコントローラからサーボアンプにネットワーク経由で指令を与え、サーボアンプがサーボモータを駆動するモーションネットワークシステムにおいて、モーションコントローラの動作周期とサーボアンプの動作周期が異なる環境で、サーボアンプがモーションコントローラから受信した位置指令を、モーションコントローラの周期とサーボアンプの周期が一致するタイミングからの経過時間によって補正する位置指令の補正方式、およびサーボアンプ装置を説明した。   As described above, in the present embodiment, in the motion network system in which the motion controller gives a command to the servo amplifier via the network and the servo amplifier drives the servo motor, in the environment where the operation cycle of the motion controller and the operation cycle of the servo amplifier are different, The position command correction method for correcting the position command received from the motion controller by the servo amplifier by the elapsed time from the timing when the cycle of the motion controller and the cycle of the servo amplifier coincide with each other and the servo amplifier device have been described.

また、本実施の形態では、モーションコントローラの動作周期とサーボアンプの動作周期が異なるモーションネットワークシステムにおいて、サーボアンプがモーションコントローラに送信するサーボモータの現在位置情報を、モーションコントローラの周期とサーボアンプの周期が一致するタイミングからの経過時間によって補正する現在位置応答の補正方式、およびサーボアンプ装置を説明した。   In this embodiment, in a motion network system in which the motion cycle of the motion controller and the servo amplifier are different, the current position information of the servo motor that the servo amplifier sends to the motion controller is The correction method of the current position response that is corrected by the elapsed time from the timing at which the periods coincide with each other and the servo amplifier device have been described.

最後に、本実施の形態に示したスレーブ装置100のハードウェア構成例について説明する。
図6は、本実施の形態に示すスレーブ装置100のハードウェア資源の一例を示す図である。
なお、図6の構成は、あくまでもスレーブ装置100のハードウェア構成の一例を示すものであり、スレーブ装置100のハードウェア構成は図6に記載の構成に限らず、他の構成であってもよい。
Finally, a hardware configuration example of the slave device 100 described in this embodiment will be described.
FIG. 6 is a diagram illustrating an example of hardware resources of the slave device 100 illustrated in the present embodiment.
Note that the configuration of FIG. 6 is merely an example of the hardware configuration of the slave device 100, and the hardware configuration of the slave device 100 is not limited to the configuration illustrated in FIG. .

図6において、スレーブ装置100は、プログラムを実行するCPU911(Central Processing Unit、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、プロセッサともいう)を備えている。
CPU911は、バス912を介して、例えば、ROM(Read Only Memory)913、RAM(Random Access Memory)914、通信ボード915、表示装置901、キーボード902、マウス903、磁気ディスク装置920と接続され、これらのハードウェアデバイスを制御する。
更に、CPU911は、FDD904(Flexible Disk Drive)、コンパクトディスク装置905(CDD)と接続していてもよい。また、磁気ディスク装置920の代わりに、光ディスク装置、メモリカード(登録商標)読み書き装置などの記憶装置でもよい。
RAM914は、揮発性メモリの一例である。ROM913、FDD904、CDD905、磁気ディスク装置920の記憶媒体は、不揮発性メモリの一例である。これらは、記憶装置の一例である。
通信ボード915、キーボード902、マウス903、FDD904などは、入力装置の一例である。
また、通信ボード915、表示装置901などは、出力装置の一例である。
In FIG. 6, the slave device 100 includes a CPU 911 (also referred to as a central processing unit, a central processing unit, a processing unit, a processing unit, a microprocessor, a microcomputer, and a processor) that executes a program.
The CPU 911 is connected to, for example, a ROM (Read Only Memory) 913, a RAM (Random Access Memory) 914, a communication board 915, a display device 901, a keyboard 902, a mouse 903, and a magnetic disk device 920 via a bus 912. Control hardware devices.
Further, the CPU 911 may be connected to an FDD 904 (Flexible Disk Drive) or a compact disk device 905 (CDD). Further, instead of the magnetic disk device 920, a storage device such as an optical disk device or a memory card (registered trademark) read / write device may be used.
The RAM 914 is an example of a volatile memory. The storage media of the ROM 913, the FDD 904, the CDD 905, and the magnetic disk device 920 are an example of a nonvolatile memory. These are examples of the storage device.
The communication board 915, the keyboard 902, the mouse 903, the FDD 904, and the like are examples of input devices.
The communication board 915, the display device 901, and the like are examples of output devices.

通信ボード915は、図1に示すように、ネットワークに接続されている。例えば、通信ボード915は、LAN(ローカルエリアネットワーク)、インターネット、WAN(ワイドエリアネットワーク)などに接続されていても構わない。   As shown in FIG. 1, the communication board 915 is connected to a network. For example, the communication board 915 may be connected to a LAN (local area network), the Internet, a WAN (wide area network), or the like.

磁気ディスク装置920には、オペレーティングシステム921(OS)、ウィンドウシステム922、プログラム群923、ファイル群924が記憶されている。
プログラム群923のプログラムは、CPU911がオペレーティングシステム921、ウィンドウシステム922を利用しながら実行する。
The magnetic disk device 920 stores an operating system 921 (OS), a window system 922, a program group 923, and a file group 924.
The programs in the program group 923 are executed by the CPU 911 using the operating system 921 and the window system 922.

また、RAM914には、CPU911に実行させるオペレーティングシステム921のプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。
また、RAM914には、CPU911による処理に必要な各種データが格納される。
The RAM 914 temporarily stores at least part of the operating system 921 program and application programs to be executed by the CPU 911.
The RAM 914 stores various data necessary for processing by the CPU 911.

また、ROM913には、BIOS(Basic Input Output System)プログラムが格納され、磁気ディスク装置920にはブートプログラムが格納されている。
スレーブ装置100の起動時には、ROM913のBIOSプログラム及び磁気ディスク装置920のブートプログラムが実行され、BIOSプログラム及びブートプログラムによりオペレーティングシステム921が起動される。
The ROM 913 stores a BIOS (Basic Input Output System) program, and the magnetic disk device 920 stores a boot program.
When the slave device 100 is activated, the BIOS program in the ROM 913 and the boot program in the magnetic disk device 920 are executed, and the operating system 921 is activated by the BIOS program and the boot program.

上記プログラム群923には、本実施の形態の説明において「〜部」として説明している機能を実行するプログラムが記憶されている。プログラムは、CPU911により読み出され実行される。   The program group 923 stores programs for executing the functions described as “˜units” in the description of the present embodiment. The program is read and executed by the CPU 911.

ファイル群924には、本実施の形態の説明において、「〜の判断」、「〜の計算」、「〜の算出」、「〜の補正」、「〜の比較」、「〜の設定」、「〜の制御」、「〜の選択」等として説明している処理の結果を示す情報やデータや信号値や変数値やパラメータが、「〜ファイル」や「〜データベース」の各項目として記憶されている。
「〜ファイル」や「〜データベース」は、ディスクやメモリなどの記録媒体に記憶される。ディスクやメモリなどの記憶媒体に記憶された情報やデータや信号値や変数値やパラメータは、読み書き回路を介してCPU911によりメインメモリやキャッシュメモリに読み出され、抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示などのCPUの動作に用いられる。
抽出・検索・参照・比較・演算・計算・処理・編集・出力・印刷・表示のCPUの動作の間、情報やデータや信号値や変数値やパラメータは、メインメモリ、レジスタ、キャッシュメモリ、バッファメモリ等に一時的に記憶される。
In the description of the present embodiment, in the file group 924, “determination of”, “calculation of”, “calculation of”, “correction of”, “comparison of”, “setting of”, Information, data, signal values, variable values, and parameters indicating the results of processing described as “control of”, “selection of”, etc. are stored as items of “˜file” and “˜database”. ing.
The “˜file” and “˜database” are stored in a recording medium such as a disk or a memory. Information, data, signal values, variable values, and parameters stored in a storage medium such as a disk or memory are read out to the main memory or cache memory by the CPU 911 via a read / write circuit, and extracted, searched, referenced, compared, and calculated. Used for CPU operations such as calculation, processing, editing, output, printing, and display.
Information, data, signal values, variable values, and parameters are stored in the main memory, registers, cache memory, and buffers during the CPU operations of extraction, search, reference, comparison, calculation, processing, editing, output, printing, and display. It is temporarily stored in a memory or the like.

また、本実施の形態の説明において「〜部」として説明しているものは、「〜回路」、「〜装置」、「〜機器」であってもよく、また、「〜ステップ」、「〜手順」、「〜処理」であってもよい。すなわち、「〜部」として説明しているものは、ROM913に記憶されたファームウェアで実現されていても構わない。或いは、ソフトウェアのみ、或いは、素子・デバイス・基板・配線などのハードウェアのみ、或いは、ソフトウェアとハードウェアとの組み合わせ、さらには、ファームウェアとの組み合わせで実施されても構わない。ファームウェアとソフトウェアは、プログラムとして、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスク、DVD等の記録媒体に記憶される。プログラムはCPU911により読み出され、CPU911により実行される。すなわち、プログラムは、本実施の形態の「〜部」としてコンピュータを機能させるものである。あるいは、本実施の形態の「〜部」の手順や方法をコンピュータに実行させるものである。   In addition, what is described as “˜unit” in the description of the present embodiment may be “˜circuit”, “˜device”, “˜device”, and “˜step”, “˜”. “Procedure” and “˜Process” may be used. That is, what is described as “˜unit” may be realized by firmware stored in the ROM 913. Alternatively, it may be implemented only by software, or only by hardware such as elements, devices, substrates, and wirings, by a combination of software and hardware, or by a combination of firmware. Firmware and software are stored as programs in a recording medium such as a magnetic disk, a flexible disk, an optical disk, a compact disk, a mini disk, and a DVD. The program is read by the CPU 911 and executed by the CPU 911. In other words, the program causes the computer to function as “to part” of the present embodiment. Alternatively, the procedure or method of “˜unit” in the present embodiment is executed by a computer.

このように、本実施の形態に示すスレーブ装置100は、処理装置たるCPU、記憶装置たるメモリ、磁気ディスク等、入力装置たるキーボード、マウス、通信ボード等、出力装置たる表示装置、通信ボード等を備えるコンピュータであり、上記したように「〜部」として示された機能をこれら処理装置、記憶装置、入力装置、出力装置を用いて実現するものである。   As described above, the slave device 100 described in this embodiment includes a CPU that is a processing device, a memory that is a storage device, a magnetic disk, a keyboard that is an input device, a mouse, a communication board, and a display device that is an output device, a communication board, and the like. As described above, the computer includes the functions indicated as “to part” by using these processing devices, storage devices, input devices, and output devices.

実施の形態1に係るスレーブ装置の構成例を示す図である。3 is a diagram illustrating a configuration example of a slave device according to Embodiment 1. FIG. 実施の形態1に係るスレーブ装置における位置指令の補正値の算出方法を説明する図である。6 is a diagram for explaining a method for calculating a correction value of a position command in the slave device according to Embodiment 1. FIG. 実施の形態1のスレーブ装置を適用したモーションコントロールシステムにおける位置指令の伝わり方を示す図である。It is a figure which shows how to transmit the position command in the motion control system to which the slave device of the first embodiment is applied. 一般的なスレーブの構成図である。It is a block diagram of a general slave. 一般的なスレーブを適用したモーションコントロールシステムにおける位置指令の伝わり方を示す図である。It is a figure which shows how to transmit the position command in the motion control system to which a general slave is applied. 実施の形態1に係るスレーブ装置のハードウェア構成例を示す図である。FIG. 3 is a diagram illustrating a hardware configuration example of a slave device according to the first embodiment.

符号の説明Explanation of symbols

100 スレーブ装置、102 周期制御部、103 タイマ部、104 周期リセット部、105 周期検出部、106 周期カウンタ部、107 ネットワーク通信部、108 データ補正部、109 モータ制御部、200 マスタ装置、300 モータ、400 ネットワーク。   100 slave device, 102 cycle control unit, 103 timer unit, 104 cycle reset unit, 105 cycle detection unit, 106 cycle counter unit, 107 network communication unit, 108 data correction unit, 109 motor control unit, 200 master device, 300 motor, 400 network.

Claims (4)

所定のマスタ動作周期で動作するマスタ装置に接続され、前記マスタ動作周期と異なるスレーブ動作周期で所定の制御対象物の制御を行うスレーブ装置であって、
前記マスタ装置がマスタ動作周期単位で生成した前記制御対象物の制御のための数値である制御指令値を受信する受信部と、
前記マスタ動作周期と前記スレーブ動作周期とが一致するタイミングからの経過時間に基づいて、スレーブ動作周期ごとに、前記マスタ動作周期単位の制御指令値をスレーブ動作周期単位の数値に補正する指令値補正部と、
スレーブ動作周期ごとに、前記指令値補正部により補正された補正値を用いて前記制御対象物の制御を行う制御部とを有し、
前記指令値補正部は、
スレーブ動作周期Y_jごとに、スレーブ動作周期Y_jの開始時刻Ys_jと、スレーブ動作周期Y_jの開始時刻Ys_jよりも前に開始しており当該スレーブ動作周期Y_jと少なくとも部分的に同時進行している同時進行マスタ動作周期X_iの開始時刻Xs_iと、前記同時進行マスタ動作周期X_iにおける制御指令値M_iと、前記同時進行マスタ動作周期X_iの1つ前のマスタ動作周期における制御指令値M_i−1と、マスタ動作周期の周期時間TMとに基づき、
スレーブ動作周期Y_jごとに、
S_j=M_i−1+{(M_i−M_i−1)×(Ys_j−Xs_i)/TM}により、
各スレーブ動作周期の補正値S_jを算出することを特徴とするスレーブ装置。
A slave device that is connected to a master device that operates at a predetermined master operation cycle and controls a predetermined control object at a slave operation cycle different from the master operation cycle,
A receiving unit that receives a control command value that is a numerical value for controlling the control object generated by the master device in units of a master operation cycle;
Command value correction for correcting the control command value in the master operation cycle unit to the value in the slave operation cycle unit for each slave operation cycle based on the elapsed time from the timing when the master operation cycle and the slave operation cycle match And
Each slave operation cycle, have a control unit for controlling the controlled object by using the correction value corrected by the command value correcting portion,
The command value correction unit
For each slave operation cycle Y_j, the start time Ys_j of the slave operation cycle Y_j starts before the start time Ys_j of the slave operation cycle Y_j, and is simultaneously progressing at least partially simultaneously with the slave operation cycle Y_j The start time Xs_i of the master operation cycle X_i, the control command value M_i in the simultaneous progress master operation cycle X_i, the control command value M_i-1 in the master operation cycle immediately before the simultaneous progress master operation cycle X_i, and the master operation Based on the cycle time TM of the cycle,
For each slave operation cycle Y_j,
S_j = M_i−1 + {(M_i−M_i−1) × (Ys_j−Xs_i) / TM}
A slave device that calculates a correction value S_j for each slave operation cycle .
前記指令値補正部は、
前後のスレーブ動作周期間の補正値の差が略一定となる数値にて各スレーブ動作周期の補正値を算出することを特徴とする請求項1に記載のスレーブ装置。
The command value correction unit
The slave device according to claim 1, wherein the correction value of each slave operation cycle is calculated with a numerical value at which a difference in correction values between the preceding and following slave operation cycles is substantially constant.
前記スレーブ装置は、
前記制御対象物としてモータを制御するサーボアンプであり、
前記受信部は、
モーションコントローラであるマスタ装置が生成した前記モータの位置を指示する制御指令値を受信し、
前記制御部は、
スレーブ動作周期ごとに、前記指令値補正部により補正された補正値を用いて前記モータの位置制御を行うことを特徴とする請求項1に記載のスレーブ装置。
The slave device is
A servo amplifier that controls a motor as the object to be controlled;
The receiver is
A control command value indicating the position of the motor generated by the master device which is a motion controller is received,
The controller is
2. The slave device according to claim 1, wherein position control of the motor is performed using a correction value corrected by the command value correction unit for each slave operation cycle.
コンピュータを、請求項1に記載されたスレーブ装置として機能させることを特徴とするプログラム。A program causing a computer to function as the slave device according to claim 1.
JP2008317789A 2008-12-15 2008-12-15 Slave device and program Active JP5202271B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008317789A JP5202271B2 (en) 2008-12-15 2008-12-15 Slave device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008317789A JP5202271B2 (en) 2008-12-15 2008-12-15 Slave device and program

Publications (2)

Publication Number Publication Date
JP2010140372A JP2010140372A (en) 2010-06-24
JP5202271B2 true JP5202271B2 (en) 2013-06-05

Family

ID=42350447

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008317789A Active JP5202271B2 (en) 2008-12-15 2008-12-15 Slave device and program

Country Status (1)

Country Link
JP (1) JP5202271B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6060384B2 (en) * 2013-03-19 2017-01-18 パナソニックIpマネジメント株式会社 Motor drive device
JP6594268B2 (en) * 2016-07-25 2019-10-23 三菱電機株式会社 Motion control system
JP2023108339A (en) * 2022-01-25 2023-08-04 株式会社日立製作所 Device controller, control system and control method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05333931A (en) * 1992-05-28 1993-12-17 Yokogawa Electric Corp Robot controller
JP3988255B2 (en) * 1998-05-20 2007-10-10 株式会社安川電機 Position command method and apparatus in numerical controller
JP2006236243A (en) * 2005-02-28 2006-09-07 Yaskawa Electric Corp Motion control system and its synchronizing method

Also Published As

Publication number Publication date
JP2010140372A (en) 2010-06-24

Similar Documents

Publication Publication Date Title
US7711918B2 (en) Apparatus and method for operating flash memory according to priority order
US9436388B2 (en) Memory access alignment in a double data rate (‘DDR’) system
US8959380B2 (en) Dynamically optimizing bus frequency of an inter-integrated circuit (‘I2C’) bus
JP5202271B2 (en) Slave device and program
US20150205754A1 (en) Chip select ('cs') multiplication in a serial peripheral interface ('spi') system
US20150118017A1 (en) Electronic device and fan controlling method
JP2011002876A5 (en)
US20130126150A1 (en) Fan control system and method
CN102450113B (en) Electronic device and cooling fan control method
CN100565465C (en) Mistake in the integrated circuit processing level is recovered
US9043586B2 (en) Memory training results corresponding to a plurality of memory modules
US7870370B2 (en) Determining thermal characteristics of instruction sets
JPH06309265A (en) Dynamic selection method for driver program of information processor
US11599169B2 (en) System and method of utilizing fans with information handling systems
JP7276265B2 (en) Production system, host control device, control device, communication method, and program
KR20140092132A (en) Method for monitoring os task of twin micom in rtos
JP2018180656A (en) Memory controller and control method thereof
JP5371569B2 (en) Data processing apparatus, control method, and program
US9128873B2 (en) Memory bus attached input/output (‘I/O’) subsystem management in a computing system
WO2019061875A1 (en) Processing method for abnormality of clock input signal of level converter
JP7248044B2 (en) CONTROLLER, EQUIPMENT CONTROL SYSTEM, TIME SYNCHRONIZATION METHOD, AND TIME SYNCHRONIZATION PROGRAM
WO2015163219A1 (en) Control apparatus
JP5901252B2 (en) Data processing apparatus, data processing method, and program
JP2007257462A (en) Bus resetting system and method
JP6725243B2 (en) Response control device, response control method, and computer program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110902

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121018

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121120

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121217

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130212

R150 Certificate of patent or registration of utility model

Ref document number: 5202271

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20160222

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250