freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

儲油罐實時監(jiān)測系統(tǒng)的設(shè)計與實現(xiàn)-閱讀頁

2025-07-28 19:37本頁面
  

【正文】 ,源代碼都是一致的,只不過編譯的軟件不一樣。 將源代碼用 armlinuxgcc 編譯,生成的可執(zhí)行文件移植到 ARM 平臺設(shè)備上,效果如圖 : 圖 操作界面 長治學(xué)院學(xué)士學(xué)位論文 22 將下位機用串口和這塊開發(fā)板相連,它也能實現(xiàn)對儲油罐的監(jiān)測,上圖中的這塊開發(fā)板的 CPU 是三星公司的 S3C2440, 主頻為 400MHz, RAM 為 64M, ROM 為 256M,屏幕只有 寸。 如果上位機除了監(jiān)測儲油罐外不做其他工作,完全可以用 ARM 嵌入式設(shè)備,無論是從環(huán)保,還是從經(jīng)濟(jì)的角度考慮都是最佳的選擇。 2.運行 Qt的調(diào)試功能,檢查是否有語法錯誤。 程序運行中的錯誤 在設(shè)計好程序代碼后,就要進(jìn)行錯誤處理與調(diào)試。有些錯誤在編譯時即可發(fā)現(xiàn)排出,但還有一些錯誤是在軟件運行時由于用戶錯誤的輸入等方面的原因而產(chǎn)生的。 常見的錯誤分為三種: ( 1) 語法錯誤。 ( 2) 運行時錯誤。 ( 3)邏輯錯誤。 調(diào)試結(jié)果 1. 下位機調(diào)試 ( 1) 溫度測試 提高溫度傳感器的溫度, 觀察數(shù)碼管溫度顯示的變化; 長治學(xué)院學(xué)士學(xué)位論文 24 圖 溫度調(diào)試 用手指接觸溫度傳感器,溫度上升 ( 2) 壓力傳感器測試 旋轉(zhuǎn)電位器(此電位器用來模擬壓力傳感器),觀察壓力值和液位值的變化 ,如圖 所示: 圖 壓力調(diào)試 長治學(xué)院學(xué)士學(xué)位論文 25 ( 3) 串口數(shù)據(jù)測試 將本系統(tǒng)的串口連接到計算機,用串口調(diào)試工具觀察串口數(shù)據(jù) ,調(diào)試結(jié)果如圖 : 圖 串口調(diào)試結(jié)果 ( 1) 啟動測試 查看軟件能否正常啟動; 通過多次檢測,軟件在 32 位 linux系統(tǒng)平臺下運行正常,沒有出現(xiàn)異常情況。當(dāng) 油罐編號超過4,界面中無數(shù)值顯示,符合要求 。 ( 2) 51 單片機的算數(shù)計算能力有限,計算較大數(shù)值的乘除法會產(chǎn)生較大的誤差。 ( 3) 本系統(tǒng)中采用的數(shù)學(xué)模型不適合計算球狀等不規(guī)則形狀的儲油罐。 ( 5) 由于對基礎(chǔ)知識的掌握不夠牢固,在設(shè)計過程中走了不少彎路,做了不少無用功。 長治學(xué)院學(xué)士學(xué)位論文 29 參考文獻(xiàn) [1] 張毅剛 .單片機原理及應(yīng)用.北京:高等教育出版社, [2] 馮博琴、吳寧,微型計算機原理與接口技術(shù),清華大學(xué)出版社, [3] 杜春雷 .ARM 體系結(jié)構(gòu)與編 程 .北京: 清華大學(xué)出版社 , [4] 劉篤仁、韓保君 .傳感器原理及應(yīng)用技術(shù) .北京:機械工業(yè)出版社, [5] 成潔 .Linux窗口程序設(shè)計 :Qt4 精彩實例分析 .北京: 清華大學(xué)出版社 , [6] 黃維通 .Visual C++面向?qū)ο笈c可視化程序設(shè)計 (第 3 版 ).北京: 清華大學(xué)出版社 , [7] 劉篤仁、韓保君,傳感器原理及應(yīng)用技術(shù),北京:機械工業(yè)出版社, [8] 童詩白,模擬電子技術(shù)基礎(chǔ),北京:高等教育出版社, [9] 周航慈,單片機應(yīng)用程序設(shè)計,北京:北京航空航天大學(xué)出版社, 長治學(xué)院學(xué)士學(xué)位論文 30 The Realtime Monitoring System of Oil Storage Tank Name:Zhang Guoyan Instructor: Zhang Zhenhong Zhang Yi Abstract: As China has a rich oil resource, so there are many oil refining enterprises in China, naturally, the oil storage tank has been important equipment to storage oil. At the same time, the liquid level of oil storage tank great affect the inventory management and economic operation of factories. However, the liquid level measurement of many responses cans, large oil tank, and gas stations is still using artificial examining and the methods of analysis and assay, and the measurement of other parameters is also has not an execute realtime dynamic measurement. This situation makes accidents happen easily, and can’t provide a accurate basis for the productive operation and management decision of factories. This system in terms of the problems above uses the monolithic technology and sensor technology to measure the temperature and pressure of oil, and makes it shows the oil capacity and temperature value. It also uses the serial port to sent data to PC, so that there is a more concise calculation and statistics. Thus, the system can provide a technical support for the safety of industrial production. Key Words: Tanks, liquid level, a monitoring system 長治學(xué)院學(xué)士學(xué)位論文 31 附錄 下位機源代碼: 1 主函數(shù)代碼 include include void main() { uchar p,bai,shi,ge。 uchar wd,wdshi,wdge。 wd = wendu()。x=110。 shi = (p%100)/10。 display (bai,1)。 display (ge,3)。 wdge = wd%10。 display (wdge, 8)。 COM_Out(0xfe)。 //儲油罐編號 , 在 文件里定義賦值 COM_Out(wd)。//向串口發(fā)送端底壓力值 COM_Out(pup())。//儲油量函數(shù) void display (uchar ,uchar )。//串口發(fā)送函數(shù) uchar wendu()。 //上端壓力返回函數(shù) unsigned char pdow()。//儲油罐編號 2 顯示模塊函數(shù)代碼 /*數(shù)碼管動態(tài)掃描顯示函數(shù),片選信號接 38 譯碼器,段選信號接鎖存器, */ include include define uchar unsigned char define uint unsigned int sbit duan = P3^7。 /* 本應(yīng)該為: wei [8] = {0,1,2,3,4,5,6,7} 但是這樣 的話, wei[1]對應(yīng)的是第二個元素 , wei[0]才對應(yīng) 的是第一個元素 為了直觀方便起見,使 wei[1]對應(yīng)到選通第一個數(shù)碼管 的代碼 0x00(也即是數(shù)組中的 0)就在數(shù)組前面加了一個 空元素(可以為任意值),數(shù)組大小隨之增大一位。 /* 以上 table 中的 10 個元素顯 示到數(shù)碼管上 時分別為 {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} table[0]對應(yīng)數(shù)組中的第一個元素,顯示到數(shù) 碼管上是: 0 以此類推 table[9]對應(yīng)數(shù)組中 長治學(xué)院學(xué)士學(xué)位論文 33 的第十個元素,顯示到數(shù)碼管上是: 10 */ void display (uchar d,uchar w) { duan = 0。 duan = 1。 //將段選信號放進(jìn)鎖存器 duan = 0。= 0xf8。/*將位選信號放進(jìn) P2 口的低三位, // 只改變 P2 口低三位的值,不影響其他位 */ delay_display (8)。 for(j=0。j++) for(x=0。x++)。 */ void display (unsigned char ,unsigned char )。 3 串口發(fā)送模塊代碼 /******************************************************************** * 文件名 : 串口發(fā)送 .c * 描述 : 該文件實現(xiàn)通過串口把數(shù)據(jù)從單片機發(fā)送到電腦, 。 PCON = 0x00。 TH1 = 0xFd。 TR1 = 1。 //初始化串口 SBUF = i。 } TI = 0。 PCON = 0x00。 TH1 = 0xFd。 TR1 = 1。 //初始 化串口 SBUF = i。 } TI = 0。 //DS18B20 數(shù)據(jù)口 unsigned char TMPH,TMPL。 for(i=0。 i++) 。 DQ = 0。 DQ = 1。 deceive_ready = DQ。 return(deceive_ready)。 DQ = 0。 for(i=0。 i++)。 } /******************************************************************** * 名稱 : write_bit() ***********************************************************************/ void write_bit(uchar bitval) { DQ=0。 delay(5)。 } /******************************************************************** * 名稱 : read_byte() ***********************************************************************/ uchar read_byte(void) { uchar i,m,receive_data。 receive_data = 0。 i8。 } delay(6)。 } /******************************************************************** * 名稱 : write_byte() *********************************************************/ void write_byte(uchar val) { uchar i,temp。 i8。 temp = temp amp。 write_bit(temp)。 } } /******************************************************************** * 名稱 : wendu() ***********************************************************************/ uchar wendu() { uchar temp。 write_byte(jump_ROM)。 Reset()。 write_byte(read_EEROM)。 TMPH = read_byte()。 return temp。 unsigned char Reset(void)。 void write_bit(
點擊復(fù)制文檔內(nèi)容
研究報告相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1