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

📄 ua302a.frm

📁 usb2.0驱动
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Begin VB.Form form1 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00C0C0C0&
   Caption         =   "UA302A  数据采集器 "
   ClientHeight    =   11115
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   15240
   FillColor       =   &H00E0E0E0&
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   8.25
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   11520
   ScaleMode       =   0  'User
   ScaleWidth      =   15360
   StartUpPosition =   2  '屏幕中心
   Begin VB.OptionButton Option2 
      Caption         =   "M_CH"
      Height          =   255
      Left            =   10560
      TabIndex        =   9
      Top             =   8640
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "2_CH"
      Height          =   255
      Left            =   9600
      TabIndex        =   8
      Top             =   8640
      Value           =   -1  'True
      Width           =   855
   End
   Begin VB.CommandButton cmdgain 
      Caption         =   "G+"
      Height          =   375
      Left            =   11520
      TabIndex        =   7
      Top             =   8520
      Width           =   615
   End
   Begin VB.PictureBox Picture3 
      BackColor       =   &H00404000&
      BorderStyle     =   0  'None
      FillColor       =   &H00FFFF00&
      ForeColor       =   &H00C0E0FF&
      Height          =   135
      Left            =   120
      ScaleHeight     =   135
      ScaleWidth      =   15015
      TabIndex        =   6
      Top             =   8280
      Width           =   15015
   End
   Begin VB.CommandButton cmdfr 
      Caption         =   "FR."
      Height          =   375
      Left            =   12240
      TabIndex        =   5
      Top             =   8520
      Width           =   615
   End
   Begin VB.PictureBox Picture2 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00000000&
      FillColor       =   &H00C0E0FF&
      ForeColor       =   &H00FFFFFF&
      Height          =   255
      Left            =   120
      ScaleHeight     =   195
      ScaleWidth      =   14955
      TabIndex        =   4
      Top             =   120
      Width           =   15015
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00404040&
      FillColor       =   &H00FFFF00&
      ForeColor       =   &H0000C000&
      Height          =   7935
      Left            =   120
      ScaleHeight     =   7875
      ScaleWidth      =   14955
      TabIndex        =   3
      Top             =   360
      Width           =   15015
   End
   Begin VB.CommandButton cmdqx 
      Caption         =   "列表"
      Height          =   375
      Left            =   12960
      TabIndex        =   2
      Top             =   8520
      Width           =   615
   End
   Begin VB.CommandButton cmdch 
      Caption         =   "CH+"
      Height          =   375
      Left            =   13680
      TabIndex        =   1
      Top             =   8520
      Width           =   615
   End
   Begin VB.CommandButton cmdend 
      Cancel          =   -1  'True
      Caption         =   "End"
      Height          =   375
      Left            =   14400
      TabIndex        =   0
      Top             =   8520
      Width           =   615
   End
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   8000
      Top             =   8000
   End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim doge, datp, i, j, kf, fcode, nn, hh, g, gd, fx As Integer
Dim dd1(81920) As Integer
Dim fr(10) As Integer
Dim y0, yd As Single
Dim mmch, mch, dispchn, wch, ch, fch, t11 As Integer
Dim i1 As Long

Dim husb As Long

Private Declare Function OpenUA300 Lib "ua300a.dll" () As Long
Private Declare Function CloseUA300 Lib "ua300a.dll" (ByVal Handle As Long) As Long
Private Declare Function ssad Lib "ua300a.dll" (ByVal Handle As Long, ByVal n1%, ByVal n2%) As Integer
Private Declare Sub ssinit Lib "ua300a.dll" (ByVal Handle As Long)
Private Declare Function GetVer Lib "ua300a.dll" (ByVal Handle As Long) As Byte
Private Declare Sub minitz Lib "ua300a.dll" (ByVal Handle As Long, ByVal n1%, ByVal n2%, ByVal n3%, ByVal n4%)
Private Declare Sub readdataz Lib "ua300a.dll" (ByVal Handle As Long, dd1 As Integer, ByVal n1%, ByVal leg As Long)
Private Declare Sub minit Lib "ua300a.dll" (ByVal Handle As Long, ByVal n1%, ByVal n2%, ByVal n3%)
Private Declare Sub readdata Lib "ua300a.dll" (ByVal Handle As Long, dd1 As Integer, ByVal n1%, ByVal leg As Long)


