【正文】
指示燈用于什么? ( 3) 為什么一個(gè) PLC 系統(tǒng)每秒鐘只能掃描梯形圖幾次? ( 4) 如果一個(gè) PLC 系統(tǒng)的掃描時(shí)間比輸入脈沖長(zhǎng),會(huì)發(fā)生什么 ?為什么? ( 5) 一個(gè) PLC 系統(tǒng)與一部臺(tái)式計(jì)算機(jī)的不同是什么? ( 6) 為什么 PLC 系統(tǒng)每次掃描要做自我檢查? ( 7) PLC 檢測(cè)時(shí)間會(huì)比簡(jiǎn)單程序所需時(shí)間長(zhǎng)嗎? 圖 7 梯形示意圖 10 實(shí)際問(wèn)題解答 ( 1) 每個(gè) PLC 系統(tǒng)包括 RAM 和 ROM,但是他們也包括 EPROM 或電池。令人失望的是 PLC 和他們組成的系統(tǒng)語(yǔ)言都沒(méi)有好標(biāo)準(zhǔn),不能用正式的模型來(lái)設(shè)計(jì)復(fù)雜可靠的控制器。 EEPROM(電可擦除可編程只讀存儲(chǔ)器) — 這種存儲(chǔ)器能像 ROM 一樣存放程序。最普通的按鈕是一個(gè)運(yùn)行 /編程選擇開(kāi)關(guān),當(dāng)在保持狀態(tài)時(shí),它將被調(diào)到編程;當(dāng)在生產(chǎn)狀態(tài)時(shí),它將被調(diào)到運(yùn)行。在第二層,沿著梯形邏輯圖移動(dòng)之前,將先解釋分支。 輸入輸出掃描經(jīng)常會(huì)令初學(xué)者感到迷惑,但是他們是很重要的。 用普通個(gè)人計(jì)算機(jī)可以運(yùn)行 PLC,雖然則并不被提倡做。輸出被送到屏幕。 ST 是一種文 本語(yǔ)言,用于復(fù)雜的數(shù)學(xué)過(guò)程和計(jì)算,不太適用于圖表語(yǔ)言。最大數(shù)量的通道是在一個(gè)擴(kuò)展系統(tǒng)中輸入和輸出通道的最大總數(shù)量。 PLCs 用軟件接口,標(biāo)準(zhǔn)計(jì)算器接口,專(zhuān)門(mén)的語(yǔ)言和網(wǎng)絡(luò)設(shè)備編程。 SFC 是一種圖表語(yǔ)言,它提供了編程順序的配合,就能支持順序選擇和并列選擇,二者擇其一即可。 2 指令 對(duì)于簡(jiǎn)單的編程,繼電器型 PLC是有效的。 輸入電路 — 連續(xù)輸入 芯片就像一個(gè)直流 24V 的輸入卡。 — 這會(huì)表明梯形圖沒(méi)有被正常掃描。在繼電器邏輯圖中,程序的每個(gè)元件將盡可能快地開(kāi)關(guān)。通常指示燈表明: 電源啟動(dòng) — 只要 PLC 帶電,它將被啟動(dòng)。 圖 6 核驗(yàn) PLC第一次掃描的程序 5 存儲(chǔ)器類(lèi)型 有幾種基本的現(xiàn)在經(jīng)常使用的計(jì)算機(jī)存儲(chǔ)器類(lèi)型: RAM(隨機(jī)存儲(chǔ)器) — 這種存儲(chǔ)器速度很快,但是當(dāng)沒(méi)電時(shí),它 的內(nèi)容將被丟失。存儲(chǔ)器的價(jià)錢(qián)一直在下降,新類(lèi)型正變得可被利 用,這些變化將繼續(xù)對(duì) PLC 系統(tǒng)發(fā)生影響。這些對(duì)于維持是很重要的,因?yàn)樗麄儾挥米袷匾郧暗挠?jì)時(shí)模式 .例如,計(jì)算機(jī)正運(yùn)行一個(gè)游戲,就可能減慢或停止計(jì)算機(jī) .這個(gè)以及其它問(wèn)題現(xiàn)在正被研究,好的解決方案不久就會(huì)出現(xiàn)。 ( 7) 是的,在許多 PLC 系統(tǒng)中,自檢大約需要 1ms,但一個(gè)單一程序需 1mms。 PLC 使用戶(hù)為專(zhuān)門(mén)的任務(wù)設(shè)計(jì)程序 ,然而在個(gè)人計(jì)算機(jī)上給系統(tǒng)編程是不常見(jiàn)的。收集數(shù)據(jù)并解釋與之相比較后獲得的結(jié)果。 EPROM在 PLC 外部編程,然后被放入 PLC。這種情況下, PLC— 5 的 “ 第一次掃描 ” 的地址是 “ S2: 1/14” 。因此,在第二行的基礎(chǔ)上,輸出掃描將修正實(shí)際輸出值。當(dāng)梯形圖被掃描時(shí),它將用存儲(chǔ)器中的值,并不是實(shí)際的輸入輸出值。當(dāng)梯形圖掃描完成后,輸出將用存儲(chǔ)器中臨時(shí)值修正,這叫做輸出掃描。存儲(chǔ)器和磁盤(pán)用語(yǔ)存儲(chǔ)要輸出的數(shù)據(jù)。它典型地在 PC 機(jī)上運(yùn)行調(diào)試。 可編程邏輯控制器用各種軟件編程語(yǔ)言來(lái)控制。 指導(dǎo)教師評(píng)語(yǔ): 譯文比較正確地表達(dá)了原文的意義、概念描述基本符合漢語(yǔ)的習(xí)慣,語(yǔ)句較通暢,層次較清晰。數(shù)據(jù)存儲(chǔ)是存儲(chǔ)數(shù)據(jù)的能力。梯形圖編程是設(shè)計(jì)成繼電器邏輯程序的圖表表示法。(注意:大多數(shù)設(shè)計(jì)圖表都是左邊輸入,右邊輸出的。如果沒(méi)有錯(cuò)誤,它會(huì)把所有輸入和輸入值復(fù)制到存 儲(chǔ)器,這叫輸入掃描。 當(dāng) PLC 最初被啟動(dòng)時(shí),通常的輸出會(huì)被關(guān)閉,這不會(huì)影響輸入值。第二行將檢測(cè)輸入 B 并把輸出 X 置 1,得到相反的值。檢測(cè)程序是否第一次被執(zhí)行是非常普遍的。原先 PLC賣(mài)主用帶有電池的 RAM,這樣如果不失電,存儲(chǔ)器的內(nèi)容就不會(huì)丟失。它是程序控制器的正確設(shè)計(jì)上的濃縮語(yǔ)。 ( 5) 主要的區(qū)別包括輸入設(shè)備輸出設(shè)備和應(yīng)用。 power on this will be on whenever the PLC has power。 ( 3) 當(dāng)邏輯圖被掃描時(shí),輸入的變化沒(méi)有被發(fā)現(xiàn) ,輸 出也沒(méi)有被修正。這導(dǎo)致新的表達(dá)的模型發(fā)展,例如,計(jì)時(shí)的混合自動(dòng)機(jī)械裝置和新的方法,最特別地做模型檢查技術(shù)包括即時(shí)方面。它通常用于存放 PLC的操作系統(tǒng)。 這些燈通常用于調(diào)試。在圖中,梯形邏輯掃描將從最高層開(kāi)始。 邏輯處理 /掃描 — 基于存儲(chǔ)器的輸入表格,程序被一次執(zhí)行一步,同時(shí)輸出值也被修正,這是其它節(jié)的集中。 輸出設(shè)備 — 監(jiān)控器就像指示燈。正如圖 1 所示的計(jì)算機(jī)組成。 LD 是適用于離散控制和互鎖邏輯的圖表語(yǔ)言。 PLCs 可以指定這些值的任何可能的組合。觸點(diǎn)數(shù)量是輸入點(diǎn)和輸出點(diǎn)的總和。標(biāo)準(zhǔn)數(shù)學(xué)和邏輯運(yùn)行可以與用戶(hù)交流和接口運(yùn)行相結(jié)合。一個(gè) VonNeaman 計(jì)算機(jī)一次只能執(zhí)行一個(gè)指令,他們是這樣運(yùn)行的,盡管許多計(jì)算機(jī)看上去一次在做許多事情。 輸出電路 — 圖形卡就像一個(gè)三相開(kāi)關(guān)輸出卡。(例如:意外停止)有一些特殊的 PLC 功能,能直接讀取輸入值,避免了輸入表格。如圖 4 所示,梯形圖將按從左到右,從上到下的順序被解釋。 錯(cuò)誤顯示 — 當(dāng) PLC 有大的硬件或軟件錯(cuò)誤時(shí),這將有顯示。 ROM(只讀存儲(chǔ)器) — 這種存儲(chǔ)器是永久性的不可擦除的。在系統(tǒng)中出現(xiàn)不連續(xù)的和連續(xù)的現(xiàn)象,激發(fā)了我們對(duì)特殊系統(tǒng)技術(shù)挑戰(zhàn)和對(duì)我們能力的分析。 ( 2) PLC 系統(tǒng)不斷地執(zhí)行系統(tǒng)檢查,輸入掃描 ,邏輯掃描和輸出掃描這個(gè)循環(huán)。 inputs the keyboard is analogous to a proximity switch input circuits the serial input chip is like a 24Vdc input card puter the 686 CPU is like a PLC CPU unit output circuits a graphics card is like a triac output card outputs a monitor is like a light storage memory in PLCs is similar to memories in personal puters It is also 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. 3 OPERATION SEQUENCE 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 hardware 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 solved once, this is called the logic scan. While solving the ladder logic the output values are only changed in temporary memory. When the ladder scan is done the outputs will be updated using the temporary values in memory, this is called the output scan. The PLC now restarts the process by starting a self check for faults. This process typically repeats 10 to 100 times per second as is shown in Figure 3. Figure3 PLC Scan Cycle SELF TEST Checks to see if all cards error free, reset watchdog 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 scanned normally). 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 from the start to the end of the program (., an emergency stop). There are special PLC functions that read the inputs directly, and avoid the input tables. LOGIC SOLVE/SCAN Based on the input table in memory, the program is executed 1 step at a time, and outputs are updated. This is the focus of the later sections. OUTPUT SCAN The output table is copied from memory to the output chips. These chips then drive the output devices. 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 prevents 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 program. This problem could have severe effects on plex programs that are developed later in the book. One side effect of the input scan is that if a change in input is too short in duration, it might fall between input scans and be missed. When the PLC is initially turned on the normal outputs will be turned off. This does not affect the values of the inputs. The Input and Output Scans When the inputs to