当前位置:文档之家› 哈工大机械原理大作业2-凸轮机构设计-22题()

哈工大机械原理大作业2-凸轮机构设计-22题()

H a r b i n I n s t i t u t e o f T e c h n o l o g y机械原理大作业二课程名称: 机械原理 设计题目: 凸轮机构设计一.设计题目设计直动从动件盘形凸轮机构, 凸轮机构原始参数 序号 升程(mm) 升程运动角(º) 升程运 动规律升程许用压力角(º) 回程运动角(º) 回程运 动规律回程许用压力角(º) 远休止角 (º) 近休止角 (º) 2212090等加等减速4080等减等加速7070120二. 凸轮推杆运动规律1.运动规律(等加速等减速运动) 推程 0450≤≤ϕ 推程 009045≤≤ϕ2.运动规律(等加速等减速运动) 回程 00200160≤≤ϕ 回程 00240200≤≤ϕ三.推杆位移、速度、加速度线图及凸轮s d ds-φ线图采用VB 编程,其源程序及图像如下: 1.位移:Private Sub Command1_Click() Timer1.Enabled = True '开启计时器 End SubPrivate Sub Timer1_Timer() Static i As SingleDim s As Single, q As Single 'i 作为静态变量,控制流程;s 代表位移;q 代表角度 Picture1.CurrentX = 0Picture1.CurrentY = 0i = i + 0.1If i <= 45 Thenq = is = 240 * (q / 90) ^ 2Picture1.PSet Step(q, -s), vbRedElseIf i >= 45 And i <= 90 Thenq = is = 120 - 240 * ((90 - q) ^ 2) / (90 ^ 2) Picture1.PSet Step(q, -s), vbGreenElseIf i >= 90 And i <= 150 Thenq = is = 120Picture1.PSet Step(q, -s), vbBlackElseIf i >= 150 And i <= 190 Thenq = is = 120 - 240 * (q - 150) ^ 2 / 6400Picture1.PSet Step(q, -s), vbBlueElseIf i >= 190 And i <= 230 Thenq = is = 240 * (230 - q) ^ 2 / 6400Picture1.PSet Step(q, -s), vbRedElseIf i >= 230 And i <= 360 Thenq = is = 0Picture1.PSet Step(q, -s), vbBlackElseEnd IfEnd Sub2.速度Private Sub Command2_Click()Timer2.Enabled = True '开启计时器End SubPrivate Sub Timer2_Timer()Static i As SingleDim v As Single, q As Single, w As Single 'i为静态变量,控制流程;q代表角度;w 代表角速度,此处被赋予50Picture1.CurrentX = 0Picture1.CurrentY = 0w = 50i = i + 0.1If i <= 45 Thenq = iv = 480 * w * q / 8100Picture1.PSet Step(q, -v), vbRedElseIf i >= 45 And i <= 90 Thenq = iv = 480 * w * (90 - q) / 8100Picture1.PSet Step(q, -v), vbBlack ElseIf i >= 90 And i <= 150 Thenq = iv = 0Picture1.PSet Step(q, -v), vbGreen ElseIf i >= 150 And i <= 190 Then q = iv = -480 * w * (q - 150) / 6400Picture1.PSet Step(q, -v), vbBlue ElseIf i >= 190 And i <= 230 Thenq = iv = -480 * w * (230 - q) / 6400Picture1.PSet Step(q, -v), vbRedElseIf i >= 230 And i <= 360 Then q = iv = 0Picture1.PSet Step(q, -v), vbBlack ElseEnd IfEnd Sub3.加速度Private Sub Command3_Click()Timer3.Enabled = True '开启计时器End SubPrivate Sub Timer3_Timer()Static i As SingleDim a As Single, w As Single, q As Single 'i为静态变量,控制流程;a代表加速度;q代表角度;w代表角速度w = 50Picture1.CurrentX = 0Picture1.CurrentY = 0i = i + 0.1If i <= 45 Thenq = ia = 480 * w ^ 2 / 8100Picture1.PSet Step(q, -a), vbRedElseIf i >= 45 And i <= 90 Thenq = ia = -480 * w ^ 2 / 8100Picture1.PSet Step(q, -a), vbBlackElseIf i >= 90 And i <= 150 Thenq = ia = 0Picture1.PSet Step(q, -a), vbGreenElseIf i >= 150 And i <= 190 Thenq = ia = -480 * w ^ 2 / 6400Picture1.PSet Step(q, -a), vbBlueElseIf i >= 190 And i <= 230 Thenq = ia = 480 * w ^ 2 / 6400Picture1.PSet Step(q, -a), vbRedElseIf i >= 230 And i <= 360 Thenq = ia = 0Picture1.PSet Step(q, -a), vbBlackElseEnd IfEnd Sub4.ds/dq---dsPrivate Sub Command4_Click()Timer4.Enabled = True '开启计时器;建立坐标系Picture1.Scale (-400, -400)-(400, 400)End SubPrivate Sub Timer4_Timer()Static i As SingleDim x As Single, s As Single, q As Single, scaley As Single, t As Single 'i为静态变量,控制流程;x代表位移;s代表纵坐标ds/dq;q代表角度Picture1.CurrentX = 0Picture1.CurrentY = 0scaley = 1t = 3.14 / 180i = i + 0.1If i <= 45 Thenq = i * tx = 194.734 * qs = 240 * (2 * q / 3.14) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 45 And i <= 90 Thenq = i * tx = 194.734 * (3.14 / 2 - q)s = 120 - 97.367 * (3.14 / 2 - q) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 90 And i <= 150 Thenq = i * tx = 0s = 120 * scaleyPicture1.PSet Step(x, -s), vbRedElseIf i >= 150 And i <= 190 Thenq = i * tx = -246.46 * (q - 5 * 3.14 / 6)s = 120 - 123.23 * (q - 5 * 3.14 / 6) ^ 2 Picture1.PSet Step(x, -s), vbRedElseIf i >= 190 And i <= 230 Thenq = i * tx = -246.46 * (23 * 3.14 / 18 - q)s = 123.23 * (23 * 3.14 / 18 - q) ^ 2 Picture1.PSet Step(x, -s), vbRedElseIf i >= 230 And i <= 360 Thenq = i * tx = 0s = 0Picture1.PSet Step(x, -s), vbRedElseEnd IfEnd Sub四.确定凸轮基圆半径和偏距1. 求切点转角在图中,右侧曲线为升程阶段的类速度-位移图,作直线Dt dt与其相切,且位移轴正方向呈夹角[ 1]=300,则切点处的斜率与直线D t d t的斜率相等,因为k Dtdt=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.绘图确定基圆半径和偏距程序如下:Private Sub Command5_Click() '开启计时器;画出ds/dq-s图的切线Timer5.Enabled = TruePicture1.Scale (-400, -400)-(400, 400)Picture1.Line (-50, 378.671)-(200, -54.329), vbRedPicture1.Line (-200, -65.683)-(40, -481.363), vbBluePicture1.Line (-200, -209.127)-(200, -63.527), vbBlackPicture1.Line (-200, -56.472)-(200, 89.128), vbGreenEnd SubPrivate Sub Timer5_Timer() 'i为静态变量,控制流程;x代表位移;s代表纵坐标ds/dq;q代表角度;scaley是图形比例系数;t为角度,弧度转化系数Static i As SingleDim x As Single, s As Single, q As Single, scaley As Single, t As Single Picture1.CurrentX = 0Picture1.CurrentY = 0scaley = 1t = 3.14 / 180i = i + 0.1If i <= 45 Thenq = i * tx = 194.734 * qs = 240 * (2 * q / 3.14) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 45 And i <= 90 Thenq = i * tx = 194.734 * (3.14 / 2 - q)s = 120 - 97.367 * (3.14 / 2 - q) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 90 And i <= 150 Thenq = i * tx = 0s = 120 * scaleyPicture1.PSet Step(x, -s), vbRedElseIf i >= 150 And i <= 190 Thenq = i * tx = -246.46 * (q - 5 * 3.14 / 6)s = 120 - 123.23 * (q - 5 * 3.14 / 6) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 190 And i <= 230 Thenq = i * tx = -246.46 * (23 * 3.14 / 18 - q)s = 123.23 * (23 * 3.14 / 18 - q) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 230 And i <= 360 Thenq = i * tx = 0s = 0Picture1.PSet Step(x, -s), vbRedElseEnd IfEnd Sub在轴心公共许用区内取轴心位置,能够满足压力角要求,现取直线红线与直线绿线的交点为轴=146.392 偏距e=131.557 s0=64.013心位置,通过解方程组:x=131.557 y=-64.214 r五.绘制凸轮理论廓线和实际廓线1.绘制凸轮理论轮廓Private Sub Command6_Click() '开启计时器;建立坐标系Picture1.Scale (-500, -500)-(500, 500)Timer6.Enabled = TrueEnd SubPrivate Sub Timer6_Timer() 'i为静态变量,控制流程;e为偏距;s为基圆半径平方减去偏距平方再开方所得;q为角度;x为横坐标;y为纵坐标Static i As SingleDim e As Single, q As Single, s As Single, x As Single, y As Single e = 131.557s = 64.213Picture1.CurrentX = 12.764Picture1.CurrentY = -95.125i = i + 0.001If i <= 3.14 / 4 Thenq = ix = (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.PSet Step(x, -y), vbRedElseIf i >= 3.14 / 4 And i <= 3.14 / 2 Thenq = ix = (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.PSet Step(x, -y), vbRedElseIf i >= 3.14 / 2 And i <= 5 * 3.14 / 6 Thenq = ix = (s + 120) * Cos(q) - e * Sin(q)y = (s + 120) * Sin(q) + e * Cos(q)Picture1.PSet Step(x, -y), vbRedElseIf i >= 5 * 3.14 / 6 And i <= 19 * 3.14 / 18 Thenq = ix = (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.PSet Step(x, -y), vbRedElseIf i >= 19 / 18 * 3.14 And i <= 23 / 18 * 3.14 Thenq = ix = (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.PSet Step(x, -y), vbRedElseIf i >= 23 / 18 * 3.14 And i <= 2 * 3.14 Thenq = ix = s * Cos(q) - e * Sin(q)y = s * Sin(q) + e * Cos(q)Picture1.PSet Step(x, -y), vbRedElseEnd IfEnd Sub2.确定滚子半径并绘制曲率半径图Private Sub Command7_Click() '开启计时器,建立坐标系Timer7.Enabled = TruePicture1.Scale (-10, -500)-(10, 10)End SubPrivate Sub Timer7_Timer() 'i为静态变量,控制流程;x代表dx/dq;y代表dy/dq;p 代表曲率;e为偏距;s为基圆半径平方减去偏距平方再开方所得Static i As SingleDim s As Single, q As Single, x As Single, y As Single, p As Singles = 64.213e = 131.557Picture1.CurrentX = 0Picture1.CurrentY = -Sqr(e ^ 2 + s ^ 2)i = i + 0.01If i <= 3.14 / 4 Thenq = ix = (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.PSet Step(q, -p), vbRedElseIf i >= 3.14 / 4 And i <= 3.14 / 2 Thenq = ix = (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.PSet Step(q, -p), vbRedElseIf i >= 3.14 / 2 And i <= 5 / 6 * 3.14 Thenq = ix = (s + 120) * (-Sin(q)) - e * Cos(q)y = (s + 120) * Cos(q) - e * Sin(q)p = Sqr(x ^ 2 + y ^ 2)Picture1.PSet Step(q, -p), vbRedElseIf i >= 5 / 6 * 3.14 And i <= 19 / 18 * 3.14 Thenq = ix = (-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.PSet Step(q, -p), vbRedElseIf i >= 19 / 18 * 3.14 And i <= 23 / 18 * 3.14 Thenq = ix = (-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.PSet Step(q, -p), vbRedElseIf i >= 23 / 18 * 3.14 And i <= 2 * 3.14 Thenq = ix = s * (-Sin(q)) - e * Cos(q)y = s * Cos(q) - e * Sin(q)p = Sqr(x ^ 2 + y ^ 2)Picture1.PSet Step(q, -p), vbRedElseEnd IfEnd Sub其中曲率最小值为126.026mm 可以得到滚子半径为63.013mm3.绘制实际轮廓线Private Sub Command8_Click()Picture1.Scale (-500, -500)-(500, 500) '建立坐标系;开启计时器Timer8.Enabled = TrueEnd SubPrivate Sub Timer8_Timer() 'i为静态变量,控制流程;q代表角度;x代表dx/dy;y 代表dy/dq;a代表理论轮廓的横坐标;b代表理论轮廓的纵坐标;m代表横坐标;n代表纵坐标Static i As SingleDim s As Single, q As Single, x As Single, y As Single, p As Single, rr As Single, a As Single, b As Single, m As Single, n As Singlerr = 63.013s = 64.213e = 131.557Picture1.CurrentX = 12.764Picture1.CurrentY = -95.175i = i + 0.001If i <= 3.14 / 4 Thenq = ix = (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)a = (s + 240 * (2 * q / 3.14) ^ 2) * Cos(q) - e * Sin(q)b = (s + 240 * (2 * q / 3.14) ^ 2) * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseIf i >= 3.14 / 4 And i <= 3.14 / 2 Thenq = ix = (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)a = (s + 120 - 97.367 * (3.14 / 2 - q) ^ 2) * Cos(q) - e * Sin(q)b = (s + 120 - 97.367 * (3.14 / 2 - q) ^ 2) * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseIf i >= 3.14 / 2 And i <= 5 / 6 * 3.14 Thenq = ix = (s + 120) * (-Sin(q)) - e * Cos(q)y = (s + 120) * Cos(q) - e * Sin(q)a = (s + 120) * Cos(q) - e * Sin(q)b = (s + 120) * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseIf i >= 5 / 6 * 3.14 And i <= 19 / 18 * 3.14 Thenq = ix = (-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)a = (s + 120 - 123.23 * (q - 5 / 6 * 3.14) ^ 2) * Cos(q) - e * Sin(q)b = (s + 120 - 123.23 * (q - 5 / 6 * 3.14) ^ 2) * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseIf i >= 19 / 18 * 3.14 And i <= 23 / 18 * 3.14 Thenq = ix = (-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)a = (s + 123.23 * (23 / 18 * 3.14 - q) ^ 2) * Cos(q) - e * Sin(q)b = (s + 123.23 * (23 / 18 * 3.14 - q) ^ 2) * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseIf i >= 23 / 18 * 3.14 And i <= 2 * 3.14 Thenq = ix = s * (-Sin(q)) - e * Cos(q)y = s * Cos(q) - e * Sin(q)a = s * Cos(q) - e * Sin(q)b = s * Sin(q) + e * Cos(q)p = Sqr(x ^ 2 + y ^ 2)m = a - rr * y / pn = b + rr * x / pPicture1.PSet Step(m, -n), vbBlackElseEnd IfEnd Sub内部轮廓为实际轮廓,外部轮廓为理论轮廓。

相关主题