Private Sub cmdch_Click()
  If fx = 0 Then
     wch = wch + 2
     If mmch = 4 Then wch = wch + 2
     If wch = 32 Then wch = 0
     Picture2.Cls
     If mmch = 1 Then
       Picture2.Print " CHANNEL:"; wch; ","; wch + 1; "           WAVE DISPLAY", "        SAMP_Fr."; fr(kf) / 10 / 2; "KHz"; "/CH"
     Else
       Picture2.Print " CHANNEL:"; wch; ","; wch + 1; ","; wch + 2; ","; wch + 3; "  WAVE DISPLAY", "   SAMP_Fr."; fr(kf) / 10 / 4; "KHz"; "/CH"
     End If

  
  Else
     fch = fch + 6
     If fch > 31 Then fch = 0
     Picture2.Cls
     If fch = 0 Then
       Picture2.Print "   CH"; 0,
       Picture2.Print "   CH"; 1,
       Picture2.Print "   CH"; 2,
       Picture2.Print "   CH"; 3,
       Picture2.Print "   CH"; 4,
       Picture2.Print "   CH"; 5,
       Picture2.Print "   CH"; 6,
       Picture2.Print "   CH"; 7,
     End If
     
     If fch = 6 Then
       Picture2.Print "   CH"; 6,
       Picture2.Print "   CH"; 7,
       Picture2.Print "   CH"; 8,
       Picture2.Print "   CH"; 9,
       Picture2.Print "   CH"; 10,
       Picture2.Print "   CH"; 11,
       Picture2.Print "   CH"; 12,
       Picture2.Print "   CH"; 13,
     End If
     
     If fch = 12 Then
       Picture2.Print "   CH"; 12,
       Picture2.Print "   CH"; 13,
       Picture2.Print "   CH"; 14,
       Picture2.Print "   CH"; 15,
       Picture2.Print "   CH"; 16,
       Picture2.Print "   CH"; 17,
       Picture2.Print "   CH"; 18,
       Picture2.Print "   CH"; 19,
     End If
     
     If fch = 18 Then
       Picture2.Print "   CH"; 18,
       Picture2.Print "   CH"; 19,
       Picture2.Print "   CH"; 20,
       Picture2.Print "   CH"; 21,
       Picture2.Print "   CH"; 22,
       Picture2.Print "   CH"; 23,
       Picture2.Print "   CH"; 24,
       Picture2.Print "   CH"; 25,
     End If
     
     If fch = 24 Then
       Picture2.Print "   CH"; 24,
       Picture2.Print "   CH"; 25,
       Picture2.Print "   CH"; 26,
       Picture2.Print "   CH"; 27,
       Picture2.Print "   CH"; 28,
       Picture2.Print "   CH"; 29,
       Picture2.Print "   CH"; 30,
       Picture2.Print "   CH"; 31,
     End If
     
          
     
     Picture2.Print "   Gain"; gd
     
     nn = 0
  End If
     Picture1.Cls

End Sub

Private Sub cmdcls_Click()
End Sub

Private Sub cmdend_Click()
  
CloseUA300 (husb)
  
  End
End Sub

Private Sub cmdfr_Click()
    If fx = 0 Then
      kf = kf + 1
      If kf = 6 Then kf = 0
      fcode1 = 60000 / fr(kf)
      fcode = fcode1
 
      Picture2.Cls
      If mmch = 1 Then
        Picture2.Print " CHANNEL:"; wch; ","; wch + 1; "           WAVE DISPLAY", "        SAMP_Fr."; fr(kf) / 10 / 2; "KHz"; "/CH"
      Else
        Picture2.Print " CHANNEL:"; wch; ","; wch + 1; ","; wch + 2; ","; wch + 3; "  WAVE DISPLAY", "   SAMP_Fr."; fr(kf) / 10 / 4; "KHz"; "/CH"
      End If
    End If
End Sub

