TWI817402B - Diagnostic system for failure of motor encoder, and diagnostic method for using the same - Google Patents

Diagnostic system for failure of motor encoder, and diagnostic method for using the same Download PDF

Info

Publication number
TWI817402B
TWI817402B TW111110500A TW111110500A TWI817402B TW I817402 B TWI817402 B TW I817402B TW 111110500 A TW111110500 A TW 111110500A TW 111110500 A TW111110500 A TW 111110500A TW I817402 B TWI817402 B TW I817402B
Authority
TW
Taiwan
Prior art keywords
motor
current command
servo driver
disturbance
encoder
Prior art date
Application number
TW111110500A
Other languages
Chinese (zh)
Other versions
TW202338387A (en
Inventor
周家至
Original Assignee
台達電子工業股份有限公司
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 台達電子工業股份有限公司 filed Critical 台達電子工業股份有限公司
Priority to TW111110500A priority Critical patent/TWI817402B/en
Application granted granted Critical
Publication of TW202338387A publication Critical patent/TW202338387A/en
Publication of TWI817402B publication Critical patent/TWI817402B/en

Links

Images

Landscapes

  • Control Of Electric Motors In General (AREA)
  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

A diagnostic system for failure of motor encoder is disclosed and includes a motor, an encoder, a servo driver, and a safety module, wherein the servo driver controls the motor through a current command. The safety module continuously obtains a feedback position of the motor through the encoder. When the safety module determines based on the feedback positions that the current status of the motor complies with a pre-determined disturbance condition, the safety module requests the servo driver to send an external current command to disturb the motor. Next, the safety module determines whether the encoder is failure based on a variation of a next feedback position being obtained.

Description

馬達編碼器的故障診斷系統及故障診斷方法 Fault diagnosis system and fault diagnosis method for motor encoder

本發明涉及馬達的編碼器,尤其涉及編碼器的故障診斷系統以及故障診斷方法。 The present invention relates to a motor encoder, and in particular, to an encoder fault diagnosis system and fault diagnosis method.

當馬達旋轉時,伺服驅動器(servo)可以讀取馬達的編碼器(encoder)以獲得馬達數據(例如旋轉角度),藉此得到馬達的回授位置。並且,伺服驅動器可以基於回授位置來對馬達進行位置控制。 When the motor rotates, the servo driver (servo) can read the motor's encoder to obtain motor data (such as rotation angle), thereby obtaining the motor's feedback position. Moreover, the servo driver can control the position of the motor based on the feedback position.

然而,當回授位置指出馬達的位置固定(即,回授位置沒有改變)時,伺服驅動器無法區分是馬達確實沒有旋轉所以回授位置沒有改變,還是馬達有旋轉但編碼器故障而導致回授位置沒有改變。於此情況下,伺服驅動器無法正確地對馬達進行控制。 However, when the feedback position indicates that the position of the motor is fixed (i.e., the feedback position has not changed), the servo driver cannot distinguish whether the motor does not rotate so the feedback position does not change, or whether the motor rotates but the encoder fails and causes feedback The location has not changed. In this case, the servo drive cannot control the motor correctly.

如上所述,為了避免系統沒有發現察覺編碼器的異常而導致馬達失控並產生危險,本發明提出一種適用於編碼器的故障診斷機制。 As mentioned above, in order to prevent the system from not detecting the abnormality of the encoder and causing the motor to run out of control and cause danger, the present invention proposes a fault diagnosis mechanism suitable for the encoder.

本發明提供一種馬達編碼器的故障診斷系統及故障診斷方法,可以於馬達的位置固定時診斷編碼器是否故障。 The invention provides a fault diagnosis system and a fault diagnosis method for a motor encoder, which can diagnose whether the encoder is faulty when the position of the motor is fixed.

於本發明的一個實施例中,馬達編碼器的故障診斷系統包括:一馬達,具有一編碼器,該編碼器依據該馬達的旋轉產生對應的一位置資訊;一伺服驅動器,連接該馬達;及一安全模組,連接該編碼器及該伺服驅動器,讀取該位置資訊以獲得該馬達的一回授位置,並依據該回授位置判斷該馬達的狀態是否符合一擾動條件或一警示條件;其中,該安全模組被配置為在判斷該馬達的狀態符合該擾動條件時請求該伺服驅動器發送一額外電流命令至該馬達;其中,該安全模組被配置為在判斷該馬達的狀態符合該警示條件時請求該伺服驅動器發出一異常警示訊號。 In one embodiment of the present invention, a motor encoder fault diagnosis system includes: a motor with an encoder that generates corresponding position information based on the rotation of the motor; a servo driver connected to the motor; and A safety module connects the encoder and the servo driver, reads the position information to obtain a feedback position of the motor, and determines whether the status of the motor meets a disturbance condition or a warning condition based on the feedback position; Wherein, the safety module is configured to request the servo driver to send an additional current command to the motor when it is determined that the state of the motor meets the disturbance condition; When a warning condition occurs, the servo drive is requested to send an abnormal warning signal.

於本發明的一個實施例中,馬達編碼器的故障診斷方法包括下列步驟:a)讀取一馬達的一編碼器以獲得該馬達的一回授位置;b)依據該回授位置判斷該馬達的狀態是否符合一擾動條件或一警示條件;c)於該馬達的狀態符合該擾動條件時,請求一伺服驅動器發出一額外電流命令至該馬達;及 d)於該馬達的狀態符合該警示條件時,請求該伺服驅動器發出一異常警示訊號。 In one embodiment of the present invention, a fault diagnosis method for a motor encoder includes the following steps: a) reading an encoder of a motor to obtain a feedback position of the motor; b) judging the motor based on the feedback position Whether the status of the motor meets a disturbance condition or a warning condition; c) when the status of the motor meets the disturbance condition, request a servo driver to issue an additional current command to the motor; and d) When the status of the motor meets the warning condition, request the servo driver to send an abnormal warning signal.

本發明在編碼器提供的回授位置指出馬達的位置固定時,對馬達進行擾動。與相關技術相比,本發明藉由擾動後的回授位置判斷是馬達確實沒有旋轉,還是馬達有旋轉但是編碼器故障而提供了錯誤的回授位置。 The present invention disturbs the motor when the feedback position provided by the encoder indicates that the position of the motor is fixed. Compared with the related art, the present invention uses the feedback position after the disturbance to determine whether the motor is indeed not rotating, or whether the motor is rotating but the encoder is faulty and provides a wrong feedback position.

1:馬達 1: Motor

2:編碼器 2: Encoder

3:伺服驅動器 3:Servo drive

4:安全模組 4: Security module

5:電流命令 5: Current command

6:額外電流命令 6: Extra current command

S10~S22、S30~S48、S50~S68:診斷步驟 S10~S22, S30~S48, S50~S68: Diagnosis steps

S70~S88:擾動步驟 S70~S88: Disturbance step

圖1為本發明的故障診斷系統的方塊圖的第一具體實施例。 Figure 1 is a block diagram of a fault diagnosis system according to a first specific embodiment of the present invention.

圖2為本發明的故障診斷方法的流程圖的第一具體實施例。 Figure 2 is a first specific embodiment of the flow chart of the fault diagnosis method of the present invention.

圖3為本發明的故障診斷方法的流程圖的第二具體實施例。 Figure 3 is a second specific embodiment of the flow chart of the fault diagnosis method of the present invention.

圖4為本發明的故障診斷方法的流程圖的第三具體實施例。 Figure 4 is a third specific embodiment of the flow chart of the fault diagnosis method of the present invention.

圖5為本發明的擾動流程圖的第一具體實施例。 Figure 5 is a first specific embodiment of the perturbation flow chart of the present invention.

圖6為本發明的擾動波型示意圖的第一具體實施例。 Figure 6 is a first specific embodiment of a schematic diagram of a disturbance wave pattern of the present invention.

圖7為本發明的擾動波型示意圖的第二具體實施例。 Figure 7 is a second specific embodiment of a schematic diagram of a disturbance wave pattern of the present invention.

茲就本發明之一較佳實施例,配合圖式,詳細說明如後。 A preferred embodiment of the present invention is described in detail below with reference to the drawings.

首請參閱圖1,為本發明的故障診斷系統的方塊圖的第一具體實施例。本發明揭露了一種馬達編碼器的故障診斷系統(下面將於說明書中簡稱為診斷系統),如圖1所示,所述診斷系統主要包括了馬達1、編碼器2及伺服驅動器3。 First, please refer to FIG. 1 , which is a block diagram of a fault diagnosis system according to a first specific embodiment of the present invention. The present invention discloses a fault diagnosis system for a motor encoder (hereinafter referred to as the diagnosis system in the description). As shown in Figure 1 , the diagnosis system mainly includes a motor 1, an encoder 2 and a servo driver 3.

