JP2022138348A - Servo driver and servo system - Google Patents
Servo driver and servo system Download PDFInfo
- Publication number
- JP2022138348A JP2022138348A JP2021038182A JP2021038182A JP2022138348A JP 2022138348 A JP2022138348 A JP 2022138348A JP 2021038182 A JP2021038182 A JP 2021038182A JP 2021038182 A JP2021038182 A JP 2021038182A JP 2022138348 A JP2022138348 A JP 2022138348A
- Authority
- JP
- Japan
- Prior art keywords
- servo
- hash value
- servo driver
- motor
- encoder
- 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.)
- Pending
Links
- 238000004364 calculation method Methods 0.000 claims abstract description 54
- 230000006870 function Effects 0.000 claims abstract description 50
- 238000001514 detection method Methods 0.000 claims abstract description 45
- 238000012545 processing Methods 0.000 claims abstract description 29
- 238000004891 communication Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 16
- 238000012986 modification Methods 0.000 description 10
- 230000004048 modification Effects 0.000 description 10
- 238000000034 method Methods 0.000 description 9
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 4
- 238000006073 displacement reaction Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 102100026205 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Human genes 0.000 description 2
- 101000691599 Homo sapiens 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Proteins 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Abstract
Description
本発明は、サーボドライバ及びサーボシステムに関する。 The present invention relates to servo drivers and servo systems.
サーボシステムでは、一般に、PLC等のコントローラからの指令に従って、サーボドライバによるサーボモータのサーボ制御が行われる。サーボモータには固有のパラメータが設定されている。サーボドライバは、このようなパラメータをサーボモータが備えるエンコーダのElectrically Erasable Programmable Read-Only Memory(EEPROM)等の不揮発性メモリから取得し、取
得したパラメータを用いてサーボモータのサーボ制御を行う。
In a servo system, servo control of a servo motor is generally performed by a servo driver according to commands from a controller such as a PLC. Each servo motor has its own parameters. The servo driver acquires such parameters from a non-volatile memory such as an electrically erasable programmable read-only memory (EEPROM) of an encoder provided in the servo motor, and performs servo control of the servo motor using the acquired parameters.
サーボモータのパラメータはサーボモータ毎に異なるため、サーボモータが交換された場合には、交換されたサーボモータからパラメータを取得しなおすことになる。そのため、サーボドライバは、エンコーダの不揮発性メモリに記憶されたモータやエンコーダのシリアル番号等のサーボモータの識別情報によってサーボモータの個体認識を行い、当該識別情報が異なる場合にはサーボモータが交換されたことを検知する。そして、サーボドライバは、サーボモータの交換を検知した場合には、異常を発報することができる。 Since the parameters of the servomotor are different for each servomotor, when the servomotor is replaced, the parameters are reacquired from the replaced servomotor. Therefore, the servo driver performs individual recognition of the servo motor based on the identification information of the servo motor such as the serial number of the motor and the encoder stored in the non-volatile memory of the encoder, and if the identification information is different, the servo motor is replaced. detect that Then, when the servo driver detects replacement of the servo motor, it is possible to report an abnormality.
ここで、サーボドライバとサーボモータとが異なる供給元から供給されている等の事情がある場合、エンコーダの不揮発性メモリのいずれの領域に識別情報が記憶されているか不明な場合がある。このような場合、サーボドライバは、サーボモータから識別情報を取得することができないため、サーボモータの交換を検知することができない。そのため、サーボドライバは、異常を発報することができず、交換前のサーボモータから取得したパラメータで交換後のサーボモータのサーボ制御が行われてしまう虞がある。 If the servo driver and the servo motor are supplied from different sources, it may be unclear in which area of the non-volatile memory of the encoder the identification information is stored. In such a case, since the servo driver cannot acquire the identification information from the servo motor, it cannot detect replacement of the servo motor. Therefore, the servo driver cannot issue an error report, and there is a risk that the parameters obtained from the pre-replacement servo motor will be used to perform servo control of the post-replacement servo motor.
本発明は、このような問題に鑑みてなされたものであり、サーボモータの交換の検知精度を高めることができるサーボドライバ及びサーボシステムを提供することを目的とする。 SUMMARY OF THE INVENTION It is an object of the present invention to provide a servo driver and a servo system capable of improving detection accuracy of replacement of a servo motor.
開示の技術の1つの側面は、次のようなサーボドライバによって例示される。本サーボドライバは、エンコーダとモータ本体とを含むサーボモータを制御するサーボドライバであって、上記サーボモータをサーボ制御するサーボ制御部と、上記エンコーダに設けられたメモリであって、上記サーボドライバの通電時に上記サーボドライバからアクセスが可能である不揮発性メモリのデータを一塊の所定データとして取得し、取得した上記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部と、上記算出部により算出された上記ハッシュ値を記憶する記憶部と、次の上記サーボドライバへの通電時に、上記サーボドライバからアクセス可能な所定エンコーダが有する不揮発性メモリに対して上記算出部による上記演算処理を行うことで得られる所定ハッシュ値が、上記記
憶部が記憶する上記ハッシュ値と異なる場合に、上記サーボモータの交換を検知する検知部と、を備える。
One aspect of the disclosed technology is exemplified by the following servo driver. The present servo driver is a servo driver for controlling a servo motor including an encoder and a motor main body, comprising a servo control section for servo-controlling the servo motor and a memory provided in the encoder, a calculation unit that acquires data in a nonvolatile memory that can be accessed from the servo driver when the power is turned on as a block of predetermined data, inputs the acquired predetermined data into a hash function, and performs arithmetic processing to calculate a hash value; a storage unit for storing the hash value calculated by the calculation unit; a detection unit that detects replacement of the servo motor when a predetermined hash value obtained by performing the processing is different from the hash value stored in the storage unit.
上記サーボドライバは、エンコーダの不揮発性メモリに保存されたデータを取得し、そのハッシュ値を基にサーボモータの交換を検知する。すなわち、上記サーボドライバは、サーボモータからシリアル番号等の情報を取得して比較するのではないため、上記不揮発性メモリに保存されるデータの配置が不明な場合でも、サーボモータの交換を検知することができる。そのため、上記サーボドライバによれば、サーボモータの交換の検知精度を高めることができる。上記算出部は、例えば、上記エンコーダの上記不揮発性メモリに保存された全データを所定データとして取得するものであってよい。なお、サーボドライバの記憶部は、最も新しい上記サーボドライバへの通電時における、上記算出部により算出される上記ハッシュ値を記憶するものであってよい。 The servo driver acquires data stored in the non-volatile memory of the encoder and detects replacement of the servo motor based on the hash value. That is, since the servo driver does not acquire and compare information such as serial numbers from the servo motors, it can detect the replacement of the servo motors even if the arrangement of the data stored in the non-volatile memory is unknown. be able to. Therefore, according to the above servo driver, it is possible to improve the detection accuracy of replacement of the servo motor. For example, the calculation unit may acquire all data stored in the nonvolatile memory of the encoder as predetermined data. The storage unit of the servo driver may store the hash value calculated by the calculation unit at the time when the servo driver is most recently energized.
ここで、上記算出部は、上記エンコーダの上記不揮発性メモリに保存されたデータのうち、上記サーボドライバがアクセス可能であって値が変動する可変データを除いたデータを上記所定データとして取得するものであってよい。上記不揮発性メモリには、温度センサによって例示される各種センサ等が計測した計測データのように、値が変動する可変データが格納されることがある。このような可変データを除外することで、上記サーボドライバは、サーボモータが交換されていないにもかかわらず、サーボモータが交換されたと誤検知することが抑制される。 Here, the calculation unit obtains, as the predetermined data, the data stored in the nonvolatile memory of the encoder, excluding variable data accessible by the servo driver and whose value fluctuates. can be Variable data whose values fluctuate, such as measurement data measured by various sensors such as temperature sensors, may be stored in the nonvolatile memory. By excluding such variable data, the servo driver is prevented from erroneously detecting that the servo motor has been replaced even though the servo motor has not been replaced.
上記算出部は、上記演算処理において、上記所定データのハッシュ値を、第1のアルゴリズムの第1ハッシュ関数及び第2のアルゴリズムの第2ハッシュ関数の夫々について算出してもよい。そして、上記検知部は、上記記憶部に保存済みの上記第1ハッシュ関数で算出されたハッシュ値と、上記次のサーボドライバへの通電時に上記演算処理で上記第1ハッシュ関数を用いて得られるハッシュ値とを比較し、上記記憶部に保存済みの上記第2ハッシュ関数で算出されたハッシュ値と、上記次のサーボドライバへの通電時に上記演算処理で上記第2ハッシュ関数を用いて得られるハッシュ値とを比較し、上記第1ハッシュ関数で算出されたハッシュ値及び上記第2ハッシュ関数で算出されたハッシュ値の少なくとも一方でハッシュ値が異なる場合に、上記サーボモータの交換を検知するものであってもよい。ハッシュ関数では、入力されるデータが異なるにもかかわらず同一の値が算出されるコリジョンが発生しうる。2つの異なるアルゴリズムを用いることで、このようなコリジョンの発生によるモータ交換の検知精度低下が抑制される。 In the arithmetic processing, the calculation unit may calculate hash values of the predetermined data for each of a first hash function of a first algorithm and a second hash function of a second algorithm. Then, the detection unit uses the hash value calculated by the first hash function stored in the storage unit and the first hash function in the arithmetic processing when the next servo driver is energized. The hash value is compared with the hash value calculated by the second hash function stored in the storage unit and the hash value obtained by using the second hash function in the arithmetic processing when the next servo driver is energized. is compared with the hash value, and if at least one of the hash value calculated by the first hash function and the hash value calculated by the second hash function is different, replacement of the servo motor is detected. may be In a hash function, collisions can occur in which the same value is calculated even though the input data are different. By using two different algorithms, it is possible to suppress the decrease in detection accuracy of motor replacement due to the occurrence of such collisions.
そして、上記サーボ制御部は、上記サーボドライバの通電時に上記検知部によって上記サーボモータの交換が検知されると、その時点で上記サーボドライバに接続されているサーボモータの制御を禁止するものであってもよい。このような特徴を備えることで、交換前のサーボモータ制御用に設定されたパラメータで交換後のサーボモータを制御することが抑制される。 The servo control section prohibits control of the servo motor connected to the servo driver at that time when the detection section detects replacement of the servo motor while the servo driver is energized. may By providing such a feature, it is possible to suppress the control of the post-replacement servomotor with the parameters set for the control of the pre-replacement servomotor.
ここで、本発明をサーボシステムの側面から捉えることもできる。すなわち、本サーボシステムは、エンコーダとモータ本体とを含むサーボモータと、上記サーボモータを制御するサーボドライバと、を含む。上記サーボドライバは、上記サーボモータをサーボ制御するサーボ制御部と、上記エンコーダに設けられたメモリであって、上記サーボドライバの通電時に上記サーボドライバからアクセスが可能である不揮発性メモリのデータを一塊の所定データとして取得し、取得した上記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部と、上記算出部により算出された上記ハッシュ値を記憶する記憶部と、次の上記サーボドライバへの通電時に、上記サーボドライバからアクセス可能な所定エンコーダが有する不揮発性メモリに対して上記算出部による上記演算処理を行うことで得られる所定ハッシュ値が、上記記憶部が記憶する上記ハッシュ値と異なる
場合に、上記サーボモータの交換を検知する検知部と、を含む。
Here, the present invention can also be viewed from the aspect of the servo system. That is, this servo system includes a servo motor including an encoder and a motor body, and a servo driver that controls the servo motor. The servo driver includes a servo control unit for servo-controlling the servo motor, and a memory provided in the encoder. a calculation unit that performs arithmetic processing to calculate a hash value by inputting the obtained predetermined data into a hash function, a storage unit that stores the hash value calculated by the calculation unit, and When the servo driver is energized, the storage unit stores a predetermined hash value obtained by performing the arithmetic processing by the calculation unit on a nonvolatile memory of a predetermined encoder accessible from the servo driver. a detection unit that detects replacement of the servo motor when the hash value is different from the hash value.
開示の技術によれば、サーボモータ交換の検知精度を高めることができる。 According to the disclosed technology, it is possible to improve the detection accuracy of servo motor replacement.
以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中同一または相当部分には同一符号を付して、その説明は繰り返さない。本開示では、サーボシステムの一つの例示的形態として、産業用システムを示す。しかしながら、本発明に係るサーボシステムの用途は特に限定されるものではない。 BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are denoted by the same reference numerals, and the description thereof will not be repeated. This disclosure presents an industrial system as one exemplary form of servo system. However, the application of the servo system according to the present invention is not particularly limited.
<実施形態>
図1は、サーボシステム100の構成例を概略的に示す図である。サーボシステム100は、Programmable Logic Controller(PLC)1と、サーボドライバ2とを含む。サーボドライバ2はサーボモータ3を駆動制御するように配置される。サーボモータ3の出力軸32は、カップリング51によって、ねじ軸52と繋がれている。ねじ軸52には精密ステージ53が配置され、サーボモータ(以下、「モータ」という)3の駆動により精密ステージ53が変位するように構成されている。ねじ軸52に沿った精密ステージ53の駆動範囲の両端部には、ストッパ(図示省略)が設けられる。精密ステージ53がストッパに接触する際の衝撃は、モータ3のトルク制御によって可及的に軽減される。精密ステージ53には、ワーク8が載せられている。このように図に示すサーボシステム100においては、モータ3による駆動軸の1本の駆動軸が設けられているが、駆動軸は2本以上設けられていてもよい。
<Embodiment>
FIG. 1 is a diagram schematically showing a configuration example of a
ここで、PLC1は、サーボドライバ2に指令信号を出力する。PLC1は、予め準備されたプログラムに従う処理を実行することによって、たとえばサーボドライバ2の監視装置として機能する。
Here, the
そして、サーボドライバ2は、PLC1から指令信号を受ける。さらにサーボドライバ2は、モータ3からフィードバック信号を受ける。サーボドライバ2においては、それぞれ、位置制御器、速度制御器、電流制御器等を利用したフィードバック制御を行うサーボ系が形成されており、これらの信号を利用して、モータ3をサーボ制御し駆動する。
Then, the
また、モータ3は、モータ本体30とエンコーダ31とを含む。モータ3は、例えばACサーボモータである。モータ3は、サーボドライバ2からの駆動電流を、動力線40を
介して給電される。エンコーダ31は、モータ本体30の出力軸32の変位を検出する。エンコーダ31が検出する出力軸32の変位としては、例えば、出力軸32の回転方向や回転量、回転速度等を挙げることができる。エンコーダ31は、検出された変位を示すフィードバック信号を、エンコーダケーブル41を介してサーボドライバ2に出力する。
Also, the
次に、エンコーダ31の機能的な構成について、説明する。図2は、モータ3の概略構成を示す図である。モータ3が備えるエンコーダ31は、信号生成部311と、通信部312と、記憶部313と、を含む。
Next, the functional configuration of the
信号生成部311は、サーボドライバ2により駆動されるモータ3のモータ本体30の動作を検出して、検出された動作を示すフィードバック信号を生成する。フィードバック信号は通信部312に出力される。フィードバック信号には、例えばモータ本体30の回転軸の回転位置(角度)についての情報、当該回転軸の回転速度についての情報、当該回転軸の回転方向についての情報などが含まれる。信号生成部311の構成には、例えば公知のインクリメンタル型またはアブソリュート型の構成を適用することができる。
The
通信部312は、サーボドライバ2と通信するためのインターフェイスである。本実施の形態において、通信部312は、エンコーダケーブル41を介して、フィードバック信号をサーボドライバ2に送る。この実施の形態では、通信部312からのフィードバック信号及び検出信号の送信には、シリアル通信が適用される。これにより、ケーブルに含まれる信号線の本数を少なくすることができる。エンコーダケーブル41によるシリアル通信には、例えばRecommended Standards 232(RS-232C)、RS-422、あるいはRS-485などの公知の通信規格を採用することができる。
A
記憶部313は、モータ3のサーボ制御に係るデータを記憶する記憶部である。記憶部313は、例えば、EEPROMである。図3は、エンコーダ31の記憶部313に記憶されるデータの一例を示す第1の図である。図3では、データが記憶される位置と、当該位置に記憶されるデータとが対応付けて示される。位置は、例えば、アドレスによって示される。記憶部313には、エンコーダシリアル番号、各種パラメータ等のエンコーダ31に係るデータが保存される。そして、エンコーダ31を製造するメーカーとモータ本体30を製造するメーカーとは異なることがある。そのため、記憶部313には、さらに、モータ用領域が設けられる。図3では、モータ用領域に保存されるデータを矢印で示している。
The
モータ用領域には、モータ本体30の駆動に用いられる各種パラメータがモータ本体30のメーカーによって保存される。図3の例では、モータ用領域には、モータ型名、モータシリアル番号、サーボ制御用パラメータが保存される。そして、モータ本体30のサーボ制御用パラメータはモータ本体30の個体毎に調整される。そのため、モータ本体30のサーボ制御用パラメータは、同じ型名のモータ本体30であっても、個体毎(モータ本体30のシリアル番号毎)に異なることがある。すなわち、モータ本体30の型名が同じであっても、サーボ制御に好適なサーボ制御用パラメータはモータ本体30の個体毎に異なることがある。
Various parameters used for driving the
記憶部313には、上記のように、予め設定されたデータが保存される。記憶部313に保存されたデータは、サーボドライバ2からの指令に応じて、通信部312からサーボドライバ2に送信される。なお、図3に示す記憶部313の構成はあくまで一例であって、記憶部313の構成はエンコーダ31のメーカーが決定し、エンコーダ31によって異なる。
The
サーボドライバ2とモータ3の供給元が同一である場合、供給元は記憶部313の構成をサーボドライバ2に設定することができる。そのため、サーボドライバ2は、記憶部313からモータ本体30の型名、シリアル番号及びエンコーダ31のシリアル番号を取得することで、モータ3の交換を検知することができる。しかしながら、サーボドライバ2とモータ3の供給元が異なる場合(例えば、サーボドライバ2とエンコーダ31の供給元が異なる場合)、記憶部313の構成をサーボドライバ2の供給元は把握することができず、サーボドライバ2の供給元は、記憶部313の構成をサーボドライバ2に設定することができなくなる。そのため、サーボドライバ2は、新たに接続されたモータ3の記憶部313からモータ3の型名、シリアル番号及びエンコーダ31のシリアル番号を取得できず、モータ3の交換を検知できなくなる。そこで、本実施形態では、このような課題を解決するため、サーボドライバ2は以下に説明する機能部を備える。
When the supplier of the
図4は、サーボドライバ2が有する機能部の概略構成を示す図である。サーボドライバ2は、演算装置、記憶装置等を有するコンピュータとみなすことができる。図4に示す機能部は、サーボドライバ2において所定のプログラム等が実行されることで実現される。サーボドライバ2は、通信部21、サーボ制御部22、算出部23、検知部24及び記憶部25を有するが、これら以外の機能部を有していても構わない。
FIG. 4 is a diagram showing a schematic configuration of functional units of the
通信部21は、通信ケーブル11を介して外部との通信を司る機能である。例えば、通信部21は、PLC1との通信のためのインターフェイスとして機能する。さらに、通信部21は、エンコーダケーブル41を介したエンコーダ31との通信のためのインターフェイスとしても機能する。
The
サーボ制御部22は、PLC1からの指令に基づいてモータ3をサーボ制御するための機能部であり、具体的には、位置制御器、速度制御器、電流制御器等を利用したフィードバック制御を行う機能部である。なお、位置制御器、速度制御器、電流制御器等については、制御対象であるモータ3のサーボ制御が好適に行われるよう速度ゲイン等の制御パラメータが適宜設定される。
The
算出部23は、例えば、サーボドライバ2の通電時等に、エンコーダ31の記憶部313に保存されたデータを取得する。ここで、算出部23は、取得したデータの意味を解釈する必要はない。そのため、検知部24は、記憶部313に保存されたデータを単なるビット列(一塊のデータ)として取得すればよい。そして、算出部23は、記憶部313から取得したデータをハッシュ関数に入力することでハッシュ値を算出する演算処理を行う。
The
ここで、算出部23が使用するハッシュ関数としては、様々なアルゴリズムのハッシュ関数を挙げることができる。検知部24が使用するハッシュ関数のアルゴリズムとしては、例えば、SHA-1、SHA-256、SHA-512等を挙げることができる。
Here, hash functions of various algorithms can be used as the hash functions used by the
検知部24は、モータ3の交換を検知する機能部である。検知部24は、算出部23によって算出された算出されたハッシュ値を記憶部25に記憶させる。そして、検知部24は、サーボドライバ2の通電時に算出したハッシュ値と、記憶部25に記憶済みのハッシュ値とを比較し、これらのハッシュ値が異なる場合にはモータ3が交換されたことを検知する。
The
記憶部25は、モータ3のサーボ制御に用いられるデータや、算出部23が算出したハッシュ値等のように、サーボドライバ2で行われる処理に関連する各種データを記憶する機能部である。
The
続いて、サーボドライバ2によるモータ3の交換を検知する検知フローについて説明する。図5は、サーボドライバ2によるモータ3の交換を検知する処理フローを示す図である。図5に示す処理フローは、例えば、サーボドライバ2の通電時(起動時)に実行される。以下、図5を参照して、検知部24によるモータ3の交換を検知する処理フローについて説明する。
Next, a detection flow for detecting replacement of the
S1では、算出部23は、エンコーダ31の記憶部313に記憶された全データを取得する。S2では、算出部23は、S1で取得した全データをハッシュ関数に入力してハッシュ値を算出する。
In S<b>1 , the
S3では、検知部24は、記憶部25に保存済みのハッシュ値があるか否かを判定する。保存済みのハッシュ値がある場合(S3でYES)、処理はS4に進められる。保存済みのハッシュ値がない場合(S3でNO)、処理はS6に進められる。
In S<b>3 , the
S4では、検知部24は、S2で算出部23が算出したハッシュ値と記憶部25に保存済みのハッシュ値とを比較する。これらのハッシュ値が一致する場合(S4でYES)、モータ3は交換されていないと判定されることから、処理はS7に進められる。これらのハッシュ値が異なる場合(S4でNO)、処理はS5に進められる。
In S<b>4 , the
S5では、検知部24は、モータ3の交換を検知する。モータ3の交換を検知した検知部24は、例えば、警報を出力するとともに、モータ3の駆動を開始しない。警報の出力は、例えば、ブザー音の出力であってよい。また、警報の出力は、PLC1等の上位装置にメッセージを送信することで実現されてもよい。そして、S5に到達する処理フローではS7の処理が実行されないことから、モータ3の駆動開始処理が禁止される。
In S<b>5 , the
S6では、算出部23は、S2で算出したハッシュ値を記憶部25に保存する。なお、算出部23は、すでに保存されたハッシュ値がある場合には、当該保存済みのハッシュ値を消去してから今回のサーボドライバ2の通電時におけるS2で算出したハッシュ値の保存を行う。保存したハッシュ値は、例えば、次にサーボドライバ2が通電された時のS4の判定に用いられる。S7では、サーボ制御部22は、モータ3の駆動を開始する。
In S<b>6 , the
以上説明した実施形態では、サーボドライバ2は、エンコーダ31の記憶部313に記憶された全データについてハッシュ値を算出し、算出したハッシュ値の比較によってモータ3の交換を検知する。そのため、サーボドライバ2は、記憶部313のどの領域にどのようなデータが保存されているかが不明な場合でも、モータ3の交換を検知することができる。
In the embodiment described above, the
サーボドライバ2は、エンコーダ31の記憶部313に保存された全データの比較にハッシュ値を採用する。ハッシュ値は、ハッシュ関数のアルゴリズムに応じた固定長のデータとなる。すなわち、記憶部313に保存されたデータが大容量であってもハッシュ値のサイズが大きくなることはない。そのため、本実施形態によれば、ハッシュ値の保存に用いる記憶部25の容量を抑制することができる。また、記憶部313に保存されたデータを比較する際にハッシュ値が用いられることで、記憶部313に保存されたデータをそのまま比較するよりもサーボドライバ2の計算負荷を軽減することができる。
The
<第1変形例>
以上で説明した実施形態では、エンコーダ31の記憶部313には、予め設定されたデータが保存されていた。第1変形例では、記憶部313に温度センサによって例示される各種センサが測定した測定データのような値が変動する可変データも保存される場合について説明する。
<First modification>
In the embodiment described above, preset data was saved in the
図6は、エンコーダ31の記憶部313に記憶されるデータの一例を示す第2の図である。図6の例では、図3に示したデータに加えて、エンコーダ31に接続された各種センサが測定した測定データも記憶部313に保存される。そのため、検知部24が記憶部313の全領域のデータを取得してハッシュ値を算出すると、モータ3が交換されていなくともハッシュ値が異なる場合が生じる。そのため、検知部24は、モータ3の交換を誤検知する場合がある。
FIG. 6 is a second diagram showing an example of data stored in the
そこで、算出部23は、記憶部313に保存されたデータのうち、可変データが保存された領域以外の領域に保存されたデータを取得し、そのハッシュ値を算出する。算出部23は、例えば、記憶部313にアクセスするコマンドにおいて可変データが保存された領域を除いた全データを取得するように指定すればよい。
Therefore, the
図7は、第1変形例におけるサーボドライバ2によるモータ3の交換を検知する検知フローを示す図である。図7に示す検知フローは、S1に変えてS1aが実行される点で図5に示す検知フローとは異なる。
FIG. 7 is a diagram showing a detection flow for detecting replacement of the
S1aでは、算出部23は、記憶部313からデータを取得するコマンドにおいて、可変データが保存された領域以外の全データを取得するように指示する。すなわち、算出部23は、図5のS1では記憶部313の全領域に保存されたデータを取得するのに対して、図7のS1aでは、可変データが保存された領域を除外して記憶部313に保存されたデータを取得する。
In S1a, the
第1変形例では、可変データが保存された領域を除外して記憶部313に保存されたデータを取得し、取得したデータのハッシュ値が算出される。そのため、記憶部313に保存された可変データの値が変動しても、モータ3が交換されない限りはハッシュ値の変動は生じない。そのため、第1変形例によれば、可変データが記憶部313に保存される場合であっても、検知部24はモータ3の交換を検知できる。
In the first modified example, the data stored in the
<第2変形例>
以上説明した実施形態では、記憶部313から取得したデータのハッシュ値をひとつのハッシュ関数で算出した。第2変形例では、2つの異なるアルゴリズムのハッシュ関数を用いて、記憶部313から取得したデータのハッシュ値を算出する例について説明する。
<Second modification>
In the embodiment described above, the hash value of data acquired from the
図8は、第2変形例におけるサーボドライバ2によるモータ3の交換を検知する検知フローを示す図である。図8に示す検知フローは、S2に変えてS2aが実行され、S4に変えてS4aが実行され、S6に変えてS6aが実行される点で図5に示す検知フローとは異なる。
FIG. 8 is a diagram showing a detection flow for detecting replacement of the
S2aでは、算出部23は、アルゴリズムの異なる2つのハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。算出部23は、例えば、SHA-1のハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。また、算出部23は、SHA-256のハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。
In S2a, the
S4aでは、検知部24は、S2aで算出された2つのハッシュ値と、S6で保存された2つのハッシュ値とを比較する。すなわち、検知部24は、S6で保存されたSHA-1で算出されたハッシュ値と、S2aにおいて新たにSHA-1で算出したハッシュ値とを比較する。さらに、検知部24は、S6で保存されたSHA-256で算出されたハッシュ値と、S2aにおいて新たにSHA-256で算出したハッシュ値とを比較する。こ
の比較の結果、SHA-1で算出されたハッシュ値及びSHA-256で算出されたハッシュ値の少なくともいずれか一方が一致しない場合(S4aでNO)、処理はS5に進められる。いずれのハッシュ値も一致する場合(S4aでYES)、処理は、S7に進められる。
In S4a, the
S6aでは、算出部23は、S2aで算出した2つのハッシュ値を記憶部25に保存する。なお、算出部23は、すでに保存されたハッシュ値がある場合には、当該保存済みのハッシュ値を消去してから今回のサーボドライバ2の通電時におけるS2aで算出した2つのハッシュ値の保存を行う。算出部23は、例えば、2つのハッシュ値の夫々を算出したアルゴリズムと対応付けて記憶部25に保存すればよい。
In S6a, the
ハッシュ関数は、入力されたデータが異なるにもかかわらず同一のハッシュ値が算出されることがある(コリジョンの発生)。第2変形例では、記憶部313から取得したデータに対して2つの異なるアルゴリズムのハッシュ関数を用いて夫々のハッシュ値を算出し、S4aにおいて少なくとも一方のアルゴリズムで算出したハッシュ値が一致しない場合に、モータ3の交換を検知する。同一の入力データに対して、2つの異なるアルゴリズムのハッシュ関数でコリジョンが発生する確率は極めて低いと考えられる。そのため、第2変形例によれば、モータ3の交換を検知する精度を高めることができる。
The hash function may calculate the same hash value despite different input data (occurrence of collision). In the second modification, each hash value is calculated using hash functions of two different algorithms for the data acquired from the
以上説明した実施形態及び変形例は、組み合わせることができる。 The embodiments and modifications described above can be combined.
<付記1>
エンコーダ(31)とモータ本体(30)とを含むサーボモータ(3)を制御するサーボドライバ(2)であって、
前記サーボモータ(3)をサーボ制御するサーボ制御部(22)と、
前記エンコーダ(31)に設けられたメモリで(313)あって、前記サーボドライバ(2)の通電時に前記サーボドライバ(2)からアクセスが可能である不揮発性メモリ(313)のデータを一塊の所定データとして取得し、取得した前記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部(23)と、
前記算出部(23)により算出された前記ハッシュ値を記憶する記憶部(25)と、
次の前記サーボドライバ(2)への通電時に、前記サーボドライバ(2)からアクセス可能な所定エンコーダ(31)が有する不揮発性メモリ(313)に対して前記算出部(23)による前記演算処理を行うことで得られる所定ハッシュ値が、前記記憶部(25)が記憶する前記ハッシュ値と異なる場合に、前記サーボモータ(3)の交換を検知する検知部(24)と、
を備える、サーボドライバ(2)。
<
A servo driver (2) for controlling a servo motor (3) including an encoder (31) and a motor body (30),
a servo control unit (22) for servo-controlling the servo motor (3);
Data in a non-volatile memory (313) provided in the encoder (31), which is accessible from the servo driver (2) when the servo driver (2) is energized, is stored as a set of predetermined data. a calculation unit (23) that performs arithmetic processing for obtaining data and inputting the obtained predetermined data to a hash function to calculate a hash value;
a storage unit (25) that stores the hash value calculated by the calculation unit (23);
When the servo driver (2) is next energized, the arithmetic processing by the calculation unit (23) is performed on the nonvolatile memory (313) of the predetermined encoder (31) accessible from the servo driver (2). a detection unit (24) for detecting replacement of the servo motor (3) when a predetermined hash value obtained by performing the above is different from the hash value stored in the storage unit (25);
a servo driver (2).
<付記2>
エンコーダ(31)とモータ本体(30)とを含むサーボモータ(3)と、
前記サーボモータ(3)を制御するサーボドライバ(2)と、を含むサーボシステム(100)であって、
前記サーボドライバ(2)は、
前記サーボモータ(3)をサーボ制御するサーボ制御部(22)と、
前記エンコーダ(31)に設けられたメモリ(313)であって、前記サーボドライバ(2)の通電時に前記サーボドライバ(2)からアクセスが可能である不揮発性メモリ(313)のデータを一塊の所定データとして取得し、取得した前記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部(23)と
前記算出部(23)により算出された前記ハッシュ値を記憶する記憶部(25)と、
次の前記サーボドライバ(2)への通電時に、前記サーボドライバ(2)からアクセス可能な所定エンコーダ(31)が有する不揮発性メモリ(313)に対して前記算出部(
23)による前記演算処理を行うことで得られる所定ハッシュ値が、前記記憶部(25)が記憶する前記ハッシュ値と異なる場合に、前記サーボモータ(3)の交換を検知する検知部(24)と、を含む、
サーボシステム(100)。
<
a servo motor (3) including an encoder (31) and a motor body (30);
A servo system (100) comprising a servo driver (2) for controlling the servo motor (3),
The servo driver (2)
a servo control unit (22) for servo-controlling the servo motor (3);
A memory (313) provided in the encoder (31), which is a non-volatile memory (313) accessible from the servo driver (2) when the servo driver (2) is energized. a calculation unit (23) that acquires data and performs arithmetic processing to calculate a hash value by inputting the acquired predetermined data into a hash function; and a storage unit that stores the hash value calculated by the calculation unit (23). (25) and
When the servo driver (2) is next energized, the calculation unit (
23) is different from the hash value stored in the storage unit (25), a detection unit (24) for detecting replacement of the servo motor (3). and including
A servo system (100).
1・・PLC
2・・サーボドライバ
3・・モータ
8・・ワーク
21・・通信部
22・・サーボ制御部
23・・算出部
24・・検知部
25・・記憶部
30・・モータ本体
31・・エンコーダ
311・・信号生成部
312・・通信部
313・・記憶部
32・・出力軸
41・・エンコーダケーブル
51・・カップリング
52・・ねじ軸
53・・精密ステージ53
100・・サーボシステム
1 PLC
2
100 Servo system
Claims (12)
前記サーボモータをサーボ制御するサーボ制御部と、
前記エンコーダに設けられたメモリであって、前記サーボドライバの通電時に前記サーボドライバからアクセスが可能である不揮発性メモリのデータを一塊の所定データとして取得し、取得した前記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部と、
前記算出部により算出された前記ハッシュ値を記憶する記憶部と、
次の前記サーボドライバへの通電時に、前記サーボドライバからアクセス可能な所定エンコーダが有する不揮発性メモリに対して前記算出部による前記演算処理を行うことで得られる所定ハッシュ値が、前記記憶部が記憶する前記ハッシュ値と異なる場合に、前記サーボモータの交換を検知する検知部と、
を備える、サーボドライバ。 A servo driver for controlling a servo motor including an encoder and a motor body,
a servo control unit that servo-controls the servo motor;
Data in a non-volatile memory provided in the encoder and accessible from the servo driver when the servo driver is energized is acquired as a block of predetermined data, and the acquired predetermined data is input to a hash function. a calculation unit that performs arithmetic processing to calculate a hash value by
a storage unit that stores the hash value calculated by the calculation unit;
When the servo driver is energized next time, the storage unit stores a predetermined hash value obtained by performing the arithmetic processing by the calculation unit on a nonvolatile memory of a predetermined encoder accessible from the servo driver. a detection unit that detects replacement of the servo motor when the hash value differs from the hash value to be used;
a servo driver.
請求項1に記載のサーボドライバ。 The storage unit stores the hash value calculated by the calculation unit when the most recent servo driver is energized.
The servo driver according to claim 1.
請求項1または2に記載のサーボドライバ。 The calculation unit acquires all data stored in the nonvolatile memory of the encoder as the predetermined data.
The servo driver according to claim 1 or 2.
請求項1または2に記載のサーボドライバ。 The calculation unit obtains, as the predetermined data, data excluding variable data that is accessible to the servo driver and whose value fluctuates, from the data stored in the nonvolatile memory of the encoder.
The servo driver according to claim 1 or 2.
前記演算処理において、前記所定データのハッシュ値を、第1のアルゴリズムの第1ハッシュ関数及び第2のアルゴリズムの第2ハッシュ関数の夫々について算出し、
前記検知部は、
前記記憶部に保存済みの前記第1ハッシュ関数で算出されたハッシュ値と、前記次のサーボドライバへの通電時に前記演算処理で前記第1ハッシュ関数を用いて得られるハッシュ値とを比較し、
前記記憶部に保存済みの前記第2ハッシュ関数で算出されたハッシュ値と、前記次のサーボドライバへの通電時に前記演算処理で前記第2ハッシュ関数を用いて得られるハッシュ値とを比較し、
前記第1ハッシュ関数で算出されたハッシュ値及び前記第2ハッシュ関数で算出されたハッシュ値の少なくとも一方でハッシュ値が異なる場合に、前記サーボモータの交換を検知する、
請求項1から4のいずれか一項に記載のサーボドライバ。 The calculation unit
calculating a hash value of the predetermined data for each of a first hash function of a first algorithm and a second hash function of a second algorithm in the arithmetic processing;
The detection unit is
comparing a hash value calculated by the first hash function stored in the storage unit with a hash value obtained by using the first hash function in the arithmetic processing when the next servo driver is energized;
comparing the hash value calculated by the second hash function stored in the storage unit and the hash value obtained by using the second hash function in the arithmetic processing when the next servo driver is energized;
Detecting the replacement of the servo motor when at least one of the hash value calculated by the first hash function and the hash value calculated by the second hash function is different.
A servo driver according to any one of claims 1 to 4.
請求項1から5のいずれか一項に記載のサーボドライバ。 When the detection unit detects replacement of the servo motor when the servo driver is energized, the servo control unit prohibits control of the servo motor connected to the servo driver at that time.
A servo driver according to any one of claims 1 to 5.
前記サーボモータを制御するサーボドライバと、を含むサーボシステムであって、
前記サーボドライバは、
前記サーボモータをサーボ制御するサーボ制御部と、
前記エンコーダに設けられたメモリであって、前記サーボドライバの通電時に前記サーボドライバからアクセスが可能である不揮発性メモリのデータを一塊の所定データとして取得し、取得した前記所定データをハッシュ関数に入力してハッシュ値を算出する演算処理を行う算出部と
前記算出部により算出された前記ハッシュ値を記憶する記憶部と、
次の前記サーボドライバへの通電時に、前記サーボドライバからアクセス可能な所定エンコーダが有する不揮発性メモリに対して前記算出部による前記演算処理を行うことで得られる所定ハッシュ値が、前記記憶部が記憶する前記ハッシュ値と異なる場合に、前記サーボモータの交換を検知する検知部と、を含む、
サーボシステム。 a servo motor including an encoder and a motor body;
A servo system comprising a servo driver that controls the servo motor,
The servo driver
a servo control unit that servo-controls the servo motor;
Data in a non-volatile memory provided in the encoder and accessible from the servo driver when the servo driver is energized is acquired as a block of predetermined data, and the acquired predetermined data is input to a hash function. a calculation unit that performs arithmetic processing to calculate a hash value by calculating a hash value; a storage unit that stores the hash value calculated by the calculation unit;
When the servo driver is energized next time, the storage unit stores a predetermined hash value obtained by performing the arithmetic processing by the calculation unit on a nonvolatile memory of a predetermined encoder accessible from the servo driver. a detection unit that detects replacement of the servo motor if the hash value differs from the hash value that
servo system.
請求項7に記載のサーボシステム。 The storage unit stores the hash value calculated by the calculation unit when the most recent servo driver is energized.
A servo system according to claim 7.
請求項7または8に記載のサーボシステム。 The calculation unit acquires all data stored in the nonvolatile memory of the encoder as the predetermined data.
9. Servo system according to claim 7 or 8.
請求項7または8に記載のサーボシステム。 The calculation unit obtains, as the predetermined data, data excluding variable data that is accessible to the servo driver and whose value fluctuates, from the data stored in the nonvolatile memory of the encoder.
9. Servo system according to claim 7 or 8.
前記演算処理において、前記所定データのハッシュ値を、第1のアルゴリズムの第1ハッシュ関数及び第2のアルゴリズムの第2ハッシュ関数の夫々について算出し、
前記記憶部に保存済みの前記第1ハッシュ関数で算出されたハッシュ値と、前記次のサーボドライバへの通電時に前記演算処理で前記第1ハッシュ関数を用いて得られるハッシュ値とを比較し、
前記記憶部に保存済みの前記第2ハッシュ関数で算出されたハッシュ値と、前記次のサーボドライバへの通電時に前記演算処理で前記第2ハッシュ関数を用いて得られるハッシュ値とを比較し、
前記第1ハッシュ関数で算出されたハッシュ値及び前記第2ハッシュ関数で算出されたハッシュ値の少なくとも一方でハッシュ値が異なる場合に、前記サーボモータの交換を検知する、
請求項7から10のいずれか一項に記載のサーボシステム。 The calculation unit
calculating a hash value of the predetermined data for each of a first hash function of a first algorithm and a second hash function of a second algorithm in the arithmetic processing;
comparing a hash value calculated by the first hash function stored in the storage unit with a hash value obtained by using the first hash function in the arithmetic processing when the next servo driver is energized;
comparing the hash value calculated by the second hash function stored in the storage unit and the hash value obtained by using the second hash function in the arithmetic processing when the next servo driver is energized;
Detecting the replacement of the servo motor when at least one of the hash value calculated by the first hash function and the hash value calculated by the second hash function is different.
Servo system according to any one of claims 7 to 10.
請求項7から11のいずれか一項に記載のサーボシステム。 When the detection unit detects replacement of the servo motor when the servo driver is energized, the servo control unit prohibits control of the servo motor connected to the servo driver at that time.
Servo system according to any one of claims 7 to 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021038182A JP2022138348A (en) | 2021-03-10 | 2021-03-10 | Servo driver and servo system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021038182A JP2022138348A (en) | 2021-03-10 | 2021-03-10 | Servo driver and servo system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022138348A true JP2022138348A (en) | 2022-09-26 |
Family
ID=83399131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021038182A Pending JP2022138348A (en) | 2021-03-10 | 2021-03-10 | Servo driver and servo system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022138348A (en) |
-
2021
- 2021-03-10 JP JP2021038182A patent/JP2022138348A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11048227B2 (en) | Abnormality detection device of machine tool | |
US11460827B2 (en) | Controller and machine learning device | |
JP3681733B2 (en) | Numerical controller | |
CN110187694B (en) | Failure prediction device and machine learning device | |
US11609567B2 (en) | Apparatus and method for controlling vehicle based on redundant architecture | |
US20170030972A1 (en) | Actuator fault detection device, controlling device and control method | |
US20200249650A1 (en) | Numerical control system | |
JP5355530B2 (en) | Electric power steering device | |
CN105269571A (en) | Robot control system having stop function | |
CN110196573B (en) | Abnormal factor determination device | |
JP5203585B2 (en) | Drive control apparatus and control method thereof | |
JP2008188694A (en) | Robot safety monitor and robot actuation control system | |
JP2017200710A (en) | Abnormality diagnostic method and abnormality diagnostic device of joint driving robot | |
JP2022138348A (en) | Servo driver and servo system | |
JP6721628B2 (en) | Parameter determination support device and program | |
JP2009538114A (en) | Electronic control device for electric drive system, electronic drive unit for electric drive system, and electric drive system | |
US10422668B2 (en) | Method and program for angle calibration of rotary shaft | |
US20200026255A1 (en) | Abnormality detection device of machine tool | |
JP2020075304A (en) | Speed reducer system, method for correction of command value to drive unit, correction data generation method, and method for manufacture of speed reducer system | |
CN109581970A (en) | Parameter determines auxiliary device | |
US11754994B2 (en) | Diagnostic apparatus and diagnostic method | |
JP2009300354A (en) | Encoder with internal information output function | |
JP4098748B2 (en) | Numerical control device having function of outputting emergency stop command | |
EP3678290A1 (en) | Motor driving device | |
JP2008225652A (en) | Numerical control device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20240116 |