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

哈工大机械原理大作业凸轮机构设计题

Har bi n I nst i t ute of Technol ogy械原理大作业二课程名称:机械原理设计题目:凸轮机构设计凸轮推杆运动规律1.运动规律(等加速等减速运动)推程 0 450推程 4509002.运动规律(等加速等减速运动)回程16002000回程20002400ds s三.推杆位移、速度、加速度线图及凸轮d线图采用VB编程,其源程序及图像如下:1.位移:Private Sub Command1_Click()Timer1.Enabled = True ' 开启计时器End SubPrivate Sub Timer1_Timer()Static i As Single表角度 Picture1.CurrentX = 0Picture1.CurrentY = 01 = 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 Then q = is = 120 - 240 * (q - 150) ^ 2 / 6400Picture1.PSet Step(q, -s), vbBlueDim s As Single, q As Single 'i 作为静态变量,控制流程; s 代表位移; q 代q = 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 Singleq代Dim v As Single, q As Single, w As Single 'i为静态变量,控制流程;表角度;w代表角速度,此处被赋予50Picture1.CurrentX = 0Picture1.CurrentY = 0w = 501= i + 0.1q = 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), vbBlackElseIf i >= 90 And i <= 150 Thenq = iv = 0Picture1.PSet Step(q, -v), vbGreenElseIf i >= 150 And i <= 190 Then q = i v = -480 * w * (q - 150) / 6400Picture1.PSet Step(q, -v), vbBlueElseIf i >= 190 And i <= 230 Then q = i v = -480 * w * (230 - q) / 6400Picture1.PSet Step(q, -v), vbRedElseIf i >= 230 And i <= 360 Then q = iElseEnd 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 'ia代为静态变量,控制流程;表加速度;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 Then q = ia = -480 * w ^ 2 / 8100ElseIf i >= 90 And i <= 150 Thenq = ia = 0Picture1.PSet Step(q, -a), vbGreen ElseIf i >= 150 And i <= 190 Then q = i a = -480 * w ^ 2 / 6400Picture1.PSet Step(q, -a), vbBlueElseIf i >= 190 And i <= 230 Then q = i a = 480 * w ^ 2 / 6400Picture1.PSet Step(q, -a), vbRedElseIf i >= 230 And i <= 360 Then q = i a = 0Picture1.PSet Step(q, -a), vbBlackElseEnd IfEnd Sub4.ds/dq---dsPrivate Sub Command4_Click()Timer4.Enabled =True开启计时器;建立坐标系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), vbRed ElseIf i >= 90 And i <= 150 Thenx = 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) ^ 2Picture1.PSet Step(x, -s), vbRedElseIf i >= 230 And i <= 360 Thenq = i * tx = 0s = 0Picture1.PSet Step(x, -s), vbRedElseEnd IfEnd Sub四.确定凸轮基圆半径和偏距1.求切点转角在图中,右侧曲线为升程阶段的类速度-位移图,作直线D t d t 与其相切,且位移轴正方向呈夹角[ 1]=300, 则切点处的斜率与直线D t d t 的斜率相等,因为k Dtdt=tan600, 右侧曲线斜率可以表示为:q;q=tan60 0继而求出切点坐标( 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 SinglePicture1.CurrentX = 0 Picture1.CurrentY = 0 scaley = 1t = 3.14 / 180 i = i + 0.1If i <= 45 Then q = 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) ^ 2 Picture1.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 Thenx = -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在轴心公共许用区内取轴心位置,能够满足压力角要求,现取直线红线与直线绿线的交点为轴心位置,通过解方程组:x=131.557 y=-64.214 r 0=146.392 偏距e=131.557s0=64.013五.绘制凸轮理论廓线和实际廓线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)1= 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), vbRedq = 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), vbRedq = 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.013 s = 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.23b = (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), vbBlack ElseEnd IfEnd Sub内部轮廓为实际轮廓,外部轮廓为理论轮廓。

相关主题