TW200917643A - Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof - Google Patents

Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof Download PDF

Info

Publication number
TW200917643A
TW200917643A TW96137084A TW96137084A TW200917643A TW 200917643 A TW200917643 A TW 200917643A TW 96137084 A TW96137084 A TW 96137084A TW 96137084 A TW96137084 A TW 96137084A TW 200917643 A TW200917643 A TW 200917643A
Authority
TW
Taiwan
Prior art keywords
stepping motor
acceleration
deceleration
interval
pulse signal
Prior art date
Application number
TW96137084A
Other languages
Chinese (zh)
Other versions
TWI339003B (en
Inventor
Wen-Shang Chuang
Original Assignee
Kinpo Elect Inc
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 Kinpo Elect Inc filed Critical Kinpo Elect Inc
Priority to TW96137084A priority Critical patent/TWI339003B/en
Publication of TW200917643A publication Critical patent/TW200917643A/en
Application granted granted Critical
Publication of TWI339003B publication Critical patent/TWI339003B/en

Links

Landscapes

  • Control Of Stepping Motors (AREA)

Abstract

A method for controlling acceleration and deceleration of a stepping motor and function generating apparatus thereof are provided. The method includes the following steps. Firstly, a plurality of accelerating interval times and a plurality of decelerating interval times are calculated according to a controlling function. Modulating the time, in which the stepping motor moves step by step, through accelerating interval times and decelerating interval times. Therefore, the present invention efficiently decreases the damage of the stepping motor.

Description

^352twf.doc/p 200917643 九、發明說明: 【發明所屬之技術領域】 本發明是有關於一種步進馬達加減速的控制方法,且 特別是有’-齡進馬達非線性加減速的控制方法。 【先前技術】 、隨著電機工業近百年來的發展,各種規格與種類的馬 達廣泛應驗不同領域。由於步進馬達具有良好的角度定 位控制特性,且具有成本低、㈣造的優點。因此,步進 馬達可以廣泛應用於各種生產、製造、檢驗設備及消費性 電子產品等需具有移動能力及定位雜的驅動裝置。 、步進馬達之所以具有定位特性,係因其在驅動時是以 逐齒運動的方式進行’是以可藉轉動齒數的控制與累積來 產生良好的定位特性’但也由於其在轉動時是藉由磁場變 =所產生之逐齒移動所發生,是以若需増加其轉速,則需 藉由乓加所輸入的脈衝訊號的頻率來控制其增加的轉速。 反之’若欲減少其轉速,則需藉由減少所輸人的脈衝訊號 的頻率來控制其減少的轉速。 ^圖1繪示為習知步進馬達線性加減速的曲線圖。請參 :圖1 ’可以發現,習知步進馬達在由加速切換到等速時, 會^生尖銳的角度。此尖銳的角度會隨著加速時的斜率而 改邊。然而,若加速的斜率過大,容易對步進馬達造成過 大的負擔,進而造成步進馬達損害與噪音的產生。 200917643 r352twf.doc/p 圖2繪不為相對應於圖}之習知 線圖。請參照圖2,可看 白★步進馬達的加速度曲 度的數值會由數值75直線^ ^達於第127步時,加速 產生過大的力矩,進而增加步降進^、=此劇烈的改變,會 由上述可知“=步的可能性。 會產生尖銳的角度與劇列加、亲 订加減速的控制時, 達的損害與失步的產生、。'、二1改變,進而造成步進馬 在進行加減速時的域=何有效地控制步進馬達 時所要面臨的重要課題之成為各廠商在發展步進馬達 【發明内容】 本發明提供:_ # i、& :進馬達於加速域速 進行裝置,產生步進馬達在 本發明提出—種牛、 列步驟:依據一二進馬達加減速之控制方法,包括下 個減速間隔時間j錢計#出N個加速間隔時間與Μ 述加速間隔時門鱼、中Ν、與Μ為大於0之整數。利用上 (N+M+S)個轉、^述減速間隔時間,調變步進馬達在 預定運轉至笫.ν數中逐步移動的時間。當上述步進馬達 時間之步驟包括個^動步數時’調變步進馬達逐步移動的 變步進馬達,、田時,利用第i個加速間隔時間調 U致使步進馬達加速。f N<i$(N+S)時, i352twf.doc/p 200917643 利用第N個加速間隔時間調變步進馬達,以致使步進馬達 保持一定的轉速。當(N+S) < i S (N+M+S)時,利用第 (N+M+S+1-i)個減速間隔時間調變步進馬達,以致使步進 馬達減速’其中S為大於〇之整數、i為整數且 (N+M+S)。 — 本發明提出一種配合上述之步進馬達加減速的控制方 法的函數產生裝置。此函數產生裝置包括乘法器、除法器、 加法益。乘法為具有第一輸入訊號端、第二輸入訊號端及 第一輸出端,其中,上述第二訊號端耦接至上述第一輸出 端。上述乘法器用以將第一訊號端所接收的特定數值與第 二訊號端上的數值進行乘法運算。除法器具有第一傳輸 端、第^輸端及第二輸出端,其中,上述第一傳輸端耦 接至上述第-輸出端。上述除法器用以將第二傳輸端所接 收的最大間隔時間TS以乘法器所輸出的數值。加法器用 以將除法輯輸出的數值與最小間隔時間τ相加,並據以 產生控制,數y。*上述特定數料y〃時,則控制函數 為.+ ’ ’其中,X代表步進馬達的步數,y代表步 P代表微調收斂因子,q代表粗 進馬達加減速的間隔時間 調收斂因子。 所控制函數,計算出致使步進馬達轉動時 二;二日’間與減速間隔時間,並依據上述加速間 間調變步進馬達,使得步進馬達於加 速切換至核或是料切魅減_,可呈現較為平滑的 200917643 t352twf.d〇c/p s進成::r制方法將可避免劇烈加速度 舉較上述特徵和優點能更明顯易懂,下文特 ,並配合所附圖式,作詳細說明如下。 【實施方式】 知技射,步進馬達是叫性加減速的方式驅 $、、^ 進馬達轉動由加速娜至等速或是由等速切換 卢會產生劇烈加速度的情況,而對步進馬達造成 =°因此’本發_主要技婦徵是騎上述缺失產生 立二制函數,並藉由此控制函數來對步進馬達於加減速的 邛刀進行调整,進而避免劇烈加速度及失步情況對步進馬 達所造成的損害。以下將列舉說明本發日狀步進馬達加減 相,制方法’但其並非用錄定本發明,熟習此技術者 可依照本發明之精神對下述實施例稍作修飾,惟其仍屬於 本發明之範圍。 在以實施例說明本發明的精神之前,首先假設以下實 施例所列舉之控制函數將對應產生如圖3所示的曲線圖。 請麥照圖3,圖3中的縱軸為脈衝間隔時間,橫轴為步進 馬達一次轉動的步數。由圖3中可看出,當步進馬達一次 轉動的步數越少,則脈衝間隔時間越大,亦即步進馬達轉 動速度較慢。反之,當步進馬達一次轉動的步數越多,則 脈衝間隔時間越小,亦即步進馬達轉動速度較快。 200917643 4352twf.doc/p 值得注意的是,用以產生如圖3所示之曲線圖的控制 函數如下所示: 户士+ ’ 、其中,T代表最大間隔時間、I代表最小間隔時間、χ 代表步進馬賴步數、y代表步進馬達加減速的間隔時 間、P代表微調收斂因子、q代表粗調收敛因子。在此,孰 習此技術者可藉由改變微驗賴子p與_收敛因子 q,來s周整上述控制函數的收斂速度。 為了印證上述控制函數與圖3的關係。首先假設上述 控制函數中的 T=260,000、p=2、q=6、Ι=5〇〇、χ=1, 2, 3,, ^代入上述控制函數中’可獲得如圖4所示之曲線圖。請 ’照圖4’圖4中的縱軸為脈衝間隔時間,單位為夺秒 (nan〇See°nd’㈣;圖4中的橫轴為步進馬達的步數。上述 ^ 4所產生的結果’可作為控制步進馬達加減速所需的加 ===及減速間隔時間的依據’以對步進馬達進行加 減迷的調整。 w 述已&明如何打&步進馬達所需的加速間隔時間 Ϊ減賴隔時間。以下將舉例·步進馬達加減速的操作。 弟一貫施例 圊5、曰示為本發明第—實施例之脈衝訊號的頻率對步 Ϊ的參照圖5,圖5中的縱軸為脈衝訊號的頻 …早:、、、ζ,圖5中的橫軸為步進馬達的步數。曲 S1〜S3分別表不在不同的粗調收斂因子(俨6、8、丨〇)下所 產生脈衝訊號的頰率曲線。為了方便說明,以曲線S1為 200917643 (352twf.doc/p 例而步進馬達總共轉動的步數為% 頻率範圍為500Hz〜5000HZ。:^ u且脈衝— 虎的 速步數為236步、減速步數為^步加速步數為58步、等 數,即接可速步Λ錢麵細數值彳认上述控制函 門Ps日士 以°周'步進馬達加減速所需的58個加速 間隔日守間與58個間隔減速間隔時間。之後,暫存上述% 個加速間隔_與5 8 _隔減速_時間,以·上述之 加速間隔時間與減速間隔時間,來調變步進馬達在352個 1動步數中逐步移動的時間。其中,在調變步進馬達逐步 移動的時間,又分為加速、等速及減速3個部分。而驅動 步進馬達逐步移動的方式如下所述。 睛合併參照圖4與圖5。首先,假設步進馬達在加速 的過程中,會運轉58個轉動步數,且每一個轉動步數都會 對應一加速間隔時間。換而言之,此時步進馬達的加速步 數相等於,其在加速的過程所需的轉動步數,也就是當步 進馬達運轉至第1個轉動步數時,就相當於其運轉至第i 步。舉例而言,當步進馬達需運轉至第1個轉動步數時, 則藉由等待第1個加速間隔時間後所產生一脈衝訊號,來 使得步進馬達依據此脈衝訊號轉動一步至第1個轉動步 數。當步進馬達需運轉至第2個轉動步數時’則藉由等待 第2個加速間隔時間後再次產生/脈衝訊號,來使得步進 馬達依據此脈衝訊號加速再次轉動一步至第2個轉動步 數。相似地’當步進馬達需運轉炱第3個轉動步數時,將 藉由等待第3個加速間隔時間後存次產生一脈衝訊號,來 4352twf.doc/p^352twf.doc/p 200917643 IX. Description of the Invention: [Technical Field] The present invention relates to a control method for stepping motor acceleration and deceleration, and in particular to a control method for nonlinear acceleration and deceleration of an 'in-age motor . [Prior Art] With the development of the motor industry in the past 100 years, various specifications and types of motors have been widely used in different fields. Because the stepping motor has good angular positioning control characteristics, it has the advantages of low cost and (4) manufacturing. Therefore, the stepping motor can be widely used in various production, manufacturing, inspection equipment, and consumer electronic products, etc., which have mobility and positioning. The reason why the stepping motor has the positioning characteristic is that it is driven by the tooth-by-tooth movement during the driving, so that it can generate good positioning characteristics by controlling and accumulating the number of rotating teeth, but also because it is rotating. The tooth-tooth movement caused by the magnetic field change= occurs, so that if the rotation speed is increased, the frequency of the pulse signal input by the pendulum is controlled to increase the rotation speed. On the other hand, if you want to reduce the speed, you need to control the reduced speed by reducing the frequency of the pulse signal of the input person. FIG. 1 is a graph showing linear acceleration and deceleration of a conventional stepping motor. Please refer to Fig. 1 ' to find that the conventional stepper motor will produce a sharp angle when switching from acceleration to constant speed. This sharp angle changes with the slope of the acceleration. However, if the slope of the acceleration is too large, it is likely to cause an excessive load on the stepping motor, which may cause damage to the stepping motor and noise. 200917643 r352twf.doc/p Figure 2 is not a conventional line diagram corresponding to Figure}. Please refer to Figure 2, you can see that the value of the acceleration curvature of the white stepping motor will be increased from the value of 75 straight line ^ ^ to the 127th step, accelerating the generation of excessive torque, and thus increasing the step drop into ^, = this dramatic change From the above, we can know the possibility of "= step. It will produce a sharp angle and the control of the drama and the acceleration and deceleration, and the damage and the loss of the step will be generated." The field in which the horse is performing acceleration/deceleration = the important problem that must be faced when effectively controlling the stepping motor becomes a stepping motor developed by various manufacturers. [Invention] The present invention provides: _ # i, & The field speed device and the stepping motor are generated in the present invention. The method of controlling the cattle and the column is based on the control method of the acceleration and deceleration of the two-in-one motor, including the next deceleration interval time, and the acceleration interval and the acceleration. At the interval, the gate fish, the middle jaw, and the cymbal are integers greater than 0. Using the upper (N+M+S) revolutions and the deceleration interval time, the modulating stepping motor moves step by step from the predetermined operation to the 笫.ν number. Time. When the above stepper motor time step The step includes a variable stepping motor in which the stepping motor is gradually moved when the number of steps is changed, and the time is adjusted by the i-th acceleration interval to accelerate the stepping motor. f N<i$(N+S When, i352twf.doc/p 200917643 uses the Nth acceleration interval to modulate the stepper motor so that the stepper motor maintains a certain speed. When (N+S) < i S (N+M+S) Using the (N+M+S+1-i) deceleration interval time to modulate the stepping motor to cause the stepping motor to decelerate 'where S is an integer greater than 〇, i is an integer and (N+M+S) The present invention provides a function generating device that cooperates with the above-described control method for stepping motor acceleration and deceleration. The function generating device includes a multiplier, a divider, and a adding benefit. The multiplication has a first input signal end and a second input signal end. And the first output end, wherein the second signal end is coupled to the first output end. The multiplier is configured to multiply a specific value received by the first signal end and a value on the second signal end. Having a first transmission end, a second transmission end, and a second output end, wherein the first transmission The first divider is coupled to the maximum interval time TS received by the second transmission end as a value output by the multiplier. The adder is configured to add the value of the division output to the minimum interval time τ. And according to the control, the number y. * When the above specific number is y〃, then the control function is .+ ' ' where X represents the number of steps of the stepper motor, y represents the step P represents the fine adjustment convergence factor, and q represents the coarse advance The acceleration and deceleration interval of the motor accelerates and decelerates. The control function calculates the stepping motor when the stepping motor rotates; the interval between the two days and the deceleration interval time, and according to the above-mentioned acceleration inter-step modulation stepping motor, the stepping motor is Accelerated switching to the core or material cut charm _, can present a relatively smooth 200917643 t352twf.d 〇 c / ps into the ::: r method will avoid the violent acceleration than the above features and advantages can be more obvious and easy to understand, below Specifically, in conjunction with the drawings, a detailed description will be given below. [Embodiment] Knowing the technical shooting, the stepping motor is called the acceleration/deceleration mode to drive the $, , ^ into the motor to rotate from the acceleration to the constant speed or by the constant speed switching Lu will produce severe acceleration, and the stepping The motor causes = ° so the 'this hair _ main technical woman's sign is to ride the above-mentioned missing to create a vertical two-function function, and by this control function to adjust the stepping motor on the acceleration and deceleration boring tool, thereby avoiding violent acceleration and loss of synchronization The damage caused by the situation to the stepper motor. In the following, the present invention will be described with reference to the present invention. However, it is not intended to describe the present invention. Those skilled in the art can modify the following embodiments in accordance with the spirit of the present invention, but still belong to the present invention. range. Before explaining the spirit of the present invention by way of example, it is first assumed that the control functions recited in the following embodiments will correspondingly produce a graph as shown in FIG. Please refer to Fig. 3, the vertical axis in Fig. 3 is the pulse interval time, and the horizontal axis is the number of steps in which the stepping motor rotates once. As can be seen from Fig. 3, the smaller the number of steps of the stepping motor in one rotation, the larger the pulse interval time, that is, the stepping motor has a slower rotation speed. Conversely, when the number of steps of the stepping motor is rotated at a time, the smaller the pulse interval time, that is, the stepping motor rotates faster. 200917643 4352twf.doc/p It is worth noting that the control function used to generate the graph shown in Figure 3 is as follows: House + ', where T represents the maximum interval time, I represents the minimum interval time, χ represents Stepping steps, y is the interval between stepping motor acceleration and deceleration, P is the fine tuning convergence factor, and q is the coarse convergence factor. Here, those skilled in the art can adjust the convergence speed of the above control function by changing the micro-test sub-p and the _ convergence factor q. In order to confirm the relationship between the above control function and FIG. First, suppose that T=260,000, p=2, q=6, Ι=5〇〇, χ=1, 2, 3, , ^ in the above control function are substituted into the above control function to obtain the curve shown in Figure 4. Figure. Please use the vertical axis in Figure 4 as the pulse interval time, the unit is the seconds (nan〇See°nd' (four); the horizontal axis in Figure 4 is the number of steps of the stepper motor. The result 'can be used as the basis for controlling the acceleration and deceleration of the stepping motor and the deceleration interval time' to adjust the deceleration of the stepping motor. w Describing the & The acceleration interval is reduced by the interval. The following is an example of the operation of stepping motor acceleration and deceleration. The same applies to the example of the pulse of the pulse signal of the first embodiment of the present invention. The vertical axis in Fig. 5 is the frequency of the pulse signal... Early:,,, ζ, the horizontal axis in Fig. 5 is the number of steps of the stepping motor. The songs S1 to S3 respectively indicate different coarse convergence factors (俨6 , 8, 丨〇) The buccal rate curve of the pulse signal generated. For convenience of explanation, the curve S1 is 200917643 (352 twf.doc/p example and the stepping motor has a total number of steps of rotation of the frequency range of 500 Hz to 5000 Hz. :^ u and pulse - the number of quick steps of the tiger is 236 steps, the number of steps of the deceleration is step by step, the number of steps is 58 steps, etc. , that is, the speed parameter of the speed step can be recognized as the above-mentioned control letter Ps. The 58th acceleration interval and the 58 interval deceleration interval required for the stepping motor acceleration and deceleration of the week. The above-mentioned % acceleration interval _ and 5 8 _interval deceleration _ time are used to adjust the time during which the stepping motor moves step by step in 352 1 moving steps. The time for stepping up the stepping motor is divided into three parts: acceleration, constant speed and deceleration. The way to drive the stepping motor to move step by step is as follows. The eye is combined with reference to Fig. 4 and Fig. 5. First, assume stepping During the acceleration process, the motor will run 58 rotation steps, and each number of rotation steps will correspond to an acceleration interval. In other words, the number of acceleration steps of the stepping motor is equal to that during the acceleration process. The number of steps required, that is, when the stepper motor is operated to the first number of steps, is equivalent to its operation to step i. For example, when the stepper motor needs to run to the first number of steps By waiting for the first acceleration interval A pulse signal is generated after the interval, so that the stepping motor rotates one step according to the pulse signal to the first rotation step. When the stepping motor needs to run to the second rotation step, 'by waiting for the second acceleration After the interval time, the /pulse signal is generated again, so that the stepping motor accelerates one step to the second number of rotation steps according to the pulse signal. Similarly, when the stepping motor needs to be operated, the third number of rotation steps will be borrowed. A pulse signal is generated after waiting for the third acceleration interval, to 4352twf.doc/p

