JP2022138348A - Servo driver and servo system - Google Patents

Servo driver and servo system Download PDF

Info

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
Application number
JP2021038182A
Other languages
Japanese (ja)
Inventor
羊二 岩永
Yoji Iwanaga
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2021038182A priority Critical patent/JP2022138348A/en
Publication of JP2022138348A publication Critical patent/JP2022138348A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

To increase the accuracy of detection of servomotor replacement.SOLUTION: A servo driver for controlling a servomotor including an encoder and a motor body comprises: a servo control unit for controlling the servomotor by servo control; a calculation unit for acquiring data of a nonvolatile memory, which is arranged in the encoder and can be accessed by the servo driver when the servo driver is electrified, as a chunk of prescribed data, and for performing an arithmetic processing of the calculation of a hash value by inputting the acquired prescribed data into a hash function; a memory unit for memorizing the hash value calculated by the calculation unit; and a detection unit for detecting the replacement of the servomotor, when the prescribed hash value, which is acquired by the arithmetic processing by the calculation unit to the nonvolatile memory of the prescribed encoder, the memory being able to be accessed by the servo driver when the servo driver is electrified next, is different from the hash value memorized in the memory unit.SELECTED DRAWING: Figure 4

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.

特開平8-023692号公報JP-A-8-023692 特開2018-021789号公報JP 2018-021789 A 国際公開第2014/109054号WO2014/109054

ここで、サーボドライバとサーボモータとが異なる供給元から供給されている等の事情がある場合、エンコーダの不揮発性メモリのいずれの領域に識別情報が記憶されているか不明な場合がある。このような場合、サーボドライバは、サーボモータから識別情報を取得することができないため、サーボモータの交換を検知することができない。そのため、サーボドライバは、異常を発報することができず、交換前のサーボモータから取得したパラメータで交換後のサーボモータのサーボ制御が行われてしまう虞がある。 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.

図1は、サーボシステムの構成例を概略的に示す図である。FIG. 1 is a diagram schematically showing a configuration example of a servo system. 図2は、モータの概略構成を示す図である。FIG. 2 is a diagram showing a schematic configuration of the motor. 図3は、エンコーダの記憶部に記憶されるデータの一例を示す第1の図である。FIG. 3 is a first diagram showing an example of data stored in a storage unit of an encoder; 図4は、サーボドライバが有する機能部の概略構成を示す図である。FIG. 4 is a diagram showing a schematic configuration of functional units of the servo driver. 図5は、サーボドライバによるモータの交換を検知する処理フローを示す図である。FIG. 5 is a diagram showing a processing flow for detecting replacement of a motor by a servo driver. 図6は、エンコーダの記憶部に記憶されるデータの一例を示す第2の図である。FIG. 6 is a second diagram showing an example of data stored in the storage unit of the encoder. 図7は、第1変形例におけるサーボドライバによるモータの交換を検知する検知フローを示す図である。FIG. 7 is a diagram showing a detection flow for detecting replacement of the motor by the servo driver in the first modified example. 図8は、第2変形例におけるサーボドライバによるモータの交換を検知する検知フローを示す図である。FIG. 8 is a diagram showing a detection flow for detecting replacement of the motor by the servo driver in the second modification.

以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中同一または相当部分には同一符号を付して、その説明は繰り返さない。本開示では、サーボシステムの一つの例示的形態として、産業用システムを示す。しかしながら、本発明に係るサーボシステムの用途は特に限定されるものではない。 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 servo system 100. As shown in FIG. Servo system 100 includes a Programmable Logic Controller (PLC) 1 and a servo driver 2 . A servo driver 2 is arranged to drive and control the servo motor 3 . An output shaft 32 of the servomotor 3 is connected to a screw shaft 52 by a coupling 51 . A precision stage 53 is arranged on the screw shaft 52 , and is configured to be displaced by driving a servomotor (hereinafter referred to as “motor”) 3 . Stoppers (not shown) are provided at both ends of the driving range of the precision stage 53 along the screw shaft 52 . The impact when the precision stage 53 contacts the stopper is reduced as much as possible by controlling the torque of the motor 3 . A work 8 is placed on the precision stage 53 . As described above, in the illustrated servo system 100, one drive shaft is provided for the motor 3, but two or more drive shafts may be provided.

