現(xiàn)在的工控行業(yè)中,編碼器的應(yīng)用越來越廣泛,故在此講述一下旋轉(zhuǎn)編碼器的一般應(yīng)用,歡迎大家踴躍提意見,如有疑問也歡迎大家與我聯(lián)系。
旋轉(zhuǎn)編碼器的一般介紹
其主要有兩種,一種是增量型,另一種是絕對(duì)型。增量型的特征是只有在旋轉(zhuǎn)期間會(huì)輸出對(duì)應(yīng)旋轉(zhuǎn)角度脈沖,停止是不會(huì)輸出。它是利用計(jì)數(shù)來測(cè)量旋轉(zhuǎn)的方式;價(jià)格比較便宜。絕對(duì)型的的特征是不論是否旋轉(zhuǎn),可以將對(duì)應(yīng)旋轉(zhuǎn)角度進(jìn)行平行輸出的類型,不需要計(jì)數(shù)器可確認(rèn)旋轉(zhuǎn)位置;它還有不受機(jī)械的晃動(dòng)或震動(dòng)以及開關(guān)等電器干擾的功能,價(jià)格貴。在選擇使用時(shí),可參考以下幾點(diǎn)。包括成本、分辨率、外形尺寸、軸負(fù)荷及機(jī)械壽命、輸出頻率、環(huán)境、軸旋轉(zhuǎn)力矩、輸出回路等等。
應(yīng)用舉例
它一般應(yīng)用在對(duì)機(jī)器的動(dòng)作控制。我那一個(gè)實(shí)例詳細(xì)說明一下。我剛剛改造一臺(tái)機(jī)器,機(jī)器在運(yùn)行過程中先要對(duì)工件進(jìn)行處理,然后加工。它以前是用光電開關(guān)做的,機(jī)器的電路就比較復(fù)雜,而且成本增加,維護(hù)調(diào)校麻煩。于是我就對(duì)機(jī)器的電路進(jìn)行改造,主要是用一個(gè)編碼器來代替以前的光電開關(guān)。此套系統(tǒng)由OMRON的PLC與編碼器組成。下面是PLC程序。
I/O 及數(shù)據(jù)
檢測(cè)是否有工件開關(guān):00007 變頻器零速輸出:00008
處理工序1:開(DM100) 關(guān)(DM101) 10100
處理工序2:開(DM102) 關(guān)(DM103) 10101
處理工序3:開(DM104) 關(guān)(DM105) 10102
加工工序1:開(DM106) 關(guān)(DM107) 10103
加工工序2:開(DM108) 關(guān)(DM109) 10104
加工工序3:開(DM110) 關(guān)(DM111) 10105
PLC程序
Name= Initialize
[STATEMENTLIST]
LD 253.13 //On
OUT TR0
OUT 252.00 //Encoder software reset
TIM 000 #0100 //System initialize delay
AND 253.15 //PLC First scan on
INI 000 002 DM0000 //Control Encoder mode
LD TR0
AND TIM000
PRV 000 000 DM0000 //Encoder PV read
DIV DM0000 #0004 DM0002 //1440 Change 360
BCMP DM0002 DM0100 HR01 //Block compare for operation
Name= Shift
[STATEMENTLIST]
LD 000.07 //Part on
LD HR01.08 //Shift degree
LD 253.14 //Off
SFT HR60 HR62 // the rightmost word of the shift register
Name= Treat 1
[STATEMENTLIST]
LD TIM000
AND HR60.08 //Shift to action 1 operate position
AND NOT 00008 //Inverter zero speed output
AND HR01.00 //Degree of action 1
OUT 101.00 //Output Treat 1
Name= Treat 2
[STATEMENTLIST]
LD TIM000
AND HR60.10 //Shift to action 2 operate position
AND NOT 00008
AND HR01.01 //Degree of action 2
OUT 101.01 //Output Treat 2
Name= Treat 3
[STATEMENTLIST]
LD TIM000
AND HR60.15 //Shift to action 3 operate position
AND NOT 00008
AND HR01.02 //Degree of action 3
OUT 101.02 //Output Treat 3
Name= Process 1
[STATEMENTLIST]
LD TIM000
AND HR62.03 //Shift to Print 1 operate position
AND NOT 00008
AND HR01.03 //Degree of print 1
OUT 101.03 //Output Process 1
Name= Process 2
[STATEMENTLIST]
LD TIM000
AND HR62.05 //Shift to Print 2 operate position
AND NOT 00008
AND HR01.04 //Degree of print 2
OUT 101.04 //Output Process 2
Name= Process 3
[STATEMENTLIST]
LD TIM000
AND HR62.08 //Shift to Print 3 operate position
AND NOT 00008
AND HR01.04 //Degree of print 3
OUT 101.04 //Output Process 3