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

📄 aitester.vb

📁 使用研华DAQ和VB.net实现研华数据采集卡的多种功能.包括数据输入输出。内含多个源码
💻 VB
📖 第 1 页 / 共 5 页
字号:
Public Class Form1
    Inherits System.Windows.Forms.Form
    Dim bRet As Boolean
    Dim IsInitializing As Boolean

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        IsInitializing = True
        InitializeComponent()
        IsInitializing = False

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Public WithEvents ErrorTimer As System.Windows.Forms.Timer
    Public WithEvents Frame4 As System.Windows.Forms.GroupBox
    Public WithEvents ErrorFrame As System.Windows.Forms.GroupBox
    Public WithEvents txtErrorMessage As System.Windows.Forms.TextBox
    Public WithEvents txtErrorCode As System.Windows.Forms.TextBox
    Public WithEvents Label14 As System.Windows.Forms.Label
    Public WithEvents Label13 As System.Windows.Forms.Label
    Public WithEvents cmdStopAutoGet As System.Windows.Forms.Button
    Public WithEvents cmdAutoGet As System.Windows.Forms.Button
    Public WithEvents txtStatus As System.Windows.Forms.TextBox
    Public WithEvents cmdStatus As System.Windows.Forms.Button
    Public WithEvents lstReading As System.Windows.Forms.ListBox
    Public WithEvents cmdAcquireStart As System.Windows.Forms.Button
    Public WithEvents cmdAcquireStop As System.Windows.Forms.Button
    Public WithEvents Label10 As System.Windows.Forms.Label
    Public WithEvents cmdExit As System.Windows.Forms.Button
    Public WithEvents Frame1 As System.Windows.Forms.GroupBox
    Public WithEvents cmdSelectDevice As System.Windows.Forms.Button
    Public WithEvents txtDeviceName As System.Windows.Forms.TextBox
    Public WithEvents txtDeviceNum As System.Windows.Forms.TextBox
    Public WithEvents Label2 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    Public WithEvents chou2121 As System.Windows.Forms.GroupBox
    Public WithEvents cmbNumofChannels As System.Windows.Forms.ComboBox
    Public WithEvents txtFifoSize As System.Windows.Forms.TextBox
    Public WithEvents CyclicMode As System.Windows.Forms.CheckBox
    Public WithEvents cmbClockSource As System.Windows.Forms.ComboBox
    Public WithEvents cmbTriggerSource As System.Windows.Forms.ComboBox
    Public WithEvents chkEventEnabled As System.Windows.Forms.CheckBox
    Public WithEvents chkOverAllGain As System.Windows.Forms.CheckBox
    Public WithEvents cmdGainList As System.Windows.Forms.Button
    Public WithEvents txtNumOfSample As System.Windows.Forms.TextBox
    Public WithEvents chkFIFOEnabled As System.Windows.Forms.CheckBox
    Public WithEvents cmbStartChannel As System.Windows.Forms.ComboBox
    Public WithEvents cmbTransferMode As System.Windows.Forms.ComboBox
    Public WithEvents txtSampleRate As System.Windows.Forms.TextBox
    Public WithEvents cmbDataType As System.Windows.Forms.ComboBox
    Public WithEvents cmbInputRange As System.Windows.Forms.ComboBox
    Public WithEvents Label12 As System.Windows.Forms.Label
    Public WithEvents Label11 As System.Windows.Forms.Label
    Public WithEvents Label9 As System.Windows.Forms.Label
    Public WithEvents Label24 As System.Windows.Forms.Label
    Public WithEvents Label19 As System.Windows.Forms.Label
    Public WithEvents Label16 As System.Windows.Forms.Label
    Public WithEvents Label8 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label4 As System.Windows.Forms.Label
    Public WithEvents Label3 As System.Windows.Forms.Label
    Public WithEvents ScanTimer As System.Windows.Forms.Timer
    Public WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Friend WithEvents DAQAI1 As AxDAQAILib.AxDAQAI


    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
        Me.ErrorTimer = New System.Windows.Forms.Timer(Me.components)
        Me.Frame4 = New System.Windows.Forms.GroupBox
        Me.ErrorFrame = New System.Windows.Forms.GroupBox
        Me.txtErrorMessage = New System.Windows.Forms.TextBox
        Me.txtErrorCode = New System.Windows.Forms.TextBox
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label13 = New System.Windows.Forms.Label
        Me.cmdStopAutoGet = New System.Windows.Forms.Button
        Me.cmdAutoGet = New System.Windows.Forms.Button
        Me.txtStatus = New System.Windows.Forms.TextBox
        Me.cmdStatus = New System.Windows.Forms.Button
        Me.lstReading = New System.Windows.Forms.ListBox
        Me.cmdAcquireStart = New System.Windows.Forms.Button
        Me.cmdAcquireStop = New System.Windows.Forms.Button
        Me.Label10 = New System.Windows.Forms.Label
        Me.cmdExit = New System.Windows.Forms.Button
        Me.Frame1 = New System.Windows.Forms.GroupBox
        Me.cmdSelectDevice = New System.Windows.Forms.Button
        Me.txtDeviceName = New System.Windows.Forms.TextBox
        Me.txtDeviceNum = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.chou2121 = New System.Windows.Forms.GroupBox
        Me.cmbNumofChannels = New System.Windows.Forms.ComboBox
        Me.txtFifoSize = New System.Windows.Forms.TextBox
        Me.CyclicMode = New System.Windows.Forms.CheckBox
        Me.cmbClockSource = New System.Windows.Forms.ComboBox
        Me.cmbTriggerSource = New System.Windows.Forms.ComboBox
        Me.chkEventEnabled = New System.Windows.Forms.CheckBox
        Me.chkOverAllGain = New System.Windows.Forms.CheckBox
        Me.cmdGainList = New System.Windows.Forms.Button
        Me.txtNumOfSample = New System.Windows.Forms.TextBox
        Me.chkFIFOEnabled = New System.Windows.Forms.CheckBox
        Me.cmbStartChannel = New System.Windows.Forms.ComboBox
        Me.cmbTransferMode = New System.Windows.Forms.ComboBox
        Me.txtSampleRate = New System.Windows.Forms.TextBox
        Me.cmbDataType = New System.Windows.Forms.ComboBox
        Me.cmbInputRange = New System.Windows.Forms.ComboBox
        Me.Label12 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label24 = New System.Windows.Forms.Label
        Me.Label19 = New System.Windows.Forms.Label
        Me.Label16 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.ScanTimer = New System.Windows.Forms.Timer(Me.components)
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.DAQAI1 = New AxDAQAILib.AxDAQAI
        Me.Frame4.SuspendLayout()
        Me.ErrorFrame.SuspendLayout()
        Me.Frame1.SuspendLayout()
        Me.chou2121.SuspendLayout()
        CType(Me.DAQAI1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'ErrorTimer
        '
        Me.ErrorTimer.Enabled = True
        Me.ErrorTimer.Interval = 1000
        '
        'Frame4
        '
        Me.Frame4.BackColor = System.Drawing.SystemColors.Control
        Me.Frame4.Controls.Add(Me.ErrorFrame)
        Me.Frame4.Controls.Add(Me.cmdStopAutoGet)
        Me.Frame4.Controls.Add(Me.cmdAutoGet)
        Me.Frame4.Controls.Add(Me.txtStatus)
        Me.Frame4.Controls.Add(Me.cmdStatus)
        Me.Frame4.Controls.Add(Me.lstReading)
        Me.Frame4.Controls.Add(Me.cmdAcquireStart)
        Me.Frame4.Controls.Add(Me.cmdAcquireStop)
        Me.Frame4.Controls.Add(Me.Label10)
        Me.Frame4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame4.Location = New System.Drawing.Point(222, 84)
        Me.Frame4.Name = "Frame4"
        Me.Frame4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame4.Size = New System.Drawing.Size(194, 335)
        Me.Frame4.TabIndex = 21
        Me.Frame4.TabStop = False
        Me.Frame4.Text = "Acquire Read:"
        '
        'ErrorFrame
        '
        Me.ErrorFrame.BackColor = System.Drawing.SystemColors.Control
        Me.ErrorFrame.Controls.Add(Me.txtErrorMessage)
        Me.ErrorFrame.Controls.Add(Me.txtErrorCode)
        Me.ErrorFrame.Controls.Add(Me.Label14)
        Me.ErrorFrame.Controls.Add(Me.Label13)
        Me.ErrorFrame.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.ErrorFrame.ForeColor = System.Drawing.SystemColors.ControlText
        Me.ErrorFrame.Location = New System.Drawing.Point(13, 260)
        Me.ErrorFrame.Name = "ErrorFrame"
        Me.ErrorFrame.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.ErrorFrame.Size = New System.Drawing.Size(171, 68)
        Me.ErrorFrame.TabIndex = 33
        Me.ErrorFrame.TabStop = False
        Me.ErrorFrame.Text = "Eroor Message"
        '
        'txtErrorMessage
        '
        Me.txtErrorMessage.AcceptsReturn = True
        Me.txtErrorMessage.AutoSize = False
        Me.txtErrorMessage.BackColor = System.Drawing.SystemColors.Window
        Me.txtErrorMessage.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtErrorMessage.Enabled = False
        Me.txtErrorMessage.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtErrorMessage.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtErrorMessage.Location = New System.Drawing.Point(62, 37)
        Me.txtErrorMessage.MaxLength = 0
        Me.txtErrorMessage.Name = "txtErrorMessage"
        Me.txtErrorMessage.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtErrorMessage.Size = New System.Drawing.Size(99, 18)
        Me.txtErrorMessage.TabIndex = 37
        Me.txtErrorMessage.Text = ""
        '
        'txtErrorCode
        '
        Me.txtErrorCode.AcceptsReturn = True
        Me.txtErrorCode.AutoSize = False
        Me.txtErrorCode.BackColor = System.Drawing.SystemColors.Window
        Me.txtErrorCode.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtErrorCode.Enabled = False
        Me.txtErrorCode.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtErrorCode.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtErrorCode.Location = New System.Drawing.Point(92, 15)
        Me.txtErrorCode.MaxLength = 0
        Me.txtErrorCode.Name = "txtErrorCode"
        Me.txtErrorCode.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtErrorCode.Size = New System.Drawing.Size(70, 17)
        Me.txtErrorCode.TabIndex = 36
        Me.txtErrorCode.Text = ""
        '
        'Label14
        '
        Me.Label14.BackColor = System.Drawing.SystemColors.Control
        Me.Label14.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label14.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label14.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label14.Location = New System.Drawing.Point(7, 37)
        Me.Label14.Name = "Label14"
        Me.Label14.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label14.Size = New System.Drawing.Size(49, 16)
        Me.Label14.TabIndex = 35
        Me.Label14.Text = "Message :"
        '
        'Label13
        '
        Me.Label13.BackColor = System.Drawing.SystemColors.Control
        Me.Label13.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label13.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label13.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label13.Location = New System.Drawing.Point(7, 15)
        Me.Label13.Name = "Label13"
        Me.Label13.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label13.Size = New System.Drawing.Size(73, 16)
        Me.Label13.TabIndex = 34
        Me.Label13.Text = "Error Code:"
        '
        'cmdStopAutoGet
        '
        Me.cmdStopAutoGet.BackColor = System.Drawing.SystemColors.Control
        Me.cmdStopAutoGet.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdStopAutoGet.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.cmdStopAutoGet.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdStopAutoGet.Location = New System.Drawing.Point(107, 45)
        Me.cmdStopAutoGet.Name = "cmdStopAutoGet"
        Me.cmdStopAutoGet.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdStopAutoGet.Size = New System.Drawing.Size(77, 23)
        Me.cmdStopAutoGet.TabIndex = 32
        Me.cmdStopAutoGet.Text = "Stop Getting"
        '
        'cmdAutoGet
        '
        Me.cmdAutoGet.BackColor = System.Drawing.SystemColors.Control

⌨️ 快捷键说明

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