ここで、PLC1は、サーボドライバ2に指令信号を出力する。PLC1は、予め準備されたプログラムに従う処理を実行することによって、たとえばサーボドライバ2の監視装置として機能する。 Here, the PLC 1 outputs command signals to the servo driver 2 . The PLC 1 functions, for example, as a monitoring device for the servo driver 2 by executing processing according to a program prepared in advance.

そして、サーボドライバ2は、PLC1から指令信号を受ける。さらにサーボドライバ2は、モータ3からフィードバック信号を受ける。サーボドライバ2においては、それぞれ、位置制御器、速度制御器、電流制御器等を利用したフィードバック制御を行うサーボ系が形成されており、これらの信号を利用して、モータ3をサーボ制御し駆動する。 Then, the servo driver 2 receives a command signal from the PLC1. Further, servo driver 2 receives a feedback signal from motor 3 . In the servo driver 2, a servo system that performs feedback control using a position controller, a speed controller, a current controller, etc. is formed, and these signals are used to servo-control and drive the motor 3. do.

また、モータ3は、モータ本体30とエンコーダ31とを含む。モータ3は、例えばACサーボモータである。モータ3は、サーボドライバ2からの駆動電流を、動力線40を
介して給電される。エンコーダ31は、モータ本体30の出力軸32の変位を検出する。エンコーダ31が検出する出力軸32の変位としては、例えば、出力軸32の回転方向や回転量、回転速度等を挙げることができる。エンコーダ31は、検出された変位を示すフィードバック信号を、エンコーダケーブル41を介してサーボドライバ2に出力する。
Also, the motor 3 includes a motor body 30 and an encoder 31 . The motor 3 is, for example, an AC servomotor. The motor 3 is supplied with drive current from the servo driver 2 through a power line 40 . The encoder 31 detects displacement of the output shaft 32 of the motor body 30 . Examples of the displacement of the output shaft 32 detected by the encoder 31 include the direction of rotation, the amount of rotation, and the speed of rotation of the output shaft 32 . The encoder 31 outputs a feedback signal indicating the detected displacement to the servo driver 2 via the encoder cable 41 .

次に、エンコーダ31の機能的な構成について、説明する。図2は、モータ3の概略構成を示す図である。モータ3が備えるエンコーダ31は、信号生成部311と、通信部312と、記憶部313と、を含む。 Next, the functional configuration of the encoder 31 will be explained. FIG. 2 is a diagram showing a schematic configuration of the motor 3. As shown in FIG. The encoder 31 included in the motor 3 includes a signal generation section 311 , a communication section 312 and a storage section 313 .

信号生成部311は、サーボドライバ2により駆動されるモータ3のモータ本体30の動作を検出して、検出された動作を示すフィードバック信号を生成する。フィードバック信号は通信部312に出力される。フィードバック信号には、例えばモータ本体30の回転軸の回転位置(角度)についての情報、当該回転軸の回転速度についての情報、当該回転軸の回転方向についての情報などが含まれる。信号生成部311の構成には、例えば公知のインクリメンタル型またはアブソリュート型の構成を適用することができる。 The signal generator 311 detects the motion of the motor body 30 of the motor 3 driven by the servo driver 2 and generates a feedback signal indicating the detected motion. The feedback signal is output to communication section 312 . The feedback signal includes, for example, information about the rotational position (angle) of the rotating shaft of the motor body 30, information about the rotating speed of the rotating shaft, information about the rotating direction of the rotating shaft, and the like. For example, a known incremental type or absolute type configuration can be applied to the configuration of the signal generator 311 .

通信部312は、サーボドライバ2と通信するためのインターフェイスである。本実施の形態において、通信部312は、エンコーダケーブル41を介して、フィードバック信号をサーボドライバ2に送る。この実施の形態では、通信部312からのフィードバック信号及び検出信号の送信には、シリアル通信が適用される。これにより、ケーブルに含まれる信号線の本数を少なくすることができる。エンコーダケーブル41によるシリアル通信には、例えばRecommended Standards 232(RS-232C)、RS-422、あるいはRS-485などの公知の通信規格を採用することができる。 A communication unit 312 is an interface for communicating with the servo driver 2 . In this embodiment, the communication unit 312 sends feedback signals to the servo driver 2 via the encoder cable 41 . In this embodiment, serial communication is applied to the transmission of the feedback signal and detection signal from the communication section 312 . As a result, the number of signal lines included in the cable can be reduced. A known communication standard such as Recommended Standards 232 (RS-232C), RS-422, or RS-485 can be adopted for serial communication by the encoder cable 41 .