200917643 致使步進馬達依據此脈衝訊號加速再次轉動一 轉動步數。 j個 以此類推,可以發現,步進馬達從第i步運轉 步時’是轉線性的方式進行加速,並歸進馬達』 ,近58步時’脈衝訊_頻率轉S1呈現較平 態。由於加速間隔時間的大小為:第j個加速間隔時間 2個加速間隔時間>.·.〉第58個加速間隔時間,且呈 線性的遞減。因此’依據圖4將所有的脈衝間隔時』 倒數(1/第X個脈衝間隔時間,4整數且GG58) ς 對應的推得如圖5之第丨步至第58步脈衝訊號的頻率 圖5中’可以看轉著脈衝訊號的鮮不斷地增加 進馬達處於加速的過程。 Υ 、在步進馬達運轉至第58步後,則開始進行等速的 刀為了使步進馬達處於等速的狀態,因此, 進馬達運轉至第58步時的狀態。也就是說,在; 至第綱步中’當步進馬達需運轉至第 守則藉由等待第58個加速間隔時間後產生一脈衝訊 號’來使得步進馬達依據此脈衝訊號轉動-步至第59個轉 ^步數=晴地’當步進馬達需運轉至第6Q個轉動步數 也是藉由等待第58個加速間隔時間後產生—脈衝訊 〜來使得步進馬達依據此脈衝訊號轉動一步至第60個韓 動步數。 w 換而言之,步進馬達從第59個轉動步數(第59步)運 轉至第294個轉動步數(第294步)的過程中,其運轉每一 11 200917643 1352twf.doc/p 故此時的步進馬達處於等 步所需等待的間隔時間都相同 速的過程。 在進行解說步進馬達的減速過程時, 由於減速間隔時間也是依據上述控制^ 了解到’ 對照圖4後,可發現減賴隔_的 〃生’故在與 隔時間〉第2個減速間隔時間 > .. 、為:弟1個減速間 間’且呈現非線性的遞減。且知,步 Γ:第Γ運轉每一步所需等待的間隔時間二^ 2第?二弟:個減速間隔時間依序被利用的順序,將 : 《58個加速間隔時間相反,也就是說,本實施例 =依序利用第58、57、56、··.、1個減速間隔時間,來致 使步進馬達進行減速。 舉例而言,繼續參關4與圖5,#步進馬達需運轉 至第295個轉動步數時,則藉由等待第58個減速間隔時間 後所產生-脈衝喊,來致使步進馬達依據此脈衝訊號轉 動一步至第295個轉動步數。當步進馬達需運轉至第2% 個轉動步數時,則藉由等待第57個減速間隔時間後再次產 生一脈衝訊號,來使得步進馬達依據此脈衝訊號減速再次 轉動一步至弟296個轉動步數。相似地,當步進馬達需運 轉至第297個轉動步數時’將藉由等待第56個減速間隔時 間後再次產生一脈衝訊號,來致使步進馬達依據此脈衝訊 號減速再次轉動一步至第297個轉動步數。 以此類推,可以發現,步進馬達從第295個轉動步數 (第295步)運轉至第352個轉動步數(第352步)的過程中, 12 200917643 4-352twf.do〇/p 其運轉每一步所需等待的間隔時間斷地 達處於減速的狀態。此外,步進馬達是以非^性 行減速,並且與其在加速的部分對稱。由上述的結果可看 ,,步進馬達在逐步移動後,由加速切換至等速日^以及由 等速切換至減速時,會呈現較為平滑的狀態。如此一來, 則可避免步進馬達失步與對機構造成過大的負擔。 ^圖6繪示為相對於圖5之步進馬達的加速度曲線圖。 f i 請參考圖6,其中,橫轴表示步進馬達的步數,縱轴表示 加速度,且曲線S4〜S6分別表示粗調收斂因子浐6、8、1〇 ,加速度曲線。由圖6中可看出,步進馬達的加速度的曲 線較為緩和,不會有劇烈加速度的改變。相較於圖2習知 技術所繪示之加速度曲線,習知步進馬達轉動至某一步(亦 即第127步)時,會產生劇烈加速度的改變(亦即加速度的 數值由數值75下降至〇).因此,本實施例可有效地改善 劇烈加速度的改變。 經由上述實施例中,可歸納出一種步進馬達加減速的 ( 控制方法,此控制方法如下所述。圖7A繪示為本發明實 施例之步進馬達加減速之控制方法流程圖。請參照圖7A, 在步驟S700中,提供微調收斂因子p、粗調收斂因子q、 最大間隔時間T、最小間隔時間I、控制函數少+ /, 其中,X代表步進馬達的步數,y代表步進馬達加減速的間 隔時間。 在步驟S710中,依據上述控制函數計算出N個加速 間隔時間與Μ個減速間隔時間,其中仅與乂為大於〇之 13 O52twf.doc/p 200917643 整數。在步驟S720巾,暫存上述N個加速間隔時間與上 述y個減速間隔時間。在步驟S73〇 +,利用上述加速間 隔時間與上述減速間隔時間,調變步進馬達在(N+M+S)個 轉動步數中逐步移動的時間。其中,當步進馬達預定運轉 至第i個轉動步數時,調變步進馬達逐步移動的時間的步 驟如圖7B所示。 請參照圖7B,在步驟S731中,初始化丨的數值,其 中i為整數且〇<ig(N+M+S)。在步驟S732中,當i$N 時,利用第i個加速間隔時間調變步進馬達,以致使步進 馬達加速。舉例而言,當步進馬達預定運轉至第i個轉動 步數’且i^N時’在步驟S732中,可利用等待第i個加 速間隔時間後所產生的一脈衝訊號’來致使步進馬達依據 此脈衝訊號轉動一步至第i個轉動步數。 在步驟S733中,當N<i$(N+S)Bf,利用第N個加 速間隔時間調變步進馬達,以致使步進馬達保持一定的轉 速。舉例而言’當步進馬達預定運轉至第i個轉動步數, 且N<iS(N+S)時,在步驟S733中,可利用等待第N個加 速間隔時間後所產生的一脈衝訊號,來致使步進馬達依據 此脈衝訊號轉動一步至第i個轉動步數。 在步驟S734中,當(N+S)<i^(N+M+S)時,以致使步 進馬達減速,其中S為大於0之整數、1為整數且〇<i$ (N+M+S)。舉例而言,當步進馬達預定運轉至第i個轉動 步數,且(N+S)<i$(N+M+S)時,在步驟S734中’可利用 等待第(N+M+S+1-i)個減速間隔時間後所產生的一脈衝訊 14 4352twf.doc/p 200917643 號,來致使步進馬達依據此脈訊號轉動—步至第i個轉動 步數。 接著’只需將流程圖中的變數設為與上述數值相同, 也就是設定 N=58、M=236,S=58、T=260,〇〇〇、p=2、q=6、 1=500、x=l,2, 3,…’即可得出第一實施例之步進馬達加 減速的結果。 Π 另外,步進馬達可採用階梯狀加減速方式時,亦即200917643 causes the stepper motor to accelerate by one revolution step according to the pulse signal. j and so on, it can be found that the stepping motor is accelerated from the step of the i-th step, and is accelerated to the motor, and the motor is turned into a flat state in the last 58 steps. Since the acceleration interval time is: the jth acceleration interval time 2 acceleration interval times >..> the 58th acceleration interval time, and is linearly decreasing. Therefore, according to Fig. 4, all the pulse intervals are reciprocal (1/Xth pulse interval time, 4 integers and GG58) 对应 correspondingly push the frequency of the pulse signal as shown in Fig. 5 to step 58. In the middle of 'can see the pulse signal, the fresh increase into the motor is accelerating. 、 After the stepping motor has been operated until the 58th step, the knife of the constant speed is started to make the stepping motor at the same speed. Therefore, the motor is moved to the state at the 58th step. That is to say, in the first step, 'When the stepping motor needs to run until the code is issued, wait for the 58th acceleration interval to generate a pulse signal' to make the stepping motor rotate according to the pulse signal-step to the first 59 rotation steps = clear ground 'When the stepping motor needs to run to the 6th rotation step, it is also generated by waiting for the 58th acceleration interval - pulse signal to make the stepping motor rotate one step according to the pulse signal To the 60th Korean step. w In other words, the stepper motor runs from the 59th rotation step (step 59) to the 294th rotation step (step 294), and its operation is 11 200917643 1352twf.doc/p. When the stepping motor is in the same step, the waiting time is the same speed. When explaining the deceleration process of the stepping motor, since the deceleration interval time is also based on the above control ^ knows that, after comparing with Fig. 4, the deceleration interval _ can be found, so the second deceleration interval between the time interval and the interval > .. , is: between the two decelerations of the brother' and exhibits a nonlinear decrement. And know, step Γ: the interval between the waiting for each step of the second operation is 2^2? Second brother: The order in which the deceleration interval is used in sequence will be: "The 58 acceleration intervals are reversed, that is, this embodiment = sequentially use the 58th, 57th, 56th, ..., 1 deceleration interval Time to cause the stepper motor to slow down. For example, continue to participate in 4 and Figure 5, when the # stepper motor needs to run to the 295th step, the stepper motor is caused by waiting for the pulse after the 58th deceleration interval. This pulse signal is rotated one step to the 295th step. When the stepping motor needs to run to the 2%th rotation step, the stepping motor is rotated one step further according to the pulse signal by waiting for the 57th deceleration interval to generate a pulse signal again. Turn the number of steps. Similarly, when the stepping motor needs to run to the 297th turning step, 'will generate a pulse signal again after waiting for the 56th deceleration interval time, causing the stepping motor to rotate one step further according to the pulse signal deceleration. 297 rotation steps. By analogy, it can be found that the stepping motor runs from the 295th turning step (step 295) to the 352th turning step (step 352), 12 200917643 4-352twf.do〇/p The interval between waiting for each step of operation is decelerated. In addition, the stepping motor is decelerated in a non-linear manner and is symmetrical with its portion in acceleration. It can be seen from the above results that the stepping motor will be in a relatively smooth state after being gradually shifted from the acceleration to the constant speed day and from the constant speed to the deceleration. In this way, stepping motor out of step and excessive load on the mechanism can be avoided. FIG. 6 is a graph showing an acceleration curve with respect to the stepping motor of FIG. 5. f i Please refer to Fig. 6, in which the horizontal axis represents the number of steps of the stepping motor, the vertical axis represents the acceleration, and the curves S4 to S6 represent the coarse convergence factors 浐6, 8, and 〇, respectively, and the acceleration curve. As can be seen from Fig. 6, the curve of the acceleration of the stepping motor is gentler and there is no change in the sharp acceleration. Compared with the acceleration curve shown in the prior art of FIG. 2, when the conventional stepping motor rotates to a certain step (ie, step 127), a sharp acceleration change is generated (that is, the value of the acceleration is decreased from the value 75 to 〇). Therefore, the present embodiment can effectively improve the change in the violent acceleration. Through the above embodiments, a stepping motor acceleration and deceleration can be summarized (control method, the control method is as follows. FIG. 7A is a flowchart of a control method for stepping motor acceleration and deceleration according to an embodiment of the present invention. 7A, in step S700, providing a fine adjustment convergence factor p, a coarse convergence convergence factor q, a maximum interval time T, a minimum interval time I, and a control function less +/-, where X represents the number of steps of the stepping motor, and y represents the step In step S710, N acceleration interval times and one deceleration interval time are calculated according to the above control function, wherein only 乂 is greater than 1313 O52twf.doc/p 200917643 integer. S720 towel, temporarily storing the N acceleration interval times and the y deceleration interval times. In step S73〇+, using the acceleration interval time and the deceleration interval time, the stepping motor is modulated at (N+M+S) The time of the stepwise movement in the number of rotation steps, wherein when the stepping motor is scheduled to run to the ith number of rotation steps, the step of modulating the stepwise movement of the stepping motor is as shown in Fig. 7B. Please refer to Fig. 7B. In step S731, the value of 丨 is initialized, where i is an integer and 〇<ig(N+M+S). In step S732, when i$N, the stepping motor is modulated by the ith acceleration interval time. So that the stepping motor is accelerated. For example, when the stepping motor is scheduled to run to the ith number of rotation steps 'and i^N', in step S732, it may be utilized after waiting for the i-th acceleration interval time. a pulse signal 'to cause the stepping motor to rotate one step to the i-th turning step according to the pulse signal. In step S733, when N<i$(N+S)Bf, the Nth acceleration interval is used to adjust the step The motor is advanced so that the stepping motor maintains a certain rotation speed. For example, when the stepping motor is scheduled to run to the ith number of rotation steps, and N < iS (N + S), in step S733, the waiting is available a pulse signal generated after the Nth acceleration interval, so that the stepping motor rotates one step to the i-th rotation step according to the pulse signal. In step S734, when (N+S) <i^(N +M+S), so that the stepper motor is decelerated, where S is an integer greater than 0, 1 is an integer, and 〇<i$ (N+M+S). In other words, when the stepping motor is scheduled to operate to the ith number of rotation steps, and (N+S) <i$(N+M+S), in step S734, 'waiting for the first (N+M+S) +1-i) A pulse signal 14 4352twf.doc/p 200917643 generated after a deceleration interval, causing the stepper motor to rotate according to the pulse signal - step to the ith rotation step. Then 'just The variables in the flow chart are set to be the same as the above values, that is, set N=58, M=236, S=58, T=260, 〇〇〇, p=2, q=6, 1=500, x=l The result of the stepping motor acceleration and deceleration of the first embodiment can be obtained by 2, 3, .... Π In addition, when the stepping motor can adopt the stepwise acceleration/deceleration mode,

