哈工大机械原理大作业2-凸轮机构设计-22题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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
机械原理大作业二
课程名称: 机械原理 设计题目: 凸轮机构设计
一.设计题目
设计直动从动件盘形凸轮机构,
1.运动规律(等加速等减速运动) 推程 0450≤≤ϕ 推程 009045≤≤ϕ
2.运动规律(等加速等减速运动) 回程 00200160≤≤ϕ 回程 00240200≤≤ϕ
三.推杆位移、速度、加速度线图及凸轮s d ds
-φ
线图
采用VB 编程,其源程序及图像如下: 1.位移:
Private Sub Command1_Click() Timer1.Enabled = True '开启计时器 End Sub
Private Sub Timer1_Timer() Static i As Single
Dim s As Single, q As Single 'i作为静态变量,控制流程;s代表位移;q代表角度
Picture1.CurrentX = 0
Picture1.CurrentY = 0
i = i + 0.1
If i <= 45 Then
q = i
s = 240 * (q / 90) ^ 2
Picture1.PSet Step(q, -s), vbRed
ElseIf i >= 45 And i <= 90 Then
q = i
s = 120 - 240 * ((90 - q) ^ 2) / (90 ^ 2)
Picture1.PSet Step(q, -s), vbGreen
ElseIf i >= 90 And i <= 150 Then
q = i
s = 120
Picture1.PSet Step(q, -s), vbBlack
ElseIf i >= 150 And i <= 190 Then
q = i
s = 120 - 240 * (q - 150) ^ 2 / 6400
Picture1.PSet Step(q, -s), vbBlue
ElseIf i >= 190 And i <= 230 Then
s = 240 * (230 - q) ^ 2 / 6400
Picture1.PSet Step(q, -s), vbRed
ElseIf i >= 230 And i <= 360 Then
q = i
s = 0
Picture1.PSet Step(q, -s), vbBlack
Else
End If
End Sub
2.速度
Private Sub Command2_Click()
Timer2.Enabled = True '开启计时器
End Sub
Private Sub Timer2_Timer()
Static i As Single
Dim v As Single, q As Single, w As Single 'i为静态变量,控制流程;q代表角度;w代表角速度,此处被赋予50
Picture1.CurrentX = 0
Picture1.CurrentY = 0
w = 50
i = i + 0.1
If i <= 45 Then
v = 480 * w * q / 8100
Picture1.PSet Step(q, -v), vbRed
ElseIf i >= 45 And i <= 90 Then
q = i
v = 480 * w * (90 - q) / 8100
Picture1.PSet Step(q, -v), vbBlack ElseIf i >= 90 And i <= 150 Then
q = i
v = 0
Picture1.PSet Step(q, -v), vbGreen ElseIf i >= 150 And i <= 190 Then q = i
v = -480 * w * (q - 150) / 6400 Picture1.PSet Step(q, -v), vbBlue ElseIf i >= 190 And i <= 230 Then q = i
v = -480 * w * (230 - q) / 6400
Picture1.PSet Step(q, -v), vbRed ElseIf i >= 230 And i <= 360 Then q = i
v = 0
Else
End If
End Sub
3.加速度
Private Sub Command3_Click()
Timer3.Enabled = True '开启计时器
End Sub
Private Sub Timer3_Timer()
Static i As Single
Dim a As Single, w As Single, q As Single 'i为静态变量,控制流程;a代表加速度;q代表角度;w代表角速度
w = 50
Picture1.CurrentX = 0
Picture1.CurrentY = 0
i = i + 0.1
If i <= 45 Then
q = i
a = 480 * w ^ 2 / 8100
Picture1.PSet Step(q, -a), vbRed
ElseIf i >= 45 And i <= 90 Then
q = i
a = -480 * w ^ 2 / 8100