記憶部313は、モータ3のサーボ制御に係るデータを記憶する記憶部である。記憶部313は、例えば、EEPROMである。図3は、エンコーダ31の記憶部313に記憶されるデータの一例を示す第1の図である。図3では、データが記憶される位置と、当該位置に記憶されるデータとが対応付けて示される。位置は、例えば、アドレスによって示される。記憶部313には、エンコーダシリアル番号、各種パラメータ等のエンコーダ31に係るデータが保存される。そして、エンコーダ31を製造するメーカーとモータ本体30を製造するメーカーとは異なることがある。そのため、記憶部313には、さらに、モータ用領域が設けられる。図3では、モータ用領域に保存されるデータを矢印で示している。 The storage unit 313 is a storage unit that stores data related to servo control of the motor 3 . The storage unit 313 is, for example, an EEPROM. FIG. 3 is a first diagram showing an example of data stored in the storage unit 313 of the encoder 31. As shown in FIG. In FIG. 3, the position where data is stored and the data stored in that position are shown in association with each other. The location is indicated, for example, by an address. The storage unit 313 stores data related to the encoder 31 such as the encoder serial number and various parameters. The manufacturer that manufactures the encoder 31 and the manufacturer that manufactures the motor body 30 may be different. Therefore, the storage unit 313 is further provided with a motor area. In FIG. 3, arrows indicate the data stored in the motor area.

モータ用領域には、モータ本体30の駆動に用いられる各種パラメータがモータ本体30のメーカーによって保存される。図3の例では、モータ用領域には、モータ型名、モータシリアル番号、サーボ制御用パラメータが保存される。そして、モータ本体30のサーボ制御用パラメータはモータ本体30の個体毎に調整される。そのため、モータ本体30のサーボ制御用パラメータは、同じ型名のモータ本体30であっても、個体毎(モータ本体30のシリアル番号毎)に異なることがある。すなわち、モータ本体30の型名が同じであっても、サーボ制御に好適なサーボ制御用パラメータはモータ本体30の個体毎に異なることがある。 Various parameters used for driving the motor body 30 are stored in the motor area by the manufacturer of the motor body 30 . In the example of FIG. 3, the motor area stores the motor model name, motor serial number, and servo control parameters. The parameters for servo control of the motor body 30 are adjusted for each individual motor body 30 . Therefore, the parameters for servo control of the motor bodies 30 may differ for each individual motor body 30 (for each serial number of the motor body 30) even if the motor bodies 30 have the same model name. That is, even if the model name of the motor body 30 is the same, servo control parameters suitable for servo control may differ for each individual motor body 30 .

記憶部313には、上記のように、予め設定されたデータが保存される。記憶部313に保存されたデータは、サーボドライバ2からの指令に応じて、通信部312からサーボドライバ2に送信される。なお、図3に示す記憶部313の構成はあくまで一例であって、記憶部313の構成はエンコーダ31のメーカーが決定し、エンコーダ31によって異なる。 The storage unit 313 stores preset data as described above. The data stored in the storage unit 313 is transmitted from the communication unit 312 to the servo driver 2 in accordance with commands from the servo driver 2 . Note that the configuration of the storage unit 313 shown in FIG. 3 is merely an example, and the configuration of the storage unit 313 is determined by the manufacturer of the encoder 31 and differs depending on the encoder 31 .

サーボドライバ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 servo driver 2 and the motor 3 is the same, the supplier can set the configuration of the storage unit 313 to the servo driver 2 . Therefore, the servo driver 2 can detect replacement of the motor 3 by acquiring the model name and serial number of the motor body 30 and the serial number of the encoder 31 from the storage unit 313 . However, if the suppliers of the servo driver 2 and the motor 3 are different (for example, if the suppliers of the servo driver 2 and the encoder 31 are different), the supplier of the servo driver 2 cannot grasp the configuration of the storage unit 313. , the supplier of the servo driver 2 cannot set the configuration of the storage unit 313 in the servo driver 2 . Therefore, the servo driver 2 cannot acquire the model name and serial number of the motor 3 and the serial number of the encoder 31 from the storage unit 313 of the newly connected motor 3, and cannot detect the replacement of the motor 3. Therefore, in the present embodiment, in order to solve such problems, the servo driver 2 includes functional units described below.