Private Sub cmdgain_Click()

   g = g + 1
   If g = 5 Then g = 0 '

   If g = 0 Then gd = 1
   If g = 1 Then gd = 2
   If g = 2 Then gd = 4
   If g = 3 Then gd = 8
   If g = 4 Then gd = 16
   If g = 5 Then gd = 32
   If g = 6 Then gd = 64
   If g = 7 Then gd = 128
        
   If fx = 1 Then
     
     Picture2.Cls
     If fch = 0 Then
       Picture2.Print "   CH"; 0,
       Picture2.Print "   CH"; 1,
       Picture2.Print "   CH"; 2,
       Picture2.Print "   CH"; 3,
       Picture2.Print "   CH"; 4,
       Picture2.Print "   CH"; 5,
       Picture2.Print "   CH"; 6,
       Picture2.Print "   CH"; 7,
     End If
     
     If fch = 6 Then
       Picture2.Print "   CH"; 6,
       Picture2.Print "   CH"; 7,
       Picture2.Print "   CH"; 8,
       Picture2.Print "   CH"; 9,
       Picture2.Print "   CH"; 10,
       Picture2.Print "   CH"; 11,
       Picture2.Print "   CH"; 12,
       Picture2.Print "   CH"; 13,
     End If
     
     If fch = 12 Then
       Picture2.Print "   CH"; 12,
       Picture2.Print "   CH"; 13,
       Picture2.Print "   CH"; 14,
       Picture2.Print "   CH"; 15,
       Picture2.Print "   CH"; 0,
       Picture2.Print "   CH"; 1,
       Picture2.Print "   CH"; 2,
       Picture2.Print "   CH"; 3,
     End If
     
     Picture2.Print "   Gain"; gd
   
 End If
End Sub

Private Sub cmdqx_Click()
  fx = (fx + 1) And 1
  If fx = 1 Then
    cmdqx.Caption = "曲线"
    cmdch.Caption = "FCH+"
    cmdfr.Enabled = False
    Picture1.AutoRedraw = True
    Picture1.Cls
    Picture1.AutoRedraw = False
    nn = 0: fch = 0
    Picture2.Cls
    'mysub1
    ssinit (husb)
    
    If fch = 0 Then
      Picture2.Print "   CH"; 0,
      Picture2.Print "   CH"; 1,
      Picture2.Print "   CH"; 2,
      Picture2.Print "   CH"; 3,
      Picture2.Print "   CH"; 4,
      Picture2.Print "   CH"; 5,
      Picture2.Print "   CH"; 6,
      Picture2.Print "   CH"; 7,
    End If
    
    If fch = 6 Then
      Picture2.Print "   CH"; 6,
      Picture2.Print "   CH"; 7,
      Picture2.Print "   CH"; 8,
      Picture2.Print "   CH"; 9,
      Picture2.Print "   CH"; 10,
      Picture2.Print "   CH"; 11,
      Picture2.Print "   CH"; 12,
      Picture2.Print "   CH"; 13,
    End If
    If fch = 12 Then
      Picture2.Print "   CH"; 12,
      Picture2.Print "   CH"; 13,
      Picture2.Print "   CH"; 14,
      Picture2.Print "   CH"; 15,
      Picture2.Print "   CH"; 0,
      Picture2.Print "   CH"; 1,
      Picture2.Print "   CH"; 2,
      Picture2.Print "   CH"; 3,
    End If
    Picture2.Print "   Gain="; gd
     
    
    Option1.Enabled = False
    Option2.Enabled = False

  Else
    Option1.Enabled = True
    Option2.Enabled = True
    
    minit husb, 2, 1, 0
        
    cmdqx.Caption = "列表"
    cmdch.Caption = "CH+"
    cmdfr.Enabled = True
'    Picture1.AutoRedraw = True
'    Picture1.Cls
    mysub1
    For i = 0 To 11
      For j = 0 To Picture1.ScaleWidth Step 45
        Picture1.PSet (j, 25 + i * (Picture1.ScaleHeight - 50) / 10), RGB(70, 150, 45)
      Next
    Next
    Picture1.Line (0, 25 + 5 * (Picture1.ScaleHeight - 50) / 10)-(Picture1.ScaleWidth, 25 + 5 * (Picture1.ScaleHeight - 50) / 10), RGB(70, 150, 45)

⌨️ 快捷键说明

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