机械原理大作业VB四杆机构的设计.docx
- 文档编号:4450490
- 上传时间:2022-12-01
- 格式:DOCX
- 页数:13
- 大小:838.42KB
机械原理大作业VB四杆机构的设计.docx
《机械原理大作业VB四杆机构的设计.docx》由会员分享,可在线阅读,更多相关《机械原理大作业VB四杆机构的设计.docx(13页珍藏版)》请在冰豆网上搜索。
机械原理大作业VB四杆机构的设计
机械原理大作业VB四杆机构的设计(总9页)
沈阳航空航天大学
铰链四杆机构设计报告
学院:
机电工程学院
班级:
姓名:
学号:
Dima,b,c,d,e,f,l1,l2,l3,l4,w1,w2,w3,a2,a3#,p,m,dc,bjj,n%
PrivateSubCommand1_Click()杆长赋值
l1=Val(Text1(0).Text)
l2=Val(Text1
(1).Text)
l3=Val(Text1
(2).Text)
l4=Val(Text1(3).Text)
a=Val*/180初始角度转弧度
Callbj(bjj)
Ifbjj=1ThenExitSub
w1=0
Calljsg
w1=Val公式计算角速度,角加速度
w2=-w1*l1*Sin(a-c)/(l3*Sin(b-c))
w3=w1*l1*Sin(a-b)/(l2*Sin(c-b))
=w2
=w3
a2=(l3*w3*w3-l1*w1*w1*Cos(a-c)-l2*w2*w2*Cos(b-c))/(l2*Sin(b-c))
a3=(l2*w2*w2+l1*w1*w1*Cos(a-b)-l3*w3*w3*Cos(c-b))/(l3*Sin(c-b))
=a2
=a3
EndSub
Functionjsg()
Ifp=0Thenp=-1
OnErrorGoToel
a=a+*w1角度随时间增加
d=l4-l1*Cos(a)
e=-l1*Sin(a)
f=(d^2+e^2+l3^2-l2^2)/(2*l3)
c=2*Atn((e+Sqr(d^2+e^2-f^2)*p)/(d-f))
b=Atn((e+l3*Sin(c))/(d+l3*Cos(c)))
w1=-w1
el:
w1=-w1
Line1(0).Y1=/2定义各个线段端点的坐标
Line1(0).X1=/2
Line1(0).X2=l1*Cos(a)+Line1(0).X1
Line1(0).Y2=Line1(0).Y1-l1*Sin(a)
Line1(3).X2=Line1(0).X1+l4
Line1(3).Y2=Line1(0).Y1
Line1(3).X1=Line1(0).X1
Line1(3).Y1=Line1(0).Y1
Line1
(2).X1=Line1(3).X2+l3*Cos(c)
Line1
(2).Y1=Line1(3).Y2-l3*Sin(c)
Line1
(2).X2=Line1(3).X2
Line1
(2).Y2=Line1(3).Y2
Line1
(1).X1=Line1(0).X2
Line1
(1).Y1=Line1(0).Y2
Line1
(1).X2=Line1
(2).X1
Line1
(1).Y2=Line1
(2).Y1
Shape1(i).Left=Line1(i).X1-50连接两杆转动副的中心坐标
Shape1(i).Top=Line1(i).Y1-50
Nexti
(Line1
(1).X1,Line1
(1).Y1),vbRed画出主动件和连架杆的轨迹
(Line1
(2).X1,Line1
(2).Y1),vbGreen
EndFunction
Functionbj(x)杆长条件的判断
x=0
xld=Val(Text1(0).Text)
xlx=Val(Text1(0).Text)
Fori=1To3
Ifxld Ifxlx>Val(Text1(i).Text)Thenxlx=Val(Text1(i).Text) Nexti Fori=0To3 zh=Val(Text1(i).Text)+zh Nexti If(xlx+xld)>(zh-(xlx+xld))Then MsgBox("不满足杆长要求") x=1 EndIf EndFunction 。 。 。 (-8,4)-(8,-4)画出角速度w2函数图像 0)-,0) (0,-(0, =: =: "x" =: =4: "y" Fori=-7To7 (i,0)-(i, =i-: =: i Nexti Fori=ToStep Ifi>Andi =: =i+: i i)-(0,i) Nexti Dima1,b1,c1,d1,e1,f1,w11# w11= Forx=ToStep Ifp=0Thenp=-1 OnErrorGoToel a1=a1+w11 d1=l4-l1*Cos(a1) e1=-l1*Sin(a1) f1=(d1^2+e1^2+l3^2-l2^2)/(2*l3) c1=2*Atn((e1+Sqr(d1^2+e1^2-f1^2)*p)/(d1-f1)) b1=Atn((e1+l3*Sin(c1))/(d1+l3*Cos(c1))) w11=-w11 el: w11=-w11 w111=Val w21=-w111*l1*Sin(a1-c1)/(l3*Sin(b1-c1)) w31=w1*l1*Sin(a1-b1)/(l2*Sin(c1-b1)) a21=(l3*w31*w31-l1*w111*w111*Cos(a1-c1)-l2*w21*w21*Cos(b1-c1))/(l2*Sin(b1-c1)) a31=(l2*w21*w21+l1*w111*w111*Cos(a1-b1)-l3*w31*w31*Cos(c1-b1))/(l3*Sin(c1-b1)) (x,w21) Nextx EndIf EndSub (-8,-(8,画出角速度w3函数图像 0)-,0) (0,-(0, =: =: "x" =: =: "y" Fori=-7To7 (i,0)-(i, =i-: =: i Nexti Fori=ToStep Ifi>Andi =: =i+: i i)-(0,i) Nexti Dima1,b1,c1,d1,e1,f1,w11# w11= Forx=ToStep Ifp=0Thenp=-1 OnErrorGoToel a1=a1+w11 d1=l4-l1*Cos(a1) e1=-l1*Sin(a1) f1=(d1^2+e1^2+l3^2-l2^2)/(2*l3) c1=2*Atn((e1+Sqr(d1^2+e1^2-f1^2)*p)/(d1-f1)) b1=Atn((e1+l3*Sin(c1))/(d1+l3*Cos(c1))) w11=-w11 el: w11=-w11 w111=Val w21=-w111*l1*Sin(a1-c1)/(l3*Sin(b1-c1)) w31=w1*l1*Sin(a1-b1)/(l2*Sin(c1-b1)) a21=(l3*w31*w31-l1*w111*w111*Cos(a1-c1)-l2*w21*w21*Cos(b1-c1))/(l2*Sin(b1-c1)) a31=(l2*w21*w21+l1*w111*w111*Cos(a1-b1)-l3*w31*w31*Cos(c1-b1))/(l3*Sin(c1-b1)) (x,w31) Nextx EndIf EndSub PrivateSubPicture4_DblClick()画出角加速度a2 d (-8,8)-(8,-8) 0)-,0) (0,-(0, =: =: "x" =: =8: "y" Fori=-7To7 (i,0)-(i, =i-: =: i Nexti Fori=7To-7Step Ifi>Andi =: =i+: i i)-(0,i) Nexti Dima1,b1,c1,d1,e1,f1,w11# w11= Forx=ToStep Ifp=0Thenp=-1 OnErrorGoToel ell: a1=a1+w11 d1=l4-l1*Cos(a1) IfIsEmpty(d1)ThenGoToell e1=-l1*Sin(a1) IfIsEmpty(e1)ThenGoToell f1=(d1^2+e1^2+l3^2-l2^2)/(2*l3) IfIsEmpty(f1)ThenGoToell c1=2*Atn((e1+Sqr(d1^2+e1^2-f1^2)*p)/(d1-f1)) IfIsEmpty(c1)Then GoToell EndIf b1=Atn((e1+l3*Sin(c1))/(d1+l3*Cos(c1))) IfIsEmpty(b1)ThenGoToell w11=-w11 el: w11=-w11 w111=Val Ifb1=NullThenGoToell w21=-w111*l1*Sin(a1-c1)/(l3*Sin(b1-c1)) w31=w1*l1*Sin(a1-b1)/(l2*Sin(c1-b1)) a21=(l3*w31*w31-l1*w111*w111*Cos(a1-c1)-l2*w21*w21*Cos(b1-c1))/(l2*Sin(b1-c1)) a31=(l2*w21*w21+l1*w111*w111*Cos(a1-b1)-l3*w31*w31*Cos(c1-b1))/(l3*Sin(c1-b1)) (x,a21) (-8,8)-(8,-8)画出角加速度a3 0)-,0) (0,-(0, =: =: "x" =: =8: "y" Fori=-7To7 (i,0)-(i, =i-: =: i Nexti Fori=-7To7Step Ifi>Andi =: =i+: i i)-(0,i) Nexti Dima1,b1,c1,d1,e1,f1,w11# w11= Forx=ToStep Ifp=0Thenp=-1 OnErrorGoToel a1=a1+w11 d1=l4-l1*Cos(a1) e1=-l1*Sin(a1) f1=(d1^2+e1^2+l3^2-l2^2)/(2*l3) c1=2*Atn((e1+Sqr(d1^2+e1^2-f1^2)*p)/(d1-f1)) b1=Atn((e1+l3*Sin(c1))/(d1+l3*Cos(c1))) w11=-w11 el: w11=-w11 w111=Val w21=-w111*l1*Sin(a1-c1)/(l3*Sin(b1-c1)) w31=w1*l1*Sin(a1-b1)/(l2*Sin(c1-b1)) a21=(l3*w31*w31-l1*w111*w111*Cos(a1-c1)-l2*w21*w21*Cos(b1-c1))/(l2*Sin(b1-c1)) a31=(l2*w21*w21+l1*w111*w111*Cos(a1-b1)-l3*w31*w31*Cos(c1-b1))/(l3*Sin(c1-b1)) (x,a31) (-8,-(8,角位移s2,s3函数的输出 0)-,0) (0,-(0, =: =: "x" =: =: "y" Fori=-7To7Step (i,0)-(i, =i-: =: i Nexti Fori=-3ToStep Ifi>Andi =: =i+: i i)-(0,i) Nexti Dima1,b1,c1,d1,e1,f1,w11# w11= Forx=ToStep Ifp=0Thenp=-1 OnErrorGoToel a1=a1+w11 d1=l4-l1*Cos(a1) e1=-l1*Sin(a1) f1=(d1^2+e1^2+l3^2-l2^2)/(2*l3) c1=2*Atn((e1+Sqr(d1^2+e1^2-f1^2)*p)/(d1-f1)) b1=Atn((e1+l3*Sin(c1))/(d1+l3*Cos(c1))) w11=-w11 el: w11=-w11 Ifx=Thenczd=c1: czx=c1 Ifczd Ifczx>c1Thenczx=c1 =czd-czx Ifx=Thenczd1=b1: czx1=b1 Ifczd1 Ifczx1>b1Thenczx1=b1 =czd1-czx1 (x,c1) (x,b1),vbRed
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 机械 原理 作业 VB 机构 设计
![提示](https://static.bdocx.com/images/bang_tan.gif)