図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 servo driver 2. As shown in FIG. The servo driver 2 can be regarded as a computer having an arithmetic device, a storage device, and the like. The functional units shown in FIG. 4 are implemented by executing a predetermined program or the like in the servo driver 2 . The servo driver 2 has a communication section 21, a servo control section 22, a calculation section 23, a detection section 24, and a storage section 25, but may have functional sections other than these.

通信部21は、通信ケーブル11を介して外部との通信を司る機能である。例えば、通信部21は、PLC1との通信のためのインターフェイスとして機能する。さらに、通信部21は、エンコーダケーブル41を介したエンコーダ31との通信のためのインターフェイスとしても機能する。 The communication unit 21 is a function that controls communication with the outside via the communication cable 11 . For example, the communication part 21 functions as an interface for communication with PLC1. Furthermore, the communication unit 21 also functions as an interface for communication with the encoder 31 via the encoder cable 41 .

サーボ制御部22は、PLC1からの指令に基づいてモータ3をサーボ制御するための機能部であり、具体的には、位置制御器、速度制御器、電流制御器等を利用したフィードバック制御を行う機能部である。なお、位置制御器、速度制御器、電流制御器等については、制御対象であるモータ3のサーボ制御が好適に行われるよう速度ゲイン等の制御パラメータが適宜設定される。 The servo control unit 22 is a functional unit for servo-controlling the motor 3 based on commands from the PLC 1. Specifically, it performs feedback control using a position controller, a speed controller, a current controller, and the like. It is a functional part. For the position controller, speed controller, current controller, etc., control parameters such as speed gain are appropriately set so that servo control of the motor 3 to be controlled is preferably performed.

算出部23は、例えば、サーボドライバ2の通電時等に、エンコーダ31の記憶部313に保存されたデータを取得する。ここで、算出部23は、取得したデータの意味を解釈する必要はない。そのため、検知部24は、記憶部313に保存されたデータを単なるビット列(一塊のデータ)として取得すればよい。そして、算出部23は、記憶部313から取得したデータをハッシュ関数に入力することでハッシュ値を算出する演算処理を行う。 The calculation unit 23 acquires data stored in the storage unit 313 of the encoder 31, for example, when the servo driver 2 is energized. Here, the calculation unit 23 does not need to interpret the meaning of the acquired data. Therefore, the detection unit 24 may acquire the data stored in the storage unit 313 simply as a bit string (a block of data). Then, the calculation unit 23 inputs the data acquired from the storage unit 313 to the hash function to perform arithmetic processing for calculating a hash value.

ここで、算出部23が使用するハッシュ関数としては、様々なアルゴリズムのハッシュ関数を挙げることができる。検知部24が使用するハッシュ関数のアルゴリズムとしては、例えば、SHA-1、SHA-256、SHA-512等を挙げることができる。 Here, hash functions of various algorithms can be used as the hash functions used by the calculator 23 . Examples of hash function algorithms used by the detection unit 24 include SHA-1, SHA-256, and SHA-512.

検知部24は、モータ3の交換を検知する機能部である。検知部24は、算出部23によって算出された算出されたハッシュ値を記憶部25に記憶させる。そして、検知部24は、サーボドライバ2の通電時に算出したハッシュ値と、記憶部25に記憶済みのハッシュ値とを比較し、これらのハッシュ値が異なる場合にはモータ3が交換されたことを検知する。 The detection unit 24 is a functional unit that detects replacement of the motor 3 . The detection unit 24 causes the storage unit 25 to store the calculated hash value calculated by the calculation unit 23 . Then, the detection unit 24 compares the hash value calculated when the servo driver 2 is energized with the hash value already stored in the storage unit 25, and if these hash values are different, it means that the motor 3 has been replaced. detect.

記憶部25は、モータ3のサーボ制御に用いられるデータや、算出部23が算出したハッシュ値等のように、サーボドライバ2で行われる処理に関連する各種データを記憶する機能部である。 The storage unit 25 is a functional unit that stores various data related to processing performed by the servo driver 2, such as data used for servo control of the motor 3 and hash values calculated by the calculation unit 23.

続いて、サーボドライバ2によるモータ3の交換を検知する検知フローについて説明する。図5は、サーボドライバ2によるモータ3の交換を検知する処理フローを示す図である。図5に示す処理フローは、例えば、サーボドライバ2の通電時(起動時)に実行される。以下、図5を参照して、検知部24によるモータ3の交換を検知する処理フローについて説明する。 Next, a detection flow for detecting replacement of the motor 3 by the servo driver 2 will be described. FIG. 5 is a diagram showing a processing flow for detecting replacement of the motor 3 by the servo driver 2. As shown in FIG. The processing flow shown in FIG. 5 is executed, for example, when the servo driver 2 is energized (at startup). A processing flow for detecting replacement of the motor 3 by the detection unit 24 will be described below with reference to FIG.

S1では、算出部23は、エンコーダ31の記憶部313に記憶された全データを取得する。S2では、算出部23は、S1で取得した全データをハッシュ関数に入力してハッシュ値を算出する。 In S<b>1 , the calculation unit 23 acquires all data stored in the storage unit 313 of the encoder 31 . In S2, the calculator 23 inputs all the data acquired in S1 to a hash function to calculate a hash value.

S3では、検知部24は、記憶部25に保存済みのハッシュ値があるか否かを判定する。保存済みのハッシュ値がある場合(S3でYES)、処理はS4に進められる。保存済みのハッシュ値がない場合(S3でNO)、処理はS6に進められる。 In S<b>3 , the detection unit 24 determines whether or not there is a stored hash value in the storage unit 25 . If there is a stored hash value (YES in S3), the process proceeds to S4. If there is no stored hash value (NO in S3), the process proceeds to S6.

S4では、検知部24は、S2で算出部23が算出したハッシュ値と記憶部25に保存済みのハッシュ値とを比較する。これらのハッシュ値が一致する場合(S4でYES)、モータ3は交換されていないと判定されることから、処理はS7に進められる。これらのハッシュ値が異なる場合(S4でNO)、処理はS5に進められる。 In S<b>4 , the detection unit 24 compares the hash value calculated by the calculation unit 23 in S<b>2 with the hash value already stored in the storage unit 25 . If these hash values match (YES in S4), it is determined that the motor 3 has not been replaced, so the process proceeds to S7. If these hash values are different (NO in S4), the process proceeds to S5.

S5では、検知部24は、モータ3の交換を検知する。モータ3の交換を検知した検知部24は、例えば、警報を出力するとともに、モータ3の駆動を開始しない。警報の出力は、例えば、ブザー音の出力であってよい。また、警報の出力は、PLC1等の上位装置にメッセージを送信することで実現されてもよい。そして、S5に到達する処理フローではS7の処理が実行されないことから、モータ3の駆動開始処理が禁止される。 In S<b>5 , the detection unit 24 detects replacement of the motor 3 . The detection unit 24 that has detected replacement of the motor 3 outputs, for example, an alarm and does not start driving the motor 3 . The output of the alarm may be, for example, output of a buzzer sound. Moreover, the output of an alarm may be realized by transmitting a message to a host device such as the PLC 1 or the like. Since the process of S7 is not executed in the process flow reaching S5, the process of starting to drive the motor 3 is prohibited.

S6では、算出部23は、S2で算出したハッシュ値を記憶部25に保存する。なお、算出部23は、すでに保存されたハッシュ値がある場合には、当該保存済みのハッシュ値を消去してから今回のサーボドライバ2の通電時におけるS2で算出したハッシュ値の保存を行う。保存したハッシュ値は、例えば、次にサーボドライバ2が通電された時のS4の判定に用いられる。S7では、サーボ制御部22は、モータ3の駆動を開始する。 In S<b>6 , the calculation unit 23 stores the hash value calculated in S<b>2 in the storage unit 25 . If there is already a stored hash value, the calculation unit 23 deletes the stored hash value and then stores the hash value calculated in S2 when the servo driver 2 is energized this time. The stored hash value is used, for example, for determination in S4 when the servo driver 2 is energized next time. In S<b>7 , the servo control section 22 starts driving the motor 3 .

以上説明した実施形態では、サーボドライバ2は、エンコーダ31の記憶部313に記憶された全データについてハッシュ値を算出し、算出したハッシュ値の比較によってモータ3の交換を検知する。そのため、サーボドライバ2は、記憶部313のどの領域にどのようなデータが保存されているかが不明な場合でも、モータ3の交換を検知することができる。 In the embodiment described above, the servo driver 2 calculates hash values for all data stored in the storage unit 313 of the encoder 31, and detects replacement of the motor 3 by comparing the calculated hash values. Therefore, the servo driver 2 can detect the replacement of the motor 3 even if it is unknown what kind of data is stored in which area of the storage unit 313 .

サーボドライバ2は、エンコーダ31の記憶部313に保存された全データの比較にハッシュ値を採用する。ハッシュ値は、ハッシュ関数のアルゴリズムに応じた固定長のデータとなる。すなわち、記憶部313に保存されたデータが大容量であってもハッシュ値のサイズが大きくなることはない。そのため、本実施形態によれば、ハッシュ値の保存に用いる記憶部25の容量を抑制することができる。また、記憶部313に保存されたデータを比較する際にハッシュ値が用いられることで、記憶部313に保存されたデータをそのまま比較するよりもサーボドライバ2の計算負荷を軽減することができる。 The servo driver 2 employs hash values for comparison of all data stored in the storage unit 313 of the encoder 31 . The hash value is fixed-length data according to the algorithm of the hash function. That is, even if the amount of data stored in the storage unit 313 is large, the size of hash values does not increase. Therefore, according to the present embodiment, it is possible to reduce the capacity of the storage unit 25 used for storing hash values. Further, by using the hash value when comparing the data stored in the storage unit 313, the calculation load of the servo driver 2 can be reduced compared to comparing the data stored in the storage unit 313 as they are.

<第1変形例>
以上で説明した実施形態では、エンコーダ31の記憶部313には、予め設定されたデータが保存されていた。第1変形例では、記憶部313に温度センサによって例示される各種センサが測定した測定データのような値が変動する可変データも保存される場合について説明する。
<First modification>
In the embodiment described above, preset data was saved in the storage unit 313 of the encoder 31 . In the first modification, a case will be described in which variable data whose values fluctuate, such as measurement data measured by various sensors such as a temperature sensor, is also stored in the storage unit 313 .

図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 storage unit 313 of the encoder 31. As shown in FIG. In the example of FIG. 6 , in addition to the data shown in FIG. 3 , measurement data measured by various sensors connected to the encoder 31 are also stored in the storage unit 313 . Therefore, when the detection unit 24 acquires the data in the entire area of the storage unit 313 and calculates the hash value, the hash value may differ even if the motor 3 is not replaced. Therefore, the detection unit 24 may erroneously detect replacement of the motor 3 .

そこで、算出部23は、記憶部313に保存されたデータのうち、可変データが保存された領域以外の領域に保存されたデータを取得し、そのハッシュ値を算出する。算出部23は、例えば、記憶部313にアクセスするコマンドにおいて可変データが保存された領域を除いた全データを取得するように指定すればよい。 Therefore, the calculation unit 23 acquires data saved in an area other than the area in which the variable data is saved, among the data saved in the storage unit 313, and calculates the hash value thereof. For example, the calculation unit 23 may specify, in a command to access the storage unit 313, to acquire all data except for the area where variable data is stored.

図7は、第1変形例におけるサーボドライバ2によるモータ3の交換を検知する検知フローを示す図である。図7に示す検知フローは、S1に変えてS1aが実行される点で図5に示す検知フローとは異なる。 FIG. 7 is a diagram showing a detection flow for detecting replacement of the motor 3 by the servo driver 2 in the first modified example. The detection flow shown in FIG. 7 differs from the detection flow shown in FIG. 5 in that S1a is executed instead of S1.

S1aでは、算出部23は、記憶部313からデータを取得するコマンドにおいて、可変データが保存された領域以外の全データを取得するように指示する。すなわち、算出部23は、図5のS1では記憶部313の全領域に保存されたデータを取得するのに対して、図7のS1aでは、可変データが保存された領域を除外して記憶部313に保存されたデータを取得する。 In S1a, the calculation unit 23 instructs the command to acquire data from the storage unit 313 to acquire all data other than the area where the variable data is stored. 5, the calculation unit 23 acquires the data stored in the entire area of the storage unit 313, while in S1a of FIG. Get data stored in 313.

