版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、Introductions of PLC and MCUA PLC is a device that was invented to replace the necessarysequential relay circuits for machine control. The PLC works by looking at its inputs and depending upon their state, turning on/off its outputs .The user enters a program, usually via software or programmer that
2、 gives the desired results.PLC are used in many “ realworld ”applications. If there is industry present, chances are good that there is a PLC present. If you are involved in machining, packaging, material handling, automated assembly or countless other industries, you are probably already using them
3、. If you are not, you are wasting money and time. Almost any application that needs some type of electrical control has need for PLC.For example, let s assumewhenthat switch turns on we want to turn a solenoid on for 5 seconds and then turn it off regardless of how long the switch is on for. We can
4、do this with a simple external timer. What if the process also needed to count how many times the switch individually turned on? We need a lot of external counters.As you can see, the bigger the process the more of a need we have for a PLC. We can simply program the PLC to count its inputs and turn
5、the solenoids on for the specified time.We will take a look at what i s considered to be the “ top 20 ” PLC instructions. It can be safely estimated that with a firm understanding of there instructions one can solve more than 80% of the applications in existence.That right,s more than 80%! Of course
6、 we ll learn more than just these instructions to help you solve almost ALL your potential PLC applications.The PLC mainly consists of a CPU, memory areas, and appropriate circuits to receive input/output data, as shown in Fig. 19.1 We can actually consider the PLC to be a box full of hundreds or th
7、ousands of separate relays, counters, timer and date storage locations. Do these counters, timers, etc. really exist? No, they don t“ physically exist” but rather they are simulated and can be considered softwarecounters, timers, etc. These internal relays are simulated through bit locations in regi
8、sters.What does each part do?INPUT RELAYS-(contacts) These are connected to the outside world. They physically exist and receive signals from switches, sensors, etc. Typically they are not relays but rather they are transistors.INTERNAL UTILITY RELAYS-(contacts)These do not receive signals fromthe o
9、utside world nor do they physically exist. They are simulated relays and are what enables a PLC to eliminate external relays. There are also some special relays that are dedicated to performing only one task. Some are always on while some are always off. Some are on only once during power-on and are
10、 typically user for initializing data what was stored.COUNTERS These again do not physically exist. They are simulated counters and they can be programmed to count pulses. Typically these counters can count up, down or both up and down. Since there are simulated, they are limited in their counting s
11、peed. Some manufacturers also include high-speed counters that are hardware based. We can think of these as physically existing. Most timers these counters can count up, down or up and down.TIMERS These also do not physically exist. They come in many varieties and increments. The most common type is
12、 an on-delay type. Other include off-delay and both retentive and non-retentive types. Increments vary from 1ms through 1s.OUTPUT RELAYS-(coil) These are connected to the outside world. They physically exist and send on/off signals to solenoids, lights, etc They can be transistors, relays, or triacs
13、 depending upon the model chosen.DATA STORAGE-Typically there are registers assigned to simply store data. There are usually used as temporary storage for math or data manipulation. They can also typically be user power-up they will still have the same contents as before power war removed. Very conv
14、enient and necessary!Step 1-CHECK INPUT STATUS-First the PLC takes a look at each input to determine if it is on or off. In other words, is the sensor connected to the first input on? How about the second input? How about the third Itrecords this data into its memory to be used during the next step.
15、Step 2-EXECUTE PROGRAM-Next the PLC executes your program one instruction at a time. Maybe your program said that if the first input was on then it should turn on the first output. Since is already knows which inputs are on/off from the previous step, it will be able to decide whether the first outp
16、ut should be turned onbased on the state of the first input. It will store the execution results for use later during the next step.Step 3-UPDATE OUTPUT STSTUS-Finally the PLC updates the status ofoutputs. It updates the outputs based on which inputs were on during the first step and the results of
17、executing your program during the second step. Based on the example in step 2 it would now turn on the first output because the first input was on and your program said to turn on the first output when this condition is true.After the third step the PLC goes back to step one and repeats the steps co
18、ntinuously. One scan time is defined as the time is takes to execute the 3 steps listed above. Thus a practical system is controlled to perform specified operations as desired.The AT89S52 is a low-power, high-performance CMOS 8-bit microcontrollerwith 8Kbytes of in-system programmable Flash memory.
19、The device is manufacturedusing Atmel s highdensity- nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin-out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatilememory programmer. By combining
20、a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.The AT89S52 provides the following standard features: 8K bytes of Flash, 25
21、6 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port,on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency
22、and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM,timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the n
23、ext interrupt or hardware reset.Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When is written to port 0 pins, the pins can be used as high-impedance inputs.Port 0 can also be configured to be the multiplexed lowered address/data bus duri
24、ng accesses to external program and data memory. In this mode, P0 has internal pull-ups.Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during program verification.Port 1 is an 8-bit bidirectional I/O
25、 port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (I IL) because of the in
26、ternal pull-ups.In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX).PLC 和微處理器簡(jiǎn)介PLC(可編程邏輯控制器 )是極限控制中為代替必要的繼電器時(shí)序電路而發(fā)明的一種設(shè)備。 PLC 工作時(shí)通過(guò)查詢輸入端并根據(jù)其狀態(tài)打開(kāi)或關(guān)閉輸出。 用戶通常用軟件或編程器輸入程序,從而或得期望的結(jié)果。很多實(shí)際應(yīng)用都采用PLC。工業(yè)生產(chǎn)中應(yīng)用PLC
27、 的可能性很高。如果你正在進(jìn)行機(jī)械制造,產(chǎn)品包裝,材料處理,自動(dòng)化裝配及無(wú)數(shù)其他工業(yè)生產(chǎn),你可能已經(jīng)用到了 PLC。如果你沒(méi)有用到, 那就是在浪費(fèi)金錢和時(shí)間。 幾乎所有需要電氣控制的地方都需要PLC。例如,假定在開(kāi)關(guān)閉合時(shí)我們需要一個(gè)線圈接通 5 秒然后不管開(kāi)關(guān)接通多長(zhǎng)時(shí)間都將線圈斷開(kāi)。 我們可以通過(guò)一個(gè)簡(jiǎn)單的外部定時(shí)器來(lái)實(shí)現(xiàn)。 但是加入該過(guò)程有十個(gè)開(kāi)關(guān)和線圈呢?我們就需要十個(gè)外部定時(shí)器。 如果這個(gè)過(guò)長(zhǎng)分別記錄每個(gè)開(kāi)關(guān)開(kāi)啟的次數(shù)呢?我們又需要很多外部計(jì)數(shù)器。由此可見(jiàn),系統(tǒng)越大,我們就越需要 PLC。我們可以簡(jiǎn)單地用 PLC 編程來(lái)對(duì)輸入信號(hào)進(jìn)行技術(shù),并在規(guī)定的時(shí)間接通線圈。我們考察一下哪些是
28、PLC 中最常用的 20 條指令。保守地估計(jì)一下,如果鎮(zhèn)長(zhǎng)地掌握了這些指令,就能解決 80%以上現(xiàn)存的應(yīng)用問(wèn)題。是的, 80%以上!當(dāng)然,我們要學(xué)習(xí)的指令比這些更多,以幫助你解決幾乎所有潛在的 PLC 應(yīng)用問(wèn)題。PLC 主要由中央處理器 (CPU),存儲(chǔ)器和輸入,輸出電路構(gòu)成,我們可以將 PLC 看成是一個(gè)裝滿了成百上千個(gè)獨(dú)立的繼電器, 計(jì)數(shù)器,定時(shí)器,以及數(shù)據(jù)存儲(chǔ)器的盒子。這些計(jì)數(shù)器,定時(shí)器,定時(shí)器等是不是真的存在呢?不,它們都是模擬的,物理上并不存在,但可以將它們看長(zhǎng)是軟計(jì)數(shù)器,軟定時(shí)器。這些內(nèi)部繼電器是用寄存器中的單元模擬出來(lái)的。各個(gè)部分是如何工作的呢?輸入繼電器 (觸點(diǎn) )這些繼電器連
29、接外部電路。它們是實(shí)際存在的,并接受來(lái)自開(kāi)關(guān),傳感器等的信號(hào),通常是晶體管而非繼電器。內(nèi)部通用繼電器 (觸點(diǎn) )它們不從外部設(shè)備接受信號(hào),也非物理上存在的。它們是模擬的繼電器,用以消除 PLC 的外部繼電器。此外還有一些特殊繼電器,專門執(zhí)行一項(xiàng)任務(wù)。 其中一些是常開(kāi)的, 一些是常閉的。 有一些僅在電源上電時(shí)導(dǎo)通一次,通常用來(lái)初始化存儲(chǔ)的數(shù)據(jù)。計(jì)數(shù)器它們也并非物理上存在的,而是模擬的計(jì)數(shù)器,可通過(guò)編程來(lái)對(duì)脈沖進(jìn)行計(jì)數(shù)。 通常它們可進(jìn)行加計(jì)數(shù), 減計(jì)數(shù)或同時(shí)進(jìn)行加減計(jì)數(shù)。因?yàn)樗鼈兪怯密浖M的, 計(jì)數(shù)速度就有限。 一些制造商提供了基于硬件的高速計(jì)數(shù)器,這樣的計(jì)數(shù)器可以認(rèn)為是物理上存在的。 這些計(jì)數(shù)
30、器多數(shù)情況下可以進(jìn)行加計(jì)數(shù)減計(jì)數(shù)或同時(shí)進(jìn)行加減計(jì)數(shù)。定時(shí)器它們也并非物理上存在的,分為多種類型和定時(shí)單位。 最常用的一種類型是延時(shí)導(dǎo)通型。 其他類型還有延時(shí)斷開(kāi)型, 記憶和非記憶型。 定時(shí)單位的范圍是 1MS 到 1S輸出繼電器 (線圈 ) 該部分連接到外圍電路。它們是物理上存在的,并給線圈,燈等發(fā)送開(kāi)關(guān)信號(hào)。輸出繼電器也可以是晶體管,繼電器或可控硅,取決于選擇的型號(hào)。數(shù)據(jù)寄存器它們通常是用來(lái)存儲(chǔ)數(shù)據(jù)的寄存器,一般作為運(yùn)算或數(shù)據(jù)處理的暫存器。在 PLC 斷電時(shí)通常還可以用來(lái)存儲(chǔ)數(shù)據(jù)。再次接通電源后,其內(nèi)容與斷電前相同,非常方便且必要。PLC 是通過(guò)連續(xù)掃描一個(gè)程序來(lái)工作的。我們可以認(rèn)為掃描周期
31、是由三個(gè)主要階段組成的。 如圖所示。當(dāng)然有多余三個(gè)階段的情況, 但我們可關(guān)注重要的環(huán)節(jié),忽略其他環(huán)節(jié)。 其他階段通常正在檢查系統(tǒng)及更新內(nèi)部計(jì)數(shù)器和定時(shí)器的當(dāng)前值。第一步 -檢查輸入狀態(tài) -首先 PLC 檢查每一個(gè)輸入是否接通。換句說(shuō)就是,與第一個(gè)輸入端連接的傳感器接通了嗎?第二哥輸入呢?第三個(gè)輸入呢?PLC 將這些數(shù)據(jù)記錄到存儲(chǔ)器中,以便在下一個(gè)階段使用。第二步 -執(zhí)行程序 -然后 PLC 一次一條地執(zhí)行程序。你的程序可能要求第一個(gè)輸入接通時(shí), 接接通第一個(gè)輸出。 因?yàn)樵谏弦徊揭呀?jīng)知道輸入端的開(kāi)關(guān)狀態(tài),根據(jù)上一步輸入端的狀態(tài), 就可以確定是否應(yīng)該接通第一個(gè)輸出。 PLC 將執(zhí)行結(jié)果存儲(chǔ)起來(lái),以供下一步使用。第三步 -更新輸出狀
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 新小區(qū)物業(yè)承包合同示例
- 2024系統(tǒng)開(kāi)發(fā)合同
- 2024年餐廳租賃合同模板
- 2024分期付款購(gòu)買合同
- 文化節(jié)慶活動(dòng)贊助協(xié)議
- 2025年會(huì)計(jì)專業(yè)考試高級(jí)會(huì)計(jì)實(shí)務(wù)試卷及解答參考
- 排水箱涵勞務(wù)分包合同2024年
- 城市管道天然氣特許經(jīng)營(yíng)合同
- 撫養(yǎng)權(quán)變更協(xié)議模板2024年
- 協(xié)商一致解除勞動(dòng)合同書樣本
- 新蘇教版五年級(jí)上冊(cè)科學(xué)全冊(cè)教學(xué)課件(2022年春整理)
- 小學(xué)體育水平一《走與游戲》教學(xué)設(shè)計(jì)
- 秋日私語(yǔ)(完整精確版)克萊德曼(原版)鋼琴雙手簡(jiǎn)譜 鋼琴譜
- 辦公室室內(nèi)裝修工程技術(shù)規(guī)范
- 鹽酸安全知識(shí)培訓(xùn)
- 萬(wàn)盛關(guān)于成立醫(yī)療設(shè)備公司組建方案(參考模板)
- 消防安全巡查記錄臺(tái)帳(共2頁(yè))
- 科技特派員工作調(diào)研報(bào)告
- 中波廣播發(fā)送系統(tǒng)概述
- 縣疾控中心中層干部競(jìng)聘上崗實(shí)施方案
- 急性心肌梗死精美PPt完整版
評(píng)論
0/150
提交評(píng)論