編碼器2可安裝於馬達1的軸上。當馬達1旋轉時,編碼器2依據馬達1的旋轉來產生對應的馬達數據,其中馬達數據至少包括馬達1的位置資訊。於伺服驅動器3與編碼器2間具有連接關係的情況下,伺服驅動器3可以讀取編碼器2輸出的馬達數據,進而得到馬達1的回授位置。具體地,伺服驅動器3主要是讀取馬達數據中的位置資訊,藉以通過位置資訊來獲得馬達1的回授位置。而通過所述回授位置,伺服驅動器3可以確定馬達1當前的旋轉狀況,進而對馬達1進行位置控制。 Encoder 2 can be installed on the shaft of motor 1. When the motor 1 rotates, the encoder 2 generates corresponding motor data according to the rotation of the motor 1 , where the motor data at least includes position information of the motor 1 . When there is a connection relationship between the servo driver 3 and the encoder 2 , the servo driver 3 can read the motor data output by the encoder 2 and thereby obtain the feedback position of the motor 1 . Specifically, the servo driver 3 mainly reads the position information in the motor data, thereby obtaining the feedback position of the motor 1 through the position information. Through the feedback position, the servo driver 3 can determine the current rotation status of the motor 1 and then control the position of the motor 1 .

於圖1的實施例中,伺服驅動器3與馬達1通過線路直接連接。本實施例中,伺服驅動器3依據回授位置產生對應的電流命令(lq)5,並且發送電流命令5給馬達1,以對馬達1進行位置控制。 In the embodiment of FIG. 1 , the servo driver 3 and the motor 1 are directly connected through lines. In this embodiment, the servo driver 3 generates a corresponding current command (lq) 5 based on the feedback position, and sends the current command 5 to the motor 1 to control the position of the motor 1 .

本發明中,診斷系統進一步包括安全模組4,安全模組4連接編碼器2以及伺服驅動器3。於一實施例中,安全模組4以軟體或韌體方式實現,並且記錄在獨立於伺服驅動器3外的硬體單元中。於另一實施例中,安全模組4以軟體或韌體方式實現,並且記錄在編碼器2中,但並不加以限定。 In the present invention, the diagnostic system further includes a safety module 4, which is connected to the encoder 2 and the servo driver 3. In one embodiment, the security module 4 is implemented in software or firmware, and is recorded in a hardware unit independent of the servo driver 3 . In another embodiment, the security module 4 is implemented in software or firmware and recorded in the encoder 2, but this is not a limitation.

安全模組4可以持續讀取編碼器2產生的位置資訊,藉此獲得馬達1的回授位置。所述回授位置為本技術領域中常用的技術 手段,於此不再贅述。本發明的其中一個技術特徵在於,安全模組4可依據回授位置來監控判斷馬達1的狀態,並且判斷馬達1的狀態是否符合預設的擾動條件(容後詳述)。 The safety module 4 can continuously read the position information generated by the encoder 2 to obtain the feedback position of the motor 1. The feedback position is a commonly used technology in this technical field. The means will not be described again here. One of the technical features of the present invention is that the safety module 4 can monitor and determine the status of the motor 1 based on the feedback position, and determine whether the status of the motor 1 meets the preset disturbance conditions (described in detail later).

本發明中,所述馬達1的狀態指的是馬達1的停滯狀態,即,馬達1沒有旋轉的狀態。 In the present invention, the state of the motor 1 refers to the stagnant state of the motor 1 , that is, the state in which the motor 1 is not rotating.

於相關技術中,伺服驅動器3主要是藉由回授位置來獲得馬達1的當前狀態(例如有無旋轉)。若回授位置指出馬達1的位置沒有改變,伺服驅動器3就會認定馬達1的位置固定。然而,於相關技術中,伺服驅動器3無法經由回授位置來直接區別馬達1是真的沒有旋轉,還是因為編碼器2異常而導致回授位置有誤。 In the related art, the servo driver 3 mainly obtains the current status of the motor 1 (such as whether it is rotating or not) through feedback position. If the feedback position indicates that the position of motor 1 has not changed, the servo driver 3 will determine that the position of motor 1 is fixed. However, in the related art, the servo driver 3 cannot directly distinguish through the feedback position whether the motor 1 is really not rotating or whether the feedback position is incorrect due to an abnormality of the encoder 2 .

本發明通過安全模組4的設置來解決上述問題。具體地,安全模組4代替伺服驅動器3來從編碼器2獲得馬達1的回授位置,藉以判斷馬達1的狀態。當安全模組4依據回授位置判斷馬達1的狀態符合預設的擾動條件時(例如,馬達1沒有旋轉達到一定時間長度),會協同伺服驅動器3進行確認動作,以判斷是馬達1確實沒有旋轉,或者是編碼器2發生故障。 The present invention solves the above problems through the installation of the security module 4 . Specifically, the safety module 4 replaces the servo driver 3 to obtain the feedback position of the motor 1 from the encoder 2 to determine the status of the motor 1 . When the safety module 4 determines that the status of the motor 1 meets the preset disturbance conditions based on the feedback position (for example, the motor 1 has not rotated for a certain period of time), it will cooperate with the servo driver 3 to perform a confirmation action to determine that the motor 1 is indeed not rotating. rotation, or encoder 2 is malfunctioning.

具體地,當安全模組4判斷馬達1的狀態符合擾動條件時,會請求伺服驅動器3發送額外電流命令(elq)6至馬達1。若編碼器2正常,則當馬達1受到額外電流命令6的影響而產生晃動後,編碼器2產生的馬達數據必然產生改變(至少馬達數據中的位置資訊會產生改變),進而安全模組4獲得的回授位置必然會指出馬達1的位置改變。於此情況下,安全模組4可認定編碼器2運作正常。 Specifically, when the safety module 4 determines that the state of the motor 1 meets the disturbance condition, it will request the servo driver 3 to send an additional current command (elq) 6 to the motor 1 . If encoder 2 is normal, when motor 1 is affected by the extra current command 6 and shakes, the motor data generated by encoder 2 will inevitably change (at least the position information in the motor data will change), and then safety module 4 The feedback position obtained will definitely indicate the position change of motor 1. In this case, the security module 4 can determine that the encoder 2 operates normally.

若伺服驅動器3發送了額外電流命令6至馬達1後,安全模組4仍然基於後續獲取的回授位置判斷馬達1的位置固定,則安全模組4可認定編碼器2發生異常。 If after the servo driver 3 sends the extra current command 6 to the motor 1, the safety module 4 still determines that the position of the motor 1 is fixed based on the subsequently obtained feedback position, then the safety module 4 can determine that an abnormality occurs in the encoder 2.

惟,上述僅為本發明的部分具體實施範例,但並不以此為限。 However, the above are only some specific implementation examples of the present invention, but are not limited thereto.

於一實施例中,安全模組4持續獲取馬達1的回授位置,並且藉由持續獲取的回授位置來判斷馬達1的位置是否固定。若馬達1的位置固定,但固定時間沒有達到預設的第一時間長度(例如200ms、300ms等),則安全模組4不做任何動作,並且繼續監控馬達1的狀態。 In one embodiment, the safety module 4 continuously obtains the feedback position of the motor 1, and determines whether the position of the motor 1 is fixed based on the continuously obtained feedback position. If the position of motor 1 is fixed, but the fixed time does not reach the preset first time length (such as 200ms, 300ms, etc.), the safety module 4 does not take any action and continues to monitor the status of motor 1.

若馬達1的位置固定,並且固定時間達到第一時間長度,則安全模組4可認定馬達1的狀態符合所述擾動條件。此時,安全模組4就會請求伺服驅動器3發送額外電流命令6至馬達1,以對馬達1進行擾動。 If the position of the motor 1 is fixed and the fixed time reaches the first time length, the safety module 4 can determine that the state of the motor 1 meets the disturbance condition. At this time, the safety module 4 will request the servo driver 3 to send an additional current command 6 to the motor 1 to disturb the motor 1.

惟,上述僅為本發明的部分具體實施範例,但並不以此為限。 However, the above are only some specific implementation examples of the present invention, but are not limited thereto.

值得一提的是,除了上述擾動條件外,安全模組4還可依據回授位置來判斷馬達1的狀態是否符合預設的警示條件(例如,馬達1沒有旋轉達到比擾動條件所需更長的時間長度)。當馬達1的狀態符合警示條件時,安全模組4可直接認定編碼器2發生故障。於此情況下,安全模組4可請求伺服驅動器3發出異常警示訊號,以提醒使用者對編碼器2進行檢修。 It is worth mentioning that in addition to the above disturbance conditions, the safety module 4 can also determine whether the status of the motor 1 meets the preset warning conditions based on the feedback position (for example, the motor 1 does not rotate for longer than the disturbance condition requires. length of time). When the status of motor 1 meets the warning conditions, safety module 4 can directly determine that encoder 2 has failed. In this case, the safety module 4 can request the servo driver 3 to send an abnormal warning signal to remind the user to inspect the encoder 2 .