第1変形例では、可変データが保存された領域を除外して記憶部313に保存されたデータを取得し、取得したデータのハッシュ値が算出される。そのため、記憶部313に保存された可変データの値が変動しても、モータ3が交換されない限りはハッシュ値の変動は生じない。そのため、第1変形例によれば、可変データが記憶部313に保存される場合であっても、検知部24はモータ3の交換を検知できる。 In the first modified example, the data stored in the storage unit 313 is acquired by excluding the area where the variable data is stored, and the hash value of the acquired data is calculated. Therefore, even if the value of the variable data stored in the storage unit 313 fluctuates, the hash value does not fluctuate unless the motor 3 is replaced. Therefore, according to the first modification, the detection unit 24 can detect replacement of the motor 3 even when the variable data is stored in the storage unit 313 .

<第2変形例>
以上説明した実施形態では、記憶部313から取得したデータのハッシュ値をひとつのハッシュ関数で算出した。第2変形例では、2つの異なるアルゴリズムのハッシュ関数を用いて、記憶部313から取得したデータのハッシュ値を算出する例について説明する。
<Second modification>
In the embodiment described above, the hash value of data acquired from the storage unit 313 is calculated using one hash function. In the second modification, an example of calculating hash values of data acquired from the storage unit 313 using hash functions of two different algorithms will be described.

図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 motor 3 by the servo driver 2 in the second modification. The detection flow shown in FIG. 8 differs from the detection flow shown in FIG. 5 in that S2a is executed instead of S2, S4a is executed instead of S4, and S6a is executed instead of S6.

S2aでは、算出部23は、アルゴリズムの異なる2つのハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。算出部23は、例えば、SHA-1のハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。また、算出部23は、SHA-256のハッシュ関数を用いて、S1で取得したデータのハッシュ値を算出する。 In S2a, the calculator 23 uses two hash functions with different algorithms to calculate the hash value of the data acquired in S1. The calculation unit 23 calculates the hash value of the data acquired in S1, for example, using the SHA-1 hash function. Further, the calculation unit 23 calculates a hash value of the data acquired in S1 using the SHA-256 hash function.

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 detection unit 24 compares the two hash values calculated in S2a with the two hash values stored in S6. That is, the detection unit 24 compares the hash value calculated by SHA-1 and stored in S6 with the hash value newly calculated by SHA-1 in S2a. Further, the detection unit 24 compares the hash value calculated by SHA-256 and stored in S6 with the hash value newly calculated by SHA-256 in S2a. As a result of this comparison, if at least one of the hash value calculated by SHA-1 and the hash value calculated by SHA-256 does not match (NO in S4a), the process proceeds to S5. If both hash values match (YES in S4a), the process proceeds to S7.

S6aでは、算出部23は、S2aで算出した2つのハッシュ値を記憶部25に保存する。なお、算出部23は、すでに保存されたハッシュ値がある場合には、当該保存済みのハッシュ値を消去してから今回のサーボドライバ2の通電時におけるS2aで算出した2つのハッシュ値の保存を行う。算出部23は、例えば、2つのハッシュ値の夫々を算出したアルゴリズムと対応付けて記憶部25に保存すればよい。 In S6a, the calculation unit 23 stores the two hash values calculated in S2a in the storage unit 25. FIG. If there is already a stored hash value, the calculation unit 23 deletes the stored hash value and then stores the two hash values calculated in S2a when the servo driver 2 is energized this time. conduct. For example, the calculation unit 23 may store the two hash values in the storage unit 25 in association with the calculated algorithm.

ハッシュ関数は、入力されたデータが異なるにもかかわらず同一のハッシュ値が算出されることがある(コリジョンの発生)。第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 storage unit 313, and if the hash values calculated by at least one of the algorithms do not match in S4a, , the replacement of the motor 3 is detected. It is considered that the probability of occurrence of collision between hash functions of two different algorithms for the same input data is extremely low. Therefore, according to the second modification, it is possible to improve the accuracy of detecting replacement of the motor 3 .

以上説明した実施形態及び変形例は、組み合わせることができる。 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)。
<Appendix 1>
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)。
<Appendix 2>
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 Servo driver 3 Motor 8 Work 21 Communication unit 22 Servo control unit 23 Calculation unit 24 Detection unit 25 Storage unit 30 Motor body 31 Encoder 311 Signal generation unit 312 Communication unit 313 Storage unit 32 Output shaft 41 Encoder cable 51 Coupling 52 Screw shaft 53 Precision stage 53
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.
JP2021038182A 2021-03-10 2021-03-10 Servo driver and servo system Pending JP2022138348A (en)

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)

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