中英文外文翻譯--plc和微處理器_第1頁(yè)
已閱讀1頁(yè),還剩6頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、<p>  Introductions of PLC and MCU</p><p>  A PLC is a device that was invented to replace the necessary sequential relay circuits for machine control. The PLC works by looking at its inputs and dependi

2、ng upon their state, turning on/off its outputs .The user enters a program, usually via software or programmer that gives the desired results.</p><p>  PLC are used in many “real world” applications. If ther

3、e 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.

4、If you are not, you are wasting money and time. Almost any application that needs some type of electrical control has need for PLC.</p><p>  For example, let’s assume that when a switch turns on we want to t

5、urn a solenoid on for 5 seconds and then turn it off regardless of how long the switch is on for. We can do this with a simple external timer. What if the process also needed to count how many times the switch individua

6、lly turned on? We need a lot of external counters.</p><p>  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 the solenoi

7、ds on for the specified time.</p><p>  We will take a look at what is considered to be the “top 20” PLC instructions. It can be safely estimated that with a firm understanding of there instructions one can s

8、olve more than 80% of the applications in existence.</p><p>  That‘s right, more than 80%! Of course we’ll learn more than just these instructions to help you solve almost ALL your potential PLC applications

9、.</p><p>  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 thousa

10、nds 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 software counters, t

11、imers, etc. These internal relays are simulated through bit locations in regist</p><p>  What does each part do?</p><p>  INPUT RELAYS-(contacts) These are connected to the outside world. T

12、hey physically exist and receive signals from switches, sensors, etc... Typically they are not relays but rather they are transistors.</p><p>  INTERNAL UTILITY RELAYS-(contacts) These do not receive signal

13、s from the outside 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.

14、 Some are always on while some are always off. Some are on only once during power-on and are typically user for initializing data what was stored.</p><p>  COUNTERS These again do not physically exist. They

15、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 speed. Some manufacturers

16、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. </p><p>  TIMERS These also do not physi

17、cally exist. They come in many varieties and increments. The most common type is an on-delay type. Other include off-delay and both retentive and non-retentive types. Increments vary from 1ms through 1s.</p><p

18、>  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 depending upon the model chosen.<

19、;/p><p>  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

20、still have the same contents as before power war removed. Very convenient and necessary!</p><p>  A PLC works by continually scanning a program. We can think of this scan cycle as consisting of 3 important s

21、teps, as shown in Fig.19.2 There are typically more than 3 but we can focus on the important parts and not worry about the others. Typically the others are checking the system and updating the current and timer values.&l

22、t;/p><p>  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 abou

23、t the third…It records this data into its memory to be used during the next step.</p><p>  Step 2-EXECUTE PROGRAM-Next the PLC executes your program one instruction at a time. Maybe your program said that if

24、 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 output should be turned on based on the

25、state of the first input. It will store the execution results for use later during the next step.</p><p>  Step 3-UPDATE OUTPUT STSTUS-Finally the PLC updates the status of outputs. It updates the outputs ba

26、sed on which inputs were on during the first step and the results of 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

27、your program said to turn on the first output when this condition is true.</p><p>  After the third step the PLC goes back to step one and repeats the steps continuously. One scan time is defined as the time

28、 is takes to execute the 3 steps listed above. Thus a practical system is controlled to perform specified operations as desired.</p><p>  The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroll

29、er with 8Kbytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pin-out.

30、The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic c</p>

31、;<p>  The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt arch

32、itecture, 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 and supports two software selectable power saving

33、modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters,</p><p>  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 writte

34、n to port 0 pins, the pins can be used as high-impedance inputs. </p><p>  Port 0 can also be configured to be the multiplexed lowered address/data bus during accesses to external program and data memory. In

35、 this mode, P0 has internal pull-ups.</p><p>  Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pull-ups are required during progr

36、am verification. </p><p>  Port 1 is an 8-bit bidirectional I/O 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

37、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 (IIL) because of the internal pull-ups.</p><p>  In addition, P1.0 and P1.1

38、 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).</p><p>  PLC和微處理器簡(jiǎn)介</p><p>  PLC(可編程邏輯控制器)是極限控制中為代替必要的繼電器時(shí)序電路而發(fā)明的一種

39、設(shè)備。PLC工作時(shí)通過(guò)查詢輸入端并根據(jù)其狀態(tài)打開或關(guān)閉輸出。用戶通常用軟件或編程器輸入程序,從而或得期望的結(jié)果。</p><p>  很多實(shí)際應(yīng)用都采用PLC。工業(yè)生產(chǎn)中應(yīng)用PLC的可能性很高。如果你正在進(jìn)行機(jī)械制造,產(chǎn)品包裝,材料處理,自動(dòng)化裝配及無(wú)數(shù)其他工業(yè)生產(chǎn),你可能已經(jīng)用到了PLC。如果你沒有用到,那就是在浪費(fèi)金錢和時(shí)間。幾乎所有需要電氣控制的地方都需要PLC。</p><p> 

