机械原理上机实验报告

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

机械原理上机实验报告实验名称

班级学号

姓名日期

成绩

指导教师(签字)

机电工程学院

二O一五年五月

例3-7:

拆杆组:

定坐标点:

编制主程序:

Private Sub CmdKsjc_Click()

' 定义变量

Dim d1 As Single, d3 As Single, d4 As Single, xa As Single, ya As Single Dim xc As Single, yc As Single, xf As Single, yf As Single

Dim dv As Single, da As Single, c1 As Single

d1 = 0.125: d3 = 0.6: d4 = 0.15

xa = 0: ya = 0: xc = 0: yc = -0.275: xf = 0: yf = 0.3

dv = 1: da = 0: c1 = 0

Dim i As Integer, n As Integer

n = 18

bc = 10 * PI / 180

kp = 1

For i = 1 To n

l = d1: r = l: af = 0

ct = c1: cv = dv: ca = da

x1 = xa: y1 = ya: xv1 = 0: yv1 = 0: xa1 = 0: ya1 = 0

Call SSL

l1 = 0: w = 0: m = 0

x1 = x2: y1 = y2

xv1 = xv2: yv1 = yv2: xa1 = xa2: ya1 = ya2

x2 = xc: y2 = yc: xv2 = 0: yv2 = 0: xa2 = 0: ya2 = 0

Call RPR

l = d3: r = l: af = 0: ct = ct2: cv = cv2: ca = ca2

x1 = xc: y1 = yc: xv1 = 0: yv1 = 0: xa1 = 0: ya1 = 0

Call SSL

l1 = d4: m = 1

ct2 = PI: cv2 = 0: ca2 = 0

x1 = x2: y1 = y2: xv1 = xv2: yv1 = yv2: xa1 = xa2: ya1 = ya2 x2 = xf: y2 = yf: xv2 = 0: yv2 = 0: xa2 = 0: ya2 = 0

Call RRP

'''将计算结果写入到表格中

MSHFGrd.TextMatrix(i, 0) = Str(i)

MSHFGrd.TextMatrix(i, 1) = Str(Int(c1 * 180 / PI + 0.5)) MSHFGrd.TextMatrix(i, 2) = Str(Int(l2 * 1000 + 0.5) / 1000) MSHFGrd.TextMatrix(i, 3) = Str(Int(lv2 * 1000 + 0.5) / 1000) MSHFGrd.TextMatrix(i, 4) = Str(Int(la2 * 1000 + 0.5) / 1000)

c1 = c1 + bc

Next i

End Sub

Private Sub CndOk_Click()

End

End Sub

Private Sub Form_Click()

MsgBox Chr(10) + "请选择按钮进行计算", vbCritical, "机械原理运动分析"

End Sub

Private Sub Form_Load()

'设置各行的宽度

MSHFGrd.ColWidth(0) = 700: MSHFGrd.ColWidth(1) = 700

MSHFGrd.ColWidth(2) = 1500: MSHFGrd.ColWidth(3) = 1500

MSHFGrd.ColWidth(4) = 1500

''设置表头

MSHFGrd.TextMatrix(0, 0) = "组数": MSHFGrd.TextMatrix(0, 1) = "角度" MSHFGrd.TextMatrix(0, 2) = "位移s(m)": MSHFGrd.TextMatrix(0, 3) = "速度v(m/s)" MSHFGrd.TextMatrix(0, 4) = "加速度a(m/s2)":

End Sub

计算结果:

例3-1

拆杆组:

编制主程序:

Private Sub Command1_Click()

kp = 1

d1 = 24

c1 = PI / 3

dv = 10

da = 0

xa = 0

ya = 0

l = d1: r = l: af = 0

ct = c1: cv = dv: ca = da

X1 = xa: Y1 = ya: xv1 = 0: yv1 = 0: xa1 = 0: ya1 = 0 Call SSL

l1 = 48 * Sin(80 * PI / 180): w = 0: m = -1

X1 = 78: Y1 = 0

xv1 = 0: yv1 = 0: xa1 = 0: ya1 = 0

Call RPR

Print "2杆角度为" & Str(ct2 * 180 / PI + 360) Print "3杆角度为" & Str(ct1 * 180 / PI + 360) Print "2杆角速度为" & Str(cv2)

Print "3杆角加速度为" & Str(ca2)

End Sub

Private Sub Command2_Click()

End

End Sub

计算结果:

3-5

拆杆组:

相关文档
最新文档