




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、机械原理课程设计(曲柄与移动从动件型近似等速平面六杆机构) 机械原理课程设计 说明书 设计题目:曲柄与移动从动件型近 似等速比平面六杆机构 年 级: 大 二 专 业: 机械电子工程 班 级: xxxxxxxxxx 姓 名: xxxxxx 学 号: xxxxxxxxxx 指导老师: xxxxxxxx 1、 设计题目、设计任务和要求l 设计题目:图3.1为曲柄与移动从动件型近似等速比平面六杆机构。令,当,曲柄从沿方向转动到时,从动件在其位移中部做近似等速比运动。导杆的半摆角,当已知从动件的工作行程h时,从动件关于点的距离,当已知曲柄的杆长时,、之间的距离。该机构的行程速比系数,最小传动角,的方位角
2、,的方位角。 图3.1 第一型近似等速比平面六杆机构 l 设计任务和要求:机构的设计参数为,;,。(1) 制作机构的动画,以上述参数作为默认设计,将设计成可以调节的,通过滚动条的方式实现的变化,的默认值为。(2) 在窗体上生成滑块5的位移、速度与加速度关于的曲线,的变化区间为,参见图3.3。(3) 生成滑块的、与的excel数据表文件,的变化区间为。二、机构设计三个杆件+两个滑块,如图3.1所示原动件(杆1)绕o1转动,通过滑块2使导杆3绕o3做摆动,杆3摆动通过滑块4使导杆5在机架6内水平移动。该构件的自由度:,所以该机构的运动是唯一确定的。机构的设计参数为,。有了以上的参数可以在vb的pi
3、cturebox控件的picture1中的绘制机构简图,首先要先定义坐标系,具体程序为:picture1.scale (-800, 300)-(200, -500),然后根据图3.1和所给的参数在对应的坐标系上来绘制,起始位置是当原动件(即杆1)的转角为0(即水平位置)。杆1与机架6形成转动副,与滑块2同样形成转动副;杆3与滑块2组成移动副,与滑块4构成移动副;杆5与滑块4构成转动副,与机架6构成移动副,不过上述的滑块都不能用矩形来画,要用线条组合。同样为了在窗体上生成滑块5的位移、速度与加速度关于的曲线,的变化区间为,在picturebox控件的picture2定义坐标系,具体程序为:pic
4、ture2.scale (-0.25 * pi, 500)-(2.25 * pi, -500),为了能清楚表示x轴上的坐标用line?.x1 = ?,line?.y1 = ?的方法来标上刻度,用 label标签来标上刻度值。另外为了实现picture1和picture2的动画,还得画上相应的command命令按钮(开始、暂停、刷新、退出)、定时器、commondialog对话框控件;为了显示运动时picture1中滑块5的即时数据(包括s5、v5、a5)和其曲线图,还需要text文本框来显示、check复选框来控制;为了能调节机构原动件的运动角速度,需要hscrollbar水平滚动条;最后还要
5、一个command命令按钮来导出excel数据文件。整体设计的初始界面如下截图:三、机构动画(vb程序详见附录七)设计原理:通过visual basic程序语言,使机构实现运动。l 先确定原动件的运动,其程序为:line3.x2 = 100 * cos(1) 'line3.y2 = 100 * sin(1)l 杆1与滑块2连接的转动副(即shape3)的运动轨迹,其程序为:shape3.top = line3.y2 + 7.5shape3.left = line3.x2 - 7.5l 滑块2的运动轨迹,其程序为:line16.x2 = line3.x2 - sqr(19.5 2 + 3
6、7 2) * cos(atn(39 / 74) + )line16.y2 = line3.y2 - sqr(19.5 2 + 37 2) * sin(atn(39 / 74) + )line16.x1 = line16.x2 - 39 * sin()line16.y1 = line16.y2 + 39 * cos()line17.x1 = line16.x1 + 74 * cos()line17.y1 = line16.y1 + 74 * sin()line17.x2 = line16.x2 + 74 * cos()line17.y2 = line16.y2 + 74 * sin()line1
7、5.x1 = line16.x1line15.y1 = line16.y1line15.x2 = line17.x1line15.y2 = line17.y1line14.x1 = line16.x2line14.y1 = line16.y2line14.x2 = line17.x2line14.y2 = line17.y2l 把杆3分成两部分,其中o3a的轨迹,其程序为:line5.x2 = line16.x2 - 0.5 * 39 * sin()line5.y2 = line16.y2 + 0.5 * 39 * cos()line58.x1 = line17.x2 - 0.5 * 39 *
8、 sin()line58.y1 = line17.y2 + 0.5 * 39 * cos()line58.x2 = 384 * cos() - 200line58.y2 = 384 * sin()l 杆5与滑块4够成的转动副的运动轨迹,其程序为:shape5.left = -640.5shape5.top = -433 * tan() + 7.5l 杆5的运动轨迹,其程序为:line8.x1 = -433 - 200line8.y1 = -433 * tan()line8.x2 = -433 - 200line8.y2 = -433 * tan() - 650l 滑块4的运动轨迹,其程序为:l
9、ine12.x1 = line8.x1 - 37 * cos() - 39 / 2 * sin()line12.y1 = line8.y1 - 37 * sin() + 39 / 2 * cos()line12.x2 = line12.x1 + 39 * sin()line12.y2 = line12.y1 - 39 * cos()line11.x1 = line12.x1 + 74 * cos()line11.y1 = line12.y1 + 74 * sin()line11.x2 = line12.x2 + 74 * cos()line11.y2 = line12.y2 + 74 * si
10、n()line10.x1 = line12.x1line10.y1 = line12.y1line10.x2 = line11.x1line10.y2 = line11.y1line9.x1 = line12.x2line9.y1 = line12.y2line9.x2 = line11.x2line9.y2 = line11.y2l 杆3的另一部分o3b的运动轨迹,其程序为:line7.x1 = line11.x1 + (line11.x2 - line11.x1) / 2line7.y1 = line11.y2 + (line11.y1 - line11.y2) / 2line7.x2 =
11、 -200line7.y2 = 0line13.x2 = line12.x1 + (line12.x2 - line12.x1) / 2line13.y2 = line12.y2 + (line12.y1 - line12.y2) / 2line13.x1 = -576 * cos() - 200line13.y1 = -576 * sin()l 另外picturebox控件的picture2中的曲线动画,其程序为:if f = true then if check1.value = 1 then picture2.pset (1, s5 / 2), rgb(255, 0, 0) '为
12、了能在p2中能够全部显示出来,将s5、v5、a5分别除以2、20、200,(以合适的比例缩小)这样能以合适的比例在p2中显示 end if if check2.value = 1 then picture2.pset (1, v5 / 20), rgb(0, 255, 0) end if if check3.value = 1 then picture2.pset (1, a5 / 200), rgb(255, 0, 255) end ifend ifl frame1容器中显示滑块5的位移、速度和加速度,其程序为:text2.text = format(s5 / 1000, "0.0
13、000000000")text3.text = format(v5 / 1000, "0.0000000000")text4.text = format(a5 / 1000, "0.0000000000")l command 6(数据文件输出)控件程序:private sub command6_click() dim file_path as string savefile.cancelerror = true on error goto errhandler savefile.flags = cdlofnhidereadonly savefi
14、le.filter = "excel文件 (*.xls)|*.xls" savefile.filterindex = 2 savefile.showsave file_path = savefile.filename call kill_file(file_path) set ex = createobject("excel.application") set exwbook = nothing set exsheet = nothing set exwbook = ex.workbooks().add set exsheet = exwbook.wor
15、ksheets.add exwbook.worksheets(1).activate ex.cells(1, 1).value = "2:" ex.cells(1, 2).value = "s5:" ex.cells(1, 3).value = "v5:" ex.cells(1, 4).value = "a5:" dim i as integer 1 = hscroll1.value = 0 for i = 1 to 360 2 = 2 + 1 1 = 2 / 180 * pi c = 1 / (1 + q 2 +
16、 2 * q * cos(1) = atn(q * sin(1) / (1 + q * cos(1) 1 = c * q * (q + cos(1) 2 = c 2 * q * (q 2 - 1) * sin(1) 3 = c 3 * q * (q 2 - 1) * (2 * q * (1 + (sin(1) 2) + (1 + q 2) * cos(1) 4 = c 4 * q * (q 2 - 1) * sin(1) * (8 * q * (1 - q 2) * cos(1) + 8 * q 2 * (cos(1) 2 + 12 * q 2 * (1 + (sin(1) 2) - (1 +
17、 q 2) 2) s5 = 0.5 * h - d2 * tan() vl5 = -d2 / (cos() 2 al5 = 2 * vl5 * tan() v5 = vl5 * 1 * 1 a5 = (al5 * (1) 2 + vl5 * 2) * 1 2 ex.cells(i + 1, 1).value = format(2, "0.00000") ex.cells(i + 1, 2).value = format(s5 / 1000, "0.00000") ex.cells(i + 1, 3).value = format(v5 / 1000, &
18、quot;0.00000") ex.cells(i + 1, 4).value = format(a5 / 1000, "0.00000") next i exwbook.sheets(1).name = "运动分析" exwbook.worksheets(1).activate exwbook.saveas file_path set exwbook = nothing set exsheet = nothing ex.quit msgbox "数据保存完毕!", vbokonly + vbinformation, &qu
19、ot;数据保存"errhandler:end subl picturebox控件的picture1中的机构动画截图:l picturebox控件的picture2中的曲线动画截图:l frame1容器中显示滑块5的位移、速度和加速度截图:4、 机构运动分析l 运动分析:在图3.1中,当曲柄1的角位移为时,导杆3上的长度,的长度,导杆3的角位移。对求关于的一二阶导数,令,于是得到 当导杆3的角位移为时,滑块5的位移为:l 相应的vb程序为: = + 1 * 180 / pi / 10001 = / 180 * pi '-的单位为弧度-c = 1 / (1 + q 2 + 2 *
20、 q * cos(1) = atn(q * sin(1) / (1 + q * cos(1)1 = c * q * (q + cos(1)2 = c 2 * q * (q 2 - 1) * sin(1)3 = c 3 * q * (q 2 - 1) * (2 * q * (1 + (sin(1) 2) + (1 + q 2) * cos(1)4 = c 4 * q * (q 2 - 1) * sin(1) * (8 * q * (1 - q 2) * cos(1) + 8 * q 2 * (cos(1) 2 + 12 * q 2 * (1 + (sin(1) 2) - (1 + q 2) 2)
21、s5 = 0.5 * h - d2 * tan()vl5 = -d2 / (cos() 2al5 = 2 * vl5 * tan()v5 = vl5 * 1 * 1a5 = (al5 * (1) 2 + vl5 * 2) * 1 2l 根据导出的excel数据文件(在该文件夹内),做出excel曲线,截图为:数据表为:(具体数据详见该文件夹下的excel数据文件)2:(0)s5:(m)v5:(m/s)a5:(m/s2)10.24748-1.443330.0000120.24496-1.443330.0000730.24244-1.443330.0002340.23992-1.443330.00
22、05550.2374-1.443330.00107.3560.26008-1.44333-0.000553570.25756-1.44333-0.000233580.25504-1.44333-0.000073590.25252-1.44333-0.000013600.25-1.443330因为s5、v5和a5的幅值相差相对较大,为了能更好的看出它们随角度变 化而变化的情况,分别根据excel中的数据做出曲线图:位移:(m) 速度:(m/s) 加速度:(m/s2) 5、 .设计的心得体会和收获 作为一名机械电子工程的大二的学生,我觉得能做类似的课程设计是十分有意义,而且是十分必要的,机电专业的
23、学生就是要将机器或机构通过一系列方法实现其功能。在已度过的大二的时间里我们大多数接触的是专业基础课,我们在课堂上掌握的仅仅是专业基础课的理论面,如何去锻炼我们的实践面?如何把我们所学到的专业基础理论知识用到实践中去呢?我想做类似的课程设计就为我们提供了良好的实践平台。在做本次课程设计的过程中,我感触最深的当数查阅大量的资料。为了让自己的设计的机构和所编的程序更加完善,更加符合题目的要求标准,一次次翻阅visual basic程序设计基础课本和网上资料是十分必要的,同时也是必不可少的。我们是在作设计,编程是细心活。 作为一名专业学生掌握一门或几门制图编程软件同样是必不可少的,vb正是这种既要绘图
24、又要编程的软件,虽然大一时学过,但那些都是基础,而且一直没有机会能将所学到的知识运用到我们的专业课程上,然而本次课程设计就是一个很好的机会,我们即将专业知识通过软件编程,了解了“曲柄与移动从动件兴近似等速比平面六杆机构”的运动原理,也将我们大一时学的vb软件知识温故一遍,可谓一举两得,收获颇大。 虽然在画图或者编程的过程中碰到了很多的困难,特别是编程,一次又一次的出现问题,一次又一次的修改程序,使得其每个构件的运动都能符合题目要求。特别有必要要提一下excel的数据文件输出,这个问题将近困扰了我大半个月,机构能顺利运动,但就是不能导出数据文件,当然在这过程当中也不断询问老师,不断查资料,最后发
25、现是电脑系统原因,最后借用别人xp系统的电脑,顺利导出数据文件。 在本次课程设计过程中我学到了很多,我们要不断温故以前学过的知识,当我们要去用到它时再去温故,恐怕有点迟了;还有遇到问题不要气馁,不要抱怨,就像指导老师说的一样,要善于查找问题,去不断的攻克,当我们解决问题的时候,我们就又提升了一个档次.话说回来,由于自己能力有限,本次课程设计难免还会有错误或者不完善的地方,还望老师批评指正。6、 参考文献 王洪欣、戴宁 主编-机械原理课程设计上机与设计. 东南大学出版社出版,2007. 陈庆章 主编-visual basic 程序设计基础. 浙江科技技术出版社出版,2010. 王文奎 主编-机械
26、原理. 电子工业出版社出版,2007.七、附录(完整vb程序)option explicitdim as singledim 1, 2 as singledim 1 as singledim f as booleandim c as single, s5 as single, vl5 as single, al5 as single, a5 as single, v5 as singledim , 1, 2, 3, 4 as singledim ex as object, exwbook as object, exsheet as objectconst pi = 3.1415926const
27、 a = 100const q = 0.5const d1 = 200const d2 = 433const h = 500private sub command6_click() dim file_path as string savefile.cancelerror = true on error goto errhandler savefile.flags = cdlofnhidereadonly savefile.filter = "excel文件 (*.xls)|*.xls" savefile.filterindex = 2 savefile.showsave f
28、ile_path = savefile.filename call kill_file(file_path) set ex = createobject("excel.application") set exwbook = nothing set exsheet = nothing set exwbook = ex.workbooks().add set exsheet = exwbook.worksheets.add exwbook.worksheets(1).activate ex.cells(1, 1).value = "2:" ex.cells(
29、1, 2).value = "s5:" ex.cells(1, 3).value = "v5:" ex.cells(1, 4).value = "a5:" dim i as integer 1 = hscroll1.value = 0 for i = 1 to 360 2 = 2 + 1 1 = 2 / 180 * pi c = 1 / (1 + q 2 + 2 * q * cos(1) = atn(q * sin(1) / (1 + q * cos(1) 1 = c * q * (q + cos(1) 2 = c 2 * q * (
30、q 2 - 1) * sin(1) 3 = c 3 * q * (q 2 - 1) * (2 * q * (1 + (sin(1) 2) + (1 + q 2) * cos(1) 4 = c 4 * q * (q 2 - 1) * sin(1) * (8 * q * (1 - q 2) * cos(1) + 8 * q 2 * (cos(1) 2 + 12 * q 2 * (1 + (sin(1) 2) - (1 + q 2) 2) s5 = 0.5 * h - d2 * tan() vl5 = -d2 / (cos() 2 al5 = 2 * vl5 * tan() v5 = vl5 * 1
31、 * 1 a5 = (al5 * (1) 2 + vl5 * 2) * 1 2 ex.cells(i + 1, 1).value = format(2, "0.00000") ex.cells(i + 1, 2).value = format(s5 / 1000, "0.00000") ex.cells(i + 1, 3).value = format(v5 / 1000, "0.00000") ex.cells(i + 1, 4).value = format(a5 / 1000, "0.00000") next
32、 i exwbook.sheets(1).name = "运动分析" exwbook.worksheets(1).activate exwbook.saveas file_path set exwbook = nothing set exsheet = nothing ex.quit msgbox "数据保存完毕!", vbokonly + vbinformation, "数据保存"errhandler:end subprivate sub kill_file(byval s as string)on error goto kille
33、rrorkill sexit subkillerror:end subprivate sub form_load() hscroll1.value = 10 timer1.enabled = false command2.enabled = false command3.enabled = false command4.enabled = false picture1.scalemode = 6 '定义单位为mm picture1.scale (-800, 300)-(200, -500) '定义坐标系,原点为控件中心,右为x轴正方向,上为y轴正方向 '画静态图,p2的
34、界面设计 picture2.scale (-0.25 * pi, 500)-(2.25 * pi, -500) picture2.drawwidth = 2 line47.x1 = 0 line47.y1 = 500 line47.x2 = 0 line47.y2 = -500 line46.x1 = -0.25 * pi line46.y1 = 0 line46.x2 = 2.25 * pi line46.y2 = 0 line50.x1 = pi / 2 line50.y1 = 20 line50.x2 = pi / 2 line50.y2 = 0 line51.x1 = pi line5
35、1.y1 = 20 line51.x2 = pi line51.y2 = 0 line49.x1 = 3 * pi / 2 line49.y1 = 20 line49.x2 = 3 * pi / 2 line49.y2 = 0 line48.x1 = 2 * pi line48.y1 = 20 line48.x2 = 2 * pi line48.y2 = 0 label12.top = -10 label12.left = 0.1 label8.top = -10 label8.left = pi / 2 - 0.2 label11.top = -10 label11.left = pi -
36、0.1 label10.top = -10 label10.left = 3 * pi / 2 - 0.2 label9.top = -10 label9.left = 2 * pi - 0.1 '画静态图,p1的界面设计 '由于画图时已经很标准所以p1的界面设计省略 = 0 '画初始位置图 call drawend subprivate sub check1_click() f = trueend subprivate sub check2_click() f = trueend subprivate sub check3_click() f = trueend su
37、bprivate sub hscroll1_change() text1 = val(hscroll1.value)end subprivate sub hscroll1_scroll() call hscroll1_changeend subprivate sub command1_click() if command1.caption = "开始" then command2.enabled = true command3.enabled = true command4.enabled = true command2.setfocus timer1.enabled =
38、true else if command1.caption = "继续" then command3.enabled = true command4.enabled = true command2.setfocus timer1.enabled = true end if end if end subprivate sub command2_click() command3.enabled = false command4.enabled = false timer1.enabled = false command1.caption = "继续" com
39、mand1.setfocusend subprivate sub command4_click() dim i as integer i = msgbox("确实要退出吗?", 1 + 32 + 0, "提示!") select case i case 1 end case 2 end selectend subprivate sub command3_click() picture1.cls picture2.cls timer1.enabled = true = 0 hscroll1.value = 10end subprivate sub text
40、1_change() hscroll1.value = text1.textend subprivate sub timer1_timer() 1 = hscroll1.value = + 1 * 180 / pi / 1000 if >= 360 then = 0 '动画 call drawend subprivate sub draw()'机构运动分析1 = / 180 * pi '-1的单位为弧度-c = 1 / (1 + q 2 + 2 * q * cos(1) = atn(q * sin(1) / (1 + q * cos(1)1 = c * q * (
41、q + cos(1)2 = c 2 * q * (q 2 - 1) * sin(1)3 = c 3 * q * (q 2 - 1) * (2 * q * (1 + (sin(1) 2) + (1 + q 2) * cos(1)4 = c 4 * q * (q 2 - 1) * sin(1) * (8 * q * (1 - q 2) * cos(1) + 8 * q 2 * (cos(1) 2 + 12 * q 2 * (1 + (sin(1) 2) - (1 + q 2) 2)s5 = 0.5 * h - d2 * tan()vl5 = -d2 / (cos() 2al5 = 2 * vl5
42、* tan()v5 = vl5 * 1 * 1a5 = (al5 * (1) 2 + vl5 * 2) * 1 2text2.text = format(s5 / 1000, "0.0000000000")text3.text = format(v5 / 1000, "0.0000000000")text4.text = format(a5 / 1000, "0.0000000000")'机构动画line3.x2 = 100 * cos(1)line3.y2 = 100 * sin(1)shape3.top = line3.y
43、2 + 7.5shape3.left = line3.x2 - 7.5line16.x2 = line3.x2 - sqr(19.5 2 + 37 2) * cos(atn(39 / 74) + )line16.y2 = line3.y2 - sqr(19.5 2 + 37 2) * sin(atn(39 / 74) + )line16.x1 = line16.x2 - 39 * sin()line16.y1 = line16.y2 + 39 * cos()line17.x1 = line16.x1 + 74 * cos()line17.y1 = line16.y1 + 74 * sin()line17.x2 = line16.x2 + 74 * cos()line17.y2 = line16.y2 + 74 * sin()line15.x1 = line16.x1line15.y1 = line16.y1line15.x2 = line17.x1line15.y2 = line17.y1line14.x1 = line16.x2line14.y1 = line16.y2line14.x2 = line17.x2line14.y
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 高中学会感恩演讲稿
- 2025年中国铸造用粘结剂市场深度评估及投资方向研究报告
- 中国开采沙石行业调查报告
- 铁路探伤技术管理课件
- LNG项目可行性研究报告范文
- 中国防火卷帘门系统行业发展监测及投资规划建议报告
- 2025年中国电镀废水处理设备行业市场深度分析及发展前景预测报告
- 2025-2030年中国电子砂锅项目投资可行性研究分析报告
- 校庆活动策划方案模板
- 临床监察员考试题及答案2025版
- 新建三座钢结构人行天桥监理规划
- 天津卫生系统招聘2022年考试真题及答案解析
- 新版城市居住区规划设计规范
- 2022年益阳市不动产登记中心事业单位工作人员招聘笔试试题及答案
- GB/T 19716-2005信息技术信息安全管理实用规则
- 2022年泰安市文化和旅游系统事业单位招聘笔试试题及答案
- 2023年上海英语高考卷及答案完整版
- ISO9001新产品研发控制程序
- 操场塑胶面层施工方案及工艺方法
- 西班牙文化概况
- 《长方形和正方形》 完整版课件
评论
0/150
提交评论