当前位置:首页 >> 机械/仪表 >>

凸轮轮廓曲线


姓名:雷小舟

班级:机制 04 班

学号:1103010411

利用 VB 绘制凸轮轮廓曲线及计算相关直角坐标和压力角
VB 程序语言如下: Private Sub Command1_Click() '参数初始化 Dim r0%, r1%, h%, e% Dim a1%, a01%, a2%, a

02% r0 = Val(InputBox("请输入基圆半径")) r1 = Val(InputBox("请输入滚子半径")) h = Val(InputBox("请输入升程")) e = Val(InputBox("请输入偏距")) a1 = Val(InputBox("请输入推程运动角")) a01 = Val(InputBox("请输入远休止角")) a2 = Val(InputBox("请输入回程运动角")) a02 = Val(InputBox("请输入近休止角")) Text1.Text = r0 Text2.Text = r1 Text3.Text = h Text4.Text = e Text5.Text = a1 Text6.Text = a01 Text7.Text = a2 Text8.Text = a02 Picture1.Scale (-75, 55)-(75, -55) '建立坐标系 Picture1.Line (0, 50)-(0, -50) Picture1.Line (-55, 0)-(55, 0) '初始化参数 Dim i!, j!, k!, m!, n!, l! Dim a!, b!, c!, d!, f! Const pi = 3.141592653 Dim s#(360), s1#(360) Dim ds#(360), ds1#(360) Dim dx#(360), dy#(360) a = a1 b = a1 + a01 c = a1 + a01 + a2 / 2 d = a1 + a01 + a2 f = 360 j=0 For i = 0 To a '推程段 s(j) = h * (1 - Cos(pi * i / a1)) / 2

ds(j) = h * pi * Sin(pi * i / a1) / (2 * a1) ds1(j) = ds(j) / 2 s1(j) = s(j) / 2 '按比例定义参数值 j=j+1 Next i For i = (a + 1) To b '远休段 s(j) = h ds(j) = 0 ds1(j) = 0 s1(j) = s(j) / 2 j=j+1 Next i For i = (b + 1) To c '回程等减速段 s(j) = h - 2 * h * (i - a1 - a01) ^ 2 / (a2 ^ 2) ds(j) = -4 * h * (i - a1 - a01) / (a2 ^ 2) ds1(j) = ds(j) / 2 s1(j) = s(j) / 2 j=j+1 Next i For i = (c + 1) To d '回程等加速段 s(j) = 2 * h * (a1 + a01 + a2 - i) ^ 2 / (a2 ^ 2) ds(j) = -4 * h * (a1 + a01 + a2 - i) / (a2 ^ 2) ds1(j) = ds(j) / 2 s1(j) = s(j) / 2 j=j+1 Next i For i = (d + 1) To f '近休段 s(j) = 0 ds(j) = 0 ds1(j) = 0 s1(j) = s(j) / 2 j=j+1 Next i '初始化参数' Dim X0#, Y0#, X1#, Y1#, X2#, Y2# Dim X11#, Y12#, X21#, Y22# Dim e1#, r#, p#, q#, r11# Dim s0#, a3#, a03#, a13# '按比例定义参数值' e1 = e / 2 r = r0 / 2 r11 = r1 / 2 s0 = Sqr(r ^ 2 - e1 ^ 2) For i = 1 To 360

dx(i) = (ds1(i) - e) * Sin(i * pi / 180) + (s0 + s1(i)) * Cos(i * pi / 180) dy(i) = (ds1(i) - e) * Cos(i * pi / 180) - (s0 + s1(i)) * Sin(i * pi / 180) Next i '输出理论、实际轮廓线图像及坐标值' X0 = e1: Y0 = s0 For g = 2 To 360 m=g-1 '求理论轮廓线 X2 = (s1(g) + s0) * Sin(g * pi / 180) + e1 * Cos(g * pi / 180) Y2 = (s1(g) + s0) * Cos(g * pi / 180) - e1 * Sin(g * pi / 180) X1 = (s1(m) + s0) * Sin(m * pi / 180) + e1 * Cos(m * pi / 180) Y1 = (s1(m) + s0) * Cos(m * pi / 180) - e1 * Sin(m * pi / 180) Picture1.Line (X0, Y0)-(X1, Y1) '输出理论轮廓线图 Picture1.Line (X1, Y1)-(X2, Y2) '求实际轮廓线 p = dx(m) / Sqr(dx(m) ^ 2 + dy(m) ^ 2) q = -dy(m) / Sqr(dx(m) ^ 2 + dy(m) ^ 2) p1 = dx(g) / Sqr(dx(g) ^ 2 + dy(g) ^ 2) q1 = -dy(g) / Sqr(dx(g) ^ 2 + dy(g) ^ 2) X11 = X1 - r11 * q Y12 = Y1 - r11 * p X21 = X2 - r11 * q1 Y22 = Y2 - r11 * p1 Picture1.PSet (X11, Y12) '输出实际轮廓线图 '求压力角 a3 = Abs(ds1(m) - e1) / (s1(m) + s0) a03 = Atn(a3) * 180 / pi a13 = Abs(a03) If m Mod 5 = 0 Then Text9.Text = Text9.Text & " "&m&" " & 2 * X1 & " " & 2 * Y1 & " " & 2 * X11 & " " & 2 * Y12 & " " & a13 & " " & vbCrLf '每隔 5°输出理论、 实际轮廓线坐标值及压力角 End If X0 = X2: Y0 = Y2 Next g End Sub

代码编辑完成之后进行控件编辑,然后运行,图片如下:

凸轮轮廓曲线图单独如下: (内轮廓为凸轮实际轮廓曲线,外轮廓为凸轮理论轮廓曲线)

理论坐标值,实际坐标值及压力角分别如下: 角度 理论坐标 X1 值 理论坐标 Y1 值 5 13.3422488649574 37.7654699135133 29.3084873143164 (实际坐标 Y12 值) 14.4275917751835

实际坐标 X11 值 8.00563520863182 (压力角)

10 16.6113888240431 36.6201626123094 28.6474623245437 14.3395586049324 15 19.8099518319073 35.2947136880551 27.856772926096 14.2154851012779 20 22.9390013468958 33.786344231391 26.9282949766938 14.0583301511266 25 25.9972138724791 32.0891892397401 25.8511081154383 13.8717847601794 30 28.9800857936919 30.1949810103691 24.6122140870338 13.6600868103377 35 31.8793010533959 28.0938923077854 23.1973736101787 13.4278219312224 40 34.6822889682749 25.7755042172997 21.5920343882299 13.1797270422329 45 37.3719941167773 23.229858501982 19.7823196627103 12.9205106604117 50 39.9268720143513 20.4485506973342 17.7560436639891 12.6547002911991 55 42.3211155304441 17.4258182420722 15.5037177655705 12.3865229198335 60 44.5251080223162 14.1595777289496 13.0195095021838 12.1198205174591 65 46.5060902965086 10.6523668774477 10.3021162405198 11.8579990820075 70 48.2290200895894 6.91215002731713 7.35551647082509 11.6040073161022 75 49.6575950992337 2.95295071320818 4.18956455652113 11.3603396435603 80 50.755403980713 40.9626058162162 .820399328117849 11.1290577603493 85 51.4871644002125 -5.53365515911432 -2.72935700960609 10.9118250940043 90 51.8200034054071 -9.99999998471846 -6.43062582997395 10.7099491725521 95 51.7247331809868 -14.5635261361755 -10.2481327730858 10.5244277665238 100 51.1770747877666 -19.1781651797988 -14.1409011986077 10.3559955978335 105 50.1587837607284 -23.792767386665 -18.0629684321482 10.2051692917602 110 48.6586344217534 -28.3520722730608 -21.9643060851593 10.0722890154272 115 46.673224342148 -32.7978611078048 -25.7919176018107 9.95755586824093

10.5751606870804 13.1258634706131 15.6611472387024 18.1814385503099 20.6835375066202 23.16012077977 25.5994160643274 27.985062991446 30.2961708002451 32.5075774448079 34.5903083545665 36.5122259542568 38.2388536146616 39.7343503575917 -1.20471896705107 41.8884190713341 42.4787204023372 42.703791981655 42.5384422811835 41.9630895289492 40.964711941724 39.5376265682527

120 44.2075664047356 -37.0702557219873 -29.4910790189435 9.8610645632329 125 41.2754431487963 -41.1091222946528 -33.0066830044075 9.78283127563007 130 37.8995062720208 -44.8555345958003 -36.2846417957369 9.7228167566893 135 34.1111130150826 -48.2532486023801 -39.2733018642547 9.6809449397216 140 29.9499003450573 -51.2501395609079 -41.9248220830537 9.65711732312722 145 25.4631070496697 -53.7995534860555 -44.1964679178452 9.6512234212581 150 20.7046627206483 -55.8615277280094 -46.0517766580646 9.66314754375353 155 15.7572222888754 -57.4534880074477 -47.5118674550833 9.66314754387064 160 10.6898598810582 -58.6081925519488 -48.6103642524582 9.66314754387064 165 5.54114118486271 -59.3168533627028 -49.3389068262703 9.66314754387064 170 .350251058433762 -59.5740771030407 -49.6919505276289 9.66314754387064 175 -4.84330469003621 -59.3779061449833 -49.666808480794 9.66314754387064 180 -9.99999996536154 -58.7298334679721 -49.2636720319233 9.66314754387064 185 -15.0745367207206 -57.5656111090232 -48.4196019869985 9.7007343960619 190 -19.9981704458301 -55.8275558531771 -47.07608981826 9.76109683882332 195 -24.6978957411788 -53.536768837998 -45.252955224612 9.8448875174968 200 -29.1036898513368 -50.7236867981278 -42.9787574382612 9.95309952314434 205 -33.149665708605 -47.4276717837425 -40.2903982189764 10.0870993202687 210 -36.7751707388143 -43.6964642540292 -37.2325905867212 10.248674264752 215 -39.9258158481975 -39.5855064328986 -33.8571996010235 10.4400979065219 220 -42.5544198533926 -35.1571445333176 -30.2224629158374 10.6642177066071 225 -44.6218556442095 -30.4797200758465 -26.3921000447533 10.9245717745374

37.6840642391778 35.4145151038628 32.74782726321 29.7110497677609 26.3390204055926 22.6737079083436 18.7633271119198 14.6782501887699 10.481462918737 6.20490538704218 1.88112477874535 -2.45697232496655 -6.77637038573203 -11.0309594505501 -15.1595919107961 -19.0962502669739 -22.7778642759138 -26.1454294146404 -29.1450765576733 -31.7290786412417 -33.8567812466153 -35.4954454802181

230 -46.0977855692624 -25.6265620268804 -22.4343201783329 11.2255440327002 235 -46.961274894428 -20.67489284471 -18.420738881855 11.5725712768119 240 -47.2012736879912 -15.7046627303114 -14.4252138861576 11.9724216180152 245 -46.942835198741 -10.8560244008044 -10.5606224187693 12.3336309643983 250 -46.3399833366382 -6.22459690598456 -6.91163517187719 12.681655391662 255 -45.431669611272 -1.82061741740468 -3.47778164203514 13.0121159629415 260 -44.2548453917153 2.35094281186775 -.253719466668754 13.3204288555372 265 -42.8438413668393 6.28984791720825 2.77000783247466 13.6019181075986 270 -41.2298334709211 9.99999996352438 5.60616502701814 13.8519513559864 275 -39.4404020217594 13.4887864006403 8.26999549168302 14.0660937671204 280 -37.4991893417156 16.766384917381 10.7783909324777 14.2402728080712 285 -35.4256595978295 19.8450386466316 13.1490814919631 14.3709442613559 290 -33.2349630249241 22.7383149633246 15.3998637319424 14.4552483369191 295 -30.93790510528 25.460361226109 17.5478798411627 14.491144224404 300 -28.5410196900453 28.025170740826 19.6089570917465 14.4775121886479 305 -25.9898579223067 30.4060402745624 21.5511525556394 14.4775121886479 310 -23.2408976427484 32.5555014822271 23.3293307357039 14.4775121886479 315 -20.3150600989574 34.4571956661558 24.9299586223012 14.4775121886479 320 -17.2346126813027 36.0966497853399 26.3408544707334 14.4775121886479 325 -14.0229994546489 37.4613866040076 27.5512805116757 14.4775121886479 330 -10.7046627348666 38.541019650922 28.5520246720849 14.4775121886479 335 -7.30485706805053 39.3273322666991 29.3354706846372 14.4775121886479

-36.6209932859852 -37.2186474299426 -37.2834608920572 -36.9471992675453 -36.3636123320494 -35.569935142498 -34.6000158015688 -33.483781229324 -32.2468376148195 -30.9102073318016 -29.4901988911806 -27.9984018412384 -26.4417948741549 -24.8229530749793 -23.1403393798392 -21.3432501827544 -19.383725964433 -17.2766798873638 -15.0381478444566 -12.6851664162141 -10.2356432120676 -7.70822058265609

340 -3.84945702817411 29.8956560521216 14.4775121886479 345 -.36476029595861 30.2283174256442 14.4775121886479 350 3.12271248235638 30.3309230512868 14.4775121886479 355 6.58641953314425 30.2026920382836 14.4775121886479

39.8143401375464 39.9983368395049 39.8779220465728 39.4540121880325

-5.12213374028172 -2.49706436732955 .147009173219551 2.78996388519434


相关文章:
基于MATLAB软件的凸轮轮廓曲线设计_
基于MATLAB软件的凸轮轮廓曲线设 计摘 要: 以偏置移动从动件盘形凸轮为例,基于MATLAB软件对凸轮轮廓曲 线进行了解析法设计.绘制出轮廓曲线。运行结果表明:在从动...
凸轮曲线设计
凸轮曲线设计_机械/仪表_工程科技_专业资料。凸轮曲线设计当根据使用要求确定了凸轮机构的类型、 基本参数以及从动件运动规律后, 即可进行凸轮轮廓曲线的设计。 设计...
基于MATLAB的凸轮轮廓曲线设计
基于MATLAB 的凸轮轮廓曲线设计 摘要 凸轮机构的运动设计主要包括从动件运动规律的确定和凸轮轮廓曲线 的设计等。 通常是先确定从动件的运动规律,然后根据从动件的...
matlab解析法画凸轮轮廓线
运用解析法进行设计, matlab 可以精确的计算出 轮廓上每一点的坐标,然后更为精确的绘制出凸轮轮廓曲线。 二、设计凸轮机构的已知条件凸轮做逆时针方向转动,从动件...
凸轮轮廓课程设计
曲线进行连线得出平底推杆的运动轨迹,即是凸轮轮廓曲线,图在下图在右 (五) 计算平底推杆平底尺寸长度 如下图 1-2 所示, 推杆平底中心至推杆平底与图轮廓线...
凸轮轮廓曲线绘制1
凸轮轮廓曲线绘制 M 代码 delta0=pi/2; h=60;r0=34; e=25; s0=sqrt(r0^2-e^2); for i=1:1:360 if i<=90 delta(i)=i*pi/180; s(i)=h*...
凸轮方程
0 引言凸轮机构常用于轻载、低速自动或半自动机构的控制。其中盘形凸轮应用较广,其加工方法 有划线加工、靠模加工和数控加工。由于凸轮轮廓曲线较复杂,采用前两者...
凸轮设计步骤
用几何法和解析法设计凸轮轮廓曲线的原理和步骤 2015-11-9 16:28:40 作者:风雨考验 人气:1252 次 评论(0) 所属标签: 产品外观设计 根据使用要求确定了凸轮...
盘形凸轮轮廓曲线的设计
高邮市菱塘民族职业中学备课纸(首页)课题 盘形凸轮轮廓曲线的设计 授课 时数 总课 时数 课型 教具 使用 新授 课件 授课日期 教目学标 根据工作要求已经选定从...
凸轮轮廓线绘制程序
凸轮轮廓线绘制程序_机械/仪表_工程科技_专业资料。凸轮的设计凸轮轮廓线绘制程序...('基圆','实际廓线','理论廓线'); 位移速度加速度曲线程序 j=0:3:360;...
更多相关标签:
凸轮轮廓曲线的设计 | 凸轮轮廓曲线的画法 | 凸轮基圆半径 | 凸轮轮廓 | 凸轮的理论轮廓曲线 | ug凸轮轮廓曲线的画法 | 凸轮理论轮廓线 | 图解法设计凸轮轮廓 |