【正文】
rt of the data acquisition system. In the uC/OSII realtime operating system core, the realization process of A/D driver depends mainly on the conversion time of A/D converter, the analog frequency of the conversion value, the number of input channels, the conversion frequency and so on. The typical A/D conversion circuit is made up of analog multiplexer (MUX), amplifier and analog to digital converter (ADC). 蘇州大學本科生畢業(yè)設計(論文) 9 Figure8. Diagram of the application transfer driver Figure8 shows the application procedure transfer driver. The driver chooses the analog channel to read by MUX, then delay a few microseconds in order to make the signal pass through the MUX, and stabilize it. Then the ADC was triggered to start the conversion and the driver in the circle waiting for the ADC until its pletion of the conversion. When waiting is in progress, the driver is detecting the ADC state signal. If the waiting time is longer than the set time, the cycle should be end. During waiting time of the cycle, if the conversion pleted signal by ADC has been detected, the driver should read the results of the conversion and then return the result to the application. 蘇州大學本科生畢業(yè)設計(論文) 10 Figure9. Diagram of serial receive Figure9 shows the serial receive diagram with the buffer and signal quantity. Due to the existence of serial peripheral equipment does not match the speed of CPU, a buffer zone is needed, and when the data is sending to the serial, it need to be written to the buffer, and then be sent out through serial one by one. When the data is received from the serial port, it will not be processed until several bytes have been received, so the advance data can be stored in buffer. In practice, two buffer zones, the receiving buffer and the sending buffer, are needed to be opened from the memory. Here the buffer zone is defined as loop queue data structure. As the signal of uC/OSII provides the overtime waiting mechanism, the serial also have the overtime reading and writing ability. If the initialization of the received data signal is 0, it expresses the loop buffer is empty. After the interrupt received, ISR read the received bytes from the UART receiving buffer, and put into receiving buffer region, at last wake the user task to execute read operation with the help of received signal. During the entire process, the variable value of the current bytes in recording buffer can be inquired, which is able to shows whether the receive buffer is full. The size of the buffer zone should be set reasonable to reduce the possibility of data loss, and to avoid the waste of storage space. CONCLUSIONS With the rapid development of the field of industrial process control and the 蘇州大學本科生畢業(yè)設計(論文) 11 wide range of applications of work, intelligence, digital distributed control System, it is necessary to make a higher demand of the data accuracy and reliability of the control system. Data acquisition system based on singlechip has been gradually eliminated because the problem of the poor realtime and reliability. With the fast popularization of embedded ARM processor, there has been a trend that ARM processor can alternate to singlechip to realize data acquisition and control. The embedded ARM system can adapt to the strict requirements of the data acquisition system, such as the function, reliability, cost, size, power consum ption, and so on. In this paper, A kind of ARMbased embedded remote I/O data acquisition system has been researched and developed, whose hardware platform use 32bit embedded ARM processor, and software platform use opensource RTOS uC/OSII core. The system can be widely applied to electric power, petroleum, chemical, metallurgy, steel, transportation and so on. And it is mainly used in the collection and monitoring of all kinds of electrical and thermal signals such as voltage, current, thermal resistance, thermocouple data of the production process. Then these data can be sent to the remote DAS, DCS monitoring system through RS485 or Ether interface. The system has the dual redundant work and long distance munication function, which can ensure the disturb rejection capability and reliability of the munication work. 蘇州大學本科生畢業(yè)設計(論文) 12 基于嵌入式 ARM 平臺的遠程 I / O 數(shù)據采集系統(tǒng)的研究和開發(fā) 導言 隨著網絡化,智能化,數(shù)字化分布式控制系統(tǒng)的廣泛使用,基于單芯片的數(shù)據采集系統(tǒng)不僅在處理能力上受限制,并且在實時性和可靠性方面也出現(xiàn)了問題。近幾年來,隨著工業(yè)過程控制領域的迅速發(fā)展和嵌入式 ARM 處理器的迅速普及, ARM 處理器代替單芯片實現(xiàn)數(shù)據的采集和控制成為了趨勢。 在 本文中提出一種新型的基于 ARM 嵌入式平臺的遠程 I / O 數(shù)據采集系統(tǒng)已被研制開發(fā),它可以衡量各種電氣和熱參數(shù),如電壓,電流,熱電偶,熱電阻等等。該系統(tǒng)具有雙冗余網絡和長途電通信功能,它可以確保通信網絡的干擾抑制能力和可靠性。 整個系統(tǒng)的結構設計 基于嵌入式 ARM 的平臺的遠程數(shù)據采集和監(jiān)控系統(tǒng)的整個結構圖在以下的圖 1中展示。該系統(tǒng)主要用于的集中采購和將各種電和熱信號如電壓,熱電阻,熱電偶在生產過程中進行數(shù)字轉換。嵌入控制器平臺的數(shù)據通過進一步以太網的分析和處理被傳送至遠程監(jiān)控中心的工作站。該系統(tǒng)具有雙冗余網絡和遠程通訊功能,它可以確保通信 網絡的干擾抑制能力和可靠性。實時操作系統(tǒng) ( RTOS ) 使設計和應用的擴大變得非常容易,增加新的功能時也沒多大變化。 蘇州大學本科生畢業(yè)設計(論文) 13 系統(tǒng)的硬件設計 基于嵌入式 ARM 平臺的遠程 I / O 數(shù)據采集系統(tǒng)具有很高的普遍性,每個購置設備配備 24收購方式的 I / O 渠道且彼此孤立 。在 0 75mV ,1 5V的 ,0 5V 范圍的電壓信號,在 0 10毫安和 4 20毫安范圍的電流信號,熱阻測量元件包括 Cu50 , Cu100 , Pt50 , Pt100和熱電偶測量元件包括 K , E, S, T 等等 。該系統(tǒng)配備了一些外圍設備,如電源,鍵盤,復位, LCD 顯示器,模擬數(shù)字轉換器, RS485總線,以太網的 JTAG , I2C 接口,串行 E2PROM 等等。那個系統(tǒng)有設置按鈕和 128 * 64液晶顯示器,這使得調試和修改參數(shù)變得容易。 ARM processorRS485系統(tǒng)具有雙冗余網絡和長途通信功能。 為了便于系統(tǒng)維護和升級以太網接口使用獨立 ZNE 100TL 智能嵌入式以太網串口轉換模塊。 圖 3 表示信號預先處理線路圖表。 4 20mA 電流信號和 1 5V 的電壓信號必須用阻抗轉換。 圖 4顯示了使用 16位 ADC 芯片 AD7715的 ADC 信號電路 。 由于 ARM 微處理器具有高速,低功耗,低電壓等優(yōu)點,這使它在低噪音,紋波權力,瞬態(tài)響應性能,時鐘來源的穩(wěn)定,功率控制和許多其他方面需要有更高的要求。圖 5展示了該系統(tǒng)復位電路。 RTOS 的關鍵部分是實時多任務的核心,其基本功能包括任務管理,資源管理,系統(tǒng)管理,計時器管理,內存管理,信息管理,隊列管理等。 該系統(tǒng)軟件平臺使用的是單一化的 uC/ OS 第二代實時簡化操作系統(tǒng)核心,使整個結構系統(tǒng)簡單和應用層次復 雜。系統(tǒng)的主要