⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs485.frm

📁 详细介绍了使用VB编制串口通信程序
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         Height          =   495
         Left            =   555
         TabIndex        =   5
         Top             =   480
         Width           =   255
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   7
         Left            =   4800
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   6
         Left            =   4080
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   5
         Left            =   3360
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   4
         Left            =   2640
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   3
         Left            =   1920
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   2
         Left            =   1200
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   1
         Left            =   480
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
      Begin VB.Shape Shape1 
         BackColor       =   &H000000FF&
         BackStyle       =   1  'Opaque
         Height          =   495
         Index           =   8
         Left            =   5520
         Shape           =   3  'Circle
         Top             =   1320
         Width           =   375
      End
   End
   Begin VB.Frame Frame6 
      Caption         =   "瞬时数据采集"
      Height          =   1095
      Left            =   5160
      TabIndex        =   0
      Top             =   240
      Width           =   2895
      Begin VB.CommandButton Command2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1440
         TabIndex        =   2
         Top             =   600
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Caption         =   "单 步"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label18 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   255
         Left            =   1320
         TabIndex        =   3
         Top             =   360
         Width           =   1455
      End
   End
   Begin VB.Timer Timer1 
      Interval        =   700
      Left            =   11400
      Top             =   1080
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   11280
      Top             =   1680
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      InBufferSize    =   30
   End
   Begin VB.Label Label23 
      Caption         =   "ms"
      Height          =   255
      Left            =   14280
      TabIndex        =   47
      Top             =   10440
      Width           =   375
   End
   Begin VB.Label Label21 
      Caption         =   "传感器8"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   7
      Left            =   8760
      TabIndex        =   22
      Top             =   9000
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器7"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   6
      Left            =   8760
      TabIndex        =   21
      Top             =   7440
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器6"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   5
      Left            =   8760
      TabIndex        =   20
      Top             =   5880
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器5"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   4
      Left            =   8760
      TabIndex        =   19
      Top             =   4320
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器4"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   3
      Left            =   1080
      TabIndex        =   18
      Top             =   9000
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器3"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   2
      Left            =   1080
      TabIndex        =   17
      Top             =   7440
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器2"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   1
      Left            =   1080
      TabIndex        =   16
      Top             =   5880
      Width           =   1335
   End
   Begin VB.Label Label21 
      Caption         =   "传感器1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Index           =   0
      Left            =   1080
      TabIndex        =   15
      Top             =   4320
      Width           =   1335
   End
   Begin VB.Label Label14 
      Caption         =   "选择通道"
      Height          =   375
      Left            =   240
      TabIndex        =   13
      Top             =   3360
      Width           =   1095
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public outstu As Integer
Public countt As Integer
Public scan As Boolean
Public runstop As Boolean
Public addr As String
Dim inbuffer
Dim position As Integer
Dim dot As Integer
Dim data(8) As Single
Dim ctnl As Integer
Dim AB()

Public CH1 As Byte
Public CL1 As Byte

Private Sub Command1_Click()
'    MSComm1.PortOpen = True
    countt = countt + 1
    If countt > 8 Then
        countt = 1
    End If
    Text1.Text = Str(countt)
    CHchange
'    MSComm1.PortOpen = False
'    MSComm2.PortOpen = True

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -