TWI403083B - Servo driver and controlling method thereof - Google Patents

Servo driver and controlling method thereof Download PDF

Info

Publication number
TWI403083B
TWI403083B TW99112062A TW99112062A TWI403083B TW I403083 B TWI403083 B TW I403083B TW 99112062 A TW99112062 A TW 99112062A TW 99112062 A TW99112062 A TW 99112062A TW I403083 B TWI403083 B TW I403083B
Authority
TW
Taiwan
Prior art keywords
phase signal
phase
preset value
processing circuit
width
Prior art date
Application number
TW99112062A
Other languages
Chinese (zh)
Other versions
TW201138289A (en
Inventor
Hsien Lai Yu
Original Assignee
Teco Elec & Machinery Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Teco Elec & Machinery Co Ltd filed Critical Teco Elec & Machinery Co Ltd
Priority to TW99112062A priority Critical patent/TWI403083B/en
Publication of TW201138289A publication Critical patent/TW201138289A/en
Application granted granted Critical
Publication of TWI403083B publication Critical patent/TWI403083B/en

Links

Landscapes

  • Control Of Electric Motors In General (AREA)

Description

伺服驅動器及其控制方法Servo drive and control method thereof

本發明是有關於一種驅動器,且特別是有關於一種伺服驅動器之控制方法及應用其之伺服驅動器。The present invention relates to a driver, and more particularly to a method of controlling a servo driver and a servo driver using the same.

一般而言,帶動負載的馬達需要一個能感應目前馬達轉速與位置的感測單元,一般稱為馬達編碼器(Encoder)。常見的馬達編碼器(Encoder)是會輸出A相訊號、B相訊號及Z相訊號。其中,Z相訊號用以表示馬達原點訊號,並於馬達旋轉一圈時出現一次。傳統廉價的處理電路是將Z相訊號直接輸出至上位控制器。In general, a motor that drives a load requires a sensing unit that senses the current motor speed and position, commonly referred to as a motor encoder (Encoder). A common motor encoder (Encoder) will output A phase signal, B phase signal and Z phase signal. The Z-phase signal is used to indicate the motor origin signal and appears once when the motor rotates once. The traditional inexpensive processing circuit outputs the Z-phase signal directly to the upper controller.

然而,隨著應用場合轉速提高並搭配較高解析度的編碼器,就會使得Z相訊號出現的寬度變窄,則會產生上位控制器無法收到Z相訊號之情況。此外,部份廠商的編碼器規格,若Z相訊號本身就過窄之情況下,如Z相訊號的寬度僅為A相訊號或B相訊號的半幅寬之情況,則會更容易造成上位控制器收不到Z相訊號。However, as the application speed increases and the higher resolution encoder is used, the width of the Z-phase signal will be narrowed, which will result in the upper controller not receiving the Z-phase signal. In addition, some manufacturers' encoder specifications, if the Z-phase signal itself is too narrow, such as the width of the Z-phase signal is only the half-width of the A-phase signal or the B-phase signal, it will be more likely to cause the upper control. The device does not receive the Z phase signal.

故,如何改善上位控制器因Z相訊號過窄,而無法收到Z相訊號之缺失,即為本發明主要改善之課題。Therefore, how to improve the lack of the Z-phase signal due to the narrow Z-phase signal of the host controller is the main improvement problem of the present invention.

本發明係有關於一種伺服驅動器及其控制方法,用以解決在高轉速應用場合時,上位控制器讀取不到Z相訊號的問題。The invention relates to a servo driver and a control method thereof for solving the problem that the upper controller can not read the Z-phase signal in the high-speed application.

根據本發明之一方面,提出一種伺服驅動器之控制方法。伺服驅動器之控制方法至少包括如下步驟:脈寬處理電路接收馬達編碼器所輸出之Z相訊號,並內設預設值;當脈寬處理電路接收到Z相訊號時,啟動紀錄功能以記錄一Z相時程,並輸出一可變寬度Z相訊號;以及當Z相時程等於預設值,脈寬處理電路停止輸出可變寬度Z相訊號至上位控制器。According to an aspect of the invention, a method of controlling a servo driver is proposed. The control method of the servo driver includes at least the following steps: the pulse width processing circuit receives the Z-phase signal output by the motor encoder, and presets a preset value; when the pulse width processing circuit receives the Z-phase signal, starts the recording function to record a Z phase time history, and output a variable width Z phase signal; and when the Z phase time course is equal to the preset value, the pulse width processing circuit stops outputting the variable width Z phase signal to the upper controller.

根據本發明之另一方面,提出一種伺服驅動器。伺服驅動器包括分週電路以及脈寬處理電路。分週電路用以接收馬達編碼器所輸出之A相訊號與B相訊號,與輸出分週A相訊號與分週B相訊號。脈寬處理電路內設有一預設值,用以接收馬達編碼器所輸出之一Z相訊號,且啟動紀錄功能以記錄一Z相時程,並輸出一可變寬度Z相訊號。當Z相時程等於預設值,脈寬處理電路停止輸出可變寬度Z相訊號至上位控制器。According to another aspect of the invention, a servo drive is presented. The servo driver includes a divided circuit and a pulse width processing circuit. The sub-circle circuit is configured to receive the A-phase signal and the B-phase signal output by the motor encoder, and output the weekly A-phase signal and the sub-cycle B-phase signal. The pulse width processing circuit is provided with a preset value for receiving one of the Z-phase signals output by the motor encoder, and starts a recording function to record a Z-phase time course and output a variable-width Z-phase signal. When the Z-phase time course is equal to the preset value, the pulse width processing circuit stops outputting the variable-width Z-phase signal to the upper controller.

為讓本發明之上述內容能更明顯易懂,下文特舉一較佳實施例,並配合所附圖式,作詳細說明如下:In order to make the above-mentioned contents of the present invention more comprehensible, a preferred embodiment will be described below, and in conjunction with the drawings, a detailed description is as follows:

為了解決上位控制器讀取不到Z相訊號的問題,下述實施例提供一種伺服驅動器及其控制方法。伺服驅動器包括分週電路以及脈寬處理電路。分週電路用以接收馬達編碼器所輸出之A相訊號與B相訊號,與輸出分週A相訊號與分週B相訊號。脈寬處理電路內設有一預設值,用以接收馬達編碼器所輸出之一Z相訊號,且啟動記錄功能以記錄一Z相時程,並輸出可變寬度Z相訊號。當Z相時程等於預設值,脈寬處理電路停止輸出可變寬度Z相訊號至上位控制器。In order to solve the problem that the upper controller cannot read the Z-phase signal, the following embodiments provide a servo driver and a control method thereof. The servo driver includes a divided circuit and a pulse width processing circuit. The sub-circle circuit is configured to receive the A-phase signal and the B-phase signal output by the motor encoder, and output the weekly A-phase signal and the sub-cycle B-phase signal. The pulse width processing circuit is provided with a preset value for receiving a Z-phase signal output by the motor encoder, and starts a recording function to record a Z-phase time course and output a variable-width Z-phase signal. When the Z-phase time course is equal to the preset value, the pulse width processing circuit stops outputting the variable-width Z-phase signal to the upper controller.

伺服驅動器之控制方法至少包括如下步驟:脈寬處理電路接收馬達編碼器所輸出之Z相訊號,並內設預設值;脈寬處理電路啟動記錄功能以記錄一Z相時程,並輸出一可變寬度Z相訊號;以及當Z相時程等於預設值,脈寬處理電路停止輸出可變寬度Z相訊號至上位控制器。實施方式中所提及之「訊號」,其意包含英文中之「signal」、日文&簡體字中之「信号」。The control method of the servo driver includes at least the following steps: the pulse width processing circuit receives the Z-phase signal output by the motor encoder, and presets a preset value; the pulse width processing circuit starts a recording function to record a Z-phase time history, and outputs one The variable width Z-phase signal; and when the Z-phase time course is equal to the preset value, the pulse width processing circuit stops outputting the variable-width Z-phase signal to the upper controller. The "signal" mentioned in the embodiment means "signal" in English, "signal" in Japanese & simplified characters.

第一實施例First embodiment

請同時參照第1圖及第2圖,第1圖繪示係為依照本發明第一實施例之一種伺服驅動器之局部示意圖,第2圖繪示係為依照本發明第一實施例之訊號波形圖。伺服驅動器30係耦接於馬達編碼器10及上位控制器20之間,而上位控制器20例如為可程式控制器(Programmable Logic Controller,PLC)。伺服驅動器30包括分週電路310及脈寬處理電路330。分週電路310又稱為除頻電路,分週電路310接收馬達編碼器10之資訊,並傳送資訊至上位控制器20。分週電路310根據一分週比將A相訊號SA分週為分週A相訊號PA並根據分週比將B相訊號SB分週為分週B相訊號PB,並將分週A相訊號PA及分週B相訊號PB輸出至上位控制器20。Please refer to FIG. 1 and FIG. 2 simultaneously. FIG. 1 is a partial schematic diagram showing a servo driver according to a first embodiment of the present invention, and FIG. 2 is a signal waveform according to a first embodiment of the present invention. Figure. The servo driver 30 is coupled between the motor encoder 10 and the upper controller 20, and the upper controller 20 is, for example, a programmable logic controller (PLC). The servo driver 30 includes a divided circuit 310 and a pulse width processing circuit 330. The divided circuit 310 is also referred to as a frequency dividing circuit, and the divided circuit 310 receives the information of the motor encoder 10 and transmits information to the upper controller 20. The weekly circuit 310 divides the A-phase signal SA into weekly A-phase signals PA according to a minute-to-week ratio, and divides the B-phase signal SB into weekly B-phase signals PB according to the weekly ratio, and divides the weekly A-phase signals. The PA and the sub-cycle B phase signal PB are output to the upper controller 20.

脈寬處理電路330接收馬達編碼器10所輸出之Z相訊號SZ,且啟動記錄功能以記錄一Z相時程。預設值與Z相時程例如為分週A相訊號PA及分週B相訊號PB之邊緣個數或一時間值。脈寬處理電路330輸出可變寬度Z相訊號ZW。當Z相時程等於預設值時,脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20。當脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20,脈寬處理電路330同時停止記錄功能,並將該Z相時程歸零。The pulse width processing circuit 330 receives the Z-phase signal SZ output from the motor encoder 10 and activates a recording function to record a Z-phase time course. The preset value and the Z-phase time history are, for example, the number of edges or a time value of the weekly A-phase signal PA and the weekly B-phase signal PB. The pulse width processing circuit 330 outputs a variable width Z phase signal ZW. When the Z-phase time course is equal to the preset value, the pulse width processing circuit 330 stops outputting the variable-width Z-phase signal ZW to the upper controller 20. When the pulse width processing circuit 330 stops outputting the variable width Z-phase signal ZW to the upper controller 20, the pulse width processing circuit 330 simultaneously stops the recording function and zeroes the Z-phase time.

由於脈寬處理電路330能調整可變寬度Z相訊號ZW之脈波寬度,因此能解決上位控制器20因Z相訊號SZ之脈波寬度過小而讀取不到Z相訊號SZ的問題。該可變寬度Z相訊號ZW,可如第2圖中之可變寬度Z相訊號ZW1、可變寬度Z相訊號ZW2或可變寬度Z相訊號ZW3,換言之,該預設值不僅限於單一參數,其亦可包含複數參數,可供使用者依其需求進行設定。當前述預設值為1時,該可變寬度Z相訊號ZW如第2圖繪示之可變寬度Z相訊號ZW1,其寬度會包含一次之邊緣個數,該邊緣個數係指分週A相訊號或分週B相訊號之邊緣個數,而當接收到第二次之邊緣個數,即停止輸出該可變寬度Z相訊號ZW1;當前述預設值為2時,該可變寬度Z相訊號ZW如第2圖繪示之可變寬度Z相訊號ZW2,其寬度會包含二次之邊緣個數,以第2圖而言,當接收到第三次之邊緣個數,即時停止輸出該可變寬度Z相訊號ZW2,使該可變寬度Z相訊號ZW2之寬度至少跨越二次邊緣個數;當前述預設值為3時,該可變寬度Z相訊號ZW如第2圖繪示之可變寬度Z相訊號ZW3,其寬度會包含三次之邊緣個數,亦即,當接收到第四次之邊緣個數,即時停止輸出該可變寬度Z相訊號ZW3,使該可變寬度Z相訊號ZW3之寬度至少跨越三次邊緣個數。Since the pulse width processing circuit 330 can adjust the pulse width of the variable-width Z-phase signal ZW, it can solve the problem that the upper controller 20 cannot read the Z-phase signal SZ because the pulse width of the Z-phase signal SZ is too small. The variable width Z-phase signal ZW can be as the variable width Z-phase signal ZW1, the variable-width Z-phase signal ZW2 or the variable-width Z-phase signal ZW3 in FIG. 2, in other words, the preset value is not limited to a single parameter. It can also contain multiple parameters, which can be set by the user according to his needs. When the preset value is 1, the variable width Z-phase signal ZW is a variable-width Z-phase signal ZW1 as shown in FIG. 2, and the width thereof includes the number of edges at a time, and the number of edges refers to a sub-circle. The number of edges of the A-phase signal or the weekly B-phase signal, and when the second edge number is received, the variable-width Z-phase signal ZW1 is stopped; when the preset value is 2, the variable The width Z-phase signal ZW, as shown in Figure 2, has a variable-width Z-phase signal ZW2, and its width will include the number of edges of the second. In the second figure, when the number of edges of the third time is received, Stop outputting the variable width Z-phase signal ZW2 such that the width of the variable-width Z-phase signal ZW2 spans at least the number of secondary edges; when the preset value is 3, the variable-width Z-phase signal ZW is as the second The variable width Z-phase signal ZW3 is shown in the figure, and the width thereof includes the number of edges of three times, that is, when the number of edges of the fourth time is received, the variable-width Z-phase signal ZW3 is immediately stopped and outputted. The width of the variable width Z-phase signal ZW3 spans at least three edges.

請同時參照第1圖及第3圖,第3圖繪示係為依照本發明第一實施例之一種伺服驅動器之控制方法之流程圖。伺服驅動器之控制方法包括如下步驟:首先如步驟410所示。脈寬處理電路330接收馬達編碼器10所輸出之Z相訊號SZ。接著如步驟440所示,脈寬處理電路330啟動記錄功能以記錄一Z相時程,並輸出可變寬度Z相訊號ZW。其中Z相時程係為分週A相訊號PA及分週B相訊號PB之邊緣個數。接著如步驟450所示,脈寬處理電路330檢測分週A相訊號PA或分週B相訊號PB之邊緣。Please refer to FIG. 1 and FIG. 3 simultaneously. FIG. 3 is a flow chart showing a control method of a servo driver according to the first embodiment of the present invention. The control method of the servo drive includes the following steps: First, as shown in step 410. The pulse width processing circuit 330 receives the Z-phase signal SZ output from the motor encoder 10. Next, as shown in step 440, pulse width processing circuit 330 initiates a recording function to record a Z-phase time course and output a variable width Z-phase signal ZW. The Z-phase time history is the number of edges of the weekly A-phase signal PA and the weekly B-phase signal PB. Next, as shown in step 450, the pulse width processing circuit 330 detects the edge of the weekly A-phase signal PA or the peripheral B-phase signal PB.

然後如步驟460所示,累加Z相時程。接著如步驟470所示,判斷Z相時程是否等於預設值。其中預設值例如等於3。若Z相時程等於預設值,則執行步驟480。於步驟480中,脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20。當脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20,脈寬處理電路330同時停止記錄功能,並將該Z相時程歸零。當步驟480執行完畢後,即重複執行步驟410。Then, as shown in step 460, the Z phase time history is accumulated. Next, as shown in step 470, it is determined whether the Z-phase time course is equal to a preset value. The preset value is for example equal to 3. If the Z-phase time course is equal to the preset value, step 480 is performed. In step 480, the pulse width processing circuit 330 stops outputting the variable width Z phase signal ZW to the upper controller 20. When the pulse width processing circuit 330 stops outputting the variable width Z-phase signal ZW to the upper controller 20, the pulse width processing circuit 330 simultaneously stops the recording function and zeroes the Z-phase time. When step 480 is performed, step 410 is repeated.

第二實施例Second embodiment

請同時參照第4圖及第5圖,第4圖繪示係為依照本發明第二實施例之一種伺服驅動器之控制方法之流程圖,第5圖繪示係為依照本發明第二實施例之一種伺服驅動器。此實施例之伺服驅動器40與第一實施例不同之處在於:此實施例中預設值與Z相時程係為時間值。此實施例之伺服驅動器其控制方法包括如下步驟:首先如步驟510所示。脈寬處理電路330接收馬達編碼器10所輸出之Z相訊號SZ。接著如步驟540所示,脈寬處理電路330啟動記錄功能以記錄一Z相時程,並輸出可變寬度Z相訊號ZW。其中預設值係為一時間值,而Z相時程則是記錄運轉時間。接著如步驟550所示,判斷Z相時程是否等於預設值。若Z相時程等於預設值,則執行步驟560。於步驟560中,脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20。當脈寬處理電路330停止輸出可變寬度Z相訊號ZW至上位控制器20,脈寬處理電路330同時停止記錄功能,並將該Z相時程歸零。當步驟560執行完畢後,即重複執行步驟510。Please refer to FIG. 4 and FIG. 5 simultaneously. FIG. 4 is a flow chart showing a control method of a servo driver according to a second embodiment of the present invention, and FIG. 5 is a second embodiment of the present invention. A servo drive. The servo driver 40 of this embodiment is different from the first embodiment in that the preset value and the Z-phase time history are time values in this embodiment. The control method of the servo driver of this embodiment includes the following steps: First, as shown in step 510. The pulse width processing circuit 330 receives the Z-phase signal SZ output from the motor encoder 10. Next, as shown in step 540, pulse width processing circuit 330 initiates a recording function to record a Z-phase time course and output a variable width Z-phase signal ZW. The preset value is a time value, and the Z-phase time history is the recording operation time. Next, as shown in step 550, it is determined whether the Z-phase time course is equal to a preset value. If the Z-phase time course is equal to the preset value, then step 560 is performed. In step 560, the pulse width processing circuit 330 stops outputting the variable width Z phase signal ZW to the upper controller 20. When the pulse width processing circuit 330 stops outputting the variable width Z-phase signal ZW to the upper controller 20, the pulse width processing circuit 330 simultaneously stops the recording function and zeroes the Z-phase time. When step 560 is performed, step 510 is repeated.

需特別說明的是,第二實施例之預設值係取決於馬達最高轉速及馬達編碼器10之解析度。馬達最高轉速之倒數與解析度之比值等於一時脈週期。預設值可預設為小於此時脈週期或是預設為小於此時脈週期之二分之一,該二分之一時脈週期=60/(解析度*最高轉速),然不以此為限。It should be particularly noted that the preset value of the second embodiment depends on the maximum motor speed and the resolution of the motor encoder 10. The ratio of the reciprocal of the maximum motor speed to the resolution is equal to one clock cycle. The preset value can be preset to be less than the pulse period or preset to be less than one-half of the pulse period, the one-half clock period = 60 / (resolution * maximum speed), but not This is limited.

第三實施例Third embodiment

請參照第6圖,第6圖繪示係為依照本發明第三實施例之訊號波形圖。前述第一實施例及第二實施例之伺服驅動器之控制方法係當Z相時程等於預設值時,停止輸出可變寬度Z相訊號ZW。然而,當馬達編碼器10所輸出之Z相訊號SZ的寬度大於脈寬處理電路330所設定的可變寬度Z相訊號ZW時,則脈寬處理電路330不對Z相訊號SZ進行處理,而直接輸出Z相訊號SZ至上位控制器20。其中,預設值與Z相時程可為分週A相訊號PA及分週B相訊號PB之邊緣個數或一時間值。Please refer to FIG. 6. FIG. 6 is a diagram showing signal waveforms according to a third embodiment of the present invention. The control method of the servo driver of the first embodiment and the second embodiment stops outputting the variable width Z-phase signal ZW when the Z-phase time course is equal to the preset value. However, when the width of the Z-phase signal SZ output by the motor encoder 10 is greater than the variable-width Z-phase signal ZW set by the pulse width processing circuit 330, the pulse width processing circuit 330 does not process the Z-phase signal SZ, but directly The Z-phase signal SZ is output to the upper controller 20. The preset value and the Z-phase time-course may be the edge number or a time value of the weekly A-phase signal PA and the weekly B-phase signal PB.

當前述預設值為1時,其可變寬度Z相訊號ZW如第6圖繪示之可變寬度Z相訊號ZW1;當前述預設值為2時,其可變寬度Z相訊號ZW如第6圖繪示之可變寬度Z相訊號ZW2;當前述預設值為3時,其可變寬度Z相訊號ZW如第6圖繪示之可變寬度Z相訊號ZW3。When the preset value is 1, the variable width Z-phase signal ZW is the variable-width Z-phase signal ZW1 as shown in FIG. 6; when the preset value is 2, the variable-width Z-phase signal ZW is as The variable width Z-phase signal ZW2 is shown in FIG. 6; when the preset value is 3, the variable-width Z-phase signal ZW is as shown in FIG. 6 as the variable-width Z-phase signal ZW3.

舉例來說,第1圖及第5圖繪示之Z相訊號SZ於第6圖係以Z相訊號Z表示。當Z相訊號Z之寬度大於可變寬度Z相訊號ZW1時,則脈寬處理電路330直接輸出Z相訊號Z至上位控制器20。相似地,當Z相訊號Z之寬度大於可變寬度Z相訊號ZW2時,則脈寬處理電路330直接輸出Z相訊號Z至上位控制器20。相反地,當Z相訊號Z之寬度小於可變寬度Z相訊號ZW3時,脈寬處理電路330持續輸出可變寬度Z相訊號ZW3直到Z相時程等於預設值。For example, the Z-phase signal SZ shown in FIGS. 1 and 5 is represented by the Z-phase signal Z in FIG. When the width of the Z-phase signal Z is greater than the variable-width Z-phase signal ZW1, the pulse width processing circuit 330 directly outputs the Z-phase signal Z to the upper controller 20. Similarly, when the width of the Z-phase signal Z is greater than the variable-width Z-phase signal ZW2, the pulse width processing circuit 330 directly outputs the Z-phase signal Z to the upper controller 20. Conversely, when the width of the Z-phase signal Z is smaller than the variable-width Z-phase signal ZW3, the pulse width processing circuit 330 continuously outputs the variable-width Z-phase signal ZW3 until the Z-phase time course is equal to the preset value.

本發明上述實施例所揭露之伺服驅動器及其控制方法能解決上位控制器讀取不到Z相訊號的問題,以確保馬達的正常工作。The servo driver and the control method thereof disclosed in the above embodiments of the present invention can solve the problem that the upper controller cannot read the Z-phase signal to ensure the normal operation of the motor.

另,於實施例中揭露,應用此提案技術之馬達驅動器可與各式編碼器相配合,可應用於常見之通訊型馬達編碼器、脈波型馬達編碼器等。In addition, it is disclosed in the embodiment that the motor driver applying the proposed technology can be matched with various encoders, and can be applied to a common communication type motor encoder, a pulse wave type motor encoder, and the like.

綜上所述,雖然本發明已以一較佳實施例揭露如上,然其並非用以限定本發明。本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾。因此,本發明之保護範圍當視後附之申請專利範圍所界定者為準。In view of the above, the present invention has been disclosed in a preferred embodiment, and is not intended to limit the present invention. A person skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention. Therefore, the scope of the invention is defined by the scope of the appended claims.

10...馬達編碼器10. . . Motor encoder

20...上位控制器20. . . Host controller

30、40...伺服驅動器30, 40. . . server Driver

310...分週電路310. . . Weekly circuit

330...脈寬處理電路330. . . Pulse width processing circuit

SA...A相訊號SA. . . Phase A signal

SB...B相訊號SB. . . Phase B signal

SZ、Z...Z相訊號SZ, Z. . . Z phase signal

PA...分週A相訊號PA. . . Weekly A phase signal

PB...分週B相訊號PB. . . Weekly B phase signal

ZW、ZW1、ZW2、ZW3...可變寬度Z相訊號ZW, ZW1, ZW2, ZW3. . . Variable width Z-phase signal

410、440、450、460、470、480、510、540、550、560...步驟410, 440, 450, 460, 470, 480, 510, 540, 550, 560. . . step

第1圖繪示係為伺服驅動器之局部示意圖。Figure 1 is a partial schematic view of a servo drive.

第2圖繪示係為伺服驅動器之訊號波形圖。Figure 2 shows the signal waveform of the servo driver.

第3圖繪示係為依照本發明第一實施例之一種伺服驅動器之控制方法之流程圖。3 is a flow chart showing a control method of a servo driver in accordance with a first embodiment of the present invention.

第4圖繪示係為依照本發明第二實施例之一種伺服驅動器之控制方法之流程圖。4 is a flow chart showing a control method of a servo driver in accordance with a second embodiment of the present invention.

第5圖繪示係為依照本發明第二實施例之一種伺服驅動器。Fig. 5 is a view showing a servo driver in accordance with a second embodiment of the present invention.

第6圖繪示係為依照本發明第三實施例之訊號波形圖。Figure 6 is a diagram showing signal waveforms in accordance with a third embodiment of the present invention.

410、440、450、460、470、480...步驟410, 440, 450, 460, 470, 480. . . step

Claims (10)

一種伺服驅動器之控制方法,包括:脈寬處理電路接收一馬達編碼器所輸出之一Z相訊號,並內設一預設值,該預設值為一邊緣個數或一時間值;該脈寬處理電路啟動記錄功能以記錄一Z相時程,並輸出一可變寬度Z相訊號;以及當該Z相時程等於該預設值,該脈寬處理電路停止輸出該可變寬度Z相訊號至一上位控制器;其中,當該預設值為該邊緣個數時,該預設值係小於等於3;其中,當該預設值為該時間值時,該預設值小於一時脈週期,該時脈週期等於一馬達最高轉速之倒數與該馬達編碼器之一解析度之比值。 A control method for a servo driver, comprising: a pulse width processing circuit receiving a Z-phase signal output by a motor encoder, and setting a preset value, the preset value being an edge number or a time value; The wide processing circuit starts a recording function to record a Z-phase time history and outputs a variable width Z-phase signal; and when the Z-phase time course is equal to the preset value, the pulse width processing circuit stops outputting the variable width Z-phase The signal is sent to an upper controller; wherein, when the preset value is the number of edges, the preset value is less than or equal to 3; wherein, when the preset value is the time value, the preset value is less than one clock The period, the clock period is equal to the ratio of the reciprocal of a maximum motor speed to the resolution of one of the motor encoders. 如申請專利範圍第1項所述之控制方法,其中當該脈寬處理電路停止輸出該可變寬度Z相訊號,並同時停止記錄功能,並將該Z相時程歸零。 The control method according to claim 1, wherein the pulse width processing circuit stops outputting the variable width Z-phase signal, and simultaneously stops the recording function, and zeroes the Z-phase time. 如申請專利範圍第2項所述之控制方法,更包括:根據一分週比將一A相訊號分週為一分週A相訊號並根據該分週比將一B相訊號分週為一分週B相訊號;以及檢測該分週A相訊號或該分週B相訊號之邊緣;以及當該分週A相訊號或該分週B相訊號之邊緣被檢出,累加該Z相時程。 For example, the control method described in claim 2 includes: dividing a phase A signal into a minute A phase signal according to a minute and dividing a phase B signal into one according to the minute ratio. a weekly B-phase signal; and detecting the edge of the weekly A-phase signal or the peripheral B-phase signal; and when the edge of the weekly A-phase signal or the peripheral B-phase signal is detected, accumulating the Z-phase Cheng. 如申請專利範圍第1項所述之控制方法,其中該Z相時程係為記錄運轉時間。 The control method according to claim 1, wherein the Z-phase time history is a recording operation time. 如申請專利範圍第1項所述之控制方法,其中當 該Z相訊號之寬度大於該可變寬度Z相訊號,該脈寬處理電路輸出該Z相訊號至該上位控制器。 For example, the control method described in claim 1 of the patent scope, wherein The width of the Z-phase signal is greater than the variable-width Z-phase signal, and the pulse width processing circuit outputs the Z-phase signal to the upper controller. 一種伺服驅動器,包括:一分週電路,用以接收馬達編碼器所輸出之A相訊號與B相訊號,與輸出一分週A相訊號與一分週B相訊號;以及一脈寬處理電路內設有一預設值,用以接收馬達編碼器所輸出之一Z相訊號,且啟動記錄功能以紀錄一Z相時程,並輸出該可變寬度Z相訊號,當該Z相時程等於該預設值,脈寬處理電路停止輸出該可變寬度Z相訊號至一上位控制器,該預設值為一邊緣個數或一時間值:其中,當該預設值為該邊緣個數時,該預設值係小於等於3;其中,當該預設值為該時間值時,該預設值小於一時脈週期,該時脈週期等於一馬達最高轉速之倒數與該馬達編碼器之一解析度之比值。 A servo driver comprising: a minute circuit for receiving A phase signal and B phase signal output by a motor encoder, and outputting a minute A phase signal and a minute B phase signal; and a pulse width processing circuit A preset value is provided for receiving one Z-phase signal output by the motor encoder, and a recording function is started to record a Z-phase time course, and the variable-width Z-phase signal is output, when the Z-phase time course is equal to The preset value, the pulse width processing circuit stops outputting the variable width Z-phase signal to an upper controller, and the preset value is an edge number or a time value: wherein, when the preset value is the edge number The preset value is less than or equal to 3; wherein, when the preset value is the time value, the preset value is less than a clock cycle, and the clock cycle is equal to a reciprocal of a motor maximum speed and the motor encoder A ratio of resolutions. 如申請專利範圍第6項所述之伺服驅動器,其中當該脈寬處理電路停止輸出該可變寬度Z相訊號,並同時停止記錄功能,並將該Z相時程歸零。 The servo driver of claim 6, wherein the pulse width processing circuit stops outputting the variable width Z-phase signal and simultaneously stops the recording function, and zeroes the Z-phase time. 如申請專利範圍第7項所述之伺服驅動器,其中該分週電路根據一分週比將一A相訊號分週為一分週A相訊號並根據該分週比將一B相訊號分週為一分週B相訊號,該脈寬處理電路判斷該分週A相訊號或該分週B相訊號之邊緣是否被檢出,當該分週A相訊號或該分週B相訊號之邊緣被檢出,累加該Z相時程。 The servo driver according to claim 7, wherein the weekly circuit divides an A-phase signal into a sub-cycle A-phase signal according to a minute-to-week ratio and divides a B-phase signal according to the sub-week. For a weekly B-phase signal, the pulse width processing circuit determines whether the edge of the weekly A-phase signal or the peripheral B-phase signal is detected, when the peripheral A-phase signal or the edge of the peripheral B-phase signal is detected. Checked out, accumulating the Z phase time course. 如申請專利範圍第6項所述之伺服驅動器,其中該Z相時程係為記錄運轉時間。 The servo drive of claim 6, wherein the Z-phase time history is a recording operation time. 如申請專利範圍第6項所述之伺服驅動器,其中當該Z相訊號之寬度大於該可變寬度Z相訊號,該脈寬處理電路輸出該Z相訊號至該上位控制器。The servo driver according to claim 6, wherein the pulse width processing circuit outputs the Z phase signal to the upper controller when the width of the Z phase signal is greater than the variable width Z phase signal.
TW99112062A 2010-04-16 2010-04-16 Servo driver and controlling method thereof TWI403083B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW99112062A TWI403083B (en) 2010-04-16 2010-04-16 Servo driver and controlling method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW99112062A TWI403083B (en) 2010-04-16 2010-04-16 Servo driver and controlling method thereof

Publications (2)

Publication Number Publication Date
TW201138289A TW201138289A (en) 2011-11-01
TWI403083B true TWI403083B (en) 2013-07-21

Family

ID=46759814

Family Applications (1)

Application Number Title Priority Date Filing Date
TW99112062A TWI403083B (en) 2010-04-16 2010-04-16 Servo driver and controlling method thereof

Country Status (1)

Country Link
TW (1) TWI403083B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4373697A (en) * 1980-12-29 1983-02-15 Caterpillar Tractor Co. Pulse width modulated constant current servo driver
TW200713790A (en) * 2005-09-28 2007-04-01 Delta Electronics Inc AC servo drive without current sensor
US7224139B2 (en) * 2003-01-29 2007-05-29 Harmonic Drive Systems Inc. Servo driver and encoder signal processing IC

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4373697A (en) * 1980-12-29 1983-02-15 Caterpillar Tractor Co. Pulse width modulated constant current servo driver
US7224139B2 (en) * 2003-01-29 2007-05-29 Harmonic Drive Systems Inc. Servo driver and encoder signal processing IC
TW200713790A (en) * 2005-09-28 2007-04-01 Delta Electronics Inc AC servo drive without current sensor

Also Published As

Publication number Publication date
TW201138289A (en) 2011-11-01

Similar Documents

Publication Publication Date Title
CN103575312B (en) A kind of fluttering method that disappears of the incremental optical-electricity encoder for photoelectric turntable
CN109546808B (en) Steering engine and method for reducing virtual position of steering engine
US20200206936A1 (en) Servo output shaft rotational angle calibration method and system and robot using the same
US10921767B2 (en) Encoder system
CN107101607A (en) Motor rotation angle measurement device and method
US20170195754A1 (en) Sensor subassembly and method for sending a data signal
JP5217766B2 (en) Angular position detection device and rotation number detection device of rotating body
JP6757287B2 (en) Speed detector
TWI403083B (en) Servo driver and controlling method thereof
US9684616B2 (en) Motor control apparatus and motor control method
JP4782434B2 (en) Rotation detection device signal processing device
US9134143B2 (en) Absolute position detector with abnormality detection function
JP2001336951A (en) Rotational position detecting apparatus and method
JP7153767B2 (en) power converter
CN102237836B (en) Servo driver and control method thereof
JP3676350B2 (en) Motor speed control apparatus and method
JP2010093895A (en) Rotor drive control device
CN114518782A (en) Micro control unit, motor rotating speed measuring method and system and storage medium
JP3010095B2 (en) How to read rotary encoder with click
CN100448156C (en) Brake control method of DC electromotor with brush without Hall subassembly, and system
US9455656B2 (en) Motor controllers
JP4867534B2 (en) Motor speed detection device
US20110192225A1 (en) method for the dnyanmically adapted recording of an angular velocity using a digital angular position transducer
EP2977727B1 (en) Field programmable gate array based brushless dc motor speed detector
CN217716276U (en) Position signal redundancy detection circuit and vehicle with same