【正文】
n 1999, on the basis of its client extend and expand to any goods and goods between, the exchange of information and munications, a work concept. This design is through the VB programming software to design database software, to achieve some of the features in the IOT monitoring system. Serial munications received by storage, data and directly display them in the visual interface. The data sources are received and described by VB and then displayed on the screen. All the data can be Realtime memory in order to analyze them. I design the interface circuit between the single chip and PC and Keep abreast of the health system, by adding alarm function in the system. Through the design of the system for indepth understanding, this can be applied to intelligent home and lab monitoring applications. Thesis is it writes design process of the monitoring information system with VB with ACCESS to expound the fact finally. Design process as basis with above focal point of analysis mainly. Carry on the collection of the basic data at first, and then carry on the query data etc. of temperature. While close towards this thought, still there are a lot of defects on a lot of little details. 物聯(lián)網(wǎng)監(jiān)控系統(tǒng)數(shù)據(jù)庫(kù)軟件設(shè)計(jì) 河南科技大學(xué)畢業(yè)設(shè)計(jì) ( 論文 ) III KEY WORDS: Inter of Things (shorter form IOT), , Database Monitoring System, Temperature, Position 目 錄 前 言 ....................................................................................................... 1 第 1 章 緒論 ............................................................................................ 2 167。 開發(fā)環(huán)境以及開發(fā)工具介紹 ..................................................... 7 167。 系統(tǒng)功能分析 ........................................................................... 16 第 3 章 系統(tǒng)具體實(shí)現(xiàn) .......................................................................... 17 167。本設(shè)計(jì)是針對(duì)物聯(lián)網(wǎng)在實(shí)驗(yàn)室監(jiān)控系統(tǒng)和智能家居管理系統(tǒng)的應(yīng)用而設(shè)立的。在集體調(diào)試的情況下,可以通過(guò)與串口通訊調(diào)試 設(shè)計(jì)連接,把數(shù)據(jù)錄入數(shù)據(jù)庫(kù),并可實(shí)現(xiàn)查詢處理等功能。 物聯(lián)網(wǎng)的認(rèn)識(shí) 物聯(lián)網(wǎng)的英文名稱為 “ The Inter of Things” 。 1999 年,在美國(guó)召開的移動(dòng)計(jì)算和網(wǎng)絡(luò)國(guó)際會(huì)議提出了, “ 傳感網(wǎng) 是下一個(gè)世紀(jì)人類面臨的又一個(gè)發(fā)展機(jī)遇 ” 。 167。同時(shí),有專家認(rèn)為,物聯(lián)網(wǎng)架構(gòu)建立需要明確產(chǎn)業(yè)鏈的利益關(guān)系,建立新的商業(yè)模式,而在新的產(chǎn)業(yè)鏈推動(dòng)矩陣中,核心則是明確電信運(yùn)營(yíng)商的龍頭地位。作者認(rèn)為,當(dāng)務(wù)之急是:擺脫現(xiàn)有技術(shù)的束縛,價(jià)值化頻譜,信任和安全至關(guān)重要,用戶驅(qū)動(dòng)創(chuàng)新帶來(lái)社會(huì)變化,鼓勵(lì)新的商業(yè)模式 [5]。鑒于以上情況,利用以太網(wǎng)實(shí)現(xiàn)智能家居網(wǎng)絡(luò)能夠?qū)?現(xiàn)。 167。關(guān)系模型的數(shù)據(jù)操縱包括查詢、插入、刪除和更新 數(shù)據(jù)。因?yàn)椴煌膽?yīng)用可能需要不同的局部數(shù)據(jù)視圖,所以一個(gè)數(shù)據(jù)庫(kù)可以有多個(gè)外模式,但只有一個(gè)模式。模式 /內(nèi)模式映像定影了數(shù)據(jù)全局邏輯結(jié)構(gòu)與存儲(chǔ)結(jié)構(gòu)之間的對(duì)應(yīng)關(guān)系。 Visual Basic 微軟公司的 Visual Basic 是 Windows 應(yīng)用程序開發(fā)工具,是目前最為廣泛的、易學(xué)易用的面向?qū)ο蟮拈_發(fā)工具。從 Visual 版本開始,在 Visual Basic 中制作的應(yīng)用程序都改變?yōu)榫幾g執(zhí)行,使得 Visual Basic 的代碼效率有了很大的提高,同時(shí)執(zhí)行的速 度 也加快了解30%(同 Visual Basic 相比 )。 167。 如下表 11 所示: 表 11 Record set 對(duì)象的 Lock Type 屬性的設(shè)置值 常量 值 說(shuō)明 adLockReadOnly 1 默認(rèn)值,只讀。 Property 對(duì)象:?jiǎn)为?dú)的一個(gè) Property 對(duì)象,提供屬性功能。 data source= amp。 167。所以首先對(duì)登 錄界面進(jìn)行設(shè)計(jì),在數(shù)據(jù)庫(kù)中錄入用戶名及密碼 ,輸入正確后登錄主窗口,可以顯示溫度、位置的實(shí)時(shí)信息以及查詢功能(包括按日查詢和按時(shí)間段查詢)。 模塊設(shè)計(jì) 添加一個(gè)模塊 Model,在 Model 中 添加如下代碼: Global g_TemperatureUpper As Long 39。記錄確定次數(shù) Private Sub Form Load () Dim connectionstring As String Connectionstring = provider=。 39。 位置數(shù)據(jù)集 2. 窗口加載時(shí)代碼如下: Private Sub Form Load () provider=。 溫度 A, B, C Dim tb As Single Dim tc As Single Dim m As Single 河南科技大學(xué)畢業(yè)設(shè)計(jì) (論文 ) 22 Dim pa As Boolean 39。 位置 B If (m = 50) Then pb = True Else pb = False End If m = Rnd * 100 39。 tm, yyyyMMdd hh:mm:ss) 河南科技大學(xué)畢業(yè)設(shè)計(jì) (論文 ) 24 rsPosition(位置 A) = pa rsPosition(位置 B) = pb rsPosition(位置 C) = pc End Sub. 記錄數(shù)據(jù)并保存生成數(shù)據(jù)的年月日 、 小時(shí)分鐘秒 ,和三個(gè)位置點(diǎn)的溫度或位置信息。HFFamp。O0amp。) 。 2) 兩個(gè) textbox 程序的設(shè)置: Private Sub ctlUpper_Change () Dim t as Long On Error GoTo over: If (Trim () = ) Then = 0 Exit Sub End If t = CLng (Trim ()) If (t 0) Then = 0 ElseIf (t 150) Then = 150 End If Exit Sub Over: = 0 End Sub Private Sub ctlLower_Change () Dim t as Long On Error GoTo over: 河南科技大學(xué)畢業(yè)設(shè)計(jì) (論文 ) 27 If (Trim () = ) Then = 0 Exit Sub End If t = CLng (Trim ()) If (t 0) Then = 0 ElseIf (t 150) Then = 150 End If Exit Sub Over: = 0 End Sub Textbox 中的數(shù)據(jù)在 0 到 150 之間,當(dāng)溢出時(shí)取兩極限值( 0 或 150) 。自動(dòng) 連接數(shù)據(jù)庫(kù) = adUseClient = adUseClient select 時(shí)間 ,溫度 A,溫度 B,溫度 C fro m 溫度 , conn, adOpenDynamic, adLockOptimistic select 時(shí)間 ,位置 A,位置 B,位置 C from 位置 , conn, adOpenDynamic, adLockOptimistic 39。 39。記錄溫度 A 最大值 sqlmax = select max(溫度 A) from 溫度 + sql sqlmax, conn, adOpenDynamic, adLockOptimistic 39。記錄溫度 A 最小值 sqlmin = select min(溫度 A) from 溫度 + sql sqlmin, conn, adOpenDynamic, adLockOptimistic If ( = 0) Then = 0 ℃ Else = Format(rs(0), ) amp。data source= amp。 amp。 amp。 \。 系統(tǒng)調(diào)試 系統(tǒng)調(diào)試分為單機(jī)模擬調(diào)試和小組內(nèi)綜合調(diào) 試: (一 ) 單機(jī)調(diào)試: VB 程序設(shè)計(jì)有數(shù)據(jù)模擬定時(shí)器,可以對(duì)模擬的數(shù)據(jù)進(jìn)行錄入存儲(chǔ)以及查詢功能,在這些功能及基礎(chǔ)上加入的查詢最大最小值以及位置紅外報(bào)警功能可以很好的實(shí)現(xiàn)。對(duì)此執(zhí)行文件進(jìn)行測(cè)試,然后 利用 Visual Basic 自帶的打包向?qū)Чぞ?Package amp。 河南科技大學(xué)畢業(yè)設(shè)計(jì) (論文 ) 39 結(jié) 論 畢業(yè)設(shè)計(jì)是本科教育過(guò)程中最重要的一次集中性實(shí)踐環(huán)節(jié),是學(xué)生四年學(xué)習(xí)的重要總結(jié)。 (二 ) 聯(lián)機(jī)調(diào)試:本系統(tǒng)是物聯(lián)網(wǎng)設(shè)計(jì)的一項(xiàng)上位機(jī)數(shù)據(jù)庫(kù)設(shè)計(jì),下面有 紅外節(jié)點(diǎn) 軟件硬件 設(shè)計(jì) ,溫度 采集 軟硬件 設(shè)計(jì),串行口通訊設(shè)計(jì),基于TCP/IP 的通訊 接口軟件 設(shè)計(jì),還有這個(gè)數(shù)據(jù)庫(kù)軟件設(shè)計(jì)。刪除溫度格式表中的所有記錄 End Sub 在本窗口的三個(gè) textbox 內(nèi)輸入三個(gè)點(diǎn)的溫度信息,然后點(diǎn)添加按鍵,此時(shí)在數(shù)據(jù)庫(kù) 沒有輸入數(shù)據(jù),只有按下提交鍵 , 錄入的數(shù)據(jù)都會(huì)存進(jìn)數(shù)據(jù)庫(kù)里。 39。 39。 \ 39。記錄溫度 B 最小值 sqlmin = select min(溫度 B) from 溫度 + sql sqlmin, conn, adOpenDynamic, adLockOptimistic If ( = 0) Then = 0 ℃ Else = Format(rs(0), ) amp。 If ( = 0) Then = 0 ℃ Else = Format(rs(0), ) amp。 amp。 溫度查詢 Private Sub ctlQueryInTemperature_Click () Dim sql As String If ( = True) Then dt1 = CDate () dt2 = DateAdd (d, dt1, 1) sql = where 時(shí)間 = + CStr(dt1) + and 時(shí)間 + CStr(dt2) + Else 河南科技大