於一實施例中,安全模組4持續獲取馬達1的回授位置,並且持續判斷馬達1的位置是否固定。若馬達1的位置固定,但固定時間沒有達到預設的第二時間長度,則安全模組4不做任何動作,並且繼續監控馬達1的狀態。若馬達1的位置固定,並且固定時間達到第二時間長度,則安全模組4可認定馬達1的狀態符合所述警示條件。此時,安全模組4可請求伺服驅動器3發送異常警示訊號。 In one embodiment, the safety module 4 continuously obtains the feedback position of the motor 1 and continuously determines whether the position of the motor 1 is fixed. If the position of the motor 1 is fixed, but the fixed time does not reach the preset second time length, the safety module 4 does not take any action and continues to monitor the status of the motor 1. If the position of the motor 1 is fixed and the fixed time reaches the second time length, the safety module 4 can determine that the state of the motor 1 meets the warning condition. At this time, the security module 4 can request the servo driver 3 to send an abnormality warning signal.

於本發明的一實施例中,所述第二時間長度係大於第一時間長度,例如第二時間長度可為500ms、600ms等,但不加以限定。 In one embodiment of the present invention, the second time length is greater than the first time length. For example, the second time length can be 500ms, 600ms, etc., but is not limited thereto.

於一實施例中,安全模組4在判斷馬達1的狀態符合警示條件時,可發送控制命令至伺服驅動器3。藉此,伺服驅動器3基於控制命令來於驅動器面板(圖未標示)上顯示異常警示訊號,或是通過蜂鳴器(圖未標示)播放異常警示訊號,但不以此為限。 In one embodiment, when the safety module 4 determines that the status of the motor 1 meets the warning condition, it can send a control command to the servo driver 3 . Thereby, the servo driver 3 displays an abnormality warning signal on the driver panel (not shown in the figure) based on the control command, or plays the abnormality warning signal through a buzzer (not shown in the figure), but is not limited to this.

請同時參閱圖2,為本發明的故障診斷方法的流程圖的第一具體實施例。本發明進一步揭露了一種馬達編碼器的故障診斷方法(下面將於說明書中簡稱為診斷方法),所述診斷方法主要應用於如圖1所示的診斷系統,但不以此為限。 Please also refer to FIG. 2 , which is a first specific embodiment of a flow chart of the fault diagnosis method of the present invention. The present invention further discloses a fault diagnosis method for a motor encoder (hereinafter referred to as the diagnosis method in the description). The diagnosis method is mainly applied to the diagnosis system as shown in Figure 1, but is not limited thereto.

如前文所述,本發明的安全模組4主要是以軟體或韌體來實現,當處理器(例如編碼器2或其他獨立於伺服驅動器3外的硬體單元)執行了所述軟體或韌體後,即可虛擬建立所述安全模組4以實現本發明的診斷方法的各個執行步驟。 As mentioned above, the security module 4 of the present invention is mainly implemented by software or firmware. When the processor (such as the encoder 2 or other hardware unit independent of the servo driver 3) executes the software or firmware, After integration, the security module 4 can be virtually established to implement each execution step of the diagnostic method of the present invention.

如圖2所示,要運用本發明的診斷方法,首先,馬達1需進入位置模式(步驟S10),並且,由安全模組4來從馬達1的編碼器2讀取對應的位置資訊,藉此獲得馬達的回授位置(步驟S12)。 As shown in Figure 2, to use the diagnostic method of the present invention, first, the motor 1 needs to enter the position mode (step S10), and the safety module 4 reads the corresponding position information from the encoder 2 of the motor 1. This obtains the feedback position of the motor (step S12).

具體地,馬達1通常只有在進行定位時,才會發生位置固定不動的狀況。此時,雖然回授位置指出馬達1固定不動,但安全模組4無法得知是馬達1確實沒有旋轉,還是編碼器2故障而產生錯誤的回授位置。因此,本發明的診斷方法主要係運用在馬達1的位置模式下,對編碼器2進行故障的診斷。 Specifically, the motor 1 usually becomes stationary only when it is being positioned. At this time, although the feedback position indicates that the motor 1 is stationary, the safety module 4 cannot know whether the motor 1 is indeed not rotating, or whether the encoder 2 is faulty and produces an erroneous feedback position. Therefore, the diagnostic method of the present invention is mainly used to diagnose faults of the encoder 2 in the position mode of the motor 1 .

一般來說,馬達1還具有速度模式、力矩模式等其他控制模式。然而,在速度模式與力矩模式下,馬達1通常會接受控制而持續旋轉。此時,若回授位置指出馬達1固定不動,則安全模組4可以直接推定編碼器2故障,而不需要再藉由本發明的診斷系統與診斷方法對編碼器2進行診斷。 Generally speaking, motor 1 also has other control modes such as speed mode and torque mode. However, in speed mode and torque mode, motor 1 is usually controlled and continues to rotate. At this time, if the feedback position indicates that the motor 1 is stationary, the safety module 4 can directly infer that the encoder 2 is faulty, without the need to diagnose the encoder 2 through the diagnostic system and diagnostic method of the present invention.

惟,上述為本發明的其中一個具體實施範例,但不以此為限。 However, the above is one of the specific implementation examples of the present invention, but it is not limited thereto.

步驟S12後,安全模組4依據回授位置來判斷馬達1的狀態,並且判斷馬達1的狀態是否符合預設的擾動條件(步驟S14)。若馬達1的狀態符合擾動條件,則安全模組4可向伺服驅動器3發送對應的控制指令,以請求伺服驅動器3發出額外電流命令6至馬達1(步驟S16)。若馬達1的狀態不符合擾動條件,則安全模組4不作動。 After step S12, the safety module 4 determines the status of the motor 1 based on the feedback position, and determines whether the status of the motor 1 meets the preset disturbance conditions (step S14). If the status of the motor 1 meets the disturbance condition, the safety module 4 can send a corresponding control command to the servo driver 3 to request the servo driver 3 to send an additional current command 6 to the motor 1 (step S16). If the status of motor 1 does not meet the disturbance conditions, safety module 4 will not act.

並且,安全模組4同時判斷馬達1的狀態是否符合預設的警示條件(步驟S18)。若馬達1的狀態符合警示條件,則安全模組4 可向伺服驅動器3發送對應的控制指令,以請求伺服驅動器3對外發出異常警示訊號(步驟S20)。若馬達1的狀態不符合警示條件,則安全模組4不作動。 Furthermore, the security module 4 simultaneously determines whether the status of the motor 1 meets the preset warning conditions (step S18). If the status of motor 1 meets the warning conditions, safety module 4 A corresponding control command can be sent to the servo driver 3 to request the servo driver 3 to send an abnormality warning signal to the outside (step S20). If the status of motor 1 does not meet the warning conditions, safety module 4 will not operate.

並且,安全模組4於執行本發明的診斷方法時,持續判斷對於馬達1及/或編碼器2的偵測動作是否結束(步驟S22)。於對馬達1及/或編碼器2的偵測動作結束前,安全模組4重覆執行步驟S12至步驟S20,藉此持續獲得馬達1的回授位置、持續判斷馬達1的狀態、並且於指定條件符合時請求伺服驅動器3發出額外電流命令6與異常警示訊號。 Furthermore, when executing the diagnostic method of the present invention, the security module 4 continues to determine whether the detection operation of the motor 1 and/or the encoder 2 is completed (step S22). Before the detection of the motor 1 and/or the encoder 2 ends, the safety module 4 repeatedly executes steps S12 to S20, thereby continuously obtaining the feedback position of the motor 1, continuing to determine the status of the motor 1, and When the specified conditions are met, the servo driver 3 is requested to issue an additional current command 6 and an abnormal warning signal.

如上所述,本發明中安全模組4主要是依據持續獲得的回授位置來判斷馬達1的狀態,並且在判斷馬達1的位置固定,並且固定時間達到預設時間長度時,認定馬達1符合擾動條件(即,需要擾動馬達1以確認編碼器2是否異常),或是符合警示條件(即,已確認編碼器2異常而需要對外發出警示)。下面將以不同的實施例來對擾動條件與警示條件分別進行說明。 As mentioned above, the safety module 4 in the present invention mainly determines the status of the motor 1 based on the continuously obtained feedback position, and when it determines that the position of the motor 1 is fixed and the fixed time reaches the preset time length, it is determined that the motor 1 meets the requirements. Disturbance conditions (that is, it is necessary to disturb motor 1 to confirm whether encoder 2 is abnormal), or meet warning conditions (that is, it is confirmed that encoder 2 is abnormal and a warning needs to be issued to the outside). The disturbance conditions and warning conditions will be described respectively using different embodiments below.

續請參閱圖1至圖3,其中圖3為本發明的故障診斷方法的流程圖的第二具體實施例。下面基於圖3的實施例對擾動條件進行說明。 Please continue to refer to FIGS. 1 to 3 , where FIG. 3 is a second specific embodiment of the flow chart of the fault diagnosis method of the present invention. The disturbance conditions will be described below based on the embodiment of FIG. 3 .

首先,安全模組4在系統運作時持續取得馬達1的回授位置(步驟S30)。接著,安全模組4將於步驟S30中取得的回授位置與暫存的前一筆回授位置進行比對(步驟S32),並且以前、後兩筆回授位置是否相同為依據,判斷馬達1的位置是否固定(步驟S34)。 First, the safety module 4 continues to obtain the feedback position of the motor 1 during system operation (step S30). Then, the security module 4 compares the feedback position obtained in step S30 with the temporarily stored previous feedback position (step S32), and based on whether the previous and last two feedback positions are the same, it determines whether the motor 1 Is the position fixed (step S34).

若於步驟S34中判斷馬達1的位置固定,則安全模組4控制內部的計數器(圖未標示)進行計數(步驟S36)。 If it is determined in step S34 that the position of the motor 1 is fixed, the safety module 4 controls an internal counter (not shown) to count (step S36).

於一實施例中,安全模組4固定於每一個週期中取得一筆回授位置並且判斷馬達1的位置,並且在判斷馬達1的位置固定時控制計數器加一。於此實施例中,計數器的計數內容相當於安全模組4的執行週期。 In one embodiment, the safety module 4 is fixed to obtain a feedback position in each cycle and determine the position of the motor 1, and controls the counter to increase by one when it is determined that the position of the motor 1 is fixed. In this embodiment, the counting content of the counter is equivalent to the execution cycle of the security module 4 .

於另一實施例中,安全模組4基於固定時間長度(例如1ms)取得回授位置並且判斷馬達1的位置,並且在判斷馬達1的位置固定時控制計數器加一。於此實施例中,計數器的計數內容相當於實際的時間長度。 In another embodiment, the safety module 4 obtains the feedback position and determines the position of the motor 1 based on a fixed time length (for example, 1 ms), and controls the counter to increase by one when it is determined that the position of the motor 1 is fixed. In this embodiment, the count content of the counter is equivalent to the actual length of time.

為便於說明,下面將以計數器的計數內容相當於實際的時間長度為例,進行說明。 For the convenience of explanation, the following explanation will be based on the example that the counting content of the counter is equivalent to the actual length of time.

若於步驟S34中判斷馬達1的位置固定,安全模組4接著再判斷計數器的計數是否達到預設的第一時間長度(步驟S38)。意即,安全模組4依據計數器的計數狀況,判斷馬達1維持固定的時間是否持續且達到第一時間長度,例如20ms、30ms等,但不加以限定。 If it is determined in step S34 that the position of the motor 1 is fixed, the safety module 4 then determines whether the count of the counter reaches the preset first time length (step S38). That is to say, the safety module 4 determines whether the motor 1 maintains a fixed time duration and reaches the first time length based on the counting status of the counter, such as 20 ms, 30 ms, etc., but it is not limited.

若於步驟S38中判斷計數器的計數達到第一時間長度,則安全模組4可認定馬達1符合所述擾動條件。本發明中,安全模組4會在認定馬達1符合擾動條件時,請求伺服驅動器3發送額外電流命令6給馬達1。 If it is determined in step S38 that the count of the counter reaches the first time length, the security module 4 may determine that the motor 1 meets the disturbance condition. In the present invention, when the safety module 4 determines that the motor 1 meets the disturbance conditions, it requests the servo driver 3 to send the additional current command 6 to the motor 1 .

於一實施例中,安全模組4在認定馬達1符合擾動條件時發送控制指令至伺服驅動器3,藉此將伺服驅動器3中的一個擾動旗標(圖未標示)設定為致能(步驟S40)。當伺服驅動器3發現內部的擾動旗標被設定為致能時,將會自動發送額外電流命令6至馬達1,以擾動馬達1。如果馬達1運作正常,則在接收伺服驅動器3發送的額外電流命令6後,馬達1將會產生晃動,使得其位置發生些微改變。 In one embodiment, when the safety module 4 determines that the motor 1 meets the disturbance condition, it sends a control command to the servo driver 3, thereby setting a disturbance flag (not shown) in the servo driver 3 to enabled (step S40 ). When the servo driver 3 finds that the internal disturbance flag is set to enabled, it will automatically send an additional current command 6 to the motor 1 to disturb the motor 1. If motor 1 operates normally, after receiving the additional current command 6 sent by servo driver 3, motor 1 will shake, causing its position to change slightly.

若於步驟S38中判斷計數器的計數尚未達到第一時間長度,則安全模組4暫時不執行任何作動。 If it is determined in step S38 that the count of the counter has not reached the first length of time, the security module 4 does not perform any action temporarily.

接著,安全模組4判斷對於馬達1及/或編碼器2的偵測動作是否結束(步驟S42)。若對馬達1及/或編碼器2的偵測動作尚未結束,則安全模組4會暫存在步驟S30中獲得的回授位置(步驟S44),並且返回步驟S30。於下一個週期中,安全模組4取得馬達1的下一筆回授位置,並且與暫存的上一筆回授位置進行比對,以判斷馬達1的位置是否固定。 Next, the security module 4 determines whether the detection operation for the motor 1 and/or the encoder 2 is completed (step S42). If the detection operation of the motor 1 and/or the encoder 2 has not yet ended, the safety module 4 will temporarily stay in the feedback position obtained in step S30 (step S44), and return to step S30. In the next cycle, the safety module 4 obtains the next feedback position of the motor 1 and compares it with the temporarily stored previous feedback position to determine whether the position of the motor 1 is fixed.

上面說明了在安全模組4判斷馬達1的位置固定時的動作。若於步驟S34中判斷馬達1的位置改變,代表編碼器2運作正常,此時安全模組4沒有擾動馬達1以測試編碼器2的必要。於此情況下,安全模組4將計數器歸零(步驟S46)。並且,安全模組4可選擇性地發出控制指令給伺服驅動器3,以將伺服驅動器3的擾動旗標設定為禁能(步驟S48)。本發明中,診斷系統可由安全模組4來將擾 動旗標設定為禁能,或是由伺服驅動器3來將擾動旗標設定為禁能(容後詳述),不加以限定。 The above describes the action when the safety module 4 determines that the position of the motor 1 is fixed. If it is determined in step S34 that the position of the motor 1 has changed, it means that the encoder 2 is operating normally. At this time, the safety module 4 does not need to disturb the motor 1 to test the encoder 2. In this case, the security module 4 resets the counter to zero (step S46). Furthermore, the security module 4 can selectively send a control command to the servo driver 3 to set the disturbance flag of the servo driver 3 to be disabled (step S48). In the present invention, the diagnostic system can use the security module 4 to The moving flag is set to be disabled, or the disturbance flag is set to be disabled by the servo driver 3 (described in detail later), which is not limited.

當伺服驅動器3發現擾動旗標被設定為禁能時,就不會對當前發送給馬達1的電流命令5及額外電流命令6進行修改。因此,馬達1不會受到伺服驅動器3的影響而產生晃動。 When the servo driver 3 finds that the disturbance flag is set to be disabled, it will not modify the current command 5 and the additional current command 6 currently sent to the motor 1. Therefore, the motor 1 will not be affected by the servo driver 3 and cause vibration.

續請參閱圖1至圖4,其中圖4為本發明的故障診斷方法的流程圖的第三具體實施例。下面基於圖4的實施例對警示條件進行說明。 Please continue to refer to FIGS. 1 to 4 , where FIG. 4 is a third specific embodiment of the flow chart of the fault diagnosis method of the present invention. The warning conditions will be described below based on the embodiment of FIG. 4 .

具體地,圖4的實施例與圖3的實施例可執行於相同的週期內,意即,圖3中的各步驟與圖4中的各步驟可被同時執行。為了便於理解,下面將對圖4的各步驟進行獨立說明。 Specifically, the embodiment of FIG. 4 and the embodiment of FIG. 3 can be executed in the same cycle, that is, each step in FIG. 3 and each step in FIG. 4 can be executed simultaneously. In order to facilitate understanding, each step of Figure 4 will be described independently below.

如圖4所示,安全模組4持續取得馬達1的回授位置(步驟S50),並且將所取得的回授位置與暫存的前一筆回授位置進行比對(步驟S52),藉此判斷馬達1的位置是否固定(步驟S54)。 As shown in Figure 4, the safety module 4 continues to obtain the feedback position of the motor 1 (step S50), and compares the obtained feedback position with the temporarily stored previous feedback position (step S52). It is determined whether the position of the motor 1 is fixed (step S54).

若於步驟S54中判斷馬達1的位置固定,則安全模組4控制所述計數器進行計數(步驟S56)。並且,安全模組4判斷計數器的計數是否達到預設的第二時間長度(步驟S58),即,安全模組4判斷馬達1的位置固定的時間是否持續且達到第二時間長度。 If it is determined in step S54 that the position of the motor 1 is fixed, the safety module 4 controls the counter to count (step S56). Furthermore, the security module 4 determines whether the count of the counter reaches a preset second time length (step S58), that is, the security module 4 determines whether the time in which the position of the motor 1 is fixed continues and reaches the second time length.

若計數器的計數達到第二時間長度,則安全模組4可發送控制指令給伺服驅動器3,藉此將伺服驅動器3中的一個警示旗標(圖未標示)設定為致能(步驟S60)。當伺服驅動器3發現內部的警示旗標被設定為致能時,將會自動對外發送異常警示訊號。 If the count of the counter reaches the second time length, the security module 4 can send a control command to the servo driver 3 to set a warning flag (not shown) in the servo driver 3 to enabled (step S60). When the servo driver 3 finds that the internal warning flag is set to enabled, it will automatically send an abnormal warning signal to the outside.

若於步驟S58中判斷計數器的計數尚未達到第二時間長度,則安全模組4不執行任何作動。值得一提的是,圖3的實施例與圖4的實施例採用相同的計數器。若計數器的計數已達到第一時間長度但尚未達到第二時間長度,此時安全模組4仍然會請求伺服驅動器3發出額外電流命令6給馬達1。 If it is determined in step S58 that the count of the counter has not reached the second time length, the security module 4 does not perform any action. It is worth mentioning that the embodiment of FIG. 3 and the embodiment of FIG. 4 use the same counter. If the count of the counter has reached the first time length but has not reached the second time length, the safety module 4 will still request the servo driver 3 to send the additional current command 6 to the motor 1 at this time.

於一實施例中,所述第二時間長度大於圖3的實施例中的第一時間長度,例如第二時間長度可為50ms、60ms等,但不加以限定。 In one embodiment, the second time length is greater than the first time length in the embodiment of FIG. 3 . For example, the second time length may be 50 ms, 60 ms, etc., but is not limited thereto.

下面以第一時間長度為20ms,第二時間長度為50ms為例,進行實施例的說明。於此實施例中,安全模組4持續藉由前、後兩筆回授位置的比對來判斷馬達1的位置是否固定。當判斷馬達1的位置固定且固定時間達到20ms(即,計數器的計數累計20ms)時,安全模組4藉由致能擾動旗標,令伺服驅動器3發送額外電流命令6至馬達1。 The following describes the embodiment by taking the first time length as 20 ms and the second time length as 50 ms as an example. In this embodiment, the safety module 4 continues to determine whether the position of the motor 1 is fixed by comparing the previous and subsequent feedback positions. When it is determined that the position of motor 1 is fixed and the fixed time reaches 20ms (that is, the counter counts for 20ms), the safety module 4 enables the disturbance flag to cause the servo driver 3 to send an additional current command 6 to the motor 1.

若在伺服驅動器3發送了額外電流命令6後,馬達1的位置仍然固定,則計數器持續計數(即,計數器累計21ms、22ms,以此類推)。 If the position of motor 1 is still fixed after servo driver 3 sends additional current command 6, the counter continues to count (that is, the counter accumulates 21ms, 22ms, and so on).

當安全模組4判斷馬達1的位置固定,且計數器的計數達到40ms(即,第二次累計20ms)時,會再次設定擾動旗標,以令伺服驅動器3取消目前發送給馬達1的額外電流命令6,以再次對馬達1進行擾動(容後詳述)。 When the safety module 4 determines that the position of the motor 1 is fixed and the counter reaches 40ms (that is, the second accumulation of 20ms), the disturbance flag will be set again to cause the servo driver 3 to cancel the additional current currently sent to the motor 1 Command 6 to perturb motor 1 again (detailed later).

若在伺服驅動器3取消了額外電流命令6後,馬達1的位置仍然固定,則計數器會持續計數(即,計數器累計41ms、42ms,以此類推)。 If the position of motor 1 is still fixed after servo driver 3 cancels extra current command 6, the counter will continue to count (that is, the counter will accumulate 41ms, 42ms, and so on).

當安全模組4判斷馬達1的位置固定,且計數器的計數達到50ms時,會致能警示旗標,藉以令伺服驅動器3對外發出異常警示訊號。當伺服驅動器3發出異常警示訊號後,使用者即可得知馬達1或編碼器2發生異常,並且進行檢修。 When the safety module 4 determines that the position of the motor 1 is fixed and the counter reaches 50ms, it will enable the warning flag, thereby causing the servo driver 3 to send an abnormal warning signal to the outside. When the servo driver 3 sends an abnormality warning signal, the user can know that an abnormality has occurred in the motor 1 or the encoder 2 and perform maintenance.

惟,上述僅為本發明的一個具體實施範例,本發明中計數器的計數方式以及第一時間長度、第二時間長度並不以上述者為限。 However, the above is only a specific implementation example of the present invention, and the counting method, first time length, and second time length of the counter in the present invention are not limited to the above.

回到圖4。於圖4的實施例中,安全模組4同樣會持續判斷對於馬達1及/或編碼器2的偵測動作是否結束(步驟S62)。若對馬達1及/或編碼器2的偵測動作尚未結束,則安全模組4會暫存在步驟S50中獲得的回授位置(步驟S64),並且返回步驟S50。於下一個週期中,安全模組4取得馬達1的下一筆回授位置,並且與暫存的上一筆回授位置進行比對,以判斷馬達1的位置是否固定。 Back to Figure 4. In the embodiment of FIG. 4 , the security module 4 will also continue to determine whether the detection operation of the motor 1 and/or the encoder 2 is completed (step S62 ). If the detection operation of the motor 1 and/or the encoder 2 has not yet ended, the safety module 4 will temporarily stay in the feedback position obtained in step S50 (step S64), and return to step S50. In the next cycle, the safety module 4 obtains the next feedback position of the motor 1 and compares it with the temporarily stored previous feedback position to determine whether the position of the motor 1 is fixed.

與圖3的實施例相似,若於步驟S54中判斷馬達1的位置改變,代表安全模組4沒有擾動馬達1以測試編碼器2的必要。因此,安全模組4將計數器歸零(步驟S66)。並且,安全模組4可選擇性地發出控制指令至伺服驅動器3,以將伺服驅動器3的警示旗標設定為禁能(步驟S68)。當伺服驅動器3發現警示旗標被設定為禁能 時,將不會再對外發送異常警示訊號。據此,使用者可得知馬達1及編碼器2已恢復正常運作。 Similar to the embodiment of FIG. 3 , if it is determined in step S54 that the position of the motor 1 has changed, it means that the safety module 4 does not need to disturb the motor 1 to test the encoder 2 . Therefore, the security module 4 resets the counter to zero (step S66). Furthermore, the security module 4 can selectively send a control command to the servo driver 3 to set the warning flag of the servo driver 3 to be disabled (step S68). When servo drive 3 finds that the warning flag is set to disabled , abnormal warning signals will no longer be sent to the outside world. Accordingly, the user can know that the motor 1 and the encoder 2 have resumed normal operation.

本發明的其中一個技術特徵是在診斷系統中增設安全模組4,並且對伺服驅動器3進行修改以新增所述擾動旗標及所述警示旗標。本發明的診斷系統通過安全模組4來監控馬達1的位置狀態,並安全模組4基於位置狀態來設定伺服驅動器3的擾動旗標及警示旗標。藉此,伺服驅動器3可以參考擾動旗標的內容(即,致能或禁能),以判斷是否需要發出/取消額外電流命令6,並且參考警示旗標的內容(即,致能或禁能),以判斷是否需要對外發出異常警示訊號。 One of the technical features of the present invention is to add a safety module 4 to the diagnostic system, and modify the servo driver 3 to add the disturbance flag and the warning flag. The diagnostic system of the present invention monitors the position status of the motor 1 through the safety module 4, and the safety module 4 sets the disturbance flag and warning flag of the servo driver 3 based on the position status. Thereby, the servo driver 3 can refer to the content of the disturbance flag (ie, enable or disable) to determine whether it is necessary to issue/cancel the additional current command 6, and refer to the content of the warning flag (ie, enable or disable), To determine whether it is necessary to issue an abnormal warning signal to the outside world.

續請參閱圖1至圖5,其中圖5為本發明的擾動流程圖的第一具體實施例。下面基於圖5的實施例對伺服驅動器3的作動進行說明。 Please continue to refer to Figures 1 to 5, where Figure 5 is a first specific embodiment of the perturbation flow chart of the present invention. The operation of the servo driver 3 will be described below based on the embodiment of FIG. 5 .

如圖5所示,伺服驅動器3會持續判斷內部的擾動旗標是否致能(步驟S70)。於一實施例中,若判斷擾動旗標已致能,伺服驅動器3會進一步判斷目前是否處於馬達1的位置模式(步驟S72)。 As shown in Figure 5, the servo driver 3 will continue to determine whether the internal disturbance flag is enabled (step S70). In one embodiment, if it is determined that the disturbance flag is enabled, the servo driver 3 will further determine whether it is currently in the position mode of the motor 1 (step S72).

如前文中所述,一般只有處於位置模式下,馬達1才有可能固定不動。換句話說,本發明的診斷系統及診斷方法只有在馬達1的位置模式下,才有對馬達1進行擾動以確認編碼器2是否正常的必要。 As mentioned above, motor 1 is generally only possible to be stationary in position mode. In other words, the diagnostic system and diagnostic method of the present invention only need to disturb the motor 1 in the position mode of the motor 1 to confirm whether the encoder 2 is normal.

若擾動旗標已致能且馬達1處於位置模式,則安全模組4進一步讀取內部的額外電流命令狀態,並且判斷當前的額外電流命令狀態為第一數值或第二數值(步驟S74)。於一實施例中,所述第一數值與所述第二數值不同(例如第一數值為0,第二數值為1),但不加以限定。 If the disturbance flag is enabled and the motor 1 is in the position mode, the safety module 4 further reads the internal additional current command state and determines whether the current additional current command state is the first value or the second value (step S74). In one embodiment, the first numerical value and the second numerical value are different (for example, the first numerical value is 0 and the second numerical value is 1), but this is not a limitation.

本發明是藉由擾動馬達1以令馬達1的位置產生改變後,再依據回授位置的內容診斷編碼器2是否正常。當伺服驅動器3發送額外電流命令6給馬達1後,馬達1會在受影響而晃動後,逐漸回歸平穩,最終回到原來的位置上。當伺服驅動器3下一次要擾動馬達1時,就必須要取消目前發送的額外電流命令6(或是發送不同數值的額外電流命令6),才能夠令馬達1再次產生晃動。為了判斷本次的擾動應該要發送額外電流命令6或是取消目前發送的額外電流命令6,本發明對伺服驅動器3進行修改,以令伺服驅動器3記錄所述額外電流命令狀態。 The present invention disturbs the motor 1 to change the position of the motor 1, and then diagnoses whether the encoder 2 is normal based on the content of the feedback position. When the servo driver 3 sends the extra current command 6 to the motor 1, the motor 1 will shake due to the influence, then gradually return to stability, and finally return to the original position. When the servo driver 3 wants to disturb the motor 1 next time, it must cancel the additional current command 6 currently sent (or send an additional current command 6 with a different value) before the motor 1 can shake again. In order to determine whether the extra current command 6 should be sent or cancel the currently sent extra current command 6 due to this disturbance, the present invention modifies the servo driver 3 so that the servo driver 3 records the extra current command status.

於一實施例中,若額外電流命令狀態當前記錄第一數值(例如為0),代表伺服驅動器3沒有提供額外電流命令6給馬達1。此時,伺服驅動器3可發送預設定的額外電流命令6至馬達1(步驟S76),並且將額外電流命令狀態設定為第二數值(步驟S78)。 In one embodiment, if the additional current command status currently records a first value (for example, 0), it means that the servo driver 3 does not provide the additional current command 6 to the motor 1 . At this time, the servo driver 3 can send the preset additional current command 6 to the motor 1 (step S76), and set the additional current command state to the second value (step S78).

若於步驟S74中判斷額外電流命令狀態當前記錄第二數值(例如為1),代表伺服驅動器3目前持續提供額外電流命令6給馬達1。此時,伺服驅動器3可取消額外電流命令6(步驟S80),並且將額外電流命令狀態設定為第一數值(步驟S82)。 If it is determined in step S74 that the additional current command status currently records a second value (for example, 1), it means that the servo driver 3 currently continues to provide the additional current command 6 to the motor 1 . At this time, the servo driver 3 can cancel the extra current command 6 (step S80), and set the extra current command state to the first value (step S82).

於一實施例中,所述額外電流命令6可例如為馬達1的額定電流的5%。另外,伺服驅動器3於步驟S80中取消額外電流命令6的動作,可例如為將額外電流命令6設定為馬達1的額定電流的0%。惟,上述僅為本發明的其中一個具體實施範例,但不以此為限。 In one embodiment, the additional current command 6 may be, for example, 5% of the rated current of the motor 1 . In addition, the action of the servo driver 3 to cancel the additional current command 6 in step S80 may be, for example, setting the additional current command 6 to 0% of the rated current of the motor 1 . However, the above is only one specific implementation example of the present invention, but it is not limited thereto.

請同時參閱圖6及圖7,其中圖6為本發明的擾動波型示意圖的第一具體實施例,圖7為本發明的擾動波型示意圖的第二具體實施例。 Please refer to FIG. 6 and FIG. 7 at the same time. FIG. 6 is a first specific embodiment of a schematic diagram of a disturbance wave pattern of the present invention, and FIG. 7 is a second specific embodiment of a schematic diagram of a disturbance wave pattern of the present invention.

如圖6的實施例所示,馬達1的回授位置指出馬達1的位置固定,且固定時間持續達到20ms(即,於0秒至0.2秒間為固定)。此時,安全模組4發送額外電流命令6(圖6以額定電流的5%為例)給馬達1。馬達1接收額外電流命令6後,會朝第一方向產生晃動。隨著時間的經過,馬達1於接近0.4秒的時候結束晃動並恢復靜止。 As shown in the embodiment of FIG. 6 , the feedback position of the motor 1 indicates that the position of the motor 1 is fixed, and the fixed time lasts for 20 ms (that is, it is fixed between 0 seconds and 0.2 seconds). At this time, the safety module 4 sends an additional current command 6 (Figure 6 takes 5% of the rated current as an example) to the motor 1. After receiving the additional current command 6, the motor 1 will shake in the first direction. As time passes, motor 1 stops shaking and returns to standstill when it is close to 0.4 seconds.

接著如圖7的實施例所示,馬達1的回授位置指出馬達1的位置固定,且固定時間持續達到20ms(即,於0.4秒至0.6秒間為固定)。此時,安全模組4取消目前發送的額外電流命令6(圖7以將額定電流的5%修改為額定電流的0%為例)。馬達1接收不到原先的額外電流命令6後,會朝與第一方向相反的第二方向產生晃動。隨著時間的經過,馬達1於接近0.8秒的時候結束晃動並恢復靜止。 Next, as shown in the embodiment of FIG. 7 , the feedback position of the motor 1 indicates that the position of the motor 1 is fixed, and the fixed time lasts for 20 ms (that is, it is fixed between 0.4 seconds and 0.6 seconds). At this time, the safety module 4 cancels the currently sent additional current command 6 (Figure 7 takes the example of modifying 5% of the rated current to 0% of the rated current). After the motor 1 cannot receive the original additional current command 6, it will shake in the second direction opposite to the first direction. As time passes, motor 1 stops shaking and returns to standstill at close to 0.8 seconds.

如圖6及圖7的實施例所示,若編碼器2運作正常,則當安全模組4發送或取消額外電流命令6後,馬達1的位置都會產 生變化,並且安全模組4所獲得的回授位置會指出這個變化。換句話說,若安全模組4發送或取消額外電流命令6後,回授位置沒有指出如圖6、圖7所示的位置變化,則安全模組4可以推定編碼器2可能發生故障。 As shown in the embodiments of Figures 6 and 7, if the encoder 2 operates normally, when the safety module 4 sends or cancels the additional current command 6, the position of the motor 1 will change. changes, and the feedback position obtained by Security Module 4 will indicate this change. In other words, if the feedback position does not indicate a position change as shown in Figures 6 and 7 after the safety module 4 sends or cancels the additional current command 6, the safety module 4 can infer that the encoder 2 may malfunction.

如上所述,安全模組4會在伺服驅動器3的警示旗標致能前,多次請求伺服驅動器3對馬達1進行擾動。其中,伺服驅動器3第一次擾動馬達1時會發送額外電流命令6(例如額定電流的5%)、第二次擾動馬達1時會取消額外電流命令6(例如額定電流的0%)、第三次擾動馬達1時會再次發送額外電流命令6,以此類推,直到警示旗標被致能、安全模組4停止偵測或是其他停止條件達成為止。 As mentioned above, the security module 4 will request the servo driver 3 to disturb the motor 1 multiple times before the warning flag of the servo driver 3 is enabled. Among them, when the servo driver 3 disturbs the motor 1 for the first time, it will send an additional current command 6 (for example, 5% of the rated current). When it disturbs the motor 1 for the second time, it will cancel the additional current command 6 (for example, 0% of the rated current). When motor 1 is disturbed three times, additional current command 6 will be sent again, and so on until the warning flag is enabled, safety module 4 stops detection, or other stop conditions are met.

回到圖5。於發出額外電流命令6或取消額外電流命令6後,伺服驅動器3主動將擾動旗標設定為禁能(步驟S84)。藉此,伺服驅動器3暫時不會再改變額外電流命令6的狀態。 Return to Figure 5. After issuing the extra current command 6 or canceling the extra current command 6 , the servo driver 3 actively sets the disturbance flag to be disabled (step S84 ). Thereby, the servo driver 3 will not change the state of the additional current command 6 temporarily.

與安全模組4相同,伺服驅動器3會持續判斷本發明的診斷方法是否結束(步驟S86),並且於診斷方法結束前重覆執行步驟S70至步驟S84,以基於擾動旗標的內容發送或取消額外電流命令6。 Like the security module 4, the servo driver 3 will continue to determine whether the diagnostic method of the present invention ends (step S86), and repeatedly executes steps S70 to step S84 before the diagnostic method ends to send or cancel additional data based on the content of the disturbance flag. Current command 6.

除了擾動旗標外,伺服驅動器3還會持續判斷內部的警示旗標是否被致能(步驟S88)。若警示旗標已致能(例如於圖4的步驟S60中被安全模組4設定為致能),則伺服驅動器3基於警示旗標的內容對外發出異常警示訊號(步驟S90)。 In addition to the disturbance flag, the servo driver 3 will also continue to determine whether the internal warning flag is enabled (step S88). If the warning flag is enabled (for example, set to enabled by the security module 4 in step S60 of FIG. 4 ), the servo driver 3 sends an abnormality warning signal to the outside based on the content of the warning flag (step S90 ).

於一實施例中,伺服驅動器3可通過其上的驅動器面板(圖未標示)以文字、圖形、顏色或其組合的方式顯示異常警示訊號,或通過蜂鳴器(圖未標示)以聲音的方式播放異常警示訊號,但不以此為限。當伺服驅動器3對外發送異常警示訊號後,使用者可以得知馬達1或編碼器2發生故障。 In one embodiment, the servo driver 3 can display an abnormality warning signal in the form of text, graphics, color or a combination thereof through the driver panel (not shown in the figure), or use a buzzer (not shown in the figure) to sound an abnormality warning signal. method to play abnormal warning signals, but is not limited to this. When the servo driver 3 sends an abnormal warning signal to the outside, the user can know that the motor 1 or the encoder 2 is faulty.

本發明在回授位置指出馬達的位置固定時,通過額外電流命令6來讓馬達1產生晃動。與相關技術相比,本發明不需要設定馬達1的位置或是電流命令的閥值,並且可適用於各種類型的編碼器(例如通訊型或非通訊型),而可令編碼器的診斷更為便利。 When the feedback position indicates that the position of the motor is fixed, the present invention uses the additional current command 6 to cause the motor 1 to shake. Compared with related technologies, the present invention does not need to set the position of the motor 1 or the threshold of the current command, and is applicable to various types of encoders (such as communication type or non-communication type), making the diagnosis of the encoder more convenient. For convenience.

以上所述僅為本發明之較佳具體實例,非因此即侷限本發明之專利範圍,故舉凡運用本發明內容所為之等效變化,均同理皆包含於本發明之範圍內,合予陳明。 The above descriptions are only preferred specific examples of the present invention, which do not limit the patent scope of the present invention. Therefore, all equivalent changes made by applying the content of the present invention are equally included in the scope of the present invention, and are hereby stated. bright.

1:馬達 1: Motor

2:編碼器 2: Encoder

3:伺服驅動器 3:Servo drive

4:安全模組 4: Security module

5:電流命令 5: Current command

6:額外電流命令 6: Extra current command

Claims (15)

一種馬達編碼器的故障診斷系統,包括:一馬達,具有一編碼器,該編碼器依據該馬達的旋轉產生對應的一位置資訊;一伺服驅動器,連接該馬達;及一安全模組,連接該編碼器及該伺服驅動器,讀取該位置資訊以獲得該馬達的一回授位置,並依據該回授位置判斷該馬達的狀態是否符合一擾動條件或一警示條件;其中,該安全模組被配置為在判斷該馬達的狀態符合該擾動條件時請求該伺服驅動器發送一額外電流命令至該馬達,該額外電流命令擾動該馬達以確認該編碼器是否異常;其中,該安全模組被配置為在判斷該馬達的狀態符合該警示條件時請求該伺服驅動器發出一異常警示訊號,並通過該異常警示訊號認定該編碼器異常。 A fault diagnosis system for a motor encoder, including: a motor with an encoder that generates corresponding position information based on the rotation of the motor; a servo driver connected to the motor; and a safety module connected to the motor. The encoder and the servo driver read the position information to obtain a feedback position of the motor, and determine whether the status of the motor meets a disturbance condition or a warning condition based on the feedback position; wherein, the safety module is Configured to request the servo driver to send an additional current command to the motor when it is determined that the state of the motor meets the disturbance condition, and the additional current command perturbs the motor to confirm whether the encoder is abnormal; wherein, the safety module is configured as When it is determined that the status of the motor meets the warning condition, the servo driver is requested to send an abnormal warning signal, and the encoder is determined to be abnormal through the abnormal warning signal. 如請求項1所述的故障診斷系統,其中該安全模組被配置為在基於該回授位置判斷該馬達的位置固定且固定時間持續一第一時間長度時,認定該馬達符合該擾動條件,並且在基於該回授位置判斷該馬達的位置固定且固定時間持續一第二時間長度時,認定該馬達符合該警示條件,其中該第二時間長度大於該第一時間長度。 The fault diagnosis system as described in claim 1, wherein the safety module is configured to determine that the motor meets the disturbance condition when it is determined based on the feedback position that the position of the motor is fixed and the fixed time lasts for a first time length, And when it is determined based on the feedback position that the position of the motor is fixed and the fixed time lasts for a second time length, it is determined that the motor meets the warning condition, wherein the second time length is greater than the first time length. 如請求項2所述的故障診斷系統,其中該伺服驅動器具有一擾動旗標及一警示旗標,該安全模組被配置為將該擾動旗標設定為致能以令該伺 服驅動器發送該額外電流命令至該馬達,並且將該警示旗標設定為致能以令該伺服驅動器發出該異常警示訊號。 The fault diagnosis system of claim 2, wherein the servo driver has a disturbance flag and a warning flag, and the safety module is configured to set the disturbance flag to enable to enable the servo driver. The servo driver sends the extra current command to the motor, and sets the warning flag to enable so that the servo driver issues the abnormal warning signal. 如請求項3所述的故障診斷系統,其中該安全模組被配置為在基於該回授位置判斷該馬達的位置改變時,將該擾動旗標及該警示旗標設定為禁能。 The fault diagnosis system of claim 3, wherein the safety module is configured to set the disturbance flag and the warning flag to be disabled when determining the position change of the motor based on the feedback position. 如請求項3所述的故障診斷系統,其中該伺服驅動器具有一額外電流命令狀態,該伺服驅動器被配置為在該擾動旗標被致能時讀取該額外電流命令狀態,於該額外電流命令狀態為一第一數值時發送該額外電流命令,並於該額外電流命令狀態為一第二數值時取消該額外電流命令。 The fault diagnosis system as described in claim 3, wherein the servo driver has an extra current command state, and the servo driver is configured to read the extra current command state when the disturbance flag is enabled, and when the extra current command The additional current command is sent when the status is a first value, and the additional current command is canceled when the additional current command status is a second value. 如請求項5所述的故障診斷系統,其中該伺服驅動器被配置為在發送該額外電流命令後設定該額外電流命令狀態為該第二數值,並且在取消該額外電流命令後設定該額外電流命令狀態為該第一數值。 The fault diagnosis system of claim 5, wherein the servo driver is configured to set the additional current command state to the second value after sending the additional current command, and to set the additional current command after canceling the additional current command. The status is the first value. 如請求項5所述的故障診斷系統,其中該伺服驅動器被配置為在發送該額外電流命令或取消該額外電流命令後,將該擾動旗標設定為禁能。 The fault diagnosis system of claim 5, wherein the servo driver is configured to set the disturbance flag to disabled after sending the extra current command or canceling the extra current command. 如請求項1-7中任一項所述的故障診斷系統,其中該額外電流命令為一額定電流的5%。 The fault diagnosis system as described in any one of claims 1-7, wherein the additional current command is 5% of a rated current. 一種馬達編碼器的故障診斷方法,包括:a)讀取一馬達的一編碼器以獲得該馬達的一回授位置;b)依據該回授位置判斷該馬達的狀態是否符合一擾動條件或一警示條件;c)於該馬達的狀態符合該擾動條件時,請求一伺服驅動器發出一額外電流命令至該馬達,其中該額外電流命令擾動該馬達以確認該編碼器是否異常;及 d)於該馬達的狀態符合該警示條件時,請求該伺服驅動器發出一異常警示訊號,並通過該異常警示訊號認定該編碼器異常。 A fault diagnosis method for a motor encoder, including: a) reading an encoder of a motor to obtain a feedback position of the motor; b) judging whether the status of the motor meets a disturbance condition or a feedback position based on the feedback position Warning condition; c) When the status of the motor meets the disturbance condition, request a servo driver to issue an additional current command to the motor, wherein the additional current command disturbs the motor to confirm whether the encoder is abnormal; and d) When the status of the motor meets the warning condition, request the servo driver to send an abnormal warning signal, and determine that the encoder is abnormal through the abnormal warning signal. 如請求項9所述的故障診斷方法,其中該步驟b)包括:b11)將該回授位置與上一筆該回授位置進行比對,以判斷該馬達的位置是否固定;b12)於判斷該馬達的位置固定時,控制一計數器進行計數;及b13)於該計數器的計數達到一第一時間長度時,認定該馬達符合該擾動條件。 The fault diagnosis method as described in claim 9, wherein step b) includes: b11) comparing the feedback position with the previous feedback position to determine whether the position of the motor is fixed; b12) determining whether the position of the motor is fixed; When the position of the motor is fixed, a counter is controlled to count; and b13) when the count of the counter reaches a first length of time, it is determined that the motor meets the disturbance condition. 如請求項10所述的故障診斷方法,其中該步驟b)更包括一步驟b14):於該計數器的計數達到一第二時間長度時,認定該馬達符合該警示條件,其中該第二時間長度大於該第一時間長度。 The fault diagnosis method as described in claim 10, wherein the step b) further includes a step b14): when the counter reaches a second length of time, it is determined that the motor meets the warning condition, wherein the second length of time is greater than the first length of time. 如請求項10所述的故障診斷方法,其中該步驟c)包括:於該馬達符合該擾動條件時,將該伺服驅動器中的一擾動旗標設定為致能,藉此該伺服驅動器基於該擾動旗標發送該額外電流命令至該馬達,並且該步驟d)包括:於該馬達符合該警示條件時,將該伺服驅動器中的一警示旗標設定為致能,藉此該伺服驅動器基於該警示旗標發出該異常警示訊號。 The fault diagnosis method as described in claim 10, wherein step c) includes: when the motor meets the disturbance condition, setting a disturbance flag in the servo driver to enable, whereby the servo driver based on the disturbance The flag sends the extra current command to the motor, and the step d) includes: when the motor meets the warning condition, setting a warning flag in the servo driver to enable, whereby the servo driver based on the warning The flag issues a warning signal for the abnormality. 如請求項12所述的故障診斷方法,其中更包括:e)於判斷該馬達的位置改變時,控制該計數器歸零;及f)於判斷該馬達的位置改變時,將該擾動旗標及該警示旗標設定為禁能。 The fault diagnosis method as described in claim 12, which further includes: e) when it is determined that the position of the motor has changed, controlling the counter to return to zero; and f) when it is determined that the position of the motor has changed, setting the disturbance flag and This warning flag is set to disabled. 如請求項12所述的故障診斷方法,其中更包括:g)該伺服驅動器於該擾動旗標被致能時讀取一額外電流命令狀態; h)於該額外電流命令狀態為一第一數值時發送該額外電流命令,並設定該額外電流命令狀態為一第二數值;i)於該額外電流命令狀態為該第二數值時取消該額外電流命令,並設定該額外電流命令狀態為該第一數值;及j)於該步驟h)或該步驟i)後,設定該擾動旗標為禁能。 The fault diagnosis method as described in claim 12, further comprising: g) the servo driver reads an extra current command status when the disturbance flag is enabled; h) Send the additional current command when the additional current command state is a first value, and set the additional current command state to a second value; i) Cancel the additional current command when the additional current command state is the second value current command, and set the additional current command state to the first value; and j) after step h) or step i), set the disturbance flag to be disabled. 如請求項14所述的故障診斷方法,其中該步驟g)包括:g1)該伺服驅動器於該擾動旗標被致能時,判斷該馬達是否運作於一位置模式;及g2)於該馬達運作於該位置模式時讀取該額外電流命令狀態。 The fault diagnosis method as described in claim 14, wherein the step g) includes: g1) the servo driver determines whether the motor operates in a position mode when the disturbance flag is enabled; and g2) when the motor operates Read the additional current command status in this position mode.
TW111110500A 2022-03-22 2022-03-22 Diagnostic system for failure of motor encoder, and diagnostic method for using the same TWI817402B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111110500A TWI817402B (en) 2022-03-22 2022-03-22 Diagnostic system for failure of motor encoder, and diagnostic method for using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111110500A TWI817402B (en) 2022-03-22 2022-03-22 Diagnostic system for failure of motor encoder, and diagnostic method for using the same

Publications (2)

Publication Number Publication Date
TW202338387A TW202338387A (en) 2023-10-01
TWI817402B true TWI817402B (en) 2023-10-01

Family

ID=89856181

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111110500A TWI817402B (en) 2022-03-22 2022-03-22 Diagnostic system for failure of motor encoder, and diagnostic method for using the same

Country Status (1)

Country Link
TW (1) TWI817402B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150130385A1 (en) * 2012-02-06 2015-05-14 Ricoh Company, Limited Motor control device, image forming apparatus, motor control method, and computer-readable storage medium
CN107614215A (en) * 2015-05-22 2018-01-19 日产自动车株式会社 Trouble-shooter and method for diagnosing faults
US20220034969A1 (en) * 2020-08-03 2022-02-03 Rohm Co., Ltd. Motor Control System

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150130385A1 (en) * 2012-02-06 2015-05-14 Ricoh Company, Limited Motor control device, image forming apparatus, motor control method, and computer-readable storage medium
CN105071711A (en) * 2012-02-06 2015-11-18 株式会社理光 Motor control device, image forming apparatus, motor control method, and computer-readable storage medium
CN107614215A (en) * 2015-05-22 2018-01-19 日产自动车株式会社 Trouble-shooter and method for diagnosing faults
US20220034969A1 (en) * 2020-08-03 2022-02-03 Rohm Co., Ltd. Motor Control System

Also Published As

Publication number Publication date
TW202338387A (en) 2023-10-01

Similar Documents

Publication Publication Date Title
JP3780508B2 (en) Machine tool abnormality diagnosis apparatus, abnormality diagnosis method, and abnormality diagnosis program
US20080303472A1 (en) Method for replacement of a defective field device by a new field device in a system which communicates via a digital fieldbus, in particular an automation system
RU2002134492A (en) AIRCRAFT CONTROL SYSTEM
JP2018128820A (en) Control device and method for controlling the same
WO2007101123A2 (en) Safety versus availability graphical user interface
TWI817402B (en) Diagnostic system for failure of motor encoder, and diagnostic method for using the same
US20140167671A1 (en) Motor position controller
EP4249854A1 (en) Failure diagnostic system and failure diagnostic method of motor encoder
JP6495851B2 (en) Elevator ride comfort diagnostic apparatus and elevator ride comfort diagnostic method
JP2015098854A (en) Engine control device
CN112034774B (en) Thermal redundancy control method
JP2008230563A (en) Platform door operation monitoring control system
JP2021012032A (en) Abnormality diagnosis device and robot controller
JP2007288829A (en) Method and device for detecting abnormality of machine
JP2500217Y2 (en) I / O card abnormality detection system
JP2007213314A (en) Encoder apparatus, servo motor and servo system
JP2809838B2 (en) Destination display device
JP2002189571A (en) Magnetic disk device and self diagnostic method therefor
JPH0268606A (en) Cnc diagnosing system
JPH11224244A (en) Information processor, automatic generating method of its system configuration information, and record medium
JPS60112103A (en) Hybrid controller
JPH10135951A (en) Communication system, image-forming device and fault diagnostic method for the communication system
JPH08221109A (en) Robot controller
CN117826872A (en) Display position method and device of flip screen, electronic equipment and medium
JP6305191B2 (en) Cutting control device and cutting control method