VB凸轮轮廓线数控加工程序设计源代码

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

八附源程序

模块

Option Explicit

Public ptx(3600) As Double '曲线存储点数组

Public pty(3600) As Double '由于存储最终输出的点

Public low As Double '数组下标

Public countnum As Integer '存储当前为第几段曲线输入的值

Public Const PI = 3.14159

Public area As Double '存储角度范围的值

Public sch As Double '总升程

Public tch As Double '输入曲线的推程

Public Huan As Double '坐标变换数据

Public Gao As Double

Public a1 As String, a2 As String, a3 As String

Public b1 As Double

Public savetime As Double

Public i As Double

FrmView 主窗口

Option Explicit

Dim j%

Public bch As String, zbx As String, M As Integer, sd As String

Private Sub CmbSlect_Click() '选择曲线类型

Select Case CmbSlect.ListIndex

Case 0 '等加速运动

dengjiasu.NumStr.Text = "" '清空Text文本框

dengjiasu.NumEnd.Text = ""

dengjiasu.NumH.Text = ""

dengjiasu.NumStr.Text = area '设定default范围

dengjiasu.NumStr.Enabled = False

dengjiasu.NumEnd.Enabled = True

If CountAll.Caption = CountNow.Caption Then '最后一段曲线dengjiasu.NumEnd.Text = "360" '输入时,自动输入dengjiasu.NumEnd.Enabled = False '默认值dengjiasu.NumH.Text = -b1

End If

dengjiasu.Show 1

Case 1 '等速运动

dengsu.NumStr.Text = ""

dengsu.NumEnd.Text = ""

dengsu.NumH.Text = ""

dengsu.NumStr.Text = area

dengsu.NumStr.Enabled = False

dengsu.NumEnd.Enabled = True

If CountAll.Caption = CountNow.Caption Then dengsu.NumEnd.Text = "360"

dengsu.NumEnd.Enabled = False

dengsu.NumH.Text = -b1

End If

dengsu.Show 1

Case 2 '正弦加速度运动sinx.NumStr.Text = ""

sinx.NumEnd.Text = ""

sinx.NumH.Text = ""

sinx.NumStr.Text = area

sinx.NumStr.Enabled = False

sinx.NumEnd.Enabled = True

If CountAll.Caption = CountNow.Caption Then

sinx.NumEnd.Text = "360"

sinx.NumEnd.Enabled = False

sinx.NumH.Text = -b1

End If

sinx.Show 1

Case 3 '余弦加速度运动Cosx.NumStr.Text = ""

Cosx.NumEnd.Text = ""

Cosx.NumH.Text = ""

Cosx.NumStr.Text = area

Cosx.NumStr.Enabled = False

Cosx.NumEnd.Enabled = True

If CountAll.Caption = CountNow.Caption Then

Cosx.NumEnd.Text = "360"

Cosx.NumEnd.Enabled = False

Cosx.NumH.Text = -b1

End If

Cosx.Show 1

Case 4 '等减速运动dengjiansu.NumStr.Text = ""

dengjiansu.NumEnd.Text = ""

dengjiansu.NumH.Text = ""

dengjiansu.NumStr.Text = area

dengjiansu.NumStr.Enabled = False

dengjiansu.NumEnd.Enabled = True

If CountAll.Caption = CountNow.Caption Then dengjiansu.NumEnd.Text = "360"

dengjiansu.NumEnd.Enabled = False

dengjiansu.NumH.Text = -b1

相关文档
最新文档