📄 frmsetting.frm
字号:
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 15
Top = 3720
Width = 1215
End
Begin VB.Label Label15
Caption = "Z轴减速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 14
Top = 3240
Width = 1215
End
Begin VB.Label Label14
Caption = "Y轴减速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 13
Top = 2760
Width = 1215
End
Begin VB.Label Label13
Caption = "X轴减速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 12
Top = 2280
Width = 1215
End
Begin VB.Label Label12
Caption = "W轴加速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 11
Top = 3720
Width = 1215
End
Begin VB.Label Label11
Caption = "Z轴加速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 10
Top = 3240
Width = 1215
End
Begin VB.Label Label10
Caption = "Y轴加速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 9
Top = 2760
Width = 1215
End
Begin VB.Label Label9
Caption = "X轴加速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 8
Top = 2280
Width = 1215
End
Begin VB.Label Label8
Caption = "W轴驱动速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 7
Top = 1560
Width = 1335
End
Begin VB.Label Label7
Caption = "Z轴驱动速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 6
Top = 1080
Width = 1335
End
Begin VB.Label Label6
Caption = "Y轴驱动速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 5
Top = 600
Width = 1335
End
Begin VB.Label Label5
Caption = "X轴驱动速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3600
TabIndex = 4
Top = 120
Width = 1335
End
Begin VB.Label Label4
Caption = "W轴初始速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 3
Top = 1560
Width = 1335
End
Begin VB.Label Label3
Caption = "Z轴初始速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 2
Top = 1080
Width = 1335
End
Begin VB.Label Label2
Caption = "Y轴初始速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 1
Top = 600
Width = 1335
End
Begin VB.Label Label1
Caption = "X轴初始速度:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 120
TabIndex = 0
Top = 120
Width = 1335
End
End
Attribute VB_Name = "frmSetting"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub btnCancel_Click()
Unload frmSetting
End Sub
Private Sub btnSave_Click()
m_nStartV_x = CLng(txtStartSpeed_x.Text)
m_nStartV_y = CLng(txtStartSpeed_y.Text)
m_nStartV_z = CLng(txtStartSpeed_z.Text)
m_nStartV_w = CLng(txtStartSpeed_w.Text)
m_nDriveSpeed_x = CLng(txtDriveSpeed_x.Text)
m_nDriveSpeed_y = CLng(txtDriveSpeed_y.Text)
m_nDriveSpeed_z = CLng(txtDriveSpeed_z.Text)
m_nDriveSpeed_w = CLng(txtDriveSpeed_w.Text)
m_nVelocityAcc_x = CLng(txtAcc_x.Text)
m_nVelocityAcc_y = CLng(txtAcc_y.Text)
m_nVelocityAcc_z = CLng(txtAcc_z.Text)
m_nVelocityAcc_w = CLng(txtAcc_w.Text)
m_nVelocityDec_x = CLng(txtDec_x.Text)
m_nVelocityDec_y = CLng(txtDec_y.Text)
m_nVelocityDec_z = CLng(txtDec_z.Text)
m_nVelocityDec_w = CLng(txtDec_w.Text)
m_nRatio_x = CLng(txtRatio_x.Text)
m_nRatio_y = CLng(txtRatio_y.Text)
m_nRatio_z = CLng(txtRatio_z.Text)
m_nRatio_w = CLng(txtRatio_w.Text)
If m_nStartV_x >= m_nDriveSpeed_x Then m_nDriveSpeed_x = m_nStartV_x
If m_nStartV_y >= m_nDriveSpeed_y Then m_nDriveSpeed_y = m_nStartV_y
If m_nStartV_z >= m_nDriveSpeed_z Then m_nDriveSpeed_z = m_nStartV_z
If m_nStartV_w >= m_nDriveSpeed_w Then m_nDriveSpeed_w = m_nStartV_w
m_fAccTime_w = (m_nDriveSpeed_w - m_nStartV_w) / m_nVelocityAcc_w
m_fAccTime_x = (m_nDriveSpeed_x - m_nStartV_x) / m_nVelocityAcc_x
m_fAccTime_y = (m_nDriveSpeed_y - m_nStartV_y) / m_nVelocityAcc_y
m_fAccTime_z = (m_nDriveSpeed_z - m_nStartV_z) / m_nVelocityAcc_z
Unload frmSetting
End Sub
Private Sub Form_Load()
txtStartSpeed_x.Text = CStr(m_nStartV_x)
txtStartSpeed_y.Text = CStr(m_nStartV_y)
txtStartSpeed_z.Text = CStr(m_nStartV_z)
txtStartSpeed_w.Text = CStr(m_nStartV_w)
txtDriveSpeed_x.Text = CStr(m_nDriveSpeed_x)
txtDriveSpeed_y.Text = CStr(m_nDriveSpeed_y)
txtDriveSpeed_z.Text = CStr(m_nDriveSpeed_z)
txtDriveSpeed_w.Text = CStr(m_nDriveSpeed_w)
txtAcc_x.Text = CStr(m_nVelocityAcc_x)
txtAcc_y.Text = CStr(m_nVelocityAcc_y)
txtAcc_z.Text = CStr(m_nVelocityAcc_z)
txtAcc_w.Text = CStr(m_nVelocityAcc_w)
If m_bEqualityVelocity Then
txtAcc_x.Locked = False
txtAcc_x.BackColor = &H80000005
txtAcc_y.Locked = False
txtAcc_y.BackColor = &H80000005
txtAcc_z.Locked = False
txtAcc_z.BackColor = &H80000005
txtAcc_w.Locked = False
txtAcc_w.BackColor = &H80000005
txtDec_x.Locked = False
txtDec_x.BackColor = &H80000005
txtDec_y.Locked = False
txtDec_y.BackColor = &H80000005
txtDec_z.Locked = False
txtDec_z.BackColor = &H80000005
txtDec_w.Locked = False
txtDec_w.BackColor = &H80000005
Else
txtAcc_x.Locked = True
txtAcc_x.BackColor = &H8000000B
txtAcc_y.Locked = True
txtAcc_y.BackColor = &H8000000B
txtAcc_z.Locked = True
txtAcc_z.BackColor = &H8000000B
txtAcc_w.Locked = True
txtAcc_w.BackColor = &H8000000B
txtDec_x.Locked = True
txtDec_x.BackColor = &H8000000B
txtDec_y.Locked = True
txtDec_y.BackColor = &H8000000B
txtDec_z.Locked = True
txtDec_z.BackColor = &H8000000B
txtDec_w.Locked = True
txtDec_w.BackColor = &H8000000B
End If
txtDec_x.Text = CStr(m_nVelocityDec_x)
txtDec_y.Text = CStr(m_nVelocityDec_y)
txtDec_z.Text = CStr(m_nVelocityDec_z)
txtDec_w.Text = CStr(m_nVelocityDec_w)
txtRatio_x.Text = CStr(m_nRatio_x)
txtRatio_y.Text = CStr(m_nRatio_y)
txtRatio_z.Text = CStr(m_nRatio_z)
txtRatio_w.Text = CStr(m_nRatio_w)
If Abs(m_fAccTime_x) < 1 Then
txtTime_x.Text = "0" + CStr(m_fAccTime_x)
Else
txtTime_x.Text = CStr(m_fAccTime_x)
End If
If Abs(m_fAccTime_y) < 1 Then
txtTime_y.Text = "0" + CStr(m_fAccTime_y)
Else
txtTime_y.Text = CStr(m_fAccTime_y)
End If
If Abs(m_fAccTime_z) < 1 Then
txtTime_z.Text = "0" + CStr(m_fAccTime_z)
Else
txtTime_z.Text = CStr(m_fAccTime_z)
End If
If Abs(m_fAccTime_w) < 1 Then
txtTime_w.Text = "0" + CStr(m_fAccTime_w)
Else
txtTime_w.Text = CStr(m_fAccTime_w)
End If
If m_bEnableCurve_S_Move Then
txtTime_x.Locked = False
txtTime_x.BackColor = &H80000005
txtTime_y.Locked = False
txtTime_y.BackColor = &H80000005
txtTime_z.Locked = False
txtTime_z.BackColor = &H80000005
txtTime_w.Locked = False
txtTime_w.BackColor = &H80000005
Else
txtTime_x.Locked = True
txtTime_x.BackColor = &H8000000B
txtTime_y.Locked = True
txtTime_y.BackColor = &H8000000B
txtTime_z.Locked = True
txtTime_z.BackColor = &H8000000B
txtTime_w.Locked = True
txtTime_w.BackColor = &H8000000B
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -