外文文獻(xiàn)-自動化制造系統(tǒng)關(guān)于PLC-5600字.doc_第1頁
外文文獻(xiàn)-自動化制造系統(tǒng)關(guān)于PLC-5600字.doc_第2頁
外文文獻(xiàn)-自動化制造系統(tǒng)關(guān)于PLC-5600字.doc_第3頁
外文文獻(xiàn)-自動化制造系統(tǒng)關(guān)于PLC-5600字.doc_第4頁
外文文獻(xiàn)-自動化制造系統(tǒng)關(guān)于PLC-5600字.doc_第5頁
已閱讀5頁,還剩17頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

自動化制造系統(tǒng)關(guān)于PLC1 緒論控制工程隨著時(shí)間的演變。過去的人們主要致力于控制方面研究。最近電力已被應(yīng)用于控制,早期電氣控制是基于繼電器的。這些繼電器使其可以在沒有機(jī)械開關(guān)的情況下被開動和關(guān)閉。這是通常使用繼電器進(jìn)行簡單的邏輯控制的方法。低成本計(jì)算機(jī)的發(fā)展帶來了新的革命,可編程邏輯控制器(PLC)出現(xiàn)于70年代,它已成為制造控制的最常見選擇。PLC的功能受到越來越多的工廠歡迎并可能作為主要控制手段再今后的一段時(shí)間內(nèi)。而這其中絕大部分原因是因?yàn)镻LC它的優(yōu)點(diǎn)很多。1.1梯形邏輯梯形邏輯編程法是主要的PLC編程方法。正如之前所說,梯形邏輯已發(fā)展到模仿繼電器邏輯。通過選擇簡單的梯形邏輯編程法,培訓(xùn)工程師和商人所需要的金錢極大的減少?,F(xiàn)代控制系統(tǒng)仍然包括繼電器,但這些都是很少的邏輯使用。字母a繼電器是一個簡單的裝置,它使用一個磁場來控制開關(guān),如圖圖1.1。當(dāng)電壓作用于輸入線圈產(chǎn)生的磁場,產(chǎn)生電流領(lǐng)域。拉起磁場的金屬開關(guān),再實(shí)現(xiàn)它的接觸和聯(lián)系,關(guān)閉開關(guān)。圖1.1 簡單的布局和繼電器電路圖繼電器的工作方式,讓一個電源開關(guān)關(guān)閉另一(通常是高電流)電源,同時(shí)保持他們孤立。一個簡單的例子,控制繼電器應(yīng)用,見圖1.2。在這方面,左邊第一個接力是通常使得系統(tǒng)關(guān)閉,并允許電流流動,直到電壓加到輸入端甲,第二個中繼器通常是開放的,不會允許目前的速度,目前的輸入二是流經(jīng)前兩個繼電器然后電流流通過在第三繼電器線圈,并關(guān)閉輸出C.此電路的開關(guān)會通常應(yīng)用在制定階梯邏輯形式。這可以被解釋為將C邏輯作用,如果A關(guān)閉B合上的話。圖1.2一個簡單的繼電器控制器圖1.2中的例子沒有顯示整個控制系統(tǒng),只有邏輯。當(dāng)我們考慮一個PLC有輸入,輸出,和邏輯。圖1.3顯示的更全面。這里有兩個按鈕的輸入。我們可以想像激活24V直流在PLC繼電器線圈的輸入。反過來驅(qū)動器是一個輸出繼電器,開關(guān)115伏交流電,結(jié)果打開了一盞燈。請注意,在實(shí)際情況下PLC的輸入繼電器,常常又是輸出繼電器。PLC梯形圖邏輯其實(shí)一種計(jì)算機(jī)程序,用戶可以輸入和更改它。注意,兩個輸入的推按鈕常開,但里面的PLC梯形圖邏輯有一個常開觸點(diǎn),和一個常閉觸點(diǎn)。在PLC梯形邏輯圖不需要匹配輸入或輸出。許多初學(xué)者會被抓住這點(diǎn)試圖使階梯邏輯匹配它的輸入類型。圖1.3繼電器PLC的簡圖許多繼電器也有多個輸出(拋出),這允許輸出繼電器可以同時(shí)輸入。圖1.4所示的電路是一個例子,它是在電路里稱為印章。此電路的電流流過兩個電路的分支,通過接觸標(biāo)簽A或B的輸入端,B只相對乙輸出。如果B是關(guān)閉的,而A是通電,那么B將打開。如果B打開,然后輸入,B將打開。打開后,乙在輸出,乙將不會關(guān)閉。圖1.4電路1.2編程第一個是PLC的編程,一個基礎(chǔ)技術(shù)的繼電器邏輯接線示意圖。雖然這就不需要教電工,技術(shù)員和工程師電腦編程 - 但是,這種方法一直是被認(rèn)可的,這是現(xiàn)在最常見的PLC的編程技術(shù)。梯形邏輯的一個例子,圖1.5。為了解釋這個圖,想像左手垂直線方向,我們稱之為熱鐵路。在右邊是中立軌道。圖中有兩個人物,每個梯級有輸入(2垂直線)和組合輸出(圓圈)。如果輸入是打開,或正確的組合可以關(guān)閉熱流量通過鐵路的輸入,使得電力輸出,最后中立鐵路。輸入來自于一個傳感器,開關(guān),或任何其他類型的傳感器。輸出會有是一些外圍的PLC設(shè)備,開啟或關(guān)閉則是如燈光或馬達(dá)之類的。在發(fā)出指令后,有常開和常閉2種出點(diǎn)。這意味著,如果輸入A和B是關(guān)閉,然后將輸出并激活它。任何其他組合輸入值將導(dǎo)致輸入被關(guān)閉。圖1.5一個簡單的梯形邏輯圖第二個梯級圖1.5更復(fù)雜,其中有多種組合的輸入,輸出Y將開機(jī)。在最左邊的部分發(fā)出聲響,流過頂端,如果C和D是關(guān)閉的。電流也可以(和同時(shí))流經(jīng)底部,如果E和F都為真。這將使得大部分響起,然后,如果是G或H輸出y的話,我們將在后面的章節(jié)解釋這些。還有其他的PLC編程方法。最早的一個技術(shù)涉及的記憶指令。這些指令由階梯邏輯圖編寫,并輸入到PLC的編程,通過簡單的終端。圖1.6是一個記憶法的例子。在這個例子中,讀取指令一次一行從上到下的時(shí)間。第一行00000的指令LDN(輸入負(fù)載而不是輸入答)這將檢查輸入到PLC,如果將它關(guān)閉記得1 1(或真),如果它會記住一個0(或假)。下一行使用一個(輸入負(fù)載)語句看看輸入。如果輸入的是一個0,如果輸入記得它是1(注意:這是相反的)。該聲明回顧與最后兩個數(shù)字記住,如果都真正的結(jié)果是1,否則結(jié)果是0。這一結(jié)果現(xiàn)在取代了兩個數(shù)字,只有一個數(shù)字記憶中。這個過程重復(fù)行00003和00004,但是,當(dāng)這些完成現(xiàn)在有三個數(shù)字的記憶中。 最古老的數(shù)字是從與,較新的數(shù)字是從兩個工作點(diǎn)處顯示的,并且符合00005,結(jié)合從最后的結(jié)果和指示工作點(diǎn)處,現(xiàn)在有兩個數(shù)字的記憶中。指令采用現(xiàn)在剩下的兩個數(shù)字,如果一方是1的結(jié)果是1,否則結(jié)果是0。這一結(jié)果可替代兩個數(shù)字,現(xiàn)在有一個數(shù)字在這。最后一個指令是存儲量,則看最后一個值儲存,如果是1,輸出將被打開,如果是0輸出將被關(guān)閉。圖1.6的一個助記符和等效梯形邏輯實(shí)例圖1.6梯形邏輯程序,相當(dāng)于記憶程序。即使你有梯形邏輯編程,PLC的,將被轉(zhuǎn)換為記憶形式使用前由PLC。在過去的記憶節(jié)目是最共同的,但現(xiàn)在是常見的用戶甚至看到記憶程序。順序功能圖(SFCs)已經(jīng)制定,以適應(yīng)規(guī)劃更先進(jìn)的系統(tǒng)。這是類似于流程圖,但更強(qiáng)大。在圖1.7中看到的例子是做兩件不同的事情。要閱讀圖表,頂部是說,地方開始啟動。下面這存在著雙重的水平線,上面寫著遵循兩個路徑。因此,臨立會開始跟隨在左,右支另一方面,同時(shí)雙方分開。在左邊有兩個功能,第一個是拉功能的權(quán)力。此函數(shù)將運(yùn)行至決定這樣做,和電力下來后功能會。在右邊是閃光功能,這將運(yùn)行直到它完成。看看這些職能不明,但每個例如啟動功能,將一個小梯形邏輯程序。這種方法有很大不同的流程圖因?yàn)樗鼪]有按照流程圖通過一個單一的路徑。圖1.7的一個順序功能圖例子結(jié)構(gòu)化文本編程已經(jīng)發(fā)展成為一個更現(xiàn)代的編程語言。這是很相似,如BASIC語言。一個簡單的例子所示圖1.8。此示例使用一個PLC的內(nèi)存位置島該內(nèi)存位置為整數(shù),也將在后面解釋這本書。該計(jì)劃的第一行設(shè)置值為0。下一行開始一個循環(huán),并將在循環(huán)返回。下一行回顧我珍惜的位置,給它加1,并返回到相同的位置。下一行檢查是否應(yīng)該退出循環(huán)。如果我是大于或等于10,那么循環(huán)將退出,否則計(jì)算機(jī)將返回到重復(fù)的聲明繼續(xù)從那里。每次程序通過這個循環(huán)時(shí),i去將增加1至值達(dá)到10。圖1.8一個結(jié)構(gòu)化文本程序范例2.1 PLC的連接當(dāng)一個進(jìn)程被控制的PLC,它使用傳感器的輸入作出決定和更新輸出,可驅(qū)動器,如圖2.1所示。這個過程是一個真正的進(jìn)程將隨時(shí)間而改變。執(zhí)行器將驅(qū)動系統(tǒng),以新的國家(或模式操作)。這意味著,該控制器是由傳感器提供,如果輸入有限不可用時(shí),控制器將無法檢測的條件。圖2.1控制器和分離過程控制回路是臨立會讀的投入不斷循環(huán),解決了階梯邏輯,然后更改輸出。如同任何電腦不會發(fā)生即時(shí)。圖2.2顯示了PLC的基本操作周期。當(dāng)電源開啟最初的PLC做了快速完整性檢查,以確保硬件正常工作。如果有問題,臨立會停止,并說明有錯誤。例如,如果PLC的功率下降,即將引爆這將導(dǎo)致故障類型之一。如果臨立會通過的完整性檢查,然后將掃描(讀取)所有的投入。輸入值后,存儲在內(nèi)存中的階梯邏輯將掃描(解決)使用存儲的值 - 不是當(dāng)前值。這樣做是為了防止當(dāng)輸入邏輯問題期間更改梯子邏輯掃描。當(dāng)梯子邏輯掃描完成的產(chǎn)出將掃描(輸出值將被更改)。之后系統(tǒng)將可以追溯到做完整性檢查,和循環(huán)繼續(xù)下去。不同于一般的計(jì)算機(jī),整個程序?qū)⒈幻看螔呙柽\(yùn)行。對每個階段的典型是時(shí)代的毫秒秩序。圖2.2 PLC的掃描周期2.2梯形邏輯輸入PLC的輸入很容易代表梯形邏輯。在圖2.3有三個類型的顯示的投入。前兩個是常開和常閉投入,討論以前。 IIT的(立即輸入)函數(shù)允許后才能投入讀輸入掃描,而梯形邏輯被掃描。這使得梯形邏輯研究輸入值往往超過一個周期。 (注:本指令是不可用在ControlLogix處理器,但仍然可以用舊型號的。)圖2.3梯形邏輯圖輸入2.3梯形邏輯輸出在梯形邏輯有多種類型的產(chǎn)出,但這些都不是一貫可在所有的PLC。產(chǎn)出部分將外部連接的設(shè)備以外PLC的,但它也可以用在PLC內(nèi)部存儲器位置。 6種輸出顯示在圖2.4。第一個是正常的輸出,輸出時(shí)活力會打開,和激勵輸出。用斜線通過圓是正常在輸出。當(dāng)通電輸出將關(guān)閉。這種類型的輸出上沒有所有的PLC類型。當(dāng)最初活力的OSR(一炮接力)指令將打開一個掃描,但后來被掃描后,就所有關(guān)閉,直到它關(guān)閉。的L(鎖)和U(解鎖)指令可以用來鎖定輸出。當(dāng)一個L輸出帶旺輸出會變成無限期,即使輸出線圈deenergized。輸出可只有關(guān)閉使用的U輸出。最后一個指令是互操作性測試(立即輸出)這將允許產(chǎn)出,而不必為梯形邏輯等待掃描更新為完成。3.1輸入和輸出在投入和產(chǎn)出,到PLC是必要的監(jiān)測和控制的過程。輸入和輸出都可以分為兩種:基本類型的邏輯或連續(xù)??紤]一個燈泡的例子。如果它只能打開或關(guān)閉,這是合乎邏輯的控制。如果光線可以使變暗淡不同層次,它是連續(xù)的。連續(xù)價(jià)值觀似乎更直觀的,但邏輯值是首選,因?yàn)樗鼈冏尭嗟拇_定性和簡化控制。因此,大多數(shù)控件的應(yīng)用程序(和PLC)和邏輯投入使用輸出對于大多數(shù)應(yīng)用。因此,我們將討論邏輯I / O和休假連續(xù)的I / O后。對執(zhí)行器輸出使PLC在導(dǎo)致一些事情發(fā)生的過程。字母a執(zhí)行器的流行短名單如下,以相對受歡迎。電磁閥 - 邏輯輸出,可以切換液壓或氣動流。燈 - 這通??梢圆捎弥苯訌腜LC輸出邏輯輸出板。馬達(dá)起動器 - 電機(jī)常常引起人們的電流時(shí),開始大量的,因此他們需要電動機(jī)起動器,基本上大的繼電器。伺服電機(jī) - 從PLC的連續(xù)輸出可以命令變速或立場。從PLC的產(chǎn)出常常繼電器,但它們也可以固體電子學(xué)例如DC輸出或輸出的雙向交流晶體管。連續(xù)輸出要求特別輸出卡與數(shù)字到模擬轉(zhuǎn)換器。輸入來自傳感器轉(zhuǎn)化為電信號的物理現(xiàn)象。傳感器典型的例子是下面列出的普及相對順序。接近開關(guān) - 使用電感,電容或光線來檢測對象的邏輯。開關(guān) - 機(jī)械機(jī)制,將打開或關(guān)閉電接觸的邏輯信號。電位器 - 不斷措施角位置,使用性。LVDT(線性可變差動變壓器) - 線性位移的措施不斷用磁耦合。從PLC的產(chǎn)出常常繼電器,但它們也可以固體電子學(xué)例如DC輸出或輸出的雙向交流晶體管。連續(xù)輸出要求特別輸出卡與數(shù)字到模擬轉(zhuǎn)換器。輸入來自傳感器轉(zhuǎn)化為電信號的物理現(xiàn)象。傳感器典型的例子是下面列出的普及相對順序。接近開關(guān) - 使用電感,電容或光線來檢測對象的邏輯。開關(guān) - 機(jī)械機(jī)制,將打開或關(guān)閉電接觸的邏輯信號。電位器 - 不斷措施角位置,使用性。LVDT(線性可變差動變壓器) - 線性位移的措施不斷用磁耦合。3.1.1 PLC的輸入在較小的投入通常是內(nèi)置在購買時(shí)指定的PLCPLC的。對于較大的PLC的投入是作為模塊或信用卡購買,8或16投入的每張卡上同一類型。為了便于討論,我們將討論所有的投入如果他們已經(jīng)購買的卡。下面的列表顯示了典型的輸入電壓范圍,大約是為了普及。PLC的輸入卡很少供電,這意味著一個外部電源需要提供的投入和傳感器等。圖3.1中的例子顯示了如何連接到一個AC輸入卡。圖3.1 AC輸入卡和梯形邏輯在這個例子中有兩個輸入,一個是常開按鈕,和第二個是一個溫度開關(guān),或熱繼電器。 (注意:這些符號是標(biāo)準(zhǔn)稍后將討論在這一章。)的開關(guān)都采用了積極/炎熱的輸出器24VAC電源 - 這就像在一個直流電源正端的。權(quán)力是提供給對兩個開關(guān)的左側(cè)。當(dāng)開關(guān)打開有傳遞到輸入卡沒有電壓。如果任一電源開關(guān),將關(guān)閉提供給輸入卡。在這種情況下投入1和3是使用 - 通知,開始投入在0。輸入卡比較這些電壓的共同。如果輸入電壓范圍內(nèi)一個給定的容差范圍的投入,將開關(guān)。梯形邏輯圖中顯示為的投入。在這里它使用的ControlLogix艾倫布拉德利符號。在頂部的標(biāo)簽(變量名)為在機(jī)架上。輸入卡(我)是在插槽3,因此該卡的地址是鮑勃:3.I.Data.x,其中,x是輸入位的數(shù)字。這些地址也可以給定別名標(biāo)簽,使較少的階梯邏輯混亂。許多初學(xué)者成為混淆在連接電路中需要上面的。關(guān)鍵是要記住單詞的電路,這意味著有一個完整的循環(huán)電壓必須能夠遵循。在圖3.1之后,我們可以啟動電路(循環(huán))在電源。路徑穿過交換機(jī),通過輸入卡,再回到電源回流的地方通過向啟動。在實(shí)施全面的PLC那里將是每一個都必須完成許多電路。第二個重要的概念是共同的。在這里,中立的電力供應(yīng)是共同的,或參考電壓。實(shí)際上,我們選擇了這是我們?yōu)?V參考,和所有其他電壓測量相對于它。如果我們有一個第二個電源,我們還需要連接的中性,使這兩個中立國將連接到同樣普遍。通常的共同和地面也會無所適從。常見的是一個參考,或基準(zhǔn)電壓,用于為0V使用,但地面是用于防止沖擊和損害到設(shè)備。地面連接到下一個金屬管道或在網(wǎng)格建設(shè)地面。這是連接到建筑物的電氣系統(tǒng),對電源插座,在電氣設(shè)備的金屬案件有關(guān)。當(dāng)電源流經(jīng)地上是壞的。不幸的是許多工程師,制造混淆的地面和共同的。這是很常見找到一個與地面和共同錯誤標(biāo)簽供電。最后一個概念,初學(xué)者往往陷阱是每個輸入卡是孤立的。這意味著,如果你有一個共同的連接只有一個卡,那么其他卡未連接。當(dāng)發(fā)生這種情況的其他卡將無法正常工作。您必須連接共同為每個輸出卡。3.1.2 輸出模塊正如輸入模塊,輸出模塊很少提供任何權(quán)力,而是作為開關(guān)。外部電源連接到輸出卡和卡開關(guān)電源或關(guān)閉每個輸出。典型的輸出電壓下面列出,并大致排序受歡迎。這些卡通常有8至16個相同類型的輸出,就可以買到不同的額定電流。一種常見的選擇,采購卡的繼電器輸出,晶體管或可控硅。繼電器是最靈活的輸出設(shè)備。他們有能力開關(guān)交流和直流輸出。但是,他們會更慢(約10ms的切換是典型),他們是笨重的,他們花費(fèi)更多,而且會磨損周期后,數(shù)百萬人。繼電器輸出通常被稱為干觸點(diǎn)。晶體管是有限的直流輸出,和雙向的僅限于交流輸出。晶體管和可控硅輸出稱為切換輸出。 一個獨(dú)立的繼電器,致力于每個輸出。這使得混合電壓(AC或DC和電壓水平,直至最高),以及絕緣輸出以保護(hù)其他產(chǎn)出和PLC。響應(yīng)時(shí)間往往大于10毫秒。此方法是最不敏感的電壓變化和尖峰。交換產(chǎn)出 - 電壓提供給PLC的卡,卡切換到使用固態(tài)電路(晶體管,晶閘管等)雙向不同的輸出適合交流設(shè)備需要小于1A。晶體管輸出NPN或使用PNP晶體管高達(dá)1A典型。它們的反應(yīng)時(shí)間大大低于1毫秒。Automating Manufacturing Systems with PLCsControl engineering has evolved over time. In the past humans were the mainmethod for controlling a system. More recently electricity has been used for control andearly electrical control was based on relays. These relays allow power to be switched onand off without a mechanical switch. It is common to use relays to make simple logicalcontrol decisions. The development of low cost computer has brought the most recent revolution,the Programmable Logic Controller (PLC). The advent of the PLC began in the1970s, and has become the most common choice for manufacturing controls.PLCs have been gaining popularity on the factory floor and will probably remainpredominant for some time to come. Most of this is because of the advantages they offer.1.1 Ladder logic Ladder logic is the main programming method used for PLCs. As mentioned before, ladder logic has been developed to mimic relay logic. logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for engineers and tradespeople was greatly reduced.Modern control systems still include relays, but these are rarely used for logic. A relay is a simple device that uses a magnetic field to control a switch, as pictured in Figure 1.1. When a voltage is applied to the input coil, the resulting current creates a magnetic field. The magnetic field pulls a metal switch (or reed) towards it and the contacts touch, closing the switch. Figure 1.1 Simple Relay Layouts and SchematicsRelays are used to let one power source close a switch for another (often high current) power source, while keeping them isolated. An example of a relay in a simple control application is shown in Figure 1.2. In this system the first relay on the left is used as normally closed, and will allow current to flow until a voltage is applied to the input A. The second relay is normally open and will not allow current to flow until a voltage is applied to the input B. If current is flowing through the first two relays then current will flow through the coil in the third relay, and close the switch for output C. This circuit would normally be drawn in the ladder logic form. This can be read logically as C will be on if A is off and B is on.Figure 1.2 A Simple Relay ControllerThe example in Figure 1.2 does not show the entire control system, but only the logic. When we consider a PLC there are inputs, outputs, and the logic. Figure 1.3 shows a more complete representation of the PLC. Here there are two inputs from push buttons.We can imagine the inputs as activating 24V DC relay coils in the PLC. This in turn drives an output relay that switches 115V AC, that will turn on a light. Note, in actual PLCs inputs are never relays, but outputs are often relays. The ladder logic in the PLC is actually a computer program that the user can enter and change. Notice that both of the input push buttons are normally open, but the ladder logic inside the PLC has one normally open contact, and one normally closed contact. Do not think that the ladder logic in the PLC need so match the inputs or outputs. Many beginners will get caught trying to make the ladder logic match the input types.Figure 1.3 A PLC Illustrated With RelaysMany relays also have multiple outputs (throws) and this allows an output relay to also be an input simultaneously. The circuit shown in Figure 1.4 is an example of this, it is called a seal in circuit. In this circuit the current can flow through either branch of the circuit, through the contacts labelled A or B. The input B will only be on when the output B is on. If B is off, and A is energized, then B will turn on. If B turns on then the input B will turn on, and keep output B on even if input A goes off. After B is turned on the output B will not turn off.Figure 1.4 A Seal-in Circuit1.2 ProgrammingThe first PLCs were programmed with a technique that was based on relay logic wiring schematics. This eliminated the need to teach the electricians, technicians and engineers how to program a computer - but, this method has stuck and it is the most common technique for programming PLCs today. An example of ladder logic can be seen in Figure 1.5. To interpret this diagram imagine that the power is on the vertical line on the left hand side, we call this the hot rail. On the right hand side is the neutral rail. In the figure there are two rungs, and on each rung there are combinations of inputs (two vertical lines) and outputs (circles). If the inputs are opened or closed in the right combination the power can flow from the hot rail, through the inputs, to power the outputs, and finally to the neutral rail. An input can come from a sensor, switch, or any other type of sensor. An output will be some device outside the PLC that is switched on or off, such as lights or motors. In the top rung the contacts are normally open and normally closed. Which means if input A is on and input B is off, then power will flow through the output and activate it. Any other combination of input values will result in the output X being off.Figure 1.5 A Simple Ladder Logic DiagramThe second rung of Figure 1.5 is more complex, there are actually multiple combinations of inputs that will result in the output Y turning on. On the left most part of the rung, power could flow through the top if C is off and D is on. Power could also (and simultaneously) flow through the bottom if both E and F are true. This would get power half way across the rung, and then if G or H is true the power will be delivered to output Y. In later chapters we will examine how to interpret and construct these diagrams. There are other methods for programming PLCs. One of the earliest techniques involved mnemonic instructions. These instructions can be derived directly from the ladder logic diagrams and entered into the PLC through a simple programming terminal. An example of mnemonics is shown in Figure 1.6. In this example the instructions are read one line at a time from top to bottom. The first line 00000 has the instruction LDN (input load and not) for input A. . This will examine the input to the PLC and if it is off it will remember a 1 (or true), if it is on it will remember a 0 (or false). The next line uses an LD (input load) statement to look at the input. If the input is off it remembers a 0, if the input is on it remembers a 1 (note: this is the reverse of the LD). The AND statement recalls the last two numbers remembered and if the are both true the result is a 1, otherwise the result is a 0. This result now replaces the two numbers that were recalled, and there is only one number remembered. The process is repeated for lines 00003 and 00004, but when these are done there are now three numbers remembered. The oldest number is from the AND, the newer numbers are from the two LD instructions. The AND in line 00005 combines the results from the last LD instructions and now there are two numbers remembered. The OR instruction takes the two numbers now remaining and if either one is a 1 the result is a 1, otherwise the result is a 0. This result replaces the two numbers, and there is now a single number there. The last instruction is the ST (store output) that will look at the last value stored and if it is 1, the output will be turned on, if it is 0 the output will be turned off.Figure 1.6 An Example of a Mnemonic Program and Equivalent Ladder LogicThe ladder logic program in Figure 1.6, is equivalent to the mnemonic program. Even if you have programmed a PLC with ladder logic, it will be converted to mnemonic form before being used by the PLC. In the past mnemonic programming was the most common, but now it is uncommon for users to even see mnemonic programs. Sequential Function Charts (SFCs) have been developed to accommodate the programming of more advanced systems. These are similar to flowcharts, but much more powerful. The example seen in Figure 1.7 is doing two different things. To read the chart, start at the top where is says start. Below this there is the double horizontal line that says follow both paths. As a result the PLC will start to follow the branch on the left and right hand sides separately and simultaneously. On the left there are two functions the first one is the power up function. This function will run until it decides it is done, and the power down function will come after. On the right hand side is the flash function, this will run until it is done. These functions look unexplained, but each function, such as power up will be a small ladder logic program. This method is much different from flowcharts because it does not have to follow a single path through the flowchart.Figure 1.7 An Example of a Sequential Function ChartStructured Text programming has been developed as a more modern programming language. It is quite similar to languages such as BASIC. A simple example is shown in Figure 1.8. This example uses a PLC memory location i. This memory location is for an integer, as will be explained later in the book. The first line of the program sets the value to 0. The next line begins a loop, and will be where the loop returns to. The next line recalls the value in location i, adds 1 to it and returns it to the same location. The next line checks to see if the loop should quit. If i is greater than or equal to 10, then the loop will quit, otherwise the computer will go back up to the REPEAT statement continue from there. Each time the program goes through this loop i will increase by 1 until the value reaches 10.Figure 1.8 An Example of a Structured Text Program2.1 PLC ConnectionsWhen a process is controlled by a PLC it uses inputs from sensors to make decisions and update outputs to drive actuators, as shown in Figure 2.1. The process is a real process that will change over time. Actuators will drive the system to new states (or modes of operation). This means that the controller is limited by the sensors available, if an inputis not available, the controller will have no way to detect a condition.Figure 2.1 The Separation of Controller and ProcessThe control loop is a continuous cycle of the PLC reading inputs, solving the ladder logic, and then changing the outputs. Like any computer this does not happen instantly. Figure 2.2 shows the basic operation cycle of a PLC. When power is turned on initially the PLC does a quick sanity check to ensure that the hardware is working properly.If there is a problem the PLC will halt and indicate there is an error. For example, if the PLC power is dropping and about to go off this will result in one type of fault. If the PLC passes the sanity check it will then scan (read) all the inputs. After the inputs values are stored in memory the ladder logic will be scanned (solved) using the stored values not the current values. This is done to prevent logic problems when inputs change during the ladder logic scan. When the ladder logic scan is complete the outputs will be scanned (the output values will be changed). After this the system goes back to do a sanity check, and the loop continues indefinitely. Unlike normal computers, the entire program will be run every scan. Typical times for each of the stages is in the order of milliseconds.Figure 2.2 The Scan Cycle of a PLC2.2 Ladder Logic InputsPLC inputs are easily represented in ladder logic. In Figure 2.3 there are three types of inputs shown. The first two are normally open and normally closed inputs, discussed previously. The IIT (Immediate InpuT) function allows inputs to be read after the input scan, while the ladder logic is being scanned. This allows ladder logic to examine input values more often than once every cycle. (Note: This instruction is not avail

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論