【正文】
摘要隨著生產(chǎn)力和科學(xué)技術(shù)的不斷發(fā)展,人們的日常生活和生產(chǎn)活動(dòng)大量的使用自動(dòng)化控制,不僅節(jié)約了人力資源,而且很大程度的提高了生產(chǎn)效率,又進(jìn)一步的促進(jìn)了生產(chǎn)力快速發(fā)展,并不斷的豐富著人們的生活。早期的自動(dòng)控制系統(tǒng)是依靠繼電接觸器來(lái)實(shí)現(xiàn)的,其特點(diǎn)是:結(jié)構(gòu)簡(jiǎn)單、價(jià)格低廉、抗干擾能力強(qiáng),可以實(shí)現(xiàn)集中控制和遠(yuǎn)距離控制,但是其采用固定接線,通用性和靈活性差;又采用觸點(diǎn)的開(kāi)關(guān)動(dòng)作,工作頻率低,觸點(diǎn)易損壞,可靠性差。1969年,出現(xiàn)了可編程邏輯控制器PLC(Programmable Logic Controller),其特點(diǎn)是:具備邏輯控制、定時(shí)、計(jì)數(shù)等功能,編程語(yǔ)言采用直觀的梯形圖語(yǔ)言,軟件更改方便,通用性和靈活性好。目前,可編程控制器PLC主要是朝著小型化、廉價(jià)化、標(biāo)準(zhǔn)化、高速化、智能化、大容量化、網(wǎng)絡(luò)化的方向發(fā)展,與計(jì)算機(jī)技術(shù)相結(jié)合,形成工業(yè)控制機(jī)系統(tǒng)、分布式控制系統(tǒng)DCS(Distributed Control System)、現(xiàn)場(chǎng)總線控制系統(tǒng)FCS(Field bus Control System),這將使PLC的功能更強(qiáng),可靠性更高,使用更方便,適用范圍更廣。本設(shè)計(jì)是基于PLC的車輛出入庫(kù)管理系統(tǒng),采用兩位LED來(lái)顯示車庫(kù)內(nèi)車輛的實(shí)際數(shù)量。使用兩個(gè)光傳感器來(lái)監(jiān)控車輛的進(jìn)出并完成計(jì)數(shù)工作,車輛進(jìn)入時(shí)經(jīng)過(guò)兩個(gè)傳感器使顯示數(shù)字加一,車輛外出時(shí)經(jīng)過(guò)兩個(gè)傳感器使顯示數(shù)字減一,但當(dāng)車輛只經(jīng)過(guò)一個(gè)傳感器時(shí)不計(jì)數(shù)。為了防止意外計(jì)數(shù)錯(cuò)誤,本系統(tǒng)采用反復(fù)程序校驗(yàn),來(lái)提高系統(tǒng)的可靠性。首先,注意控制兩個(gè)傳感器之間的距離,用程序驗(yàn)證進(jìn)出車庫(kù)的是否是車輛,當(dāng)人通過(guò)傳感器時(shí)不計(jì)數(shù);其次,采用邏輯互鎖方式,啟動(dòng)加計(jì)數(shù)則要鎖定減計(jì)數(shù),產(chǎn)生加計(jì)數(shù)脈沖時(shí)則要鎖定減計(jì)數(shù)脈沖,如此以保證可靠性;最后,及時(shí)的進(jìn)行復(fù)位處理,以免車輛在傳感器附近作往返運(yùn)動(dòng)時(shí)錯(cuò)誤計(jì)數(shù)。關(guān)鍵詞: PLC 傳感器 車輛 可靠性AbstractWith productivity and the continuous development of science and technology, people39。s daily lives and production activities of a large number of the use of automated control, not only saving human resources, but a large degree of improved production efficiency, further promote the rapid development of productive forces, and constant enrich people39。s lives. Early automatic control system relies on the relay Contactor to achieve, and its features are: simple structure, low cost, antiinterference capability, can achieve centralized control and remote control, but the introduction of fixed wiring, versatile and flexible of the poor and by the switch contacts, the low frequency contacts easily damaged, poor reliability.1969, a programmable logic controller PLC (Programmable Logic Controller), its features are: a logic control, timing, counting, and other functions, intuitive programming language used ladder diagram language, software changes convenience, versatility and flexibility good.At present, the major PLC programmable controller is a small, lowcost, standardized, highspeed, intelligent, hi