隔一段步數才改變速度。以下另舉一例來說明本發明。 蓋二實施例 圖8繪示為本發明第二實施例之脈衝訊號的頻来 數的曲線圖。請參照圖8,其中縱軸為脈衝訊號的^ :位為Hz ’橫轴為步進馬達的步數,且曲線s7〜s 上表不粗調收斂因子q=6、8、1()時所產生的曲線。接下j =明步進馬達階梯狀加減速的操作。為了方便說明 ^為mm”步作為速度改變的間隔數,而牛、= 達所需轉動的總步數為350步,1中力$止 ^進馬 速步數為190#,減速步數為8〇、步:逮步數為80步、等 度改變的間隔數,因此,步進馬達所f於以’步作為速 為8_〇)個,而減速間隔時間也同^間隔時間則 首先,將加速步數與減速步數的數:〔 中,可計算出⑽難錢馬達加^控制函數 間與減速間隔時間。之後,暫存上、*、、而的加速間隔時 間隔時間,以利用上述之加速間隔$ °速間隔時間與減逮 來調變步進馬達逐步移動的時間。复〜減速間隔時間, ,、中,在調變步進馬達 15 200917643 ^352twf.doc/p =:===減速3個部分。而 待第===二時, 隔時_成的心===== f 預定值(10次)為止。換而言之,此時的步進馬達等速運 轉步後,才會轉動至第1個轉動步數,也就是當步進馬 達等速從第1步運轉至第10步時,其才會運轉至所述的第 1個轉動步數。 相似地’當步進馬達預定轉動至第2個轉動步數時, 先等待第2個加速間隔時間,並在等待第2個加速間隔時 間後產生一脈衝訊號,以利用此脈衝訊號驅動步進馬達轉 動一步。之後,再次重複上述的步驟,直到利用第2個加 速間隔時間所形成的脈衝訊號,其驅動步進馬達的次數達 t 到第一預定值(10次)為止。換而言之,此時的步進馬達也 是等速運轉10步後,才會轉動至第2個轉動步數,也就是 當步進馬達等速從第11步運轉至第20步時,其才會運轉 至所述的第2個轉動步數。 以此類推,當步進馬達預定轉動至第3〜8個轉動步數 時’先等待第3〜8個脈衝間隔時間,並在等待第3〜8個加 速間隔時間後產生一脈衝訊號,以利用此脈衝訊號驅動步 進馬達轉動一步。之後,再次重複上述的步驟,直到利用 16 l352twf.doc/p 200917643 第3〜8個加速間隔時間所形成的脈 達的次數達到第一預定值(1〇次)為止。k,其驅動步進馬 預定轉動至第3〜8個轉動步數時因此’當步進馬達 別轉動至第30、40、50、6〇、表不步進馬達已分 接下來’步進馬達在等速的過程二。 9個轉動步數至第27個轉動步數 也就是預計從第 第270步)。為了使步進馬達保二…卩由第81步轉動至 步進馬達預定轉動至第9個轉動步數$的速^ ’因此,當 個加速間隔時間,並在等待第8個加速’等待第8 脈衝訊號,以利用此脈衝訊號驅動步===產生一 後,再次重複上述步驟,直到 、、、轉動一步。之 所產生的-脈衝訊號,其驅動步進工隔啸 定值(10次為止)。 /進馬達的次數達到第-預 會轉的步進馬達也是等速運轉10步後,才 步運轉至》90 錢’也就是#步進$料速從第81 二=有二i才會運轉至所述的第9個轉動步 果,推論9個_步數的結 第91步至第27D^M 〜27個轉動步數的動作(亦即從 運轉進馬達從第9個轉動步數(第81〜90步) 每^動步數(第261〜270步)的過程中,其運轉 進馬達寺的間隔時間都相同,故此時的步 17 [352twf.doc/p 200917643 在f丁解說步進馬達的減速過程時,必須先了解到, 步進馬達在進灯減速的過程中,其運轉每ι個轉動步數所 二應不斷^減,故第1至第8個減速間 隔時間依序被利用的順序,將與第1至第8個加速間隔時 間相反,也就是說,本實施例是依序彻第8、7、6、…、 1個減速間糾間’來致使步進馬達進行減速。 舉例而言,請繼續參照圖8,當步進馬達預定轉動至 弟28個轉動步數時,首先,等待第8個減速間隔時間,並 在等待第8個減速間隔時間後產生一脈衝訊號,以利用此 脈衝訊號骑步料達轉動—步。之後,再讀複上述的 步驟,直到第8個減賴隔時間所形成驗衝訊號, 其驅動步進馬達的次數達到第二預定值〇〇次)為止。換而 言之,此時的步進馬達等速運轉1〇步後,才會轉動至第 28鋪ftr錄’也狀#丨料料·帛271步運轉至 第280步時,其才會運轉至所述的第28個轉動步數。 相f地,當步進馬達預定轉動至第29個轉動步數時, 首先’等待第7個減速間隔時間,並在等待第7個減速間 隔呀間後產生一脈衝訊號,以利用此脈衝訊號驅動步進馬 達轉動一步。之後,再次重複上述的步驟,直到利用第7 個減速間隔時間所形成的脈衝訊號,其驅動步進馬達的次 數達到第二預定值(1〇次)為止。換而言之,此時的步進馬 達等速運轉10步後,才會轉動至第29個轉動步數,也就 是當步進馬達等速從第281步運轉至第290步時,其才會 運轉至所述的第29個轉動步數。 18 B52twf.doc/p 200917643 以此類推,可以發現,步進馬達從第2 8個轉動步數 271 280步)運轉至第35個轉動步數(第㈠別步)的過程 1i ΐΐ轉每1個轉動步數⑽步)所需等待的間隔時間不 斷地遞減’故步進馬達處於減速的狀態。此外,由於本實 = 一預疋值與第二預定值相等,故步進馬達減速的 4为與其在加速的部分對稱。 、ί+ Ϊ上^結果可看出,步進馬達在逐步移動後,由加 沾刀至等速時以及由等速切換至減速時,呈現一階梯狀 的形式’而不會產生劇烈加速度的改變。如此一來,可避 , 勺 負擔。上述的速度改 又/Hx 10步為例’然本發日林限於此,使用者可 =需求自行調整速度改變關隔數,調整出不同階梯形式 的加減速曲線。Change the speed after a few steps. The present invention will be described below by way of another example. Cover 2 Embodiment FIG. 8 is a graph showing the frequency of the pulse signal according to the second embodiment of the present invention. Please refer to FIG. 8 , where the vertical axis is the pulse signal of the ^: bit is Hz 'the horizontal axis is the number of steps of the stepping motor, and the curve s7~s is not coarse adjustment convergence factor q=6, 8, 1 () The resulting curve. Next, j = stepping motor step-wise acceleration and deceleration operation. In order to facilitate the explanation, ^ is the mm" step as the interval of the speed change, and the total number of steps required for the rotation of the cow, = is 350 steps, and the number of steps in the 1st force is 190#, and the number of steps is 190#. 8〇, step: the number of steps is 80 steps, the number of intervals of equal change, therefore, the stepping motor f is in the 'step as the speed is 8_〇), and the deceleration interval is also the same as ^ interval time first , the number of steps to be accelerated and the number of steps to be decelerated: [in, you can calculate (10) the difficulty of the motor plus ^ control function and the deceleration interval time. After that, temporarily accumulate the interval between the acceleration interval of *, and Using the above-mentioned acceleration interval $ ° speed interval time and reduction to adjust the stepping motor stepwise movement time. Complex ~ deceleration interval time, ,, medium, in the modulation stepper motor 15 200917643 ^352twf.doc / p =: ===Deceleration of 3 parts. When the === 2, the time is _ into the heart ===== f is the predetermined value (10 times). In other words, the stepping motor is at the same speed. After the operation step, it will rotate to the first number of rotation steps, that is, when the stepping motor constant speed is from the first step to the tenth step, it will run to the above The first number of rotation steps. Similarly, when the stepping motor is scheduled to rotate to the second number of rotation steps, the second acceleration interval is waited for, and a pulse signal is generated after waiting for the second acceleration interval to The stepping motor is driven by the pulse signal to rotate one step. Then, the above steps are repeated again until the pulse signal formed by the second acceleration interval is used, and the number of times of driving the stepping motor reaches t to the first predetermined value (10 times) In other words, the stepping motor at this time is also rotated to the second number of steps after 10 steps of constant speed operation, that is, when the stepping motor is running at the same speed from step 11 to step 20 Then, it will run to the second number of rotation steps. By analogy, when the stepping motor is scheduled to rotate to the 3rd to 8th rotation steps, 'wait for the 3rd to 8th pulse interval, and After waiting for the 3rd to 8th acceleration interval time, a pulse signal is generated to drive the stepping motor to rotate one step by using the pulse signal. After that, the above steps are repeated again until 16 l 352 twf.doc/p 200917643 3 to 8 Acceleration interval The number of times the pulse reaches reaches the first predetermined value (1 time). k, which drives the stepping horse to rotate to the 3rd to 8th rotation steps, so 'when the stepping motor does not rotate to the 30th, 40th , 50, 6 〇, the table stepper motor has been divided into the following stepping motor in the constant speed process two. The number of nine turning steps to the 27th turning step is also expected from step 270). The stepping motor protects the second step from the 81st step to the stepping motor and rotates to the speed of the 9th turning step. Therefore, the acceleration interval is waiting for the 8th acceleration and waiting for the 8th pulse. After the signal is generated by using the pulse signal to drive the step ===, the above steps are repeated again until the , , and one steps are turned. The generated -pulse signal, which drives the stepper to set the value (10 times). / The number of times the motor has reached the first-pre-turning stepping motor is also 10 steps after the constant speed operation, and then the step is run to "90 money", that is, the #stepping speed is from the 81st = two to run. To the ninth rotation step, infer the action of the 91th step to the 27th D^M~27 rotation steps of the 9th _step number (that is, from the operation into the motor from the ninth rotation step ( Steps 81 to 90) In the process of each step (steps 261 to 270), the interval between the operation and the motor temple is the same, so step 17 at this time [352twf.doc/p 200917643 When entering the deceleration process of the motor, it must be understood that the stepping motor should continuously reduce the number of steps per ι in the process of deceleration of the incoming lamp, so the first to eighth deceleration intervals are sequentially The order of use will be opposite to the first to eighth acceleration intervals, that is, the present embodiment is to sequentially step through the eighth, seventh, sixth, ..., and one deceleration between the decelerations to cause the stepping motor. For example, please continue to refer to FIG. 8. When the stepping motor is scheduled to rotate to 28 rotation steps, first, wait for the 8th deceleration interval. Time, and wait for the 8th deceleration interval to generate a pulse signal to use the pulse signal to ride the step to the rotation step. After that, read the above steps until the 8th reduction interval is formed. The rushing signal, which drives the stepping motor to a second predetermined value 〇〇). In other words, after the stepping motor runs at the same speed for 1 step, it will rotate until the 28th shop frr recording 'also #丨料料·帛271 step to step 280, it will run. To the 28th rotation step described. Phase f, when the stepping motor is scheduled to rotate to the 29th rotation step, first 'wait for the 7th deceleration interval time, and wait for the 7th deceleration interval to generate a pulse signal to utilize the pulse signal Drive the stepper motor to rotate one step. Thereafter, the above steps are repeated again until the number of times the stepping motor is driven reaches the second predetermined value (1 time) by the pulse signal formed by the seventh deceleration interval. In other words, the stepping motor at this time will rotate to the 29th rotation step after 10 steps of constant speed operation, that is, when the stepping motor constant speed is from the 281th step to the 290th step, Will run to the 29th number of steps described. 18 B52twf.doc/p 200917643 By analogy, it can be found that the stepping motor runs from the 2nd turning step 271 280 steps) to the 35th turning step (the first step). The number of steps (10) is required to wait for the interval to be continuously decreased, so the stepping motor is in a decelerating state. In addition, since the real = a pre-depreciation value is equal to the second predetermined value, the step motor decelerating 4 is symmetrical with the portion thereof at the acceleration. The result of ί+ Ϊ上^ can be seen that after stepwise movement, the stepping motor will appear in a stepped form when the knife is applied to the constant speed and when it is switched from constant speed to deceleration without causing severe acceleration. change. In this way, it can be avoided and the spoon is burdened. The above-mentioned speed change/Hx 10 steps is taken as an example. However, the user can limit the speed to change the interval and adjust the acceleration and deceleration curves of different step forms.

㈣’可歸納出另—種步進馬達加減速的 方法’此控制方法亦可使用第-實施例所述的流程圖 θ 7^與圖7B)來表示之。其中,於圖7A的部分,此實施 第一實施例相同,故不加贅述。而此實施例與第一實 =例不同的地方,在於圖7B中的步驟$732〜步驟§734所 勹成的^力效。舉例而言,本實施例達成步驟s732的方法 ^括.當步進馬達預定運轉至第i個轉動步數,且時, :利用第i個加速間隔時間後所產生的一脈衝訊號,來驅 =步進馬達轉動一步。之後,再次重複上述步驟,直到上 =脈衝訊號驅動步進馬達的次數達到第一預定值為止。如 來’當iSN時,本實施例將可利用第丨個加速間隔時 19 [352twf.doc/p 200917643 間調變步進馬達,以致使步進喊__狀的方式來執 行加速。其中,N為大於〇之整數,並用以表示步進馬達 在加速過程中所耗費的轉動步數。 另外’本實施例達成步驟S733的方法包括:當步進 馬達預定運轉至第i個轉動步數,且N<is(N+S)時,可利 用等待第N個減速間隔時間後所產生的一脈衝訊號,來驅 動步進馬達號轉動一步。之後,再次重複上述步驟,直到 上述脈衝訊號驅動步進馬達的次數達到第一預定值為止。 藉此,當N<i$(N+S)時,本實施例將可利用第N個加速 間隔時間調變步進馬達’以致使步進馬達保持一定的轉 速。其中,S為大於〇之整數,並用以表示步進馬達在等 速過程中所耗費的轉動步數。 此外,本實施例達成步驟S734的方法包括:當步進 馬達預定運轉至第i個轉動步數,且(4) 'Method of accelerating another stepping motor acceleration and deceleration' This control method can also be expressed using the flowcharts θ 7^ and 7B) described in the first embodiment. Here, in the portion of Fig. 7A, the first embodiment is the same as the first embodiment, and therefore no further description is given. The difference between this embodiment and the first real example is that the steps from step 732 to step 734 in Fig. 7B are effective. For example, the method of step s732 is implemented in this embodiment. When the stepping motor is scheduled to run to the ith number of rotation steps, and: using a pulse signal generated after the ith acceleration interval, = The stepper motor rotates one step. Thereafter, the above steps are repeated again until the number of times the up=pulse signal drives the stepping motor reaches the first predetermined value. For example, when the iSN is used, the present embodiment can utilize the second step of the acceleration interval to perform the acceleration step by stepping the __ shape. Where N is an integer greater than 〇 and is used to indicate the number of rotation steps that the stepper motor consumes during acceleration. In addition, the method of the present embodiment to achieve step S733 includes: when the stepping motor is scheduled to run to the ith number of rotation steps, and N<is(N+S), the following may be generated after waiting for the Nth deceleration interval time. A pulse signal is used to drive the stepper motor to rotate one step. Thereafter, the above steps are repeated again until the number of times the pulse signal drives the stepping motor reaches the first predetermined value. Thereby, when N<i$(N+S), the present embodiment can modulate the stepping motor 'with the Nth acceleration interval time to cause the stepping motor to maintain a certain speed. Where S is an integer greater than 〇 and is used to indicate the number of rotation steps that the stepper motor consumes during the constant speed process. In addition, the method of step S734 is implemented in this embodiment, including: when the stepping motor is scheduled to run to the ith number of rotation steps, and

時,可利等待第(N+M+S+1-i)個減速間隔時間後所產生的 —脈衝訊號,來驅動步進馬達轉動一步。之後,再次重複 上述步驟,直到上述脈衝訊號驅動步進馬達的次數達到第 二預定值為止。藉此,當(N+S)<ig(N+M+S)時,本實施 例將利用第(N+M+S+1 -i)個減速間隔時間調變步進馬達, 以致使步進馬達採用階梯狀的方式來執行減速。其中,M 為大於0之整數,並用以表示步進馬達在減速過程中所耗 費的轉動步數。 值得注意的是,上述提及的第一預設值與第二預設值 即為使步進馬達速度改變的間隔數,也就是如上述實施例 20 200917643 f352twf.doc/p 中的間隔數“10”步。此外,在第一與第二實施例中,可藉 由不同的q值來調整步進馬達運轉至最高速的時間,可: 併參照圖5及圖8 ’可看出當q值較小時,步進馬達可在 較少的步數到達預定的轉速(亦即所需的時間較短)。q值車交 大時,步進馬達到達預定轉速所經過的步數較多(亦即所^ 的時間較長)。因此,使用者可視需求調整q值的大小調= 步進馬達到達預定轉速的時間。 & 第三實施例 在進行第二實施例的解說之前,必須先明瞭第_實施 例與第二實施例都是依據圖4所示之控制函數的曲線圖^ 來產生控制步進馬達加減速所需的加速間隔時間及減速間 隔時間。且知,加速間隔時間及減速間隔時間的大小,將 攸關於步進馬達在加減速控制中的性能。因此,如何產生 上述的控制函數,將是第一實施例與第二實施例在具體實 施上非常重要的一環。故以下將列舉用以產生上述控制函 數的函數產生裝置以讓熟f本技術者能更加清楚明 瞭本發明之精神。 ▲圖9緣示為本發明實施例之函數產生裝置的方塊圖。 明參如、圖9,函數產生裝置_包括乘法器⑽、除法器 咖與加法器㈣。乘法器91〇具有第—輸入訊號端犯、 弟—輸入訊號端912及第一輸出端913,其中,第二輸入 端912耗接至第-輸出端913。除法器㈣具有第一傳輸 端92卜第二傳輸端922及第二輸出端奶,其中,第一傳 輪端921轉接至第一輪出端913。加法器具有第一連 21 200917643 t352twf. doc/p 接端93卜第二連接端932及第三輸出端933,其中,第一 連接端931耦接至第二輸出端923。 在整體作動上,乘法器910用以將第一輪入訊號端911 所接收的特定數值(y/y與第二輸入訊號端912上的數值 進行乘法運算,並透過第一輸出端913輸出上述的運算結 果。此外,除法器92〇用以將第二傳輸端922所接收的最 士間隔時間(T)除以乘法器910所輸出的數值。最後,加法 f 930將第二連接端932所接收的最小間隔時間⑴與除法 态920所輪出的數值相加,並透過第三輸出端933產生上 述之控制函數^ = + + 1,其中,乂代表步進馬達的步數, y弋表y進馬達加減速的間隔時間,p代表一微調收傲因 子,q代表一粗調收斂因子。 、不上所述’本發明之步進馬達加減速的控制方法及其 函數產生裝置至少具有下列優點: _^藉由—控制函數,計算步進馬達加減速所需的加速 門隔日守間與減速間隔時間,並依據上述的加速間隔時間與 減速間隔時間,調整步進馬達加減速的狀況,使得步進馬 ^於速至等速以及等速至減速時,呈現較為平滑的狀 悲。稭此,本發明可避免劇烈加速度的改變,而造成步進 馬達損壞與失步的產生。 藉由—控制函數,計算步進馬達加減速所需的加速 3隔時間與減速間隔時間,並依據上述的加速間 減速間隔時間,每間隔—段步數才調整步進馬達的加減 22 ^352twf.doc/p 200917643 速。藉此’步進馬達將可利用階梯狀的加減速方式,來降 低劇烈加減速的現象。 3·產生控制函數的複雜度低,且容易實現於產品上。 —雖然本發明已以較佳實施例揭露如上,然其並非用以 限疋本發明’任何所屬技術領域中具有通常知識者,在不 脫離本發明之精神和範圍内,當可作些許之更動與潤飾, 因此本發明之保護範圍當視後附之申請專利範圍所界定者 為準。 【圖式簡單說明】 圖1繪不為習知步進馬達線性加減速的曲線圖。 圖2繪示為相對應於圖丨之習知步進馬達的加速度曲 線圖。 圖3繪是為本發明實施例之脈衝間隔時間對步數之曲 線圖。 圖4繪示為本發明實施例之脈衝間隔時間對 之曲 線圖。 圖5繪示為本發明第一實施例之脈衝訊號的頻率對步 的曲線圖(在不同的粗調收斂因子q下)。 圖6繪示為相對於圖5之步進馬達的加速度曲線圖。 圖7八!會示為本發明第一實施例之步進馬達的控制方 凌流程圖。 圖7B為圖7A之步驟S730之詳細流程圖。 23 1352ί\νΓ(1οε/ρ 200917643 圖8繪示為本發明第二實施例之脈衝訊號的頻率對步 數的曲線圖(在不同的粗調收斂因子q下)。 圖9繪示為本發明實施例之函數產生裝置的方塊圖。 【主要元件符號說明】 S700、S710、S720、S730、S731 〜S734 :本發明實施 例之步進馬達的控制方法各步驟 900 :函數產生裝置 910 :乘法器 911 :第一輸入訊號端 912:第二輸入訊號端 913 :第一輸出端 920 :除法器 921 :第一傳輸端 922 :第二傳輸端 923 :第二輸出端 930 :加法器 931 :第一連接端 932 :第二連接端 933 :第三輸出端 24At this time, the pulse signal generated after the (N+M+S+1-i) deceleration interval time is waited for to drive the stepping motor to rotate one step. Thereafter, the above steps are repeated again until the number of times the pulse signal drives the stepping motor reaches the second predetermined value. Thereby, when (N+S) < ig(N+M+S), the embodiment will use the (N+M+S+1 -i) deceleration interval time to modulate the stepping motor, so as to cause The stepper motor performs a deceleration in a stepped manner. Where M is an integer greater than 0 and is used to indicate the number of rotational steps the stepper motor consumes during deceleration. It should be noted that the first preset value and the second preset value mentioned above are the number of intervals for changing the speed of the stepping motor, that is, the number of intervals in the above-mentioned embodiment 20 200917643 f352twf.doc/p. 10" step. In addition, in the first and second embodiments, the stepping motor can be adjusted to the highest speed by different q values, and: and referring to FIG. 5 and FIG. 8 ', when the q value is small, The stepper motor can reach a predetermined speed in a smaller number of steps (ie, the required time is shorter). When the q-value car is over, the stepping motor reaches a predetermined number of steps, and the number of steps passes is longer (that is, the time is longer). Therefore, the user can adjust the size of the q value according to the demand = the time when the stepping motor reaches the predetermined speed. & Third Embodiment Before performing the explanation of the second embodiment, it must be understood that the first embodiment and the second embodiment are both based on the graph of the control function shown in FIG. 4 to generate and control the stepping motor acceleration and deceleration. The required acceleration interval and deceleration interval. It is also known that the acceleration interval time and the deceleration interval time will be related to the performance of the stepping motor in the acceleration/deceleration control. Therefore, how to generate the above control function will be a very important part of the first embodiment and the second embodiment. Therefore, the function generating means for generating the above-described control function will be enumerated below so that the spirit of the present invention can be more clearly understood by those skilled in the art. ▲ Figure 9 is a block diagram showing the function generating apparatus of the embodiment of the present invention. As shown in Fig. 9, the function generating device _ includes a multiplier (10), a divider coffee and an adder (4). The multiplier 91 has a first input signal terminal, a parent input signal terminal 912 and a first output terminal 913, wherein the second input terminal 912 is consuming to the first output terminal 913. The divider (4) has a first transmission end 92, a second transmission end 922 and a second output end milk, wherein the first transmission end 921 is transferred to the first round end 913. The adder has a first connection 21 200917643 t352 twf. doc/p terminal 93 and a second connection end 932 and a third output end 933, wherein the first connection end 931 is coupled to the second output end 923. In the overall operation, the multiplier 910 is configured to multiply the specific value (y/y received by the first round-in signal terminal 911 and the value on the second input signal terminal 912, and output the above through the first output terminal 913. In addition, the divider 92 is used to divide the channel time (T) received by the second transmission terminal 922 by the value output by the multiplier 910. Finally, the addition f 930 sets the second connection terminal 932. The minimum interval of reception (1) is added to the value rotated by the division 920, and the above control function ^ = + + 1 is generated through the third output 933, where 乂 represents the number of steps of the stepping motor, y 弋y into the motor acceleration and deceleration interval, p represents a fine adjustment of the arrogance factor, q represents a coarse adjustment convergence factor. The control method of the stepping motor acceleration and deceleration of the present invention and its function generating device have at least the following Advantages: _^ By using the - control function, calculate the acceleration gate interval and deceleration interval time required for stepping motor acceleration and deceleration, and adjust the stepping motor acceleration and deceleration according to the above-mentioned acceleration interval time and deceleration interval time. The stepping horse is presented with a smoother sorrow when the speed is constant to constant speed and the constant speed to deceleration. Thus, the invention can avoid the change of the violent acceleration and cause the stepping motor to be damaged and out of step. - Control function, calculate the acceleration 3 interval and deceleration interval time required for stepping motor acceleration and deceleration, and adjust the stepping motor to increase or decrease 22 ^352twf.doc according to the above-mentioned inter-acceleration deceleration interval time. /p 200917643 speed. By this, the 'stepping motor will use the step-like acceleration and deceleration method to reduce the phenomenon of sharp acceleration and deceleration. 3. The complexity of generating the control function is low and easy to implement on the product. The above has been disclosed in the preferred embodiments, and it is not intended to limit the invention to those skilled in the art, and it is possible to make some modifications and refinements without departing from the spirit and scope of the invention. The scope of the present invention is defined by the scope of the appended claims. BRIEF DESCRIPTION OF THE DRAWINGS Figure 1 depicts a graph of linear acceleration and deceleration of a conventional stepper motor. 2 is a graph showing an acceleration curve of a conventional stepping motor corresponding to the drawing. FIG. 3 is a graph showing a pulse interval time versus a step number according to an embodiment of the present invention. The pulse interval time is plotted against the graph. Figure 5 is a graph showing the frequency versus step of the pulse signal according to the first embodiment of the present invention (under different coarse convergence factor q). Figure 5 is a flow chart of the control of the stepping motor of the first embodiment of the present invention. Figure 7B is a detailed flow chart of step S730 of Figure 7A. 23 1352ί\ Γ (1οε/ρ 200917643 FIG. 8 is a graph showing the frequency versus step number of the pulse signal according to the second embodiment of the present invention (under different coarse convergence factor q). FIG. 9 is a block diagram of a function generating apparatus according to an embodiment of the present invention. [Main component symbol description] S700, S710, S720, S730, S731 to S734: Stepping motor control method according to an embodiment of the present invention, each step 900: function generating device 910: multiplier 911: first input signal terminal 912: Two input signal terminals 913: first output terminal 920: divider 921: first transmission terminal 922: second transmission terminal 923: second output terminal 930: adder 931: first connection terminal 932: second connection terminal 933: Third output 24

Claims (1)

200917643 352twf.doc/p 十、申請專利範圍: 二種== 二制方法,包括下列步驟: 速間隔時間,其中 + 些加相隔時間與該些減速間隔時間,調變該200917643 352twf.doc/p X. Patent application scope: Two == two methods, including the following steps: speed interval time, where + some plus time interval and the deceleration interval time, modulation $進=在(N+朗)個轉動步數中逐步移動的時間,其 =該步進馬達預定運轉至第i個轉動步數時,調變該 乂進馬達逐步移動的時間之步驟包括: 當1時’利用第i個加速間隔時間調變該步進 馬達’以致使該步進馬達加速; ^ 當N<iS(N+S)時,利用第]Sf個加速間隔時間調 變該步進馬達,以致使該步進馬達保持—定的轉速 ;以及 當(N+S) < i S (N+M+S)時,利用第(N+M+s+l-i) 個減速間隔時間調變該步進馬達,以致使該步進馬達減 速’其中S為大於〇之整數、i為整數且〇<丨$丨n+M+S)。 2.如申請專利範圍第1項所述之步進馬達加減速的控 制方法,其中“利用第i個加速間隔時間調變該步進馬達” 之步驟包括: 專待第i個加速間隔時間後產生一脈衝訊號;以及 利用該脈衝訊號驅動該步進馬達轉動一步。 3.如申請專利範圍第1項所述之步進馬達加減速的控 制方法,其中“利用第i個加速間隔時間調變該步進馬達,, 之步驟包括: a.等待第i個加速間隔時間後產生一脈衝訊號; 25 200917643 352twf.doc/p b·利用該脈衝訊號驅動該步進馬達轉動—步;以及 、重複上述步驟a與b,直到該脈衝訊號驅動該步進馬 達的次數達到一第一預定值為止。 4·如申請專利範圍第1項所述之步進馬達加減速的控 制方法其中利用苐N個加速間隔時間調變該步進馬達,, 之步驟包括: 專待第N個加速間隔日守間後產生一脈衝訊號;以及 利用該脈衝訊號驅動該步進馬達轉動一步。 5.如申請專利範圍第1項所述之步進馬達加減速的控 制方去,其中利用弟]個加速間隔時間調變該步進馬達,, 之步驟包括: a•等待第N個加速間隔時間後產生一脈衝訊號; b·利用該脈衝訊號驅動該步進馬達轉動—步;以及 重複上述步驟a與b,直到該脈衝訊號驅動該步進馬 達的次數達到該第一預定值為止。 6·如申請專利範圍第1項所述之步進馬達加減速的控 制方法’其中“利用第(N+M+S+1-i)個減速間隔時間調變該 步進馬達”之步驟包括: 專待第(N+M+S+1 -i)個減速間隔時間後產生一脈衝訊 號;以及 利用該脈衝訊號驅動該步進馬達轉動一步。 7.如申請專利範圍第1項所述之步進馬達加減速的控 制方法’其中“利用第(N+M+S+1 -i)個減速間隔時間調變該 步進馬達”之步驟包括: 26 4352twf.doc/p 200917643 a. 等待第(N+M+S+l-i)個減速間隔時間後產生一脈衝 訊號; b. 利用該脈衝訊號驅動該步進馬達轉動一步;以及 重複上述步驟a與b,直到該脈衝訊號驅動該步進馬 達的次數達到一第二預定值為止。 8. 如申請專利範圍第1項所述之步進馬達加減速的控 制方法,更包括: 初始化i的數值。 9. 如申請專利範圍第丨項所述之步進馬達加減速的控 制方法,更包括: 暫存該些加速間隔時間與該些減速間隔時間。 =申料鄕㈣1項所述之錢馬達加減速的 控制方法,更包括: ,供一微調收斂因子P與一粗調收斂因子q · 最大間隔時間T與一最小間隔時間ι;’ k供^控制函數,且該控制函數為: 7 = p + / ’其中’X代表該步進馬達的步數,^代表 該步進馬達加減速的間隔時間。 11·如申請專利範圍第i項所述之 該些加速間隔時間的大小為:第"::二 ,間 >弟2個加速間隔時間>···〉第 :3 > ^二,減速間隔時間的大小為:第!個減速間 個減速間隔時間>.·. >第N個減速間隔時^。夺間 27 4352twf.doc/p 200917643 12. 如申睛專利範圍第1項所述之少進馬達加減速的 控制方法’其中該些加速間隔時間與該些減速間隔時間的 大小分別呈現非線性的遞減。 13. —種配合申請專利範圍第1項所述之步進馬達加 減速的控制方法的函數產生裝置,包括: 一乘法器’具有一第一輸入訊號端、一第二輸入訊號 端及一第一輸出端,該第二輸入訊號端耦接至該第一輸出 端’且該乘法器用以將該第一輸入訊號端所接收的一特定 數值與該第二輸入訊號端上的數值進行乘法運算; 一一除法器’具有一第一傳輸端、一第二傳輸端及一第 一輸出端’該第一傳輸端耦接至該第一輸出端,且該除法 益用以將該第二傳輸端所接收的一最大間隔時間T除以該 乘法器所輸出的數值;以及 一――加法器,具有一第一連接端、一第二連接端及一第 f輸出端’該第一連接端耦接至該第二輸出端,且該加法 器用以將該除法器所輪出的數值與一最小間隔時間I相 加並據以產生一控制函數y , 其中,當該特定數值為〜時,該控制函數為: T 少pA ’ /、中’ X代表該步進馬達的步數,y代表 該步進馬達加減速的間隔時間,卩代表一微調收斂因子,q 代表一粗調收斂因子。 28$进 = the time of stepwise movement in (N + lang) rotation steps, which = the step of modulating the stepwise movement of the boring motor when the stepping motor is scheduled to run to the ith rotation step includes: At 1 o'clock, the stepping motor is modulated by the ith acceleration interval to accelerate the stepping motor; ^ when N<iS(N+S), the step is modulated by the sf acceleration interval time a motor such that the stepper motor maintains a constant speed; and when (N+S) < i S (N+M+S), utilizes the (N+M+s+li) deceleration interval time adjustment The stepping motor is changed such that the stepping motor decelerates 'where S is an integer greater than 〇, i is an integer and 〇<丨$丨n+M+S). 2. The control method of stepping motor acceleration and deceleration according to claim 1, wherein the step of “modulating the stepping motor by using the ith acceleration interval time” comprises: after the ith acceleration interval Generating a pulse signal; and using the pulse signal to drive the stepping motor to rotate one step. 3. The control method of stepping motor acceleration and deceleration according to claim 1, wherein the step of modulating the stepping motor by the ith acceleration interval comprises: a. waiting for the ith acceleration interval After the time, a pulse signal is generated; 25 200917643 352twf.doc/pb. The stepping motor is driven to rotate by the pulse signal; and the steps a and b are repeated until the pulse signal drives the stepping motor to a number of times The first predetermined value is as follows: 4. The control method of stepping motor acceleration and deceleration according to claim 1, wherein the stepping motor is modulated by 苐 N acceleration intervals, the steps of: A pulse signal is generated after the interval between the acceleration intervals; and the stepping motor is driven to rotate by using the pulse signal. 5. The control unit of the stepping motor acceleration and deceleration described in claim 1 of the patent scope is used. The acceleration step is used to modulate the stepping motor, and the steps include: a: waiting for the Nth acceleration interval to generate a pulse signal; b. driving the step by using the pulse signal The motor rotates-step; and repeats the above steps a and b until the number of times the pulse signal drives the stepping motor reaches the first predetermined value. 6. The stepping motor acceleration and deceleration as described in claim 1 The control method 'where the step of modulating the stepping motor by using the (N+M+S+1-i) deceleration interval time comprises: specializing in the (N+M+S+1 -i) deceleration interval After the time, a pulse signal is generated; and the stepping motor is driven to rotate one step by using the pulse signal. 7. The method for controlling the stepping motor acceleration and deceleration according to the first aspect of the patent application, wherein "the use of the (N+M+) The steps of S+1 -i) deceleration interval time modulation of the stepping motor include: 26 4352twf.doc/p 200917643 a. Waiting for the (N+M+S+li) deceleration interval to generate a pulse signal b. driving the stepping motor to rotate one step by using the pulse signal; and repeating steps a and b above until the number of times the pulse signal drives the stepping motor reaches a second predetermined value. The control method of stepping motor acceleration and deceleration described in the item : Initialize the value of i. 9. The control method of stepping motor acceleration and deceleration as described in the scope of the patent application includes: temporarily storing the acceleration interval and the deceleration interval. The control method of the motor motor acceleration and deceleration further includes: a trimming convergence factor P and a coarse convergence factor q · a maximum interval time T and a minimum interval time ι; 'k for the control function, and the control The function is: 7 = p + / ' where 'X represents the number of steps of the stepper motor, and ^ represents the interval between acceleration and deceleration of the stepper motor. 11. The size of the acceleration interval as described in item i of the patent application scope is: # "::二,间>弟2 acceleration interval>···〉第:3 > ^二The deceleration interval is: Deceleration interval deceleration interval >.·. > Nth deceleration interval ^. Between 27 4352twf.doc/p 200917643 12. The method for controlling the acceleration and deceleration of the motor with less acceleration as described in item 1 of the scope of the patent application, wherein the acceleration interval and the magnitude of the deceleration interval are respectively nonlinear. Decrement. 13. A function generating device for controlling a stepping motor acceleration/deceleration method according to claim 1, comprising: a multiplier 'having a first input signal end, a second input signal end, and a first An output terminal, the second input signal terminal is coupled to the first output terminal ′, and the multiplier is configured to multiply a specific value received by the first input signal terminal and a value on the second input signal terminal a one-way divider having a first transmission end, a second transmission end, and a first output end coupled to the first output end, and the dividing benefit is used to transmit the second transmission The maximum interval time T received by the terminal is divided by the value output by the multiplier; and the one-adder has a first connection end, a second connection end, and a f-th output end 'the first connection end Coupling to the second output end, and the adder is configured to add the value rotated by the divider to a minimum interval time I and generate a control function y, wherein when the specific value is ~ The control function is: T less pA ′ /, medium 'X represents the number of steps of the stepping motor, y represents the interval time of acceleration and deceleration of the stepping motor, 卩 represents a fine adjustment convergence factor, and q represents a coarse adjustment convergence factor. 28
TW96137084A 2007-10-03 2007-10-03 Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof TWI339003B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96137084A TWI339003B (en) 2007-10-03 2007-10-03 Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96137084A TWI339003B (en) 2007-10-03 2007-10-03 Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof

Publications (2)

Publication Number Publication Date
TW200917643A true TW200917643A (en) 2009-04-16
TWI339003B TWI339003B (en) 2011-03-11

Family

ID=44726467

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96137084A TWI339003B (en) 2007-10-03 2007-10-03 Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof

Country Status (1)

Country Link
TW (1) TWI339003B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852648A (en) * 2014-08-13 2015-08-19 北汽福田汽车股份有限公司 Method and system for driving rotation of stepping motor

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE202016103652U1 (en) 2016-07-07 2016-07-21 Ju-Tan Chen Workpiece clamping device with changeable clamping angle

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104852648A (en) * 2014-08-13 2015-08-19 北汽福田汽车股份有限公司 Method and system for driving rotation of stepping motor
CN104852648B (en) * 2014-08-13 2017-07-11 北汽福田汽车股份有限公司 The method and system that Driving Stepping Motor is rotated

Also Published As

Publication number Publication date
TWI339003B (en) 2011-03-11

Similar Documents

Publication Publication Date Title
CN102334341B (en) For controlling the system and method for the coding of Media Stream
JP5214619B2 (en) Method and apparatus for eliminating stall and cogging in a multiphase stepping motor
TW200917643A (en) Method for controlling acceleration and deceleration of stepping motor and function generating apparatus thereof
CN106060380A (en) Linkage camera control system and method
JP7307211B2 (en) Client, Server, Receiving Method and Sending Method
JP6161419B2 (en) Stepping motor drive control device and stepping motor drive control method
EP3777218B1 (en) Congestion response for timely media delivery
CN111240370B (en) Position correction method, device and system for cradle head and storage medium
CN111727411A (en) Equipment motion control method, equipment and storage device
FR2579387A1 (en) METHOD AND DEVICE FOR CONTROLLING THE ACCELERATION OF AN ELECTRIC MOTOR STEP BY STEP
US7656115B2 (en) Calibrating stepper motor by driving fractional ranges
RU2005139552A (en) TAPE WINDING METHOD
US20110066742A1 (en) Devices and methods for scheduling transmission time of media data
CN110729934B (en) Motor control method, motor control device, and computer-readable storage medium
CN1172377A (en) Method for driving step-by-step motor
EP2063528A3 (en) Improvements in or relating to BLDC motors
CN109995286A (en) A kind of asynchronous machine speed ring PI method for optimally designing parameters
CN111371378B (en) Method and apparatus for speed control
CN110943654B (en) Driving method and system of stepping motor driving chip
CN116455274A (en) Control method, system and related device of stepping motor
US20140077749A1 (en) Method and Apparatus to Convert a Minimally Controlled Pulse Stream into a Proper Mechatronic Trajectory
JP2003523713A (en) Selsin control method for multiple step motors
CN113411021A (en) Control system and control method of holder
KR102525150B1 (en) Apparatus for generating parabolic motion profile and method thereof
JPS5818880B2 (en) Stepping motor control method

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees