版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p> Programmable Logic Controllers (PLCs)</p><p> 1 。About Programmable Logic Controllers (PLCs)</p><p> PLCs (programmable logic controllers) are the control hubs for a wide variety of
2、 automated systems and processes. They contain multiple inputs and outputs that use transistors and other circuitry to simulate switches and relays to control equipment. They are programmable via software interfaced via
3、standard computer interfaces and proprietary languages and network options. Programmable logic controllers I/O channel specifications include total number of points, number of inputs and outputs,</p><p>
4、; code. It is used in relatively simple logic instructions. Relay Ladder Logic (RLL), or ladder diagrams, is the primary programming language for programmable logic controllers (PLCs). Ladder logic programming is
5、a graphical representation of the program designed to look like relay logic. Flow Chart is a graphical language that describes sequential operations in a controller sequence or application. It is used to build modu
6、lar, reusable function libraries. C is a high level programming language</p><p> 2 。INTRODUCTION</p><p> For simple programming the relay model of the PLC is sufficient. As more complex
7、functions are used the more complex VonNeuman model of the PLC must be used. A VonNeuman computer processes one instruction at a time. Most computers operate this way, although they appear to be doing many things at once
8、. Consider the computer components shown in Figure 1.</p><p> Figure 1 1 Simplified Personal Computer Architecture</p><p> Input is obtained from the keyboard and mouse, output is sent to
9、 the screen, and the disk and memory are used for both input and output for storage. (Note: the directions of these arrows are very important to engineers, always pay attention to indicate where information is flowing.)
10、This figure can be redrawn as in Figure 2 to clarify the role of inputs and outputs.</p><p> Figure 2 An Input-Output Oriented Architecture</p><p> In this figure the data enters the left
11、 side through the inputs. (Note: most engineering diagrams have inputs on the left and outputs on the right.) It travels through buffering circuits before it enters the CPU. The CPU outputs data through other circuits. M
12、emory and disks are used for storage of data that is not destined for output. If we look at a personal computer as a controller, it is controlling the user by outputting stimuli on the screen, and inputting responses fro
13、m the mouse and the k</p><p> A PLC is also a computer controlling a process. When fully integrated into an application the analogies become;</p><p> inputs - the keyboard is analogous to a pr
14、oximity switch</p><p> input -circuits - the serial input chip is like a 24Vdc input card</p><p> computer - the 686 CPU is like a PLC CPU unit</p><p> output - circuits - a grap
15、hics card is like a triac output card</p><p> outputs - a monitor is like a light</p><p> storage - memory in PLCs is similar to memories in personal computers</p><p> It is also
16、 possible to implement a PLC using a normal Personal Computer, although this is not advisable. In the case of a PLC the inputs and outputs are designed to be more reliable and rugged for harsh production environments.<
17、;/p><p> 3 。 OPERATION SEQUENCE</p><p> All PLCs have four basic stages of operations that are repeated many times per second. Initially when turned on the first time it will check it’s own hardw
18、are and software for faults. If there are no problems it will copy all the input and copy their values into memory, this is called the input scan. Using only the memory copy of the inputs the ladder logic program will be
19、 solved once, this is called the logic scan. While solving the ladder logic the output values are only changed in temporary m</p><p> Figure 3 PLC Scan Cycle</p><p> SELF TEST - Checks to s
20、ee if all cards error free, reset watch-dog timer, etc. (A watchdog timer will cause an error, and shut down the PLC if not reset within a short period of time - this would indicate that the ladder logic is not being sca
21、nned normally).</p><p> INPUT SCAN - Reads input values from the chips in the input cards, and copies their values to memory. This makes the PLC operation faster, and avoids cases where an input changes fro
22、m the start to the end of the program (e.g., an emergency stop). There are special PLC functions that read the inputs directly, and avoid the input tables.</p><p> LOGIC SOLVE/SCAN - Based on the input tabl
23、e in memory, the program is executed 1 step at a time, and outputs are updated. This is the focus of the later sections.</p><p> OUTPUT SCAN - The output table is copied from memory to the output chips. The
24、se chips then drive the output devices.</p><p> The input and output scans often confuse the beginner, but they are important. The input scan takes a snapshot of the inputs, and solves the logic. This preve
25、nts potential problems that might occur if an input that is used in multiple places in the ladder logic program changed while half way through a ladder scan. Thus changing the behaviors of half of the ladder logic progra
26、m. This problem could have severe effects on complex programs that are developed later in the book. One side effect of the</p><p> When the PLC is initially turned on the normal outputs will be turned off.
27、This does not affect the values of the inputs.</p><p> 3 。1 The Input and Output Scans</p><p> When the inputs to the PLC are scanned the physical input values are copied into memory. When th
28、e outputs to a PLC are scanned they are copied from memory to the physical outputs. When the ladder logic is scanned it uses the values in memory, not the actual input or output values. The primary reason for doing this
29、is so that if a program uses an input value in multiple places, a change in the input value will not invalidate the logic. Also, if output bits were changed as each bit was changed, in</p><p> 3 。2 The Logi
30、c Scan</p><p> Ladder logic programs are modelled after relay logic. In relay logic each element in the ladder will switch as quickly as possible. But in a program elements can only be examines one at a tim
31、e in a fixed sequence. Consider the ladder logic in Figure 4, the ladder logic will be interpreted left-to-right, top-to-bottom. In the figure the ladder logic scan begins at the top rung. At the end of the rung it inter
32、prets the top output first, then the output branched below it. On the second rung it solv</p><p> Figure 4 Ladder Logic Execution Sequence</p><p> The logic scan sequence become important
33、when solving ladder logic programs which use outputs as inputs. It also becomes important when considering output usage. Consider Figure 5, the first line of ladder logic will examine input A and set output X to have the
34、 same value. The second line will examine input B and set the output X to have the opposite value. So the value of X was only equal to A until the second line of ladder logic was scanned. Recall that during the logic sca
35、n the outputs are o</p><p> Figure 5 A Duplicated Output Error</p><p> 4 。 PLC STATUS</p><p> The lack of keyboard, and other input-output devices is very noticeable on a PLC
36、. On the front of the PLC there are normally limited status lights. Common lights indicate;</p><p> power on - this will be on whenever the PLC has power</p><p> program running - this will of
37、ten indicate if a program is running, or if no program is running</p><p> fault - this will indicate when the PLC has experienced a major hardware or software problem</p><p> These lights are
38、normally used for debugging. Limited buttons will also be provided for PLC hardware. The most common will be a run/program switch that will be switched to program when maintenance is being conducted, and back to run when
39、 in production. This switch normally requires a key to keep unauthorized personnel from altering the PLC program or stopping execution. A PLC will almost never have an on-off switch or reset button on the front. This nee
40、ds to be designed into the remainder of the</p><p> The status of the PLC can be detected by ladder logic also. It is common for programs to check to see if they are being executed for the first time, as sh
41、own in Figure 6. The ’first scan’ input will be true on the very first time the ladder logic is scanned, but false on every other scan. In this case the address for ’first scan’ in a PLC-5 is ’S2:1/14’. With the logic in
42、 the example the first scan will seal on ’light’, until ’clear’ is turned on. So the light will turn on after the PLC has been</p><p> Figure 6 An program that checks for the first scan of the PLC</p&
43、gt;<p> 5 。 MEMORY TYPES</p><p> There are a few basic types of computer memory that are in use today.</p><p> RAM (Random Access Memory) - this memory is fast, but it will lose its co
44、ntents when power is lost, this is known as volatile memory. Every PLC uses this memory for the central CPU when running the PLC.</p><p> ROM (Read Only Memory) - this memory is permanent and cannot be eras
45、ed. It is often used for storing the operating system for the PLC.</p><p> EPROM (Erasable Programmable Read Only Memory) - this is memory that can be programmed to behave like ROM, but it can be erased wit
46、h ultraviolet light and reprogrammed.</p><p> EEPROM (Electronically Erasable Programmable Read Only Memory) – This memory can store programs like ROM. It can be programmed and erased using a voltage, so it
47、 is becoming more popular than EPROMs.</p><p> All PLCs use RAM for the CPU and ROM to store the basic operating system for the PLC. When the power is on the contents of the RAM will be kept, but the issue
48、is what happens when power to the memory is lost. Originally PLC vendors used RAM with a battery so that the memory contents would not be lost if the power was lost. This method is still in use, but is losing favor. EPRO
49、Ms have also been a popular choice for programming PLCs. The EPROM is programmed out of the PLC, and then placed in the P</p><p> 6 。 SOFTWARE BASED PLCS</p><p> The dropping cost of personal
50、computers is increasing their use in control, including the replacement of PLCs. Software is installed that allows the personal computer to solve ladder logic, read inputs from sensors and update outputs to actuators. Th
51、ese are important to mention here because they don’t obey the previous timing model. For example, if the computer is running a game it may slow or halt the computer. This issue and others are currently being investigated
52、 and good solutions should be </p><p> 7 。 SUMMARY</p><p> ? A PLC and computer are similar with inputs, outputs, memory, etc.</p><p> ? The PLC continuously goes through a cycle
53、 including a sanity check, input scan, logic scan, and output scan.</p><p> ? While the logic is being scanned, changes in the inputs are not detected, and the outputs are not updated.</p><p>
54、 ? PLCs use RAM, and sometime EPROMs are used for permanent programs.</p><p> 8 。 PRACTICE PROBLEMS</p><p> 1. Does a PLC normally contain RAM, ROM, EPROM and/or batteries?</p><p>
55、; 2. What are the indicator lights on a PLC used for?</p><p> 3. A PLC can only go through the ladder logic a few times per second. Why?</p><p> 4. What will happen if the scan time for a PLC
56、 is greater than the time for an input pulse? Why?</p><p> 5. What is the difference between a PLC and a desktop computer?</p><p> 6. Why do PLCs do a self check every scan?</p><p&g
57、t; 7. Will the test time for a PLC be long compared to the time required for a simple program?</p><p> 8. What is wrong with the following ladder logic? What will happen if it is used?</p><p>
58、 9. What is the address for a memory location that indicates when a PLC has just been turned on?</p><p> 9 。 PRACTICE PROBLEM SOLUTIONS</p><p> 1. Every PLC contains RAM and ROM, but they may
59、 also contain EPROM or batteries.</p><p> 2. Diagnostic and maintenance</p><p> 3. Even if the program was empty the PLC would still need to scan inputs and outputs, and do a self check.</p
60、><p> 4. The pulse may be missed if it occurs between the input scans</p><p> 5. Some key differences include inputs, outputs, and uses. A PLC has been designed for the factory floor, so it does
61、not have inputs such as keyboards and mice (although some newer types can). They also do not have outputs such as a screen or sound. Instead they have inputs and outputs for voltages and current. The PLC runs user design
62、ed programs for specialized tasks, whereas on a personal computer it is uncommon for a user to program their system.</p><p> 6. This helps detect faulty hardware or software. If an error were to occur, and
63、the PLC continued operating, the controller might behave in an unpredictable way and become dangerous to people and equipment. The self check helps detect these types of faults, and shut the system down safely.</p>
64、<p> 7. Yes, the self check is equivalent to about 1ms in many PLCs, but a single program instruction is about 1 micro second.</p><p> 8. The normal output Y is repeated twice. In this example the v
65、alue of Y would always match B, and the earlier rung with A would have no effect on Y.</p><p> 9. S2:1/14 for micro logy, S2:1/15 for PLC-5</p><p><b> 中文翻譯</b></p><p>
66、<b> 1.PLC介紹</b></p><p> PLCS(可編程邏輯控制器)是用于各種自動(dòng)控制系統(tǒng)和過程的可控網(wǎng)絡(luò)集線器。他們包含多個(gè)輸入輸出,輸入輸出是用晶體管和其它電路,模擬開關(guān)和繼電器來控制設(shè)備的。PLCS用軟件接口,標(biāo)準(zhǔn)計(jì)算器接口,專門的語(yǔ)言和網(wǎng)絡(luò)設(shè)備編程。</p><p> 可編程邏輯控制器I/O通道規(guī)則包括所有的輸入觸點(diǎn)和輸出觸點(diǎn),擴(kuò)展能力和最大
67、數(shù)量的通道。觸點(diǎn)數(shù)量是輸入點(diǎn)和輸出點(diǎn)的總和。PLCS可以指定這些值的任何可能的組合。擴(kuò)展單元可以被堆棧或互相連接來增加總的控制能力。最大數(shù)量的通道是在一個(gè)擴(kuò)展系統(tǒng)中輸入和輸出通道的最大總數(shù)量。PLC系統(tǒng)規(guī)則包括掃描時(shí)間,指令數(shù)量,數(shù)據(jù)存儲(chǔ)和程序存儲(chǔ)。掃描時(shí)間是 PLC需要的用來檢測(cè)輸入輸出模塊的時(shí)間。指令是用于PLC軟件(例如數(shù)學(xué)運(yùn)算)的標(biāo)準(zhǔn)操作。數(shù)據(jù)存儲(chǔ)是存儲(chǔ)數(shù)據(jù)的能力。程序存儲(chǔ)是控制軟件的能力。</p><p&g
68、t; 用于可編程邏輯控制器的輸入設(shè)備包括DC,AC,中間繼電器,熱電偶,RTD,頻率或脈沖,晶體管和中斷信號(hào)輸入;輸出設(shè)備包括DC,AC,繼電器,中間繼電器,頻率或脈沖,晶體管,三端雙向可控硅開關(guān)元件;PLC的編程設(shè)備包括控制面板,手柄和計(jì)算機(jī)。</p><p> 可編程邏輯控制器用各種軟件編程語(yǔ)言來控制。這些語(yǔ)言包括IEC61131-3,順序執(zhí)行表(SFC),動(dòng)作方塊圖(FBD),梯形圖(LD),結(jié)構(gòu)文本(
69、ST),指令序列(IL),繼電器梯形圖(RIL),流程圖,C語(yǔ)言和Basic語(yǔ)言。IEC61131-3編程環(huán)境能支持五種語(yǔ)言,用國(guó)際標(biāo)準(zhǔn)加以規(guī)范,分別為SFC,F(xiàn)BD,LD,ST和IL。這便允許了多賣主兼容性和多種語(yǔ)言編程。SFC是一種圖表語(yǔ)言,它提供了編程順序的配合,就能支持順序選擇和并列選擇,二者擇其一即可。FBD用一種大的運(yùn)行庫(kù),以圖表形式建立了一些復(fù)雜的過程。標(biāo)準(zhǔn)數(shù)學(xué)和邏輯運(yùn)行可以與用戶交流和接口運(yùn)行相結(jié)合。LD是適用于離散控制
70、和互鎖邏輯的圖表語(yǔ)言。它在離散控制上與FBD是完全兼容的。ST是一種文本語(yǔ)言,用于復(fù)雜的數(shù)學(xué)過程和計(jì)算,不太適用于圖表語(yǔ)言。IL是與組合編碼相似的低級(jí)語(yǔ)言。它用在相對(duì)比較簡(jiǎn)單的邏輯指令。繼電器梯形圖或梯形圖是適用于可編程邏輯控制器的重要的編程語(yǔ)言。梯形圖編程是設(shè)計(jì)成繼電器邏輯程序的圖表表示法。流程圖是一種圖表語(yǔ)言,用于在一個(gè)控制器或應(yīng)用軟件中描述順序操作,它用于建立有標(biāo)準(zhǔn)組件的可循環(huán)使用的運(yùn)行庫(kù)。C語(yǔ)言是一種高</p>&
71、lt;p> 可編程邏輯控制器也規(guī)范了許多計(jì)算機(jī)接口設(shè)備,網(wǎng)絡(luò)規(guī)則和特色。PLC能源設(shè)備和運(yùn)行環(huán)境也是非常重要的。</p><p><b> 2.指令</b></p><p> 對(duì)于簡(jiǎn)單的編程,繼電器型PLC是有效的。隨著功能的復(fù)雜化,復(fù)雜的VonNeaman型PLC就必須被采用。一個(gè)VonNeaman計(jì)算機(jī)一次只能執(zhí)行一個(gè)指令,他們是這樣運(yùn)行的,盡管許多計(jì)
72、算機(jī)看上去一次在做許多事情。正如圖1所示的計(jì)算機(jī)組成。</p><p> 圖 1 簡(jiǎn)化個(gè)人計(jì)算機(jī)結(jié)構(gòu)圖</p><p> 輸入是通過鍵盤和鼠標(biāo)得到的。輸出被送到屏幕。磁盤和存儲(chǔ)器用于輸入和輸出存儲(chǔ)(注意:這些箭頭的方向?qū)τ谠O(shè)計(jì)者是非常重要的,要注意表明信息是流向哪里的。)這個(gè)圖表可以像圖2那樣能被重新擬訂來闡明輸入設(shè)備和輸出設(shè)備的作用。</p><p>
73、 在這個(gè)圖表中數(shù)據(jù)通過輸入設(shè)備進(jìn)入左邊。(注意:大多數(shù)設(shè)計(jì)圖表都是左邊輸入,右邊輸出的。)在進(jìn)入CPU之前,它穿過緩沖電路。CPU通過其他回路輸出數(shù)據(jù)。存儲(chǔ)器和磁盤用語(yǔ)存儲(chǔ)要輸出的數(shù)據(jù)。如果我們把個(gè)人計(jì)算機(jī)看作一個(gè)控制器,它通過在屏幕上輸出激勵(lì)和輸入來自鼠標(biāo)和鍵盤的響應(yīng)來控制用戶。
74、 </p><p> PLC也是一個(gè)控制過程的計(jì)算機(jī)。當(dāng)與應(yīng)用程序完全結(jié)合起來時(shí),類似之處變成:</p><p> 輸入設(shè)備—鍵盤與接近開關(guān)相類比。</p><p> 輸入電路—連續(xù)輸入芯片就像一個(gè)直流24V的輸入卡。</p><p> 計(jì)
75、算 機(jī)—686CPU就像一個(gè)PLC的CPU模塊。</p><p> 輸出電路—圖形卡就像一個(gè)三相開關(guān)輸出卡。</p><p> 輸出設(shè)備—監(jiān)控器就像指示燈。</p><p> 存 儲(chǔ) 器—PLC的存儲(chǔ)器與個(gè)人計(jì)算機(jī)的存儲(chǔ)器相似。</p><p> 用普通個(gè)人計(jì)算機(jī)可以運(yùn)行PLC,雖然則并不被提倡做。就PLC來說,輸入和輸出</p
76、><p> 設(shè)備設(shè)計(jì)得更加可靠,更加粗糙,更適合惡劣的制造環(huán)境。</p><p><b> 3.運(yùn)行順序</b></p><p> 所有的PLC系統(tǒng)有每秒鐘重復(fù)多次的四種基本運(yùn)行階段。最初被第一次接通時(shí),它會(huì)檢測(cè)它的硬件和軟件是否有錯(cuò)誤。如果沒有錯(cuò)誤,它會(huì)把所有輸入和輸入值復(fù)制到存儲(chǔ)器,這叫輸入掃描。只用復(fù)制了輸入值的存儲(chǔ)器,梯形邏輯圖將被解
77、決一個(gè),這叫邏輯掃描。在解決梯形圖期間,輸出值只在臨時(shí)存儲(chǔ)器中被改變。當(dāng)梯形圖掃描完成后,輸出將用存儲(chǔ)器中臨時(shí)值修正,這叫做輸出掃描。PLC此時(shí)將從自我檢測(cè)開始重新啟動(dòng)這個(gè)過程,這個(gè)過程很明顯地每秒鐘重復(fù)10到100次,正如圖3所示</p><p> 自我檢測(cè)—檢測(cè)是否所有的卡沒有錯(cuò)誤,把時(shí)間繼電器復(fù)零等。(如果在很小一段時(shí)間內(nèi)沒有復(fù)零,時(shí)間繼電器會(huì)引起錯(cuò)誤,關(guān)閉PLC系統(tǒng)。—這會(huì)表明梯形圖沒有被正常掃描。)&
78、lt;/p><p> 輸入掃描—從芯片上的輸入卡讀取輸入值,并把輸入值復(fù)制到存儲(chǔ)器,這能使PLC更快速地運(yùn)行,并且避免從程序開始到結(jié)束輸入變化。(例如:意外停止)有一些特殊的PLC功能,能直接讀取輸入值,避免了輸入表格。</p><p> 邏輯處理/掃描—基于存儲(chǔ)器的輸入表格,程序被一次執(zhí)行一步,同時(shí)輸出值也被修正,這是其它節(jié)的集中。</p><p> 輸出掃描—
79、輸出表格從存儲(chǔ)器復(fù)制到輸出芯片,這些芯片然后驅(qū)動(dòng)輸出儀器。</p><p> 輸入輸出掃描經(jīng)常會(huì)令初學(xué)者感到迷惑,但是他們是很重要的。輸入掃描是輸入值的快照,并且解決邏輯關(guān)系。在一個(gè)梯形圖掃描期間,如果一個(gè)輸入在梯形圖的多個(gè)地方被用到,它就會(huì)起變化,潛在問題就可能發(fā)生,而輸入掃描卻避免了這些問題。這個(gè)邊境效應(yīng)是如果在一段持續(xù)時(shí)間內(nèi)如果一個(gè)輸入變化太短,它可能在輸入掃描之間會(huì)減少或者丟失。</p>
80、<p> 當(dāng)PLC最初被啟動(dòng)時(shí),通常的輸出會(huì)被關(guān)閉,這不會(huì)影響輸入值。</p><p> 3.1 輸入輸出掃描</p><p> 當(dāng)輸入值被掃描到PLC時(shí),自然輸入值被復(fù)制到存儲(chǔ)器。當(dāng)輸出值被掃描到PLC時(shí),他們將從存儲(chǔ)器復(fù)制到自然輸出設(shè)備。當(dāng)梯形圖被掃描時(shí),它將用存儲(chǔ)器中的值,并不是實(shí)際的輸入輸出值。這樣做的主要原因是如果一個(gè)程序在多個(gè)地方用一個(gè)輸入值,那么輸入值的變化將
81、使其邏輯關(guān)系無效。而且,如果隨著每塊的變化,輸出模塊也變化,在掃描結(jié)束時(shí)PLC的運(yùn)行速度將大大減慢。</p><p><b> 3.2 邏輯掃描</b></p><p> 梯形邏輯程序圖是模仿繼電器邏輯圖的。在繼電器邏輯圖中,程序的每個(gè)元件將盡可能快地開關(guān)。但是在一個(gè)程序中,元件只能按固定的順序一次檢測(cè)一個(gè)。如圖4所示,梯形圖將按從左到右,從上到下的順序被解釋。在
82、圖中,梯形邏輯掃描將從最高層開始。在底層,它將先解釋高層輸出,然后輸出它下面的分支。在第二層,沿著梯形邏輯圖移動(dòng)之前,將先解釋分支。</p><p> 圖 4 梯形圖邏輯執(zhí)行順序</p><p> 解決梯形邏輯程序時(shí),邏輯掃描順序會(huì)變得非常重要。梯形圖輸出作為輸入,考慮輸出應(yīng)用時(shí),它也變得非常重要。如圖5所示,梯形圖第一行將檢測(cè)輸入并把輸出X置1,得到相同的值。第二行將檢測(cè)輸入B
83、并把輸出X置1,得到相反的值。因此,直到梯形圖的第二行被掃描時(shí)X值才能與A相等。在邏輯掃描期間,輸出值只能在存儲(chǔ)器中被改變,只有當(dāng)梯形邏輯掃描完成時(shí),實(shí)際的輸出才能被修正。因此,在第二行的基礎(chǔ)上,輸出掃描將修正實(shí)際輸出值。并且梯形圖的第一行將無效。</p><p><b> 4.PLC狀態(tài)顯示</b></p><p> 在一個(gè)PLC中,缺少鍵盤和其他的輸入輸出設(shè)備
84、是非常值得注意的。在PLC前端通常有一定數(shù)量的狀態(tài)指示燈。通常指示燈表明:</p><p> 電源啟動(dòng)—只要PLC帶電,它將被啟動(dòng)。</p><p> 程序運(yùn)行—這將指示是否程序正在運(yùn)行或是否沒有程序正在運(yùn)行。</p><p> 錯(cuò)誤顯示—當(dāng)PLC有大的硬件或軟件錯(cuò)誤時(shí),這將有顯示。</p><p> 這些燈通常用于調(diào)試。一定數(shù)量的按
85、鈕也將提供給PLC的硬件。最普通的按鈕是一個(gè)運(yùn)行/編程選擇開關(guān),當(dāng)在保持狀態(tài)時(shí),它將被調(diào)到編程;當(dāng)在生產(chǎn)狀態(tài)時(shí),它將被調(diào)到運(yùn)行。一個(gè)PLC系統(tǒng)幾乎沒有一個(gè)啟動(dòng)關(guān)閉開關(guān)或復(fù)位開關(guān)在前面。這需要被設(shè)計(jì)到系統(tǒng)剩余部分。</p><p> PLC的狀態(tài)也能被梯形邏輯圖檢測(cè)。檢測(cè)程序是否第一次被執(zhí)行是非常普遍的。如圖6所示?!甪irst scan’輸入在梯形圖被第一次掃描時(shí),將是對(duì)的,而在其余的每次掃描時(shí)是錯(cuò)誤的。這種情
86、況下,PLC—5的‘first scan’的地址是‘S2:1/14’。根據(jù)例子中的邏輯關(guān)系,第一次掃描將封上‘light’,直到‘clear’被啟動(dòng)。因此燈將在PLC被啟動(dòng)之后變亮,但在‘clear’被啟動(dòng)之后,它將關(guān)閉并且保持在關(guān)閉狀態(tài)。‘first scan ’模塊在‘first pass’模塊中被提到。</p><p> 圖 6 核驗(yàn)PLC第一次掃描的程序</p><p&
87、gt;<b> 5.存儲(chǔ)器類型</b></p><p> 有幾種基本的現(xiàn)在經(jīng)常使用的計(jì)算機(jī)存儲(chǔ)器類型:</p><p> RAM(隨機(jī)存儲(chǔ)器)—這種存儲(chǔ)器速度很快,但是當(dāng)沒電時(shí),它的內(nèi)容將被丟失。這是一種不穩(wěn)定存儲(chǔ)器,每個(gè)PLC在運(yùn)行時(shí),都用這種存儲(chǔ)器作為中央處理器 。</p><p> ROM(只讀存儲(chǔ)器)—這種存儲(chǔ)器是永久性的不可擦
88、除的。它通常用于存放PLC的操作系統(tǒng)。</p><p> EPROM(可擦除可編程只讀存儲(chǔ)器)—這是一種像ROM一樣可編程的存儲(chǔ)器,但是它能用紫外線光擦除并且可以重新編程。</p><p> EEPROM(電可擦除可編程只讀存儲(chǔ)器)—這種存儲(chǔ)器能像ROM一樣存放程序。它能被編程并且用電壓擦除,因此它正變得比EPROM更加普遍。</p><p> 所有的PLC系
89、統(tǒng)都用RAM做CPU,用ROM存儲(chǔ)PLC的基本操作系統(tǒng)。當(dāng)有電時(shí),RAM的內(nèi)容被保存,但是問題在于當(dāng)供給存儲(chǔ)器的電源失去時(shí)會(huì)發(fā)生什么。原先PLC賣主用帶有電池的RAM,這樣如果不失電,存儲(chǔ)器的內(nèi)容就不會(huì)丟失。這種方法現(xiàn)在仍被使用,但變得不那么受歡迎。EPROMS也是PLC編程的比較好的選擇。EPROM在PLC外部編程,然后被放入PLC。當(dāng)PLC被啟動(dòng)時(shí),在EPROM上的梯形邏輯程序被下載PLC并且運(yùn)行。這種方法非??煽浚遣脸途幊碳?/p>
90、術(shù)都是很消耗時(shí)間的。EEPROM存儲(chǔ)器是PLC的永久部分,程序能EPROM一樣被存放在他們中。存儲(chǔ)器的價(jià)錢一直在下降,新類型正變得可被利用,這些變化將繼續(xù)對(duì)PLC系統(tǒng)發(fā)生影響。</p><p> 6.基于軟件的PLC系統(tǒng)</p><p> 個(gè)人計(jì)算機(jī)持續(xù)下降的價(jià)格增加了他們?cè)诳刂葡到y(tǒng)中的應(yīng)用,包括PLC的替代品。安裝了軟件就能用個(gè)人計(jì)算機(jī)解決梯形圖邏輯.從傳感器中讀取輸入,修改輸出送到
91、激勵(lì)。這些對(duì)于維持是很重要的,因?yàn)樗麄儾挥米袷匾郧暗挠?jì)時(shí)模式.例如,計(jì)算機(jī)正運(yùn)行一個(gè)游戲,就可能減慢或停止計(jì)算機(jī).這個(gè)以及其它問題現(xiàn)在正被研究,好的解決方案不久就會(huì)出現(xiàn)。</p><p><b> 7.概要</b></p><p> PLC系統(tǒng)和計(jì)算機(jī)與輸入設(shè)備,輸出設(shè)備,存儲(chǔ)器等很相似。</p><p> PLC系統(tǒng)不斷地執(zhí)行系統(tǒng)檢查,
92、輸入掃描,邏輯掃描和輸出掃描這個(gè)循環(huán)。</p><p> 當(dāng)邏輯圖被掃描時(shí),輸入的變化沒有被發(fā)現(xiàn),輸出也沒有被修正。</p><p> PLC系統(tǒng)用RAM,有時(shí)用EPROM存放永久程序。</p><p><b> 8.實(shí)際問題</b></p><p> 一個(gè)PLC系統(tǒng)通常包括RAM,ROM,EPROM和/或電池嗎
93、?</p><p> PLC的指示燈用于什么?</p><p> 為什么一個(gè)PLC系統(tǒng)每秒鐘只能掃描梯形圖幾次?</p><p> 如果一個(gè)PLC系統(tǒng)的掃描時(shí)間比輸入脈沖長(zhǎng),會(huì)發(fā)生什么?為什么?</p><p> 一個(gè)PLC系統(tǒng)與一部臺(tái)式計(jì)算機(jī)的不同是什么?</p><p> 為什么PLC系統(tǒng)每次掃描要做自我
94、檢查?</p><p> PLC檢測(cè)時(shí)間會(huì)比簡(jiǎn)單程序所需時(shí)間長(zhǎng)嗎?</p><p> 下面的梯形邏輯有什么錯(cuò)誤?如果它被用會(huì)發(fā)生什么?</p><p> 當(dāng)一個(gè)PLC系統(tǒng)已經(jīng)被啟動(dòng)時(shí),表明啟動(dòng)的存儲(chǔ)器地址是什么?</p><p><b> 9.實(shí)際問題解答</b></p><p> 每個(gè)
95、PLC系統(tǒng)包括RAM和ROM,但是他們也包括EPROM或電池。</p><p><b> 診斷和保持。</b></p><p> 盡管程序是空的,PLC系統(tǒng)仍需掃描輸入和輸出,做自我檢測(cè)。</p><p> 如果在兩次輸入掃描之間發(fā)生,脈沖就會(huì)丟失。</p><p> 主要的區(qū)別包括輸入設(shè)備輸出設(shè)備和應(yīng)用。PLC
96、系統(tǒng)是為工廠設(shè)計(jì)的,因此它沒有鼠標(biāo)鍵盤之類的輸入設(shè)備。(雖然,一些較新型PLC能夠達(dá)到)他們也沒有屏幕聲音之類的輸出設(shè)備,.取而代之,他們有電壓,電流這樣的輸入設(shè)備和輸出設(shè)備。PLC使用戶為專門的任務(wù)設(shè)計(jì)程序,然而在個(gè)人計(jì)算機(jī)上給系統(tǒng)編程是不常見的。</p><p> 這能幫助檢測(cè)硬件和軟件錯(cuò)誤。如果一個(gè)錯(cuò)誤發(fā)生了,PLC還繼續(xù)運(yùn)行,控制器就可能以一種不可預(yù)見的方式運(yùn)行,這對(duì)人和機(jī)器是非常危險(xiǎn)的。自我檢測(cè)則幫助
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝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)論