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

📄 frmch4.frm

📁 用VB实现正弦波的采集和傅里叶变换。将时域信号变化为频域信号
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.1#0"; "COMDLG32.OCX"
Begin VB.Form FrmCh4 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00C0C0C0&
   Caption         =   "UA301 数据采集器 "
   ClientHeight    =   11010
   ClientLeft      =   60
   ClientTop       =   405
   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     =   11411.17
   ScaleMode       =   0  'User
   ScaleWidth      =   15360
   StartUpPosition =   2  'CenterScreen
   WindowState     =   2  'Maximized
   Begin VB.Timer Timer2 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   14640
      Top             =   7080
   End
   Begin MSComDlg.CommonDialog CmDialog1 
      Left            =   14280
      Top             =   6000
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   327680
      CancelError     =   -1  'True
      Filter          =   "数据文件|*.dat"
   End
   Begin VB.PictureBox PicTime 
      Appearance      =   0  'Flat
      AutoRedraw      =   -1  'True
      BackColor       =   &H00404040&
      BorderStyle     =   0  'None
      ForeColor       =   &H0000FFFF&
      Height          =   375
      Left            =   120
      ScaleHeight     =   375
      ScaleWidth      =   13935
      TabIndex        =   13
      Top             =   10200
      Width           =   13935
   End
   Begin VB.CommandButton CmdGM 
      Caption         =   "放大-"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   12
      Top             =   3360
      Width           =   855
   End
   Begin VB.PictureBox PicAmp 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00404040&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "Times New Roman"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   9735
      Left            =   120
      ScaleHeight     =   9735
      ScaleWidth      =   735
      TabIndex        =   11
      Top             =   480
      Width           =   735
   End
   Begin VB.CommandButton CmdFP 
      Caption         =   "频率+"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   10
      Top             =   5280
      Width           =   855
   End
   Begin VB.CommandButton CmdRead 
      Caption         =   "回读"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   8
      Top             =   8040
      Width           =   855
   End
   Begin VB.CommandButton CmdSave 
      Caption         =   "保存"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   7
      Top             =   9000
      Width           =   855
   End
   Begin VB.CommandButton CmdfM 
      Caption         =   "频率-"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   6
      Top             =   4560
      Width           =   855
   End
   Begin VB.PictureBox Pic 
      AutoRedraw      =   -1  'True
      BackColor       =   &H00404040&
      BorderStyle     =   0  'None
      ForeColor       =   &H0000C000&
      Height          =   9735
      Left            =   840
      ScaleHeight     =   9735
      ScaleWidth      =   13215
      TabIndex        =   5
      Top             =   482
      Width           =   13215
   End
   Begin VB.OptionButton OptList 
      Caption         =   "列表"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   14280
      TabIndex        =   4
      Top             =   840
      Width           =   855
   End
   Begin VB.OptionButton OptCurve 
      Caption         =   "波形"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   14280
      TabIndex        =   3
      Top             =   360
      Value           =   -1  'True
      Width           =   855
   End
   Begin VB.CommandButton cmdSample 
      Caption         =   "采样"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   2
      Top             =   1560
      Width           =   855
   End
   Begin VB.CommandButton cmdGp 
      Caption         =   "放大+"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   1
      Top             =   2760
      Width           =   855
   End
   Begin VB.CommandButton CmdEnd 
      Cancel          =   -1  'True
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   14280
      TabIndex        =   0
      Top             =   9960
      Width           =   855
   End
   Begin VB.Timer TimerSample 
      Enabled         =   0   'False
      Interval        =   10
      Left            =   14160
      Top             =   7080
   End
   Begin VB.Label LblFreq 
      Height          =   255
      Left            =   6720
      TabIndex        =   9
      Top             =   120
      Width           =   1815
   End
End
Attribute VB_Name = "FrmCh4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim dd1(40960)     As Integer         '采样结果存放
Private fr(10)     As Integer         '采样频率数组
Private fcode      As Integer         '频率码
Private kf         As Integer         '采样频率号
Private ndraw      As Integer         '显示点数
Private gain       As Integer         '程控放大倍数
Private CurveFlag  As Boolean         '曲线标志
Private Irms(4) As Single, Ikurt(4) As Single

Private Sub CmdEnd_Click()
  

⌨️ 快捷键说明

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