哈工大机械设计带传动设计电算大作业vb和c语言程序代码

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

上上机机电电算算说说明明书书课程名称:机械设计电算题目:V带传动设计院系:机电控制学院班级:1308102班设计者:尤开灵学号:1130810222设计时间:2015.10.17部分变量说明(所有说明见程序部分变量定义)ka工作情况系数p输入功率kwpd工作功率kwi传动比n1输入小轮转速r/mind1小带轮直径mmd2大带轮直径mmv皮带速度m/sjiao输出包容角度°ff0初拉力Nff1轴间力Nld带的长度mmz皮带代数根m质量kg程序运行截图判断语句:包括速度判断选择小轮直径,输入数据判断小轮直径输出结果及其函数界面程序代码Dimka1AsDouble'工作情况系数变量DimkaAsDouble'工作情况系数DimpAsDouble'输入功率DimpiAsDouble'pi的定义DimpdAsDouble'工作功率DimiAsDouble'传动比Dimn1AsDouble'输入小轮转速Dimd1AsDouble'小带轮直径Dimd2AsDouble'大带轮直径DimkAsDouble'循环变量Dima()AsVariant'小轮直径选择序列Dimb()AsVariant'皮带的长度选择序列Dimnn()AsVariant'转速的选择序列Dimmm()AsVariant'包容修正系数列表DimvAsDouble'皮带速度DimaaAsDouble'输入中心距离DimaaaAsDouble'输出实际中心距DimjiaoAsDouble'输出包容角度Dimff0AsDouble'初拉力Dimff1AsDouble'轴间力DimldAsDouble'带的长度DimshunxuAsDouble'基本额定功率顺序Dimshunxu1AsDouble'长度顺序Dimpnum()AsVariant'基本功率序列Dimlxishu()AsVariant'c长度系数Dimp0AsDouble'基本功率Dimdp0AsDouble'增加功率DimzAsDouble'皮带数DimkaaAsDouble'包容修正系数DimklAsDouble'长度系数DimkiAsDouble'传动比系数DimkbAsDouble'弯曲系数DimmAsDouble'质量'运行程序PrivateSubCommand5_Click()'条件输入确定Callf0Callf1Text5.Text=n1&r/minText4.Text=pd&kwEndSubPrivateSubCommand2_Click()'小轮直径选择与确定d1=Val(Text7.Text)Callf2Callf3Callf4EndSubPrivateSubCommand3_Click()'中心距离输入aa=Val(Text16.Text)Callf5EndSubPrivateSubCommand4_Click()'计算Callf6Callf7Callf8Text6.Text=d1&mmText9.Text=d2&mmText10.Text=z&根Text12.Text=aaa&mmText11.Text=jiao&度Text13.Text=ff0&NText14.Text=ff1&NEndSubPrivateSubCommand1_Click()EndEndSubPrivateSubf0()'参数赋值函数pi=3.14159p=Val(Text1.Text)i=Val(Text2.Text)n1=Val(Text3.Text)a()=Array(20,28,31.5,35.5,40,45,50,56,63,71,75,80,90,100,112,125,140,150,160,180,200,224,250,280,315,355,400,425,450,500,560,600,630,710,800,0)b()=Array(200,224,250,280,315,355,400,450,500,560,630,710,800,900,1000,1120,1250,1400,1600,1800,2000,2240,2500,2800,3150,3550,4000,4500,5000,0)nn()=Array(100,200,400,700,800,950,1200,1450,1600,2000,2400,2800,3200,3600,4000,4500,5000,5500,6000,0)mm()=Array(0.68,0.73,0.78,0.82,0.86,0.89,0.92,0.95,0.98,1,1.05,1.1,1.15,1.2,0)EndSubPrivateSubf1()'选择ka1计算pdIfdianjileixing.Text=I类Andzaihe.Text=载荷平稳Andworkhour.Text=10h/天Thenka1=1Ifdianjileixing.Text=I类Andzaihe.Text=载荷平稳Andworkhour.Text=10-16h/天Thenka1=1.1Ifdianjileixing.Text=I类Andzaihe.Text=载荷平稳Andworkhour.Text=16h/天Thenka1=1.2Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动小Andworkhour.Text=10h/天Thenka1=1.1Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动小Andworkhour.Text=10-16h/天Thenka1=1.2Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动小Andworkhour.Text=16h/天Thenka1=1.3Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动较大Andworkhour.Text=10h/天Thenka1=1.2Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动较大Andworkhour.Text=10-16h/天Thenka1=1.3Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动较大Andworkhour.Text=16h/天Thenka1=1.4Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动很大Andworkhour.Text=10h/天Thenka1=1.3Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动很大Andworkhour.Text=10-16h/天Thenka1=1.4Ifdianjileixing.Text=I类Andzaihe.Text=载荷变动很大Andworkhour.Text=16h/天Thenka1=1.5Ifdianjileixing.Text=II类Andzaihe.Text=载荷平稳Andworkhour.Text=10h/天Thenka1=1.1Ifdianjileixing.Text=II类Andzaihe.Text=载荷平稳Andworkhour.Text=10-16h/天Thenka1=1.2Ifdianjileixing.Text=II类Andzaihe.Text=载荷平稳Andworkhour.Text=16h/天Thenka1=1.3Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动小Andworkhour.Text=10h/天Thenka1=1.2Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动小Andworkhour.Text=10-16h/天Thenka1=1.3Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动小Andworkhour.Text=16h/天Thenka1=1.4Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动较大Andworkhour.Text=10h/天Thenka1=1.4Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动较大Andworkhour.Text=10-16h/天Thenka1=1.5Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动较大Andworkhour.Text=16h/天Thenka1=1.6Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动很大Andworkhour.Text=10h/天Thenka1=1.5Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动很大Andworkhour.Text=10-16h/天Thenka1=1.6Ifdianjileixing.Text=II类Andzaihe.Text=载荷变动很大Andworkhour.Text=16h/天Thenka1=1.8IfCheck1.Value=0Thenka=ka1IfCheck1.Value=1Thenka=ka1*1.1pd=p*kaEndSubPrivateSubf2()'计算带轮直径d1=Val(Text7.Text)d2=0Fork=0To50Step1Ifa(k)=0ThenExitForEndIfIfAbs((a(k)/d1-i)/i)=0.05Thend2=a(k)ExitForEndIfNextkIfd2=0ThenMsgBox小带轮直径和带型选择不合适!,重新输入直径ExitSubEndIfEndSubPrivateSubf3()'判断速度v=pi*d1*n1/60/1000Ifv20ThenMsgBox小带轮直径过大!,重新输入直径ExitSubEndIfIfv5ThenMsgBox小带轮直径过小!,重新输入直径ExitSubEndIfEndSubPrivateSubf4()'估计中心距离Dimaa0AsDoubleDimaa1AsDoubleaa0=0.7*(d1+d2)aa1=2*(d1+d2)Text15.Text=aa0&-&aa1EndSubPrivateSubf5()'确定带长和中心距和角度DimllAsDoubleDimc1AsDoubleDimc2AsDoubleIfText8.Text=YThenlxishu=Array(0.81,0.82,0.84,0.87,0.9,0.92,0.96,1,1.02,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)IfText8.Text=ZThenlxishu=Array(0,0,0,0,0,0,0.87,0.89,0.91,0.94,0.96,0.99,1,1.03,1.06,1.08,1.1,1.14,1.16,1.18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)IfText8.Text=AThenlxishu=Array(0,0,0,0,0,0,0,0,0,0,0.81,0.83,0.85,0.87,0.89,0.91,0.93,0.96,0.99,1.01,1.03,1.06,1.09,1.11,1.13,1.17,1.19,0,0,0,0,0,0,0,0,0,0,0,0)IfText8.Text=BThenlxishu=Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0.82,0.84,0.86,0.88,0.9,0.92,0.95,0.98,1,1.03,1.05,1.07,1.09,1.13,1.15,1.18,0,0,0,0,0,0,0,0,0,0)IfText8.Text=CThenlxishu=Array(0,0,0,0,0,0,0,

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功