已閱讀5頁,還剩18頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
Mechanical CAD / CAM ReportSingle V-belts of ordinary Z-rated powerTable Program DesignAcademy:Mechanical and Electrical AcademyMajor: Mechanical design and manufacture of brakeClass:072093Name: 聶俊杰Student ID:20091003886Expect score: 97June 2012Contents一.VB Introduction1二. The raw data table2三. Look-up table procedure design process3四. Run the demo11五source program13一.VB IntroductionVisual Basic is event-driven programming language developed by Microsoft to include assist in the development environment. By any standards, the VB is the worlds largest number of languages - not only praised or VB developers complain about the number of VB developers. It is derived from the BASIC programming language. VB has a graphical user interface (GUI) and rapid application development (RAD) system, you can easily use DAO, RDO, ADO, connect to the database, or to easily create ActiveX controls. Programmers can easily use VB components to quickly create an application.二. The raw data tableThe table data come from 機械設計(第八版),濮良貴等,高等教育出版社P152表8-4a。單根普通Z型V帶的基本額定功率P0/kw小齒輪的基準直徑d/mm小齒輪轉速n/(r/min)400700800950120014501600200024002800500.060.090.100.120.140.160.170.200.220.26560.060.110.120.140.170.190.200.250.300.33630.080.130.150.180.220.250.270.320.370.41710.090.170.200.230.270.300.330.390.460.50800.140.200.220.260.300.350.390.440.500.56900.140.220.240.280.330.360.400.480.540.60三. Look-up table procedure design process1. Open the Microsoft Visual Basic 6.0, the newly created exe projects, such as figure3-1.figure3-12. After establishing engineering, shown in figure3-2.figure3-23. Rename the object window, as shown in figure3-3.figure3-34. Interface design, such as figure3-4 as shown in.figure3-45. Double-click the OK button to program design, such as figure3-5,3-6 and 3-7.figure3-5figure3-6figure3-76. Carry out a phased program to check, such as shown in figure3-8 and 3-9.figure3-8figure3-97. Step 6 After the success to continue the program design, as shown in figure3-10.figure3-108. Step 7 is completed, press Ctrl + Tab, the interface switching, double-click the exit button to program design, such as figure3-11 and 3-12.figure3-11figure3-129. After completion of the program design, run, debug, such as figure3-13,3-14,3-15 as shown in.figure3-13figure3-14figure3-15By comparison with the original form of data, it is reasonable program design;10. Exit the program, such as shown in figure3-16.figure3-1610. Save and generate the nie.exe applications, such as figure3-17 figure3-18 as shown.figure3-17figure3-18四. Run the demoOpen the as figure4-1,beause so more data,so only choice some of them .figure4-1Choose the input parameters, and click OK to generate the query results, and the two in the originalTable to verify that the correct procedure is as follows figure4-2 and 4-3. figure4-2figure4-3五source programPrivate Sub Command1_Click()Dim a As DoubleDim xz1(0 To 5) As String 定義數組Dim xz2(0 To 9) As Stringxz1(0) = 50 下拉索引xz1(1) = 56xz1(2) = 63xz1(3) = 71xz1(4) = 80xz1(5) = 90xz2(0) = 400xz2(1) = 700xz2(2) = 800xz2(3) = 950xz2(4) = 1200xz2(5) = 1450xz2(6) = 1600xz2(7) = 2000xz2(8) = 2400xz2(9) = 2800Dim indata(6, 10) As DoubleDim zj1 As String 定義中間變量Dim zj2 As String獲取文件Dim FileNo As Integer FileNo = FreeFile() 獲取一個未使用的文件號 Dim str As String 用來記錄最終的值 Open C:UsersAdministratorDocumentsnienie.txt For Input As #FileNo For i = 0 To 5 For j = 0 To 9 Input #FileNo, indata(i, j) Next j Next i Close #FileNo zj1 = Combo1.Text zj2 = Combo2.Text If (zj1 = xz1(0) Then If (zj2 = xz2(0) Then a = indata(0, 0) End If If (zj2 = xz2(1) Then a = indata(0, 1) End If If (zj2 = xz2(2) Then a = indata(0, 2) End If If (zj2 = xz2(3) Then a = indata(0, 3) End If If (zj2 = xz2(4) Then a = indata(0, 4) End If If (zj2 = xz2(5) Then a = indata(0, 5) End If If (zj2 = xz2(6) Then a = indata(0, 6) End If If (zj2 = xz2(7) Then a = indata(0, 7) End If If (zj2 = xz2(8) Then a = indata(0, 8) End If If (zj2 = xz2(9) Then a = indata(0, 9) End If End If If (zj1 = xz1(1) Then If (zj2 = xz2(0) Then a = indata(1, 0) End If If (zj2 = xz2(1) Then a = indata(1, 1) End If If (zj2 = xz2(2) Then a = indata(1, 2) End If If (zj2 = xz2(3) Then a = indata(1, 3) End If If (zj2 = xz2(4) Then a = indata(1, 4) End If If (zj2 = xz2(5) Then a = indata(1, 5) End If If (zj2 = xz2(6) Then a = indata(1, 6) End If If (zj2 = xz2(7) Then a = indata(1, 7) End If If (zj2 = xz2(8) Then a = indata(1, 8) End If If (zj2 = xz2(9) Then a = indata(1, 9) End If End If If (zj1 = xz1(2) Then If (zj2 = xz2(0) Then a = indata(2, 0) End If If (zj2 = xz2(1) Then a = indata(2, 1) End If If (zj2 = xz2(2) Then a = indata(2, 2) End If If (zj2 = xz2(3) Then a = indata(2, 3) End If If (zj2 = xz2(4) Then a = indata(2, 4) End If If (zj2 = xz2(5) Then a = indata(2, 5) End If If (zj2 = xz2(6) Then a = indata(2, 6) End If If (zj2 = xz2(7) Then a = indata(2, 7) End If If (zj2 = xz2(8) Then a = indata(2, 8) End If If (zj2 = xz2(9) Then a = indata(2, 9) End If End If If (zj1 = xz1(3) Then If (zj2 = xz2(0) Then a = indata(3, 0) End If If (zj2 = xz2(1) Then a = indata(3, 1) End If If (zj2 = xz2(2) Then a = indata(3, 2) End If If (zj2 = xz2(3) Then a = indata(3, 3) End If If (zj2 = xz2(4) Then a = indata(3, 4) End If If (zj2 = xz2(5) Then a = indata(3, 5) End If If (zj2 = xz2(6) Then a = indata(3, 6) End If If (zj2 = xz2(7) Then a = indata(3, 7) End If If (zj2 = xz2(8) Then a = indata(3, 8) End If If (zj2 = xz2(9) Then a = indata(3, 9) End If End If If (zj1 = xz1(4) Then If (zj2 = xz2(0) Then a = indata(4, 0) End If If (zj2 = xz2(1) Then a = indata(4, 1) End If If (zj2 = xz2(2) Then a = indata(4, 2) End If If (zj2 = xz2(3) Then a = indata(4, 3) End If If (zj2 = xz2(4) Then a = indata(4, 4) End If If (zj2 = xz2(5) Then a = indata(4, 5) End If If (zj2 = xz2(6) Then a = indata(4, 6) End If If (zj2 = xz2(7) Then a = indata(4, 7) End If If (zj2 = xz2(8) Then a = indata(4, 8) End If If (zj2 = xz2(9) Then a = indata(4, 9) End If End If If (zj1 = xz1(5) Then If (zj2 = xz2(0) Then a = indata(5, 0) End If If (zj2 = xz2(1) Then a = indata(5, 1) End If If (zj2 = xz2(2) Then a = indata(5, 2) End If If (zj2 = xz2(3) Then a = indata(5, 3) End If If (zj2 = xz2(4) Then a = indata(5, 4) E
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2026校招:財務經理題目及答案
- 2026校招:SAP實施顧問題目及答案
- 餐廳管理培訓課件
- 2026中考沖刺動員大會教師發(fā)言稿:逐夢青春我們陪你勇毅前行
- 餐廳有聲服務培訓課件
- 《醫(yī)療器械經營監(jiān)督管理辦法》培訓考核試題及答案
- 2025年輔警招聘考試試題庫及答案
- 維修人員責任書與維修保養(yǎng)安全協(xié)議
- 飛機黑匣子知識
- 英美文學之UncleTomsCabin展示
- 2026及未來5年中國抽紗刺繡工藝品行業(yè)競爭現狀及投資前景趨勢報告
- 2025動物防疫專員試題及答案
- 單元復習:解碼中國-我國區(qū)域差異的深度整合與素養(yǎng)提升
- 心肺復蘇術護理配合要點
- 中醫(yī)特色護理在精神科的應用
- 風力發(fā)電運輸合同范本
- 重難點22 立體幾何中的外接球、內切球問題(舉一反三專項訓練)(全國通.用)(原卷版)-2026年高考數學一輪復習舉一反三系列
- 高二生物DNA的復制一節(jié)教案(2025-2026學年)
- 法律合規(guī)風險評估檢查表
- 福建省莆田市擢英中學2026屆九年級英語第一學期期末聯考試題含解析
- 大連東軟信息學院《高等數學一》2024-2025學年第一學期期末試卷
評論
0/150
提交評論