【正文】
ROM 和 RAM。 內(nèi)存 的 容量的大小一般 與 PLC 的大小有關(guān) ,通常小型機(jī) 的 最大的存儲(chǔ)能力 要小 于 6kb,中型機(jī)器 的 最大存儲(chǔ)能力可以達(dá)到 64KB,而 大型機(jī)的最大存儲(chǔ)能力可達(dá)到兆字節(jié)。使用時(shí)可以根據(jù) 40 程序和數(shù)據(jù)存儲(chǔ)能力選擇適合的類型, 必要時(shí) 也可以進(jìn)行內(nèi)存擴(kuò)大設(shè)計(jì)。 PLC 中內(nèi)存的 選擇方法:根據(jù)編程 所用的節(jié)點(diǎn)數(shù)來(lái) 準(zhǔn)確計(jì)算實(shí)際 所需 內(nèi)存 的容量 。 軟件選擇 在系統(tǒng)的實(shí)現(xiàn)過(guò)程 中 , PLC 的編程 問(wèn)題是非常重要的。用戶應(yīng)該知道 PLC 產(chǎn)品的軟件 功能 。通常,一個(gè)系統(tǒng)的軟件是用 來(lái)處理 控制硬件 的 。但 有時(shí) 一些應(yīng)用系統(tǒng) 除了需要控制硬件部分外 還需要軟件的 一些 功能。 一個(gè)程序塊由可執(zhí)行代碼和注釋組成??蓤?zhí)行代碼由主程序和若干子程序或者中斷服務(wù)程序組成??蓤?zhí)行代碼被編譯并下載到 FX2N 中,而程序注釋不會(huì)被下載。您可以使用組織組件(主程序、子程序和中斷服務(wù)程序)來(lái)結(jié)構(gòu)化您的控制程序。 主程序 主程序中包括控制應(yīng)用的指令。 FX2N 在每一個(gè)掃描周期中順序執(zhí)行這些指令。 子程序 子程序是應(yīng)用程序中的可選組件。只有被主程序、中斷服務(wù)程序或者其它子程序調(diào)用時(shí),子程序才會(huì)執(zhí)行。當(dāng)您希望重復(fù)執(zhí)行某項(xiàng)功能時(shí),子程序是非常有用的。與其在主程序中的不同位置多次使用相同的程序代碼,不如將這段程序 邏輯寫在子程序中,然后在主程序中需要的地方調(diào)用。調(diào)用子程序有如下優(yōu)點(diǎn): (1)用子程序可以減小程序的長(zhǎng)度 (2)由于將代碼從主程序中移出,因而用子程序可以縮短程序掃描周期。 FX2N 在每個(gè)掃描周期中處理主程序中的代碼,不管代碼是否執(zhí)行。而子程序只有在被調(diào)用時(shí),F(xiàn)X2N 才會(huì)處理其代碼。在不調(diào)用子程序時(shí), FX2N 不會(huì)處理其代碼。 (3)用子程序創(chuàng)建的程序代碼是可傳遞的。您可以在一個(gè)子程序中完成一個(gè)獨(dú)立的功能,然后將它復(fù)制到另一個(gè)應(yīng)用程序中而無(wú)需作重復(fù)工作。 中斷服務(wù)程序 中斷服務(wù)程序是應(yīng)用程序中的可選組件。當(dāng)特定 的中斷事件發(fā)生時(shí),中斷服務(wù)程序執(zhí)行。您可以為一個(gè)預(yù)先定義好的中斷事件設(shè)計(jì)一個(gè)中斷服務(wù)程序。當(dāng)特定的事件發(fā)生時(shí), FX2N 會(huì)執(zhí)行中斷服務(wù)程序。中斷服務(wù)程序不會(huì)被主程序調(diào)用。只有當(dāng)中斷服務(wù)程序與一個(gè)中斷事件相關(guān)聯(lián),且在該中斷事件發(fā)生時(shí), FX2N 才會(huì)執(zhí)行中斷服務(wù)程序。 提示:因?yàn)闊o(wú)法預(yù)測(cè)何時(shí)會(huì)產(chǎn)生中斷,所以應(yīng)考慮盡量限制中斷服務(wù)程序和程序中其它部分所共用的變量個(gè)數(shù)。使用中斷服務(wù)程序中的局部變量,可以保證中斷服務(wù)程序只使用臨時(shí)存儲(chǔ)器,并且不會(huì)覆蓋程序中其它部分使用的數(shù)據(jù)。為了保證主程序與中斷服務(wù)程序正確地 共享數(shù)據(jù),您可以使用許多編程技巧。 41 結(jié)論 隨著科技的不斷進(jìn)步, PLC 的種類 是越來(lái)越多,功能也逐漸增強(qiáng)。在文章中,雖然有總結(jié)一些選擇的方法, 但 在實(shí)際工作中我們?nèi)匀槐仨氉龀鲞m當(dāng)?shù)恼{(diào)整,根據(jù)實(shí)際情況來(lái)設(shè)計(jì)控制系統(tǒng) 以 滿足期望。 The Method Selecting Type of PLC in Controlling System Abstract: When designing PLC system,first determining control scheme, the work of next step is PLC selecting type of project design. The characteristic of process and application requirement are the major accordance of designing selecting and relevant equipments should be integrated、 standard 、 according to the principle easy to form a whole with industrial control system and easy to expand its function to select type, PLC chosen should have application achievement in related industrial field、 the maturation and reliable system,the systematic hardware、 software configuration and function of PLC should suit with installation scale and control programming controller, function picture and relevant programming language is helpful to shorten programming time. Therefore, selecting type of project design and estimating, it should analyse the characteristic of process and control requirement in detail, definite control task and range, determing operation and movement required,then according to control ask to estimate numbers of inputs and outputs、memory capacity required、 determing function of PLC, the external equipment property etc. finally selecting having higher price performance PLC and desiging the corresponding control system. Along with popularization of PLC in industrial control, quantity and kind of PLC product are more and more and function also bees perfect day by day. In recent years, the PLC products that introduced from the countries such as America、 Japan and Germany and the domestic manufacturer assembles or develops independently have had tens of series, hundreds of models. The kind of PLC is numerous, its structural model , performance、 capacity、instruction system and programming method etc are different, application occasion has also each to stress. Therefore, select PLC reasonably, the application for PLC in control system has important role. Along with the unceasing advance of science and technology, the kind of PLC is increasingly numerous,its function also strengthens gradually. Though the article have sumed up some methods of choosing PLC and exampled to explain how to use, in practical work it must still make proper adjustment according to practical condition in order to design the 42 industrial control system that satisfies expectation. Key words: PLC。 selecting type。 controlling system I. Introduction PLC technology develops promptly along with the development of puter and microelectronics technology, and develops from a initial machine to 8 machines. Along with application of microprocessor CPU and the technical of microputer in PLC, it has formed PLC on modern meaning. Since 80 decade of 20 century, along with microelectronics technology development of the largescale and super largescale Integrated circuit etc. microelectronics technology, That the 16 and 32 microprocessor forms microputer PLC have gotten astonishing development, these make PLC get new breakthrough in the aspects such as concept、 design、 price performance as well as application. Not only control function strengthens, power consumption and volume reduce, cost drops, reliability rises, programming and fault detection are more flexible and convenient, but also longrange UO and munication work, data handling as well as manmachine interface (HMI) also have got rapid development. Now, PLC can not only apply in the automation of manufacturing industry but also can still apply in the course control system in serial production, these have made it bee one of 3 pillar in automation technical field, even if the technology of bus line bees today of automation technical application hot point, PLC is still the indispensable controller in the control system onthespot of bus line. Synthesized, along with the development of PLC and its popularize in automation industrial control, the kind of PLC product is more and more and use is also more and more extensive, therefore, selecting PLC reasonably for raising the application of PLC in control system has important role. II. Selecting machine model The market of our country has the popular PLC product that has following few pany: 1) Schneider pany, include early Tianjin instrument and meter plant transfer the product of Modicon pany, now, there is the products such as Quantum, Premium and Momentum。 2) Rockwell pany (include AB pany) PLC product, now, there is the products such as SLC、 Micro Logix and Control Logix。 43 3) Siemens pany product, now, there is S7400/300/200 seri