40、 例如,假定在開關(guān)閉合時(shí)我們需要一個(gè)線圈接通5秒然后不管開關(guān)接通多長(zhǎng)時(shí)間都將線圈斷開。我們可以通過(guò)一個(gè)簡(jiǎn)單的外部定時(shí)器來(lái)實(shí)現(xiàn)。但是加入該過(guò)程有十個(gè)開關(guān)和線圈呢?我們就需要十個(gè)外部定時(shí)器。如果這個(gè)過(guò)長(zhǎng)分別記錄每個(gè)開關(guān)開啟的次數(shù)呢?我們又需要很多外部計(jì)數(shù)器。</p><p>  由此可見,系統(tǒng)越大,我們就越需要PLC。我們可以簡(jiǎn)單地用PLC編程來(lái)對(duì)輸入信號(hào)進(jìn)行技術(shù),并在規(guī)定的時(shí)間接通線圈。</p>&l

41、t;p>  我們考察一下哪些是PLC中最常用的20條指令。保守地估計(jì)一下,如果鎮(zhèn)長(zhǎng)地掌握了這些指令,就能解決80%以上現(xiàn)存的應(yīng)用問題。</p><p>  是的,80%以上!當(dāng)然,我們要學(xué)習(xí)的指令比這些更多,以幫助你解決幾乎所有潛在的PLC應(yīng)用問題。</p><p>  PLC主要由中央處理器(CPU),存儲(chǔ)器和輸入,輸出電路構(gòu)成,我們可以將PLC看成是一個(gè)裝滿了成百上千個(gè)獨(dú)立的繼電

42、器,計(jì)數(shù)器,定時(shí)器,以及數(shù)據(jù)存儲(chǔ)器的盒子。這些計(jì)數(shù)器,定時(shí)器,定時(shí)器等是不是真的存在呢?不,它們都是模擬的,物理上并不存在,但可以將它們看長(zhǎng)是軟計(jì)數(shù)器,軟定時(shí)器。這些內(nèi)部繼電器是用寄存器中的單元模擬出來(lái)的。</p><p>  各個(gè)部分是如何工作的呢?</p><p>  輸入繼電器(觸點(diǎn))這些繼電器連接外部電路。它們是實(shí)際存在的,并接受來(lái)自開關(guān),傳感器等的信號(hào),通常是晶體管而非繼電器。&

43、lt;/p><p>  內(nèi)部通用繼電器(觸點(diǎn))它們不從外部設(shè)備接受信號(hào),也非物理上存在的。它們是模擬的繼電器,用以消除PLC的外部繼電器。此外還有一些特殊繼電器,專門執(zhí)行一項(xiàng)任務(wù)。其中一些是常開的,一些是常閉的。有一些僅在電源上電時(shí)導(dǎo)通一次,通常用來(lái)初始化存儲(chǔ)的數(shù)據(jù)。</p><p>  計(jì)數(shù)器 它們也并非物理上存在的,而是模擬的計(jì)數(shù)器,可通過(guò)編程來(lái)對(duì)脈沖進(jìn)行計(jì)數(shù)。通常它們可進(jìn)行加計(jì)數(shù),減計(jì)數(shù)

44、或同時(shí)進(jìn)行加減計(jì)數(shù)。因?yàn)樗鼈兪怯密浖M的,計(jì)數(shù)速度就有限。一些制造商提供了基于硬件的高速計(jì)數(shù)器,這樣的計(jì)數(shù)器可以認(rèn)為是物理上存在的。這些計(jì)數(shù)器多數(shù)情況下可以進(jìn)行加計(jì)數(shù)減計(jì)數(shù)或同時(shí)進(jìn)行加減計(jì)數(shù)。</p><p>  定時(shí)器它們也并非物理上存在的,分為多種類型和定時(shí)單位。最常用的一種類型是延時(shí)導(dǎo)通型。其他類型還有延時(shí)斷開型,記憶和非記憶型。定時(shí)單位的范圍是1MS到1S</p><p>  輸

45、出繼電器(線圈) 該部分連接到外圍電路。它們是物理上存在的,并給線圈,燈等發(fā)送開關(guān)信號(hào)。輸出繼電器也可以是晶體管,繼電器或可控硅,取決于選擇的型號(hào)。</p><p>  數(shù)據(jù)寄存器 它們通常是用來(lái)存儲(chǔ)數(shù)據(jù)的寄存器,一般作為運(yùn)算或數(shù)據(jù)處理的暫存器。在PLC斷電時(shí)通常還可以用來(lái)存儲(chǔ)數(shù)據(jù)。再次接通電源后,其內(nèi)容與斷電前相同,非常方便且必要。</p><p>  PLC是通過(guò)連續(xù)掃描一個(gè)程序來(lái)工作

46、的。我們可以認(rèn)為掃描周期是由三個(gè)主要階段組成的。如圖所示。當(dāng)然有多余三個(gè)階段的情況,但我們可關(guān)注重要的環(huán)節(jié),忽略其他環(huán)節(jié)。其他階段通常正在檢查系統(tǒng)及更新內(nèi)部計(jì)數(shù)器和定時(shí)器的當(dāng)前值。</p><p>  第一步----檢查輸入狀態(tài)----首先PLC檢查每一個(gè)輸入是否接通。換句說(shuō)就是,與第一個(gè)輸入端連接的傳感器接通了嗎?第二哥輸入呢?第三個(gè)輸入呢?PLC將這些數(shù)據(jù)記錄到存儲(chǔ)器中,以便在下一個(gè)階段使用。</p&g

47、t;<p>  第二步----執(zhí)行程序----然后PLC一次一條地執(zhí)行程序。你的程序可能要求第一個(gè)輸入接通時(shí),接接通第一個(gè)輸出。因?yàn)樵谏弦徊揭呀?jīng)知道輸入端的開關(guān)狀態(tài),根據(jù)上一步輸入端的狀態(tài),就可以確定是否應(yīng)該接通第一個(gè)輸出。PLC將執(zhí)行結(jié)果存儲(chǔ)起來(lái),以供下一步使用。</p><p>  第三步----更新輸出狀態(tài)----最后PLC更新輸出狀態(tài)。PLC根據(jù)第一步中國(guó)接通的輸入和第二步中程序執(zhí)行的結(jié)果更

48、新輸出轉(zhuǎn)臺(tái)。由于第一個(gè)輸入接通了,程序要求在該條件滿足時(shí)就接通第一個(gè)輸出,根據(jù)第二步的情況,PLC就接通第一個(gè)輸出。</p><p>  PLC在執(zhí)行完第三步后就返回到第一步,并反復(fù)循環(huán)。一次掃描時(shí)間定義為執(zhí)行上面的三步所花的時(shí)間。因此,一個(gè)實(shí)際的系統(tǒng)應(yīng)根據(jù)要求執(zhí)行特定的操作。</p><p>  AT89S52是一種低功耗、高性能CMOS8位微控制器,具有8K 在系統(tǒng)可編程 Flash

49、存儲(chǔ)器。使用 Atmel 公司高密度非易失性存儲(chǔ)器技術(shù)制造,與工業(yè) 80C51 產(chǎn)品指令和引腳完全兼容。片上Flash允許程序存儲(chǔ)器在系統(tǒng)可編程,亦適于常規(guī)編程器。在單芯片上,擁有靈巧的 8 位 CPU 和在系統(tǒng)可編程Flash,使得 AT89S52為眾多嵌入式控制應(yīng)用系統(tǒng)提</p><p>  供高靈活、超有效的解決方案。</p><p>  AT89S52具有以下標(biāo)準(zhǔn)功能:8k字節(jié)Fl

50、ash,256字節(jié)RAM,32 位 I/O 口線,看門狗定時(shí)器,2個(gè)數(shù)據(jù)指針,三個(gè)16位定時(shí)器/計(jì)數(shù)器,一個(gè)6向量2級(jí)中斷結(jié)構(gòu),全雙工串行口,片內(nèi)晶振及時(shí)鐘電路。另外,AT89S52 可降至 0Hz 靜態(tài)邏輯操作,支持2種軟件可選擇節(jié)電模式??臻e模式下,CPU停止工作,允許RAM、定時(shí)器/計(jì)數(shù)器、串口、中斷繼續(xù)工作。掉電保護(hù)方式下,RAM內(nèi)容被保存,振蕩器被凍結(jié),單片機(jī)一切工作停止,直到下一個(gè)中斷或硬件復(fù)位為止。</p>

51、<p>  P0口是一個(gè)8位漏極開路的雙向I/O口。作為輸出口,每位能驅(qū)動(dòng)8個(gè)TTL邏輯電平。對(duì)P0端口寫“1”時(shí),引腳用作高阻抗輸入。</p><p>  當(dāng)訪問外部程序和數(shù)據(jù)存儲(chǔ)器時(shí),P0口也被作為低8位地址/數(shù)據(jù)復(fù)用。在這種模式下,</p><p>  P0具有內(nèi)部上拉電阻。在 flash編程時(shí),P0口也用來(lái)接收指令字節(jié);在程序校驗(yàn)時(shí),輸出指令字節(jié)。程序校驗(yàn)時(shí),需要外部上拉

52、電阻。</p><p>  P1 口:P1 口是一個(gè)具有內(nèi)部上拉電阻的 8 位雙向 I/O 口,p1 輸出緩沖器能驅(qū)動(dòng) 4 個(gè)TTL 邏輯電平。對(duì) P1 端口寫“1”時(shí),內(nèi)部上拉電阻把端口拉高,此時(shí)可以作為輸入口使用。作為輸入使用時(shí),被外部拉低的引腳由于內(nèi)部電阻的原因,將輸出電流(IIL)。此外,P1.0和P1.2分別作定時(shí)器/計(jì)數(shù)器2的外部計(jì)數(shù)輸入(P1.0/T2)和時(shí)器/計(jì)數(shù)器2的觸發(fā)輸入(P1.1/T2EX

溫馨提示

  • 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ù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫(kù)僅提供信息存儲(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ì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論