【正文】
development of low cost puter has brought the most recent revolution, the Programmable Logic Controller (PLC). The advent of the PLC began in the 1970s, and has bee the most mon choice for manufacturing controls.PLCs have been gaining popularity on the factory floor and will probably remain predominant for some time to e. Most of this is because of the advantages they offer Cost effective for controlling plex systems. Flexible and can be reapplied to control other systems quickly and easily. Computational abilities allow more sophisticated control. Trouble shooting aids make programming easier and reduce downtime. Reliable ponents make these likely to operate for years before failure.2Ladder LogicLadder logic is the main programming method used for PLCs. As mentioned before, ladder logic has been developed to mimic relay logic. The decision to use the relay logic diagrams was a strategic one. By selecting ladder logic as the main programming method, the amount of retraining needed for engineers and trades people 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 magic field to control a switch, as pictured in FigureA1. When a voltage is applied to the input coil, the resulting current creates a magic field. The magic field pulls a metal switch (or reed) towards it and the contacts touch, closing the switch. The contact that closes when the coil is energized is called normally open. The normally closed contacts touch when the input coil is not energized. Relays are normally drawn in schematic form using a circle to represent the input coil. The output contacts are shown with two parallel lines. Normally open contacts are shown as two lines, and will be open (nonconducting) when the input is not energized. Normally closed contacts are shown with two lines with a diagonal line through them. When the input coil is not energized the normally closed contacts will be closed (conducting). 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 31 頁 Figure A1 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 FigureA2. 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.The example in FigureA2 does not show the entire control system, but only the logic. When we consider a PLC there are inputs, outputs, and the logic. FigureA3 shows a more plete 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 puter program that the user can enter and change. Notice that both of the input push buttons are 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 32 頁Figure A2 A Simple Relay Controllernormally 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 needs to match the inputs or outputs. Many beginners will get caught trying to make the ladder logic match the input types.Figure A3 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 FigureA4 is an example of this。結(jié)合堆垛機的工作特性,SIMATIC S7300 是既經(jīng)濟又方便的選擇方案。由于機械手是以 5m/min 的速度運動,伸縮距離為 30cm,定時器 C37 是以100ms 為基本記時單位的,所以計算得到機械手可以到達預(yù)定位置的時間:運動距離 L=30cm速度 v=5m/min運行時間 t=L/v*===3z600ms因此選用 100ms 定時器 C37 進行計時,應(yīng)該設(shè)置計時累加為 36。網(wǎng)絡(luò) 6 的梯形圖如圖 所示 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 23 頁圖 網(wǎng)絡(luò) 6由于基本原理與前面的前后、升降運動相似,就不詳細說明了,下面只對一些不 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 24 頁同于前面兩種運動的情況進行說明。如果小車處于已經(jīng)完成了取放貨的動作,那么判斷小車是否已經(jīng)完成了由貨架上的返回(伸縮機械手的運動) ,如果小車這個過程已經(jīng)完成,那么將開始進行后退運動。網(wǎng)絡(luò) 4 的梯形圖如圖 所示 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 21 頁圖 網(wǎng)絡(luò) 4自動控制下面是自動控制部分,由網(wǎng)絡(luò) 5 實現(xiàn)。為 ON 時,表示機械手已經(jīng)到達指定位置,為 OFF 遼寧科技大學(xué)畢業(yè)設(shè)計(論文) 第 20 頁時表示還未到達指定位置。當(dāng)小車還處于取放貨的動作未完成的階段時,需要判斷的是小車是否已經(jīng)完成了列的定位,如果未完成列的定位( 為 OFF) ,那么啟動小車前進的電機使小車向前運動。根據(jù)這種要求,在編寫程序的時候加入了 3 個不同的 BOOL 類型的變量 、 以及 ,分別作為小車沿列向運行到位標(biāo)志、機械手沿行向運行到位標(biāo)志、機械手貨架到位標(biāo)志。其運動的方式和運動的目的,這樣才不至于因為目的不明確而造成錯誤的判斷以及錯誤的動作,造成存取貨物的失敗。 )這是一段簡單的初始化過程程序,S7300 在讀特殊內(nèi)存,只有在首次掃描循環(huán)時打開,所以這段初始化程序只在程序開始運行的時候執(zhí)行一次。位控模塊的特性如下:(1)位控模塊可提供單軸開環(huán)移動控制所需要的功能和性能;(2)提供高速控制從每秒 12 個脈沖至每秒 200 000 個脈沖;(3)支持急停 S 曲線或線形的加速減速功能;(4)提供可組態(tài)的測量系統(tǒng),既可以使用工程單位如英寸或厘米,也可以使用脈沖數(shù);(5)支持手動的位控方式;(6)提供連續(xù)操作;(7)提供 4 種不同的參考點尋找模式,每種模式都可對起始的尋找方向和最終的接近方向進行選擇。數(shù)字量通道(中央) 256可裝載的塊的數(shù)量(FC+FB+DB 的總和) 1024位操作 <200ns位存儲器/定時器/計數(shù)器此外,豐富的 CPU 類型和電壓等級使其在解決工業(yè)自動化問題時,具有很強的適應(yīng)性。(3)存取貨物的過程:在這個過程中,通過控制機械手臂的運動,使機械手到達預(yù)先指定的位置,然后根據(jù)實際的需要完成存放或者取得貨物的操作。在各個階段,對象的特性相對穩(wěn)定,并且小車在前進和抬升貨物的過程控制方面是基本一致的。另外隨著電子技術(shù)的發(fā)展,出現(xiàn)了眾多優(yōu)秀的 PLC,用 PLC 來控制堆垛機是相當(dāng)靈活方便的,可以在 PLC 的軟件中加保護,即堆垛機每走過一個貨格的時間超過或少于正常的時間范圍就報警。PLC 控制系統(tǒng)總體方案設(shè)計的硬件組成框圖: 圖 硬件組成框圖編程器的顯示器有二行共 32 位 57 的液晶點陣,可以顯示數(shù)字、符號和字母;可編程控制器功率驅(qū)動器 電 機 計算機鍵盤作為 按鈕輸入