📄 frmmain.frm
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form frmZong
BorderStyle = 1 'Fixed Single
Caption = "电机驱动监控系统"
ClientHeight = 6975
ClientLeft = 2355
ClientTop = 1755
ClientWidth = 10275
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6975
ScaleWidth = 10275
StartUpPosition = 2 'CenterScreen
Begin VB.Timer Timer
Left = 5400
Top = 120
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 495
Left = 7320
TabIndex = 31
Top = 4920
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "显示监视串口窗口"
Height = 495
Left = 480
TabIndex = 30
Top = 4920
Width = 1575
End
Begin VB.CommandButton command1
Caption = "显示编辑窗口"
Height = 495
Left = 5520
TabIndex = 29
Top = 4920
Width = 1455
End
Begin VB.CommandButton CommandCode
Caption = "设置控制码"
Height = 495
Left = 2520
TabIndex = 25
Top = 4920
Width = 1335
End
Begin VB.Frame Frame5
Caption = "单字节发送测试"
Height = 975
Left = 5280
TabIndex = 21
Top = 1080
Width = 3975
Begin VB.TextBox TextSingleSend
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 270
Left = 840
TabIndex = 24
Top = 360
Width = 1215
End
Begin VB.CommandButton CommandSingleStep
Caption = "发送"
Height = 495
Left = 240
TabIndex = 22
Top = 240
Width = 615
End
Begin VB.Label Label1
Caption = "(请输入十进制数据)"
Height = 255
Left = 2040
TabIndex = 23
Top = 360
Width = 1695
End
End
Begin VB.Frame Frame3
Caption = "查询系统参数"
Height = 1455
Left = 4440
TabIndex = 1
Top = 2760
Width = 4935
Begin VB.TextBox TextU
Enabled = 0 'False
Height = 375
Left = 1680
TabIndex = 28
Top = 240
Width = 1215
End
Begin VB.TextBox TextT
Enabled = 0 'False
Height = 375
Left = 1680
TabIndex = 9
Top = 960
Width = 1215
End
Begin VB.TextBox TextI
Enabled = 0 'False
Height = 375
Left = 1680
TabIndex = 8
Top = 600
Width = 1215
End
Begin VB.CommandButton CommandTorque
Caption = "查询转矩"
Height = 375
Left = 720
TabIndex = 7
Top = 960
Width = 975
End
Begin VB.CommandButton CommandCurrent
Caption = "查询电流"
Height = 375
Left = 720
TabIndex = 6
Top = 600
Width = 975
End
Begin VB.CommandButton CommandVoltage
Caption = "查询电压"
Height = 375
Left = 720
TabIndex = 5
Top = 240
Width = 975
End
Begin VB.Label LabelU
Caption = "×1V"
Height = 255
Index = 1
Left = 3000
TabIndex = 4
Top = 360
Width = 615
End
Begin VB.Label LabelI
Caption = "×0.1A"
Height = 255
Index = 1
Left = 3000
TabIndex = 3
Top = 720
Width = 855
End
Begin VB.Label LabelT
Caption = "×10N.M"
Height = 255
Index = 1
Left = 3000
TabIndex = 2
Top = 1080
Width = 735
End
End
Begin VB.CommandButton cmdCfgSPort
Caption = "配置串口"
Enabled = 0 'False
Height = 495
Left = 3960
TabIndex = 0
Top = 4920
Width = 1335
End
Begin VB.Frame Frame4
Caption = "控制命令组合设置"
Height = 3855
Left = 120
TabIndex = 10
Top = 480
Width = 4215
Begin VB.CommandButton CommandAddCalcel
Caption = "取消添加"
Height = 495
Left = 120
TabIndex = 27
Top = 1680
Width = 1215
End
Begin VB.CommandButton CommandAdd
Caption = "添加命令"
Height = 495
Left = 120
TabIndex = 17
Top = 240
Width = 1215
End
Begin VB.CommandButton CommandRun
Caption = "运行"
Height = 495
Left = 120
TabIndex = 16
Top = 2160
Width = 1215
End
Begin VB.CommandButton CommandFinish
Caption = "完成"
Height = 495
Left = 120
TabIndex = 15
Top = 1200
Width = 1215
End
Begin VB.ComboBox ComboCmd
CausesValidation= 0 'False
Height = 300
ItemData = "frmMain.frx":0000
Left = 2160
List = "frmMain.frx":0002
TabIndex = 14
Top = 360
Width = 1575
End
Begin VB.TextBox TextPara
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 270
Left = 2160
TabIndex = 13
Top = 960
Width = 1455
End
Begin VB.TextBox TextDelay
BeginProperty DataFormat
Type = 1
Format = "0"
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 1
EndProperty
Height = 270
Left = 2160
TabIndex = 12
Top = 1440
Width = 1455
End
Begin VB.CommandButton CommandAddOk
Caption = "添加完成"
Height = 495
Left = 120
TabIndex = 11
Top = 720
Width = 1215
End
Begin VB.Label Labelms
Caption = "毫秒"
Height = 255
Left = 3600
TabIndex = 26
Top = 1440
Width = 375
End
Begin VB.Label LabelCmd
Caption = "控制命令"
Height = 180
Left = 1440
TabIndex = 20
Top = 480
Width = 735
End
Begin VB.Label LabelPara
Caption = "控制参数"
Height = 195
Left = 1440
TabIndex = 19
Top = 960
Width = 735
End
Begin VB.Label LabelDelay
Caption = "延时"
Height = 255
Left = 1560
TabIndex = 18
Top = 1440
Width = 495
End
End
Begin VB.Timer tmRX
Enabled = 0 'False
Interval = 50
Left = 10440
Top = 720
End
Begin MSCommLib.MSComm Comm
Left = 6120
Top = 0
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
DTREnable = -1 'True
InputLen = 1
RThreshold = 1
BaudRate = 2400
ParitySetting = 1
InputMode = 1
End
Begin VB.Frame Frame1
Caption = "测试"
Height = 2175
Left = 4440
TabIndex = 32
Top = 480
Width = 4935
End
Begin VB.Frame Frame2
Caption = "功能选择"
Height = 1215
Left = 120
TabIndex = 33
Top = 4440
Width = 9255
End
Begin VB.Menu MNU_File
Caption = "文件(&F)"
Begin VB.Menu MNU_File_Save
Caption = "保存(&S)..."
End
Begin VB.Menu MNU_File_Close
Caption = "关闭(&C)"
End
Begin VB.Menu MNU_File_Open
Caption = "打开(&O)..."
End
Begin VB.Menu seperator
Caption = "-"
End
Begin VB.Menu MNU_File_Exit
Caption = "退出(&x)"
End
End
Begin VB.Menu MNU_Config
Caption = "设置(&C)"
Begin VB.Menu MNU_Config_Port
Caption = "设置串口(&P)"
End
Begin VB.Menu MNU_Config_Code
Caption = "设置控制码(&C)"
End
End
Begin VB.Menu MNU_Help
Caption = "帮助(&H)"
Begin VB.Menu MNU_About
Caption = "关于本软件&A"
End
End
End
Attribute VB_Name = "frmZong"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'用于接收的变量
Dim tmpAnswerCode As Byte
Dim AnswerCode(2) As Byte
Dim tmpAnswerVal As Long
Dim tmpAnswerStr As String
Dim OK As Long
Dim RepeatCnt As Integer
Dim Answer_Index As Integer
Public RXCorrectFlag As Boolean
Dim Cmd As String
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -