机械原理大作业22题2凸轮.docx
《机械原理大作业22题2凸轮.docx》由会员分享,可在线阅读,更多相关《机械原理大作业22题2凸轮.docx(19页珍藏版)》请在冰豆网上搜索。
机械原理大作业22题2凸轮
一.设计题目
设计直动从动件盘形凸轮机构,
凸轮机构原始参数
序号
升程(mm)
升程运动角(º)
升程运
动规律
升程许用压力角(º)
回程运动角(º)
回程运
动规律
回程许用压力角(º)
远休止角
(º)
近休止角
(º)
22
120
90
等加等减速
40
80
等减等加速
70
70
120
二.凸轮推杆运动规律
1.运动规律(等加速等减速运动)
推程
推程
2.运动规律(等加速等减速运动)
回程
回程
三.推杆位移、速度、加速度线图及凸轮
线图
采用VB编程,其源程序及图像如下:
1.位移:
PrivateSubCommand1_Click()
Timer1.Enabled=True'开启计时器
EndSub
PrivateSubTimer1_Timer()
StaticiAsSingle
DimsAsSingle,qAsSingle'i作为静态变量,控制流程;s代表位移;q代表角度
Picture1.CurrentX=0
Picture1.CurrentY=0
i=i+0.1
Ifi<=45Then
q=i
s=240*(q/90)^2
Picture1.PSetStep(q,-s),vbRed
ElseIfi>=45Andi<=90Then
q=i
s=120-240*((90-q)^2)/(90^2)
Picture1.PSetStep(q,-s),vbGreen
ElseIfi>=90Andi<=150Then
q=i
s=120
Picture1.PSetStep(q,-s),vbBlack
ElseIfi>=150Andi<=190Then
q=i
s=120-240*(q-150)^2/6400
Picture1.PSetStep(q,-s),vbBlue
ElseIfi>=190Andi<=230Then
q=i
s=240*(230-q)^2/6400
Picture1.PSetStep(q,-s),vbRed
ElseIfi>=230Andi<=360Then
q=i
s=0
Picture1.PSetStep(q,-s),vbBlack
Else
EndIf
EndSub
2.速度
PrivateSubCommand2_Click()
Timer2.Enabled=True'开启计时器
EndSub
PrivateSubTimer2_Timer()
StaticiAsSingle
DimvAsSingle,qAsSingle,wAsSingle'i为静态变量,控制流程;q代表角度;w代表角速度,此处被赋予50
Picture1.CurrentX=0
Picture1.CurrentY=0
w=50
i=i+0.1
Ifi<=45Then
q=i
v=480*w*q/8100
Picture1.PSetStep(q,-v),vbRed
ElseIfi>=45Andi<=90Then
q=i
v=480*w*(90-q)/8100
Picture1.PSetStep(q,-v),vbBlack
ElseIfi>=90Andi<=150Then
q=i
v=0
Picture1.PSetStep(q,-v),vbGreen
ElseIfi>=150Andi<=190Then
q=i
v=-480*w*(q-150)/6400
Picture1.PSetStep(q,-v),vbBlue
ElseIfi>=190Andi<=230Then
q=i
v=-480*w*(230-q)/6400
Picture1.PSetStep(q,-v),vbRed
ElseIfi>=230Andi<=360Then
q=i
v=0
Picture1.PSetStep(q,-v),vbBlack
Else
EndIf
EndSub
3.加速度
PrivateSubCommand3_Click()
Timer3.Enabled=True'开启计时器
EndSub
PrivateSubTimer3_Timer()
StaticiAsSingle
DimaAsSingle,wAsSingle,qAsSingle'i为静态变量,控制流程;a代表加速度;q代表角度;w代表角速度
w=50
Picture1.CurrentX=0
Picture1.CurrentY=0
i=i+0.1
Ifi<=45Then
q=i
a=480*w^2/8100
Picture1.PSetStep(q,-a),vbRed
ElseIfi>=45Andi<=90Then
q=i
a=-480*w^2/8100
Picture1.PSetStep(q,-a),vbBlack
ElseIfi>=90Andi<=150Then
q=i
a=0
Picture1.PSetStep(q,-a),vbGreen
ElseIfi>=150Andi<=190Then
q=i
a=-480*w^2/6400
Picture1.PSetStep(q,-a),vbBlue
ElseIfi>=190Andi<=230Then
q=i
a=480*w^2/6400
Picture1.PSetStep(q,-a),vbRed
ElseIfi>=230Andi<=360Then
q=i
a=0
Picture1.PSetStep(q,-a),vbBlack
Else
EndIf
EndSub
4.ds/dq---ds
PrivateSubCommand4_Click()
Timer4.Enabled=True'开启计时器;建立坐标系
Picture1.Scale(-400,-400)-(400,400)
EndSub
PrivateSubTimer4_Timer()
StaticiAsSingle
DimxAsSingle,sAsSingle,qAsSingle,scaleyAsSingle,tAsSingle'i为静态变量,控制流程;x代表位移;s代表纵坐标ds/dq;q代表角度
Picture1.CurrentX=0
Picture1.CurrentY=0
scaley=1
t=3.14/180
i=i+0.1
Ifi<=45Then
q=i*t
x=194.734*q
s=240*(2*q/3.14)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=45Andi<=90Then
q=i*t
x=194.734*(3.14/2-q)
s=120-97.367*(3.14/2-q)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=90Andi<=150Then
q=i*t
x=0
s=120*scaley
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=150Andi<=190Then
q=i*t
x=-246.46*(q-5*3.14/6)
s=120-123.23*(q-5*3.14/6)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=190Andi<=230Then
q=i*t
x=-246.46*(23*3.14/18-q)
s=123.23*(23*3.14/18-q)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=230Andi<=360Then
q=i*t
x=0
s=0
Picture1.PSetStep(x,-s),vbRed
Else
EndIf
EndSub
四.确定凸轮基圆半径和偏距
1.求切点转角
在图中,右侧曲线为升程阶段的类速度-位移图,作直线Dtdt与其相切,且位移轴正方向呈夹角[
1]=300,则切点处的斜率与直线Dtdt的斜率相等,因为kDtdt=tan600,右侧曲线斜率可以表示为:
q;q=tan600继而求出切点坐标(337.272,292.084)。
同理可求出另一切点(-89.766,16.347)
2.确定直线方程
y-292.084=1.732*(x-337.272)
y-16.347=-0.364*(x+89.766)
3.绘图确定基圆半径和偏距
程序如下:
PrivateSubCommand5_Click()'开启计时器;画出ds/dq-s图的切线
Timer5.Enabled=True
Picture1.Scale(-400,-400)-(400,400)
Picture1.Line(-50,378.671)-(200,-54.329),vbRed
Picture1.Line(-200,-65.683)-(40,-481.363),vbBlue
Picture1.Line(-200,-209.127)-(200,-63.527),vbBlack
Picture1.Line(-200,-56.472)-(200,89.128),vbGreen
EndSub
PrivateSubTimer5_Timer()'i为静态变量,控制流程;x代表位移;s代表纵坐标ds/dq;q代表角度;scaley是图形比例系数;t为角度,弧度转化系数
StaticiAsSingle
DimxAsSingle,sAsSingle,qAsSingle,scaleyAsSingle,tAsSingle
Picture1.CurrentX=0
Picture1.CurrentY=0
scaley=1
t=3.14/180
i=i+0.1
Ifi<=45Then
q=i*t
x=194.734*q
s=240*(2*q/3.14)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=45Andi<=90Then
q=i*t
x=194.734*(3.14/2-q)
s=120-97.367*(3.14/2-q)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=90Andi<=150Then
q=i*t
x=0
s=120*scaley
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=150Andi<=190Then
q=i*t
x=-246.46*(q-5*3.14/6)
s=120-123.23*(q-5*3.14/6)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=190Andi<=230Then
q=i*t
x=-246.46*(23*3.14/18-q)
s=123.23*(23*3.14/18-q)^2
Picture1.PSetStep(x,-s),vbRed
ElseIfi>=230Andi<=360Then
q=i*t
x=0
s=0
Picture1.PSetStep(x,-s),vbRed
Else
EndIf
EndSub
在轴心公共许用区内取轴心位置,能够满足压力角要求,现取直线红线与直线绿线的交点为轴心位置,通过解方程组:
x=131.557y=-64.214r0=146.392偏距e=131.557s0=64.013
五.绘制凸轮理论廓线和实际廓线
1.绘制凸轮理论轮廓
PrivateSubCommand6_Click()'开启计时器;建立坐标系
Picture1.Scale(-500,-500)-(500,500)
Timer6.Enabled=True
EndSub
PrivateSubTimer6_Timer()'i为静态变量,控制流程;e为偏距;s为基圆半径平方减去偏距平方再开方所得;q为角度;x为横坐标;y为纵坐标
StaticiAsSingle
DimeAsSingle,qAsSingle,sAsSingle,xAsSingle,yAsSingle
e=131.557
s=64.213
Picture1.CurrentX=12.764
Picture1.CurrentY=-95.125
i=i+0.001
Ifi<=3.14/4Then
q=i
x=(s+240*(2*q/3.14)^2)*Cos(q)-e*Sin(q)
y=(s+240*(2*q/3.14)^2)*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
ElseIfi>=3.14/4Andi<=3.14/2Then
q=i
x=(s+120-97.367*(3.14/2-q)^2)*Cos(q)-e*Sin(q)
y=(s+120-97.367*(3.14/2-q)^2)*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
ElseIfi>=3.14/2Andi<=5*3.14/6Then
q=i
x=(s+120)*Cos(q)-e*Sin(q)
y=(s+120)*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
ElseIfi>=5*3.14/6Andi<=19*3.14/18Then
q=i
x=(s+120-123.23*(q-5/6*3.14)^2)*Cos(q)-e*Sin(q)
y=(s+120-123.23*(q-5/6*3.14)^2)*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
ElseIfi>=19/18*3.14Andi<=23/18*3.14Then
q=i
x=(s+123.23*(23/18*3.14-q)^2)*Cos(q)-e*Sin(q)
y=(s+123.23*(23/18*3.14-q)^2)*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
ElseIfi>=23/18*3.14Andi<=2*3.14Then
q=i
x=s*Cos(q)-e*Sin(q)
y=s*Sin(q)+e*Cos(q)
Picture1.PSetStep(x,-y),vbRed
Else
EndIf
EndSub
2.确定滚子半径并绘制曲率半径图
PrivateSubCommand7_Click()'开启计时器,建立坐标系
Timer7.Enabled=True
Picture1.Scale(-10,-500)-(10,10)
EndSub
PrivateSubTimer7_Timer()'i为静态变量,控制流程;x代表dx/dq;y代表dy/dq;p代表曲率;e为偏距;s为基圆半径平方减去偏距平方再开方所得
StaticiAsSingle
DimsAsSingle,qAsSingle,xAsSingle,yAsSingle,pAsSingle
s=64.213
e=131.557
Picture1.CurrentX=0
Picture1.CurrentY=-Sqr(e^2+s^2)
i=i+0.01
Ifi<=3.14/4Then
q=i
x=(480*4*q/3.14^2)*Cos(q)+(s+240*(2*q/3.14)^2)*(-Sin(q))-e*Cos(q)
y=(480*4*q/3.14^2)*Sin(q)-e*Sin(q)+(s+240*(2*q/3.14)^2)*Cos(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
ElseIfi>=3.14/4Andi<=3.14/2Then
q=i
x=(2*97.367*(3.14/2-q))*Cos(q)+(s+120-97.367*(3.14/2-q)^2)*(-Sin(q))-e*Cos(q)
y=(2*97.367*(3.14/2-q))*Sin(q)+(s+120-97.367*(3.14/2-q)^2)*Cos(q)-e*Sin(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
ElseIfi>=3.14/2Andi<=5/6*3.14Then
q=i
x=(s+120)*(-Sin(q))-e*Cos(q)
y=(s+120)*Cos(q)-e*Sin(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
ElseIfi>=5/6*3.14Andi<=19/18*3.14Then
q=i
x=(-2*123.23*(q-5/6*3.14))*Cos(q)+(s+120-123.23*(q-5/6*3.14)^2)*(-Sin(q))-e*Cos(q)
y=(-2*123.23*(q-5/6*3.14))*Sin(q)+(s+120-123.23*(q-5/6*3.14)^2)*Cos(q)-e*Sin(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
ElseIfi>=19/18*3.14Andi<=23/18*3.14Then
q=i
x=(-2*123.23*(23/18*3.14-q))*Cos(q)+(s+123.23*(23/18*3.14-q)^2)*(-Sin(q))-e*Cos(q)
y=(-2*123.23*(23/18*3.14-q))*Sin(q)+(s+123.23*(23/18*3.14-q)^2)*Cos(q)-e*Sin(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
ElseIfi>=23/18*3.14Andi<=2*3.14Then
q=i
x=s*(-Sin(q))-e*Cos(q)
y=s*Cos(q)-e*Sin(q)
p=Sqr(x^2+y^2)
Picture1.PSetStep(q,-p),vbRed
Else
EndIf
EndSub
其中曲率最小值为126.026mm可以得到滚子半径为63.013mm
3.绘制实际轮廓线
PrivateSubCommand8_Click()
Picture1.Scale(-500,-500)-(500,500)'建立