Option Strict Off
Option Explicit On
Friend Class Form1
	Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
	Public Sub New()
		MyBase.New()
		If m_vb6FormDefInstance Is Nothing Then
			If m_InitializingDefInstance Then
				m_vb6FormDefInstance = Me
			Else
				Try 
					'For the start-up form, the first instance created is the default instance.
					If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
						m_vb6FormDefInstance = Me
					End If
				Catch
				End Try
			End If
		End If
		'This call is required by the Windows Form Designer.
		InitializeComponent()
	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
	Public ToolTip1 As System.Windows.Forms.ToolTip
    Public WithEvents _Option7_3 As System.Windows.Forms.RadioButton
	Public WithEvents _Option7_2 As System.Windows.Forms.RadioButton
	Public WithEvents _Option7_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Option7_0 As System.Windows.Forms.RadioButton
	Public WithEvents Frame15 As System.Windows.Forms.GroupBox
	Public WithEvents Text7 As System.Windows.Forms.TextBox
	Public WithEvents Slider5 As AxMSComctlLib.AxSlider
	Public WithEvents Text6 As System.Windows.Forms.TextBox
	Public WithEvents Slider4 As AxMSComctlLib.AxSlider
	Public WithEvents Label4 As System.Windows.Forms.Label
	Public WithEvents Label3 As System.Windows.Forms.Label
	Public WithEvents Frame14 As System.Windows.Forms.GroupBox
	Public WithEvents Command5 As System.Windows.Forms.Button
	Public WithEvents Command4 As System.Windows.Forms.Button
	Public WithEvents Command3 As System.Windows.Forms.Button
	Public WithEvents Frame13 As System.Windows.Forms.GroupBox
	Public WithEvents Text2 As System.Windows.Forms.TextBox
	Public WithEvents Text1 As System.Windows.Forms.TextBox
	Public WithEvents Frame12 As System.Windows.Forms.GroupBox
	Public WithEvents Timer1 As System.Windows.Forms.Timer
    Public WithEvents _Option6_3 As System.Windows.Forms.RadioButton
	Public WithEvents _Option6_2 As System.Windows.Forms.RadioButton
	Public WithEvents _Option6_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Option6_0 As System.Windows.Forms.RadioButton
	Public WithEvents Frame11 As System.Windows.Forms.GroupBox
	Public WithEvents Text5 As System.Windows.Forms.TextBox
	Public WithEvents Slider3 As AxMSComctlLib.AxSlider
	Public WithEvents Frame10 As System.Windows.Forms.GroupBox
	Public WithEvents Command2 As System.Windows.Forms.Button
	Public WithEvents Text4 As System.Windows.Forms.TextBox
	Public WithEvents Slider2 As AxMSComctlLib.AxSlider
	Public WithEvents Label2 As System.Windows.Forms.Label
	Public WithEvents Frame9 As System.Windows.Forms.GroupBox
	Public WithEvents Command1 As System.Windows.Forms.Button
	Public WithEvents Text3 As System.Windows.Forms.TextBox
	Public WithEvents Slider1 As AxMSComctlLib.AxSlider
	Public WithEvents Label1 As System.Windows.Forms.Label
	Public WithEvents Frame8 As System.Windows.Forms.GroupBox
	Public WithEvents _Option5_2 As System.Windows.Forms.RadioButton
	Public WithEvents _Option5_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Option5_0 As System.Windows.Forms.RadioButton
	Public WithEvents Frame7 As System.Windows.Forms.GroupBox
	Public WithEvents Frame6 As System.Windows.Forms.GroupBox
	Public WithEvents _Option4_5 As System.Windows.Forms.RadioButton
	Public WithEvents _Option4_4 As System.Windows.Forms.RadioButton
	Public WithEvents _Option4_3 As System.Windows.Forms.RadioButton
	Public WithEvents _Option4_2 As System.Windows.Forms.RadioButton
	Public WithEvents _Option4_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Option4_0 As System.Windows.Forms.RadioButton
	Public WithEvents Frame5 As System.Windows.Forms.GroupBox
	Public WithEvents _Option3_0 As System.Windows.Forms.RadioButton
	Public WithEvents _Option3_1 As System.Windows.Forms.RadioButton
	Public WithEvents _Option3_2 As System.Windows.Forms.RadioButton
	Public WithEvents Frame3 As System.Windows.Forms.GroupBox
	Public WithEvents _Option2_0 As System.Windows.Forms.RadioButton
	Public WithEvents _Option2_1 As System.Windows.Forms.RadioButton
	Public WithEvents Frame2 As System.Windows.Forms.GroupBox
	Public WithEvents _Option1_0 As System.Windows.Forms.RadioButton
	Public WithEvents _Option1_1 As System.Windows.Forms.RadioButton
	Public WithEvents Frame1 As System.Windows.Forms.GroupBox
	Public WithEvents Frame4 As System.Windows.Forms.GroupBox
	Public WithEvents Option1 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option2 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option3 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option4 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option5 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option6 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	Public WithEvents Option7 As Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray
	'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.
    Friend WithEvents DiBoardState As System.Windows.Forms.CheckBox
    Friend WithEvents WaveformDisplay As System.Windows.Forms.PictureBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    <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.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.Frame15 = New System.Windows.Forms.GroupBox
        Me._Option7_3 = New System.Windows.Forms.RadioButton
        Me._Option7_2 = New System.Windows.Forms.RadioButton
        Me._Option7_1 = New System.Windows.Forms.RadioButton
        Me._Option7_0 = New System.Windows.Forms.RadioButton
        Me.Frame14 = New System.Windows.Forms.GroupBox
        Me.Text7 = New System.Windows.Forms.TextBox
        Me.Slider5 = New AxMSComctlLib.AxSlider
        Me.Text6 = New System.Windows.Forms.TextBox
        Me.Slider4 = New AxMSComctlLib.AxSlider
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Frame13 = New System.Windows.Forms.GroupBox
        Me.Command5 = New System.Windows.Forms.Button
        Me.Command4 = New System.Windows.Forms.Button
        Me.Command3 = New System.Windows.Forms.Button
        Me.Frame12 = New System.Windows.Forms.GroupBox
        Me.Text2 = New System.Windows.Forms.TextBox
        Me.Text1 = New System.Windows.Forms.TextBox
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.Frame6 = New System.Windows.Forms.GroupBox
        Me.Frame11 = New System.Windows.Forms.GroupBox
        Me._Option6_3 = New System.Windows.Forms.RadioButton
        Me._Option6_2 = New System.Windows.Forms.RadioButton
        Me._Option6_1 = New System.Windows.Forms.RadioButton
        Me._Option6_0 = New System.Windows.Forms.RadioButton
        Me.Frame10 = New System.Windows.Forms.GroupBox
        Me.Text5 = New System.Windows.Forms.TextBox
        Me.Slider3 = New AxMSComctlLib.AxSlider
        Me.Command2 = New System.Windows.Forms.Button
        Me.Frame9 = New System.Windows.Forms.GroupBox
        Me.Text4 = New System.Windows.Forms.TextBox
        Me.Slider2 = New AxMSComctlLib.AxSlider
        Me.Label2 = New System.Windows.Forms.Label
        Me.Command1 = New System.Windows.Forms.Button
        Me.Frame8 = New System.Windows.Forms.GroupBox
        Me.Text3 = New System.Windows.Forms.TextBox
        Me.Slider1 = New AxMSComctlLib.AxSlider
        Me.Label1 = New System.Windows.Forms.Label
        Me.Frame7 = New System.Windows.Forms.GroupBox
        Me._Option5_2 = New System.Windows.Forms.RadioButton
        Me._Option5_1 = New System.Windows.Forms.RadioButton
        Me._Option5_0 = New System.Windows.Forms.RadioButton
        Me.Frame4 = New System.Windows.Forms.GroupBox
        Me.Frame5 = New System.Windows.Forms.GroupBox
        Me._Option4_5 = New System.Windows.Forms.RadioButton
        Me._Option4_4 = New System.Windows.Forms.RadioButton
        Me._Option4_3 = New System.Windows.Forms.RadioButton
        Me._Option4_2 = New System.Windows.Forms.RadioButton
        Me._Option4_1 = New System.Windows.Forms.RadioButton
        Me._Option4_0 = New System.Windows.Forms.RadioButton
        Me.Frame3 = New System.Windows.Forms.GroupBox
        Me._Option3_0 = New System.Windows.Forms.RadioButton
        Me._Option3_1 = New System.Windows.Forms.RadioButton
        Me._Option3_2 = New System.Windows.Forms.RadioButton
        Me.Frame2 = New System.Windows.Forms.GroupBox
        Me._Option2_0 = New System.Windows.Forms.RadioButton
        Me._Option2_1 = New System.Windows.Forms.RadioButton
        Me.Frame1 = New System.Windows.Forms.GroupBox
        Me._Option1_0 = New System.Windows.Forms.RadioButton
        Me._Option1_1 = New System.Windows.Forms.RadioButton
        Me.Option1 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option2 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option3 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option4 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option5 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option6 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.Option7 = New Microsoft.VisualBasic.Compatibility.VB6.RadioButtonArray(Me.components)
        Me.DiBoardState = New System.Windows.Forms.CheckBox
        Me.WaveformDisplay = New System.Windows.Forms.PictureBox
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.Frame15.SuspendLayout()
        Me.Frame14.SuspendLayout()
        CType(Me.Slider5, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Slider4, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.Frame13.SuspendLayout()
        Me.Frame12.SuspendLayout()
        Me.Frame6.SuspendLayout()
        Me.Frame11.SuspendLayout()
        Me.Frame10.SuspendLayout()
        CType(Me.Slider3, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.Frame9.SuspendLayout()
        CType(Me.Slider2, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.Frame8.SuspendLayout()
        CType(Me.Slider1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.Frame7.SuspendLayout()
        Me.Frame4.SuspendLayout()
        Me.Frame5.SuspendLayout()
        Me.Frame3.SuspendLayout()
        Me.Frame2.SuspendLayout()
        Me.Frame1.SuspendLayout()
        CType(Me.Option1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option2, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option3, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option4, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option5, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option6, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Option7, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox1.SuspendLayout()
        Me.SuspendLayout()
        '
        'Frame15
        '
        Me.Frame15.BackColor = System.Drawing.SystemColors.Control
        Me.Frame15.Controls.Add(Me._Option7_3)
        Me.Frame15.Controls.Add(Me._Option7_2)
        Me.Frame15.Controls.Add(Me._Option7_1)
        Me.Frame15.Controls.Add(Me._Option7_0)
        Me.Frame15.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame15.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame15.Location = New System.Drawing.Point(608, 136)
        Me.Frame15.Name = "Frame15"
        Me.Frame15.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame15.Size = New System.Drawing.Size(73, 121)
        Me.Frame15.TabIndex = 54
        Me.Frame15.TabStop = False
        Me.Frame15.Text = "Aperture"
        '
        '_Option7_3
        '
        Me._Option7_3.BackColor = System.Drawing.SystemColors.Control
        Me._Option7_3.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option7_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option7_3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option7.SetIndex(Me._Option7_3, CType(3, Short))
        Me._Option7_3.Location = New System.Drawing.Point(8, 96)
        Me._Option7_3.Name = "_Option7_3"
        Me._Option7_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option7_3.Size = New System.Drawing.Size(41, 17)
        Me._Option7_3.TabIndex = 58
        Me._Option7_3.TabStop = True
        Me._Option7_3.Text = "32"
        '
        '_Option7_2
        '
        Me._Option7_2.BackColor = System.Drawing.SystemColors.Control
        Me._Option7_2.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option7_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option7_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option7.SetIndex(Me._Option7_2, CType(2, Short))
        Me._Option7_2.Location = New System.Drawing.Point(8, 72)
        Me._Option7_2.Name = "_Option7_2"
        Me._Option7_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option7_2.Size = New System.Drawing.Size(41, 17)
        Me._Option7_2.TabIndex = 57
        Me._Option7_2.TabStop = True
        Me._Option7_2.Text = "24"
        '
        '_Option7_1
        '
        Me._Option7_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option7_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option7_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option7_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option7.SetIndex(Me._Option7_1, CType(1, Short))
        Me._Option7_1.Location = New System.Drawing.Point(8, 48)
        Me._Option7_1.Name = "_Option7_1"
        Me._Option7_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option7_1.Size = New System.Drawing.Size(41, 17)
        Me._Option7_1.TabIndex = 56
        Me._Option7_1.TabStop = True
        Me._Option7_1.Text = "16"
        '
        '_Option7_0
        '
        Me._Option7_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option7_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option7_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option7_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option7.SetIndex(Me._Option7_0, CType(0, Short))
        Me._Option7_0.Location = New System.Drawing.Point(8, 24)
        Me._Option7_0.Name = "_Option7_0"
        Me._Option7_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option7_0.Size = New System.Drawing.Size(33, 17)
        Me._Option7_0.TabIndex = 55
        Me._Option7_0.TabStop = True
        Me._Option7_0.Text = "8"
        '
        'Frame14
        '
        Me.Frame14.BackColor = System.Drawing.SystemColors.Control
        Me.Frame14.Controls.Add(Me.Text7)
        Me.Frame14.Controls.Add(Me.Slider5)
        Me.Frame14.Controls.Add(Me.Text6)
        Me.Frame14.Controls.Add(Me.Slider4)
        Me.Frame14.Controls.Add(Me.Label4)
        Me.Frame14.Controls.Add(Me.Label3)
        Me.Frame14.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame14.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame14.Location = New System.Drawing.Point(688, 136)
        Me.Frame14.Name = "Frame14"
        Me.Frame14.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame14.Size = New System.Drawing.Size(233, 177)
        Me.Frame14.TabIndex = 49
        Me.Frame14.TabStop = False
        Me.Frame14.Text = "Pulse Generator"
        '
        'Text7
        '
        Me.Text7.AcceptsReturn = True
        Me.Text7.AutoSize = False
        Me.Text7.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text7.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text7.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text7.Location = New System.Drawing.Point(144, 104)
        Me.Text7.MaxLength = 0
        Me.Text7.Name = "Text7"
        Me.Text7.ReadOnly = True
        Me.Text7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text7.Size = New System.Drawing.Size(73, 19)
        Me.Text7.TabIndex = 53
        Me.Text7.Text = "Text7"
        '
        'Slider5
        '
        Me.Slider5.ContainingControl = Me
        Me.Slider5.Location = New System.Drawing.Point(8, 128)
        Me.Slider5.Name = "Slider5"
        Me.Slider5.OcxState = CType(resources.GetObject("Slider5.OcxState"), System.Windows.Forms.AxHost.State)
        Me.Slider5.Size = New System.Drawing.Size(209, 41)
        Me.Slider5.TabIndex = 52
        '
        'Text6
        '
        Me.Text6.AcceptsReturn = True
        Me.Text6.AutoSize = False
        Me.Text6.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text6.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text6.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text6.Location = New System.Drawing.Point(136, 32)
        Me.Text6.MaxLength = 0
        Me.Text6.Name = "Text6"
        Me.Text6.ReadOnly = True
        Me.Text6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text6.Size = New System.Drawing.Size(81, 19)
        Me.Text6.TabIndex = 51
        Me.Text6.Text = "Text6"
        '
        'Slider4
        '
        Me.Slider4.ContainingControl = Me
        Me.Slider4.Location = New System.Drawing.Point(8, 56)
        Me.Slider4.Name = "Slider4"
        Me.Slider4.OcxState = CType(resources.GetObject("Slider4.OcxState"), System.Windows.Forms.AxHost.State)
        Me.Slider4.Size = New System.Drawing.Size(209, 41)
        Me.Slider4.TabIndex = 50
        '
        'Label4
        '
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(56, 104)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(65, 17)
        Me.Label4.TabIndex = 60
        Me.Label4.Text = "Rep Rate"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(56, 32)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(73, 17)
        Me.Label3.TabIndex = 59
        Me.Label3.Text = "Pulse Width"
        '
        'Frame13
        '
        Me.Frame13.BackColor = System.Drawing.SystemColors.Control
        Me.Frame13.Controls.Add(Me.Command5)
        Me.Frame13.Controls.Add(Me.Command4)
        Me.Frame13.Controls.Add(Me.Command3)
        Me.Frame13.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame13.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame13.Location = New System.Drawing.Point(608, 8)
        Me.Frame13.Name = "Frame13"
        Me.Frame13.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame13.Size = New System.Drawing.Size(105, 121)
        Me.Frame13.TabIndex = 45
        Me.Frame13.TabStop = False
        Me.Frame13.Text = "TCG Outputs"
        '
        'Command5
        '
        Me.Command5.BackColor = System.Drawing.SystemColors.Control
        Me.Command5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Command5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Command5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Command5.Location = New System.Drawing.Point(56, 24)
        Me.Command5.Name = "Command5"
        Me.Command5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Command5.Size = New System.Drawing.Size(41, 33)
        Me.Command5.TabIndex = 48
        Me.Command5.Text = "Ramp"
        '
        'Command4
        '
        Me.Command4.BackColor = System.Drawing.SystemColors.Control
        Me.Command4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Command4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Command4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Command4.Location = New System.Drawing.Point(8, 64)
        Me.Command4.Name = "Command4"
        Me.Command4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Command4.Size = New System.Drawing.Size(41, 33)
        Me.Command4.TabIndex = 47
        Me.Command4.Text = "Zero"
        '
        'Command3
        '
        Me.Command3.BackColor = System.Drawing.SystemColors.Control
        Me.Command3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Command3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Command3.Location = New System.Drawing.Point(8, 24)
        Me.Command3.Name = "Command3"
        Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Command3.Size = New System.Drawing.Size(41, 33)
        Me.Command3.TabIndex = 46
        Me.Command3.Text = "FS"
        '
        'Frame12
        '
        Me.Frame12.BackColor = System.Drawing.SystemColors.Control
        Me.Frame12.Controls.Add(Me.Text2)
        Me.Frame12.Controls.Add(Me.Text1)
        Me.Frame12.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame12.Location = New System.Drawing.Point(384, 8)
        Me.Frame12.Name = "Frame12"
        Me.Frame12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame12.Size = New System.Drawing.Size(217, 121)
        Me.Frame12.TabIndex = 42
        Me.Frame12.TabStop = False
        Me.Frame12.Text = "Status"
        '
        'Text2
        '
        Me.Text2.AcceptsReturn = True
        Me.Text2.AutoSize = False
        Me.Text2.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text2.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text2.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text2.Location = New System.Drawing.Point(16, 80)
        Me.Text2.MaxLength = 0
        Me.Text2.Name = "Text2"
        Me.Text2.ReadOnly = True
        Me.Text2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text2.Size = New System.Drawing.Size(185, 25)
        Me.Text2.TabIndex = 44
        Me.Text2.Text = "Text2"
        '
        'Text1
        '
        Me.Text1.AcceptsReturn = True
        Me.Text1.AutoSize = False
        Me.Text1.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text1.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text1.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text1.Location = New System.Drawing.Point(16, 32)
        Me.Text1.MaxLength = 0
        Me.Text1.Name = "Text1"
        Me.Text1.ReadOnly = True
        Me.Text1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text1.Size = New System.Drawing.Size(185, 25)
        Me.Text1.TabIndex = 43
        Me.Text1.Text = "Text1"
        '
        'Timer1
        '
        Me.Timer1.Enabled = True
        Me.Timer1.Interval = 50
        '
        'Frame6
        '
        Me.Frame6.BackColor = System.Drawing.SystemColors.Control
        Me.Frame6.Controls.Add(Me.Frame11)
        Me.Frame6.Controls.Add(Me.Frame10)
        Me.Frame6.Controls.Add(Me.Command2)
        Me.Frame6.Controls.Add(Me.Frame9)
        Me.Frame6.Controls.Add(Me.Command1)
        Me.Frame6.Controls.Add(Me.Frame8)
        Me.Frame6.Controls.Add(Me.Frame7)
        Me.Frame6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame6.Location = New System.Drawing.Point(8, 136)
        Me.Frame6.Name = "Frame6"
        Me.Frame6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame6.Size = New System.Drawing.Size(593, 241)
        Me.Frame6.TabIndex = 18
        Me.Frame6.TabStop = False
        Me.Frame6.Text = "Sampling"
        '
        'Frame11
        '
        Me.Frame11.BackColor = System.Drawing.SystemColors.Control
        Me.Frame11.Controls.Add(Me._Option6_3)
        Me.Frame11.Controls.Add(Me._Option6_2)
        Me.Frame11.Controls.Add(Me._Option6_1)
        Me.Frame11.Controls.Add(Me._Option6_0)
        Me.Frame11.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame11.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame11.Location = New System.Drawing.Point(8, 120)
        Me.Frame11.Name = "Frame11"
        Me.Frame11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame11.Size = New System.Drawing.Size(97, 113)
        Me.Frame11.TabIndex = 37
        Me.Frame11.TabStop = False
        Me.Frame11.Text = "Rectification"
        '
        '_Option6_3
        '
        Me._Option6_3.BackColor = System.Drawing.SystemColors.Control
        Me._Option6_3.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option6_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option6_3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option6.SetIndex(Me._Option6_3, CType(3, Short))
        Me._Option6_3.Location = New System.Drawing.Point(8, 88)
        Me._Option6_3.Name = "_Option6_3"
        Me._Option6_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option6_3.Size = New System.Drawing.Size(81, 17)
        Me._Option6_3.TabIndex = 41
        Me._Option6_3.TabStop = True
        Me._Option6_3.Text = "- Half Wave"
        '
        '_Option6_2
        '
        Me._Option6_2.BackColor = System.Drawing.SystemColors.Control
        Me._Option6_2.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option6_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option6_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option6.SetIndex(Me._Option6_2, CType(2, Short))
        Me._Option6_2.Location = New System.Drawing.Point(8, 64)
        Me._Option6_2.Name = "_Option6_2"
        Me._Option6_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option6_2.Size = New System.Drawing.Size(81, 17)
        Me._Option6_2.TabIndex = 40
        Me._Option6_2.TabStop = True
        Me._Option6_2.Text = "+ Half Wave"
        '
        '_Option6_1
        '
        Me._Option6_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option6_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option6_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option6_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option6.SetIndex(Me._Option6_1, CType(1, Short))
        Me._Option6_1.Location = New System.Drawing.Point(8, 40)
        Me._Option6_1.Name = "_Option6_1"
        Me._Option6_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option6_1.Size = New System.Drawing.Size(73, 17)
        Me._Option6_1.TabIndex = 39
        Me._Option6_1.TabStop = True
        Me._Option6_1.Text = "Full Wave"
        '
        '_Option6_0
        '
        Me._Option6_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option6_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option6_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option6_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option6.SetIndex(Me._Option6_0, CType(0, Short))
        Me._Option6_0.Location = New System.Drawing.Point(8, 16)
        Me._Option6_0.Name = "_Option6_0"
        Me._Option6_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option6_0.Size = New System.Drawing.Size(65, 17)
        Me._Option6_0.TabIndex = 38
        Me._Option6_0.TabStop = True
        Me._Option6_0.Text = "Bipolar"
        '
        'Frame10
        '
        Me.Frame10.BackColor = System.Drawing.SystemColors.Control
        Me.Frame10.Controls.Add(Me.Text5)
        Me.Frame10.Controls.Add(Me.Slider3)
        Me.Frame10.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame10.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame10.Location = New System.Drawing.Point(336, 120)
        Me.Frame10.Name = "Frame10"
        Me.Frame10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame10.Size = New System.Drawing.Size(249, 97)
        Me.Frame10.TabIndex = 34
        Me.Frame10.TabStop = False
        Me.Frame10.Text = "Start Delay"
        '
        'Text5
        '
        Me.Text5.AcceptsReturn = True
        Me.Text5.AutoSize = False
        Me.Text5.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text5.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text5.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text5.Location = New System.Drawing.Point(152, 24)
        Me.Text5.MaxLength = 0
        Me.Text5.Name = "Text5"
        Me.Text5.ReadOnly = True
        Me.Text5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text5.Size = New System.Drawing.Size(73, 19)
        Me.Text5.TabIndex = 36
        Me.Text5.Text = "Text5"
        '
        'Slider3
        '
        Me.Slider3.ContainingControl = Me
        Me.Slider3.Location = New System.Drawing.Point(8, 48)
        Me.Slider3.Name = "Slider3"
        Me.Slider3.OcxState = CType(resources.GetObject("Slider3.OcxState"), System.Windows.Forms.AxHost.State)
        Me.Slider3.Size = New System.Drawing.Size(233, 33)
        Me.Slider3.TabIndex = 35
        '
        'Command2
        '
        Me.Command2.BackColor = System.Drawing.SystemColors.Control
        Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Command2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Command2.Location = New System.Drawing.Point(184, 128)
        Me.Command2.Name = "Command2"
        Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Command2.Size = New System.Drawing.Size(49, 41)
        Me.Command2.TabIndex = 33
        Me.Command2.Text = "Run"
        '
        'Frame9
        '
        Me.Frame9.BackColor = System.Drawing.SystemColors.Control
        Me.Frame9.Controls.Add(Me.Text4)
        Me.Frame9.Controls.Add(Me.Slider2)
        Me.Frame9.Controls.Add(Me.Label2)
        Me.Frame9.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame9.Location = New System.Drawing.Point(336, 8)
        Me.Frame9.Name = "Frame9"
        Me.Frame9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame9.Size = New System.Drawing.Size(249, 105)
        Me.Frame9.TabIndex = 29
        Me.Frame9.TabStop = False
        Me.Frame9.Text = "Number Of Samples"
        '
        'Text4
        '
        Me.Text4.AcceptsReturn = True
        Me.Text4.AutoSize = False
        Me.Text4.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text4.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text4.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text4.Location = New System.Drawing.Point(152, 24)
        Me.Text4.MaxLength = 0
        Me.Text4.Name = "Text4"
        Me.Text4.ReadOnly = True
        Me.Text4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text4.Size = New System.Drawing.Size(65, 19)
        Me.Text4.TabIndex = 31
        Me.Text4.Text = "Text4"
        '
        'Slider2
        '
        Me.Slider2.ContainingControl = Me
        Me.Slider2.Location = New System.Drawing.Point(8, 56)
        Me.Slider2.Name = "Slider2"
        Me.Slider2.OcxState = CType(resources.GetObject("Slider2.OcxState"), System.Windows.Forms.AxHost.State)
        Me.Slider2.Size = New System.Drawing.Size(233, 42)
        Me.Slider2.TabIndex = 30
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(32, 24)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(121, 17)
        Me.Label2.TabIndex = 32
        Me.Label2.Text = "Number Of Samples"
        '
        'Command1
        '
        Me.Command1.BackColor = System.Drawing.SystemColors.Control
        Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Command1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Command1.Location = New System.Drawing.Point(120, 128)
        Me.Command1.Name = "Command1"
        Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Command1.Size = New System.Drawing.Size(49, 41)
        Me.Command1.TabIndex = 28
        Me.Command1.Text = "Single Sample"
        '
        'Frame8
        '
        Me.Frame8.BackColor = System.Drawing.SystemColors.Control
        Me.Frame8.Controls.Add(Me.Text3)
        Me.Frame8.Controls.Add(Me.Slider1)
        Me.Frame8.Controls.Add(Me.Label1)
        Me.Frame8.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame8.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame8.Location = New System.Drawing.Point(80, 8)
        Me.Frame8.Name = "Frame8"
        Me.Frame8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame8.Size = New System.Drawing.Size(249, 105)
        Me.Frame8.TabIndex = 23
        Me.Frame8.TabStop = False
        Me.Frame8.Text = "Sampling Frequency"
        '
        'Text3
        '
        Me.Text3.AcceptsReturn = True
        Me.Text3.AutoSize = False
        Me.Text3.BackColor = System.Drawing.SystemColors.InactiveBorder
        Me.Text3.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.Text3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Text3.ForeColor = System.Drawing.SystemColors.WindowText
        Me.Text3.Location = New System.Drawing.Point(144, 24)
        Me.Text3.MaxLength = 0
        Me.Text3.Name = "Text3"
        Me.Text3.ReadOnly = True
        Me.Text3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text3.Size = New System.Drawing.Size(73, 19)
        Me.Text3.TabIndex = 25
        Me.Text3.Text = "Text3"
        '
        'Slider1
        '
        Me.Slider1.ContainingControl = Me
        Me.Slider1.Location = New System.Drawing.Point(8, 56)
        Me.Slider1.Name = "Slider1"
        Me.Slider1.OcxState = CType(resources.GetObject("Slider1.OcxState"), System.Windows.Forms.AxHost.State)
        Me.Slider1.Size = New System.Drawing.Size(225, 33)
        Me.Slider1.TabIndex = 24
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(24, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(113, 17)
        Me.Label1.TabIndex = 26
        Me.Label1.Text = "Samplnig Frequency"
        '
        'Frame7
        '
        Me.Frame7.BackColor = System.Drawing.SystemColors.Control
        Me.Frame7.Controls.Add(Me._Option5_2)
        Me.Frame7.Controls.Add(Me._Option5_1)
        Me.Frame7.Controls.Add(Me._Option5_0)
        Me.Frame7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame7.Location = New System.Drawing.Point(8, 16)
        Me.Frame7.Name = "Frame7"
        Me.Frame7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame7.Size = New System.Drawing.Size(65, 97)
        Me.Frame7.TabIndex = 19
        Me.Frame7.TabStop = False
        Me.Frame7.Text = "Trigger"
        '
        '_Option5_2
        '
        Me._Option5_2.BackColor = System.Drawing.SystemColors.Control
        Me._Option5_2.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option5_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option5_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option5.SetIndex(Me._Option5_2, CType(2, Short))
        Me._Option5_2.Location = New System.Drawing.Point(8, 72)
        Me._Option5_2.Name = "_Option5_2"
        Me._Option5_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option5_2.Size = New System.Drawing.Size(41, 13)
        Me._Option5_2.TabIndex = 22
        Me._Option5_2.TabStop = True
        Me._Option5_2.Text = "Enc"
        '
        '_Option5_1
        '
        Me._Option5_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option5_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option5_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option5_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option5.SetIndex(Me._Option5_1, CType(1, Short))
        Me._Option5_1.Location = New System.Drawing.Point(8, 48)
        Me._Option5_1.Name = "_Option5_1"
        Me._Option5_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option5_1.Size = New System.Drawing.Size(41, 13)
        Me._Option5_1.TabIndex = 21
        Me._Option5_1.TabStop = True
        Me._Option5_1.Text = "Ext"
        '
        '_Option5_0
        '
        Me._Option5_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option5_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option5_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option5_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option5.SetIndex(Me._Option5_0, CType(0, Short))
        Me._Option5_0.Location = New System.Drawing.Point(8, 24)
        Me._Option5_0.Name = "_Option5_0"
        Me._Option5_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option5_0.Size = New System.Drawing.Size(41, 13)
        Me._Option5_0.TabIndex = 20
        Me._Option5_0.TabStop = True
        Me._Option5_0.Text = "Int"
        '
        'Frame4
        '
        Me.Frame4.BackColor = System.Drawing.SystemColors.Control
        Me.Frame4.Controls.Add(Me.Frame5)
        Me.Frame4.Controls.Add(Me.Frame3)
        Me.Frame4.Controls.Add(Me.Frame2)
        Me.Frame4.Controls.Add(Me.Frame1)
        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(8, 8)
        Me.Frame4.Name = "Frame4"
        Me.Frame4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame4.Size = New System.Drawing.Size(369, 121)
        Me.Frame4.TabIndex = 0
        Me.Frame4.TabStop = False
        Me.Frame4.Text = "Main Inputs"
        '
        'Frame5
        '
        Me.Frame5.BackColor = System.Drawing.SystemColors.Control
        Me.Frame5.Controls.Add(Me._Option4_5)
        Me.Frame5.Controls.Add(Me._Option4_4)
        Me.Frame5.Controls.Add(Me._Option4_3)
        Me.Frame5.Controls.Add(Me._Option4_2)
        Me.Frame5.Controls.Add(Me._Option4_1)
        Me.Frame5.Controls.Add(Me._Option4_0)
        Me.Frame5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame5.Location = New System.Drawing.Point(248, 8)
        Me.Frame5.Name = "Frame5"
        Me.Frame5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame5.Size = New System.Drawing.Size(113, 105)
        Me.Frame5.TabIndex = 11
        Me.Frame5.TabStop = False
        Me.Frame5.Text = "Range"
        '
        '_Option4_5
        '
        Me._Option4_5.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_5.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_5.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_5, CType(5, Short))
        Me._Option4_5.Location = New System.Drawing.Point(72, 72)
        Me._Option4_5.Name = "_Option4_5"
        Me._Option4_5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_5.Size = New System.Drawing.Size(33, 17)
        Me._Option4_5.TabIndex = 17
        Me._Option4_5.TabStop = True
        Me._Option4_5.Text = "5V"
        '
        '_Option4_4
        '
        Me._Option4_4.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_4.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_4.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_4, CType(4, Short))
        Me._Option4_4.Location = New System.Drawing.Point(72, 48)
        Me._Option4_4.Name = "_Option4_4"
        Me._Option4_4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_4.Size = New System.Drawing.Size(33, 17)
        Me._Option4_4.TabIndex = 16
        Me._Option4_4.TabStop = True
        Me._Option4_4.Text = "2V"
        '
        '_Option4_3
        '
        Me._Option4_3.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_3.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_3, CType(3, Short))
        Me._Option4_3.Location = New System.Drawing.Point(72, 24)
        Me._Option4_3.Name = "_Option4_3"
        Me._Option4_3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_3.Size = New System.Drawing.Size(33, 17)
        Me._Option4_3.TabIndex = 15
        Me._Option4_3.TabStop = True
        Me._Option4_3.Text = "1V"
        '
        '_Option4_2
        '
        Me._Option4_2.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_2.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_2, CType(2, Short))
        Me._Option4_2.Location = New System.Drawing.Point(8, 72)
        Me._Option4_2.Name = "_Option4_2"
        Me._Option4_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_2.Size = New System.Drawing.Size(57, 17)
        Me._Option4_2.TabIndex = 14
        Me._Option4_2.TabStop = True
        Me._Option4_2.Text = "500mV"
        '
        '_Option4_1
        '
        Me._Option4_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_1, CType(1, Short))
        Me._Option4_1.Location = New System.Drawing.Point(8, 48)
        Me._Option4_1.Name = "_Option4_1"
        Me._Option4_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_1.Size = New System.Drawing.Size(57, 17)
        Me._Option4_1.TabIndex = 13
        Me._Option4_1.TabStop = True
        Me._Option4_1.Text = "200mV"
        '
        '_Option4_0
        '
        Me._Option4_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option4_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option4_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option4_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option4.SetIndex(Me._Option4_0, CType(0, Short))
        Me._Option4_0.Location = New System.Drawing.Point(8, 24)
        Me._Option4_0.Name = "_Option4_0"
        Me._Option4_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option4_0.Size = New System.Drawing.Size(57, 17)
        Me._Option4_0.TabIndex = 12
        Me._Option4_0.TabStop = True
        Me._Option4_0.Text = "100mV"
        '
        'Frame3
        '
        Me.Frame3.BackColor = System.Drawing.SystemColors.Control
        Me.Frame3.Controls.Add(Me._Option3_0)
        Me.Frame3.Controls.Add(Me._Option3_1)
        Me.Frame3.Controls.Add(Me._Option3_2)
        Me.Frame3.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame3.Location = New System.Drawing.Point(168, 8)
        Me.Frame3.Name = "Frame3"
        Me.Frame3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame3.Size = New System.Drawing.Size(73, 105)
        Me.Frame3.TabIndex = 7
        Me.Frame3.TabStop = False
        Me.Frame3.Text = "Input"
        '
        '_Option3_0
        '
        Me._Option3_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option3_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option3_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option3_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option3.SetIndex(Me._Option3_0, CType(0, Short))
        Me._Option3_0.Location = New System.Drawing.Point(8, 24)
        Me._Option3_0.Name = "_Option3_0"
        Me._Option3_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option3_0.Size = New System.Drawing.Size(57, 17)
        Me._Option3_0.TabIndex = 10
        Me._Option3_0.TabStop = True
        Me._Option3_0.Text = "Input 0"
        '
        '_Option3_1
        '
        Me._Option3_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option3_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option3_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option3_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option3.SetIndex(Me._Option3_1, CType(1, Short))
        Me._Option3_1.Location = New System.Drawing.Point(8, 48)
        Me._Option3_1.Name = "_Option3_1"
        Me._Option3_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option3_1.Size = New System.Drawing.Size(57, 17)
        Me._Option3_1.TabIndex = 9
        Me._Option3_1.TabStop = True
        Me._Option3_1.Text = "Input 1"
        '
        '_Option3_2
        '
        Me._Option3_2.BackColor = System.Drawing.SystemColors.Control
        Me._Option3_2.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option3_2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option3_2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option3.SetIndex(Me._Option3_2, CType(2, Short))
        Me._Option3_2.Location = New System.Drawing.Point(8, 72)
        Me._Option3_2.Name = "_Option3_2"
        Me._Option3_2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option3_2.Size = New System.Drawing.Size(49, 17)
        Me._Option3_2.TabIndex = 8
        Me._Option3_2.TabStop = True
        Me._Option3_2.Text = "GND"
        '
        'Frame2
        '
        Me.Frame2.BackColor = System.Drawing.SystemColors.Control
        Me.Frame2.Controls.Add(Me._Option2_0)
        Me.Frame2.Controls.Add(Me._Option2_1)
        Me.Frame2.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame2.Location = New System.Drawing.Point(88, 24)
        Me.Frame2.Name = "Frame2"
        Me.Frame2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame2.Size = New System.Drawing.Size(73, 73)
        Me.Frame2.TabIndex = 4
        Me.Frame2.TabStop = False
        Me.Frame2.Text = "Inp Imp"
        '
        '_Option2_0
        '
        Me._Option2_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option2_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option2_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option2_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option2.SetIndex(Me._Option2_0, CType(0, Short))
        Me._Option2_0.Location = New System.Drawing.Point(8, 24)
        Me._Option2_0.Name = "_Option2_0"
        Me._Option2_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option2_0.Size = New System.Drawing.Size(49, 17)
        Me._Option2_0.TabIndex = 6
        Me._Option2_0.TabStop = True
        Me._Option2_0.Text = "50R"
        '
        '_Option2_1
        '
        Me._Option2_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option2_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option2_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option2_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option2.SetIndex(Me._Option2_1, CType(1, Short))
        Me._Option2_1.Location = New System.Drawing.Point(8, 40)
        Me._Option2_1.Name = "_Option2_1"
        Me._Option2_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option2_1.Size = New System.Drawing.Size(49, 25)
        Me._Option2_1.TabIndex = 5
        Me._Option2_1.TabStop = True
        Me._Option2_1.Text = "1M"
        '
        'Frame1
        '
        Me.Frame1.BackColor = System.Drawing.SystemColors.Control
        Me.Frame1.Controls.Add(Me._Option1_0)
        Me.Frame1.Controls.Add(Me._Option1_1)
        Me.Frame1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Frame1.Location = New System.Drawing.Point(8, 24)
        Me.Frame1.Name = "Frame1"
        Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Frame1.Size = New System.Drawing.Size(73, 73)
        Me.Frame1.TabIndex = 1
        Me.Frame1.TabStop = False
        Me.Frame1.Text = "Coupling"
        '
        '_Option1_0
        '
        Me._Option1_0.BackColor = System.Drawing.SystemColors.Control
        Me._Option1_0.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option1_0.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option1_0.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option1.SetIndex(Me._Option1_0, CType(0, Short))
        Me._Option1_0.Location = New System.Drawing.Point(16, 24)
        Me._Option1_0.Name = "_Option1_0"
        Me._Option1_0.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option1_0.Size = New System.Drawing.Size(41, 17)
        Me._Option1_0.TabIndex = 3
        Me._Option1_0.TabStop = True
        Me._Option1_0.Text = "AC"
        '
        '_Option1_1
        '
        Me._Option1_1.BackColor = System.Drawing.SystemColors.Control
        Me._Option1_1.Cursor = System.Windows.Forms.Cursors.Default
        Me._Option1_1.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me._Option1_1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Option1.SetIndex(Me._Option1_1, CType(1, Short))
        Me._Option1_1.Location = New System.Drawing.Point(16, 40)
        Me._Option1_1.Name = "_Option1_1"
        Me._Option1_1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me._Option1_1.Size = New System.Drawing.Size(41, 25)
        Me._Option1_1.TabIndex = 2
        Me._Option1_1.TabStop = True
        Me._Option1_1.Text = "DC"
        '
        'Option1
        '
        '
        'Option2
        '
        '
        'Option3
        '
        '
        'Option4
        '
        '
        'Option5
        '
        '
        'Option6
        '
        '
        'Option7
        '
        '
        'DiBoardState
        '
        Me.DiBoardState.Location = New System.Drawing.Point(720, 16)
        Me.DiBoardState.Name = "DiBoardState"
        Me.DiBoardState.Size = New System.Drawing.Size(104, 16)
        Me.DiBoardState.TabIndex = 65
        Me.DiBoardState.Text = "DI Board Power"
        '
        'WaveformDisplay
        '
        Me.WaveformDisplay.Location = New System.Drawing.Point(8, 16)
        Me.WaveformDisplay.Name = "WaveformDisplay"
        Me.WaveformDisplay.Size = New System.Drawing.Size(648, 384)
        Me.WaveformDisplay.TabIndex = 66
        Me.WaveformDisplay.TabStop = False
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.WaveformDisplay)
        Me.GroupBox1.Location = New System.Drawing.Point(16, 392)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(664, 408)
        Me.GroupBox1.TabIndex = 67
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "A Scan Waveform"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.SystemColors.Control
        Me.ClientSize = New System.Drawing.Size(925, 816)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.DiBoardState)
        Me.Controls.Add(Me.Frame15)
        Me.Controls.Add(Me.Frame14)
        Me.Controls.Add(Me.Frame13)
        Me.Controls.Add(Me.Frame12)
        Me.Controls.Add(Me.Frame6)
        Me.Controls.Add(Me.Frame4)
        Me.Cursor = System.Windows.Forms.Cursors.Default
        Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Location = New System.Drawing.Point(4, 23)
        Me.Name = "Form1"
        Me.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Text = "RapiDaq Basic Control"
        Me.Frame15.ResumeLayout(False)
        Me.Frame14.ResumeLayout(False)
        CType(Me.Slider5, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Slider4, System.ComponentModel.ISupportInitialize).EndInit()
        Me.Frame13.ResumeLayout(False)
        Me.Frame12.ResumeLayout(False)
        Me.Frame6.ResumeLayout(False)
        Me.Frame11.ResumeLayout(False)
        Me.Frame10.ResumeLayout(False)
        CType(Me.Slider3, System.ComponentModel.ISupportInitialize).EndInit()
        Me.Frame9.ResumeLayout(False)
        CType(Me.Slider2, System.ComponentModel.ISupportInitialize).EndInit()
        Me.Frame8.ResumeLayout(False)
        CType(Me.Slider1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.Frame7.ResumeLayout(False)
        Me.Frame4.ResumeLayout(False)
        Me.Frame5.ResumeLayout(False)
        Me.Frame3.ResumeLayout(False)
        Me.Frame2.ResumeLayout(False)
        Me.Frame1.ResumeLayout(False)
        CType(Me.Option1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option2, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option3, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option4, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option5, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option6, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Option7, System.ComponentModel.ISupportInitialize).EndInit()
        Me.GroupBox1.ResumeLayout(False)
        Me.ResumeLayout(False)

    End Sub
#End Region 
#Region "Upgrade Support "
	Private Shared m_vb6FormDefInstance As Form1
	Private Shared m_InitializingDefInstance As Boolean
	Public Shared Property DefInstance() As Form1
		Get
			If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
				m_InitializingDefInstance = True
				m_vb6FormDefInstance = New Form1()
				m_InitializingDefInstance = False
			End If
			DefInstance = m_vb6FormDefInstance
		End Get
		Set
			m_vb6FormDefInstance = Value
		End Set
	End Property
#End Region 
	
	Dim test As Integer
	Dim RQcards As Integer
	Dim arse As Integer
	
    Dim dump(100000) As Short
	Dim Index As Integer
	
    Dim bufBytes As Integer
	
	
	Dim runFlag As Integer
	
	Dim InternalTriggerFlag As Integer
	
	
	Dim TCG_data(10000) As Integer
	Dim TCG_index As Integer
	
	Dim TCG_ramp(256) As Integer
	
	
	
	Dim x As Integer
	Dim y As Integer
	
	Dim numberOfSamples As Integer
	
    Enum RQ_InputCoupling
        RQ_ICDC = 0
        RQ_ICAC = 1
    End Enum

    Enum RQ_InputImpedance
        RQ_II1MOhm = 0
        RQ_II50Ohm = 1
    End Enum

    Enum RQ_AnalogueInput
        RQ_AIInput1 = 0
        RQ_AIInput0 = 1
        RQ_AIInputCalibration = 2
        RQ_AIInputGND = 3
    End Enum

    Enum RQ_AnalogueInputRange
        RQ_AG100mV = 0
        RQ_AG200mV = 1
        RQ_AG500mV = 2
        RQ_AG1V = 3
        RQ_AG2V = 4
        RQ_AG5V = 5
    End Enum

    Enum RQ_Trigger
        RQ_TExternal = 0
        RQ_TInternal = 1
        RQ_TEncoder = 2
    End Enum

    Enum RQ_Rectification
        RQ_RBipolar = 0
        RQ_RFullwave = 1
        RQ_RPosHalfwave = 2
        RQ_RNegHalfwave = 3
    End Enum


    Enum RQ_TCGTriggerEvent
        RQ_TCGTEInterfaceGate = 0
        RQ_TCGTEAbsolute = 1
    End Enum

    Enum RQ_ApertureSize
        RQ_AS8 = 0
        RQ_AS16 = 1
        RQ_AS24 = 2
        RQ_AS32 = 3
    End Enum


    Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command1.Click

        test = RQ_GetAScan(0, dump(0), bufBytes, 0, 0)

        If test = 0 Then
            Text2.Text = "RQ_GetAScan Fail"
        Else
            Text2.Text = "RQ_GetAScan OK"
        End If

        display()

    End Sub

    Private Sub display()
        Dim xScale, yScale As Double
        Dim x, y, lastX, lastY, sampleIndex As Integer
        Dim bit As Bitmap = New Bitmap(WaveformDisplay.Width, WaveformDisplay.Height)
        Dim g As Graphics = Graphics.FromImage(bit)
        Dim myPen As Pen = New Pen(Color.Green, 1)

        xScale = WaveformDisplay.Width / numberOfSamples
        yScale = WaveformDisplay.Height / 4096
        lastX = 0
        lastY = (dump(0) + 2048) * yScale
        For sampleIndex = 1 To numberOfSamples Step 1
            x = sampleIndex * xScale
            y = (dump(sampleIndex) + 2048) * yScale
            g.DrawLine(myPen, lastX, lastY, x, y)
            lastX = x
            lastY = y
        Next
        WaveformDisplay.Image = bit
    End Sub

    Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command2.Click

        If runFlag = 0 Then
            runFlag = 1
        Else
            runFlag = 0
        End If

    End Sub

    Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command3.Click
        'set TCG outputs to full scale

        For TCG_index = 0 To 10000 Step 1

            TCG_data(TCG_index) = &HFFFFFFFF

        Next TCG_index


        test = RQ_SetTCGValues(0, TCG_data(0), 10000)

        If test = 0 Then
            Text2.Text = "RQ_SetTCGValues Fail"
        Else
            Text2.Text = "RQ_SetTCGValues OK"
        End If



    End Sub



    Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command4.Click
        'set TCG outputs to zero

        For TCG_index = 0 To 10000 Step 1

            TCG_data(TCG_index) = &H0S

        Next TCG_index


        test = RQ_SetTCGValues(0, TCG_data(0), 10000)

        If test = 0 Then
            Text2.Text = "RQ_SetTCGValues Fail"
        Else
            Text2.Text = "RQ_SetTCGValues OK"
        End If



    End Sub

    Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Command5.Click
        'set TCG outputs to ramp

        Dim temp(4) As Integer

        TCG_ramp(0) = &H101S
        TCG_ramp(1) = &H2020303
        TCG_ramp(2) = &H4040505
        TCG_ramp(3) = &H6060707

        TCG_ramp(4) = &H8080909
        TCG_ramp(5) = &HA0A0B0B
        TCG_ramp(6) = &HC0C0D0D
        TCG_ramp(7) = &HE0E0F0F

        TCG_ramp(8) = &H10101111
        TCG_ramp(9) = &H12121313
        TCG_ramp(10) = &H14141515
        TCG_ramp(11) = &H16161717

        TCG_ramp(12) = &H18181919
        TCG_ramp(13) = &H1A1A1B1B
        TCG_ramp(14) = &H1C1C1D1D
        TCG_ramp(15) = &H1E1E1F1F

        TCG_ramp(16) = &H20202121
        TCG_ramp(17) = &H22222323
        TCG_ramp(18) = &H24242525
        TCG_ramp(19) = &H26262727

        TCG_ramp(20) = &H28282929
        TCG_ramp(21) = &H2A2A2B2B
        TCG_ramp(22) = &H2C2C2D2D
        TCG_ramp(23) = &H2E2E2F2F

        TCG_ramp(24) = &H30303131
        TCG_ramp(25) = &H32323333
        TCG_ramp(26) = &H34343535
        TCG_ramp(27) = &H36363737

        TCG_ramp(28) = &H38383939
        TCG_ramp(29) = &H3A3A3B3B
        TCG_ramp(30) = &H3C3C3D3D
        TCG_ramp(31) = &H3E3E3F3F

        TCG_ramp(32) = &H40404141
        TCG_ramp(33) = &H42424343
        TCG_ramp(34) = &H44444545
        TCG_ramp(35) = &H46464747

        TCG_ramp(37) = &H48484949
        TCG_ramp(38) = &H4A4A4B4B
        TCG_ramp(39) = &H4C4C4D4D
        TCG_ramp(40) = &H4E4E4F4F

        TCG_ramp(41) = &H50505151
        TCG_ramp(42) = &H52525353
        TCG_ramp(43) = &H54545555
        TCG_ramp(44) = &H56565757

        TCG_ramp(45) = &H58585959
        TCG_ramp(46) = &H5A5A5B5B
        TCG_ramp(47) = &H5C5C5D5D
        TCG_ramp(48) = &H5E5E5F5F

        TCG_ramp(49) = &H60606161
        TCG_ramp(50) = &H62626363
        TCG_ramp(51) = &H64646565
        TCG_ramp(52) = &H66666767

        TCG_ramp(53) = &H68686969
        TCG_ramp(54) = &H6A6A6B6B
        TCG_ramp(55) = &H6C6C6D6D
        TCG_ramp(56) = &H6E6E6F6F

        TCG_ramp(57) = &H70707171
        TCG_ramp(58) = &H72727373
        TCG_ramp(59) = &H74747575
        TCG_ramp(60) = &H76767777

        TCG_ramp(61) = &H78787979
        TCG_ramp(62) = &H7A7A7B7B
        TCG_ramp(63) = &H7C7C7D7D
        TCG_ramp(64) = &H7E7E7F7F

        TCG_ramp(65) = &H80808181
        TCG_ramp(66) = &H82828383
        TCG_ramp(67) = &H84848585
        TCG_ramp(68) = &H86868787

        TCG_ramp(69) = &H88888989
        TCG_ramp(70) = &H8A8A8B8B
        TCG_ramp(71) = &H8C8C8D8D
        TCG_ramp(72) = &H8E8E8F8F

        TCG_ramp(73) = &H90909191
        TCG_ramp(74) = &H92929393
        TCG_ramp(75) = &H94949595
        TCG_ramp(76) = &H96969797

        TCG_ramp(77) = &H98989999
        TCG_ramp(78) = &H9A9A9B9B
        TCG_ramp(79) = &H9C9C9D9D
        TCG_ramp(80) = &H9E9E9F9F

        TCG_ramp(81) = &HA0A0A1A1
        TCG_ramp(82) = &HA2A2A3A3
        TCG_ramp(83) = &HA4A4A5A5
        TCG_ramp(84) = &HA6A6A7A7

        TCG_ramp(85) = &HA8A8A9A9
        TCG_ramp(86) = &HAAAAABAB
        TCG_ramp(87) = &HACACADAD
        TCG_ramp(88) = &HAEAEAFAF

        TCG_ramp(89) = &HB0B0B1B1
        TCG_ramp(90) = &HB2B2B3B3
        TCG_ramp(91) = &HB4B4B5B5
        TCG_ramp(92) = &HB6B6B7B7

        TCG_ramp(93) = &HB8B8B9B9
        TCG_ramp(94) = &HBABABBBB
        TCG_ramp(95) = &HBCBCBDBD
        TCG_ramp(96) = &HBEBEBFBF

        TCG_ramp(97) = &HC0C0C1C1
        TCG_ramp(98) = &HC2C2C3C3
        TCG_ramp(99) = &HC4C4C5C5
        TCG_ramp(100) = &HC6C6C7C7

        TCG_ramp(101) = &HC8C8C9C9
        TCG_ramp(102) = &HCACACBCB
        TCG_ramp(103) = &HCCCCCDCD
        TCG_ramp(104) = &HCECECFCF

        TCG_ramp(105) = &HD0D0D1D1
        TCG_ramp(106) = &HD2D2D3D3
        TCG_ramp(107) = &HD4D4D5D5
        TCG_ramp(108) = &HD6D6D7D7

        TCG_ramp(109) = &HD8D8D9D9
        TCG_ramp(110) = &HDADADBDB
        TCG_ramp(111) = &HDCDCDDDD
        TCG_ramp(112) = &HDEDEDFDF

        TCG_ramp(113) = &HE0E0E1E1
        TCG_ramp(114) = &HE2E2E3E3
        TCG_ramp(115) = &HE4E4E5E5
        TCG_ramp(116) = &HE6E6E7E7

        TCG_ramp(117) = &HE8E8E9E9
        TCG_ramp(118) = &HEAEAEBEB
        TCG_ramp(119) = &HECECEDED
        TCG_ramp(120) = &HEEEEEFEF

        TCG_ramp(121) = &HF0F0F1F1
        TCG_ramp(122) = &HF2F2F3F3
        TCG_ramp(123) = &HF4F4F5F5
        TCG_ramp(124) = &HF6F6F7F7

        TCG_ramp(125) = &HF8F8F9F9
        TCG_ramp(126) = &HFAFAFBFB
        TCG_ramp(127) = &HFCFCFDFD
        TCG_ramp(128) = &HFEFEFFFF


        For TCG_index = 0 To 10000 Step 1 ' clear TCG_data array
            TCG_data(TCG_index) = 0
        Next TCG_index


        For TCG_index = 0 To 128 Step 1

            TCG_data(TCG_index) = TCG_ramp(TCG_index)

        Next TCG_index


        test = RQ_SetTCGValues(0, TCG_ramp(0), 256) '(0, TCG_data(0), 10000)

        If test = 0 Then
            Text2.Text = "RQ_SetTCGValues Fail"
        Else
            Text2.Text = "RQ_SetTCGValues OK"
        End If

        test = RQ_SetTCGEnable(0, 1)

        If test = 0 Then
            Text2.Text = "RQ_SetTCGEnable Fail"
        Else
            Text2.Text = "RQ_SetTCGEnable OK"
        End If

        test = RQ_SetTCGTriggerEvent(0, RQ_TCGTriggerEvent.RQ_TCGTEAbsolute)

        If test = 0 Then
            Text2.Text = "RQ_SetTCGTriggerEvent Fail"
        Else
            Text2.Text = "RQ_SetTCGTriggerEvent OK"
        End If


    End Sub


    Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        test = RQ_PCIEnumerate(RQcards, 0)
        Text1.Text = RQcards & " RapiDaq Cards Detected" ' Ha ! - it works!!!

        If RQcards > 0 Then

            test = RQ_GetIsInitialised(0)

            If test = 0 Then
                Text2.Text = "RQ Not Initialised"

                test = RQ_InitialiseNonSequenced(0)

                If test = 0 Then
                    Text2.Text = "RQ_Initialise Fail"
                    Dim s As String
                    MsgBox("RQ Initialise Fail - check firmware.  Firmware is now specified in rq.dll RQInternal.c or overriden in rq.ini")
                Else
                    Text2.Text = "RQ_Initialise OK"
                End If

            Else
                Text2.Text = "RQ Already Initialised"
            End If

            default_settings()

        End If


    End Sub

    Private Sub default_settings()

        runFlag = 0
        bufBytes = 100000 * 2

        '**********************************************
        'for input coupling
        '**********************************************
        Option1(1).Checked = True 'dc coupling button on
        test = RQ_SetInputCoupling(0, RQ_InputCoupling.RQ_ICDC) 'do the deed

        '**********************************************
        'for input impedance
        '**********************************************
        Option2(0).Checked = True '50R button on
        test = RQ_SetInputImpedance(0, RQ_InputImpedance.RQ_II50Ohm) 'do it

        '**********************************************
        'for input selection
        '**********************************************
        Option3(0).Checked = True 'input 0 button is on
        test = RQ_SetAnalogueInput(0, RQ_AnalogueInput.RQ_AIInput0) 'go do it

        '**********************************************
        'for input range
        '**********************************************
        Option4(0).Checked = True '100mV button is on
        test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG100mV) 'shazzamm....

        '**********************************************
        'for trigger input
        '**********************************************
        Option5(0).Checked = True 'internal trigger button on
        InternalTriggerFlag = 1
        test = RQ_SetTriggerSelect(0, RQ_Trigger.RQ_TInternal) 'internal triggery stuff also on

        '**********************************************
        'for sampling frequency
        '**********************************************
        Slider1.Value = 50 ' setup slider
        test = RQ_SetSamplingFrequency(0, Slider1.Value) 'make it real
        Text3.Text = Slider1.Value & " MHz" 'report

        '**********************************************
        'for number of samples
        '**********************************************
        numberOfSamples = 512
        Slider2.Value = numberOfSamples
        test = RQ_SetNumberOfSamples(0, Slider2.Value)
        Text4.Text = CStr(Slider2.Value)

        '**********************************************
        'for stqrt delay
        '**********************************************
        Slider3.Value = 0
        test = RQ_SetStartDelay(0, Slider3.Value)
        Text5.Text = CStr(Slider3.Value)

        '**********************************************
        'for rectification
        '**********************************************
        Option6(0).Checked = True
        test = RQ_SetRectifierMode(0, RQ_Rectification.RQ_RBipolar)

        '**********************************************
        'for pulse width
        '**********************************************
        Slider4.Value = 10
        test = RQ_SetTransducerPulseWidth(0, Slider4.Value)
        Text6.Text = CStr(Slider4.Value)

        '**********************************************
        'for rep rate
        '**********************************************
        Slider5.Value = 10000
        test = RQ_SetRepetitionRate(0, Slider5.Value)
        Text7.Text = CStr(Slider5.Value)

        '**********************************************
        'for aperture size
        '**********************************************
        Option7(0).Checked = True
        test = RQ_SetSensorArrayApertureSize(0, RQ_ApertureSize.RQ_AS8)

        RQ_SetNumberOfAScansPerBScan(0, 1)

    End Sub


    Private Sub Form1_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed
        test = RQ_Uninitialise(0)
    End Sub

    Private Sub Option1_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option1.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option1.GetIndex(eventSender)
            'set input coupling
            Select Case Index
                Case 0
                    test = RQ_SetInputCoupling(0, RQ_InputCoupling.RQ_ICAC)
                Case 1
                    test = RQ_SetInputCoupling(0, RQ_InputCoupling.RQ_ICDC)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetInputCoupling Fail"
            Else
                Text2.Text = "RQ_SetInputCoupling OK"
            End If


        End If
    End Sub

    Private Sub Option2_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option2.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option2.GetIndex(eventSender)
            'set input impedance
            Select Case Index
                Case 0
                    test = RQ_SetInputImpedance(0, RQ_InputImpedance.RQ_II50Ohm)
                Case 1
                    test = RQ_SetInputImpedance(0, RQ_InputImpedance.RQ_II1MOhm)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetInputImpedance Fail"
            Else
                Text2.Text = "RQ_SetInputImpedance OK"
            End If

        End If
    End Sub

    Private Sub Option3_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option3.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option3.GetIndex(eventSender)
            'input selection
            Select Case Index
                Case 0
                    test = RQ_SetAnalogueInput(0, RQ_AnalogueInput.RQ_AIInput0)
                Case 1
                    test = RQ_SetAnalogueInput(0, RQ_AnalogueInput.RQ_AIInput1)
                Case 2
                    test = RQ_SetAnalogueInput(0, RQ_AnalogueInput.RQ_AIInputGND)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetAnalogueInput Fail"
            Else
                Text2.Text = "RQ_SetAnalogueInput OK"
            End If


        End If
    End Sub

    Private Sub Option4_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option4.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option4.GetIndex(eventSender)
            'input range
            Select Case Index
                Case 0
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG100mV)
                Case 1
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG200mV)
                Case 2
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG500mV)
                Case 3
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG1V)
                Case 4
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG2V)
                Case 5
                    test = RQ_SetAnalogueInputRange(0, RQ_AnalogueInputRange.RQ_AG5V)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetAnalogueInputRange Fail"
            Else
                Text2.Text = "RQ_SetAnalogueInputRange OK"
            End If

        End If
    End Sub

    Private Sub Option5_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option5.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option5.GetIndex(eventSender)
            'trigger source selection

            InternalTriggerFlag = 0

            Select Case Index
                Case 0
                    test = RQ_SetTriggerSelect(0, RQ_Trigger.RQ_TInternal) 'internal
                    InternalTriggerFlag = 1
                Case 1
                    test = RQ_SetTriggerSelect(0, RQ_Trigger.RQ_TExternal) 'external
                Case 2
                    test = RQ_SetTriggerSelect(0, RQ_Trigger.RQ_TEncoder) 'encoder
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetTriggerSelect Fail"
            Else
                Text2.Text = "RQ_SetTriggerSelect OK"
            End If


        End If
    End Sub

    Private Sub Option6_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option6.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option6.GetIndex(eventSender)
            ' rectification selection
            Select Case Index
                Case 0
                    test = RQ_SetRectifierMode(0, RQ_Rectification.RQ_RBipolar)
                Case 1
                    test = RQ_SetRectifierMode(0, RQ_Rectification.RQ_RFullwave)
                Case 2
                    test = RQ_SetRectifierMode(0, RQ_Rectification.RQ_RPosHalfwave)
                Case 3
                    test = RQ_SetRectifierMode(0, RQ_Rectification.RQ_RNegHalfwave)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetRectifierMode Fail"
            Else
                Text2.Text = "RQ_SetRectifierMode OK"
            End If

        End If
    End Sub

    Private Sub Option7_CheckedChanged(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Option7.CheckedChanged
        If eventSender.Checked Then
            Dim Index_Renamed As Short = Option7.GetIndex(eventSender)
            'set aperture size
            Select Case Index
                Case 0
                    test = RQ_SetSensorArrayApertureSize(0, RQ_ApertureSize.RQ_AS8)
                Case 1
                    test = RQ_SetSensorArrayApertureSize(0, RQ_ApertureSize.RQ_AS16)
                Case 2
                    test = RQ_SetSensorArrayApertureSize(0, RQ_ApertureSize.RQ_AS24)
                Case 3
                    test = RQ_SetSensorArrayApertureSize(0, RQ_ApertureSize.RQ_AS32)
            End Select

            If test = 0 Then
                Text2.Text = "RQ_SetSensorArrayApertureSize Fail"
            Else
                Text2.Text = "RQ_SetSensorArrayApertureSize OK"
            End If


        End If
    End Sub

    Private Sub Slider1_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider1.Change
        'set sampling frequency 40 to 100MHz in 10MHz steps
        test = RQ_SetSamplingFrequency(0, Slider1.Value * 1000000)
        Text3.Text = Slider1.Value & " MHz"

        If test = 0 Then
            Text2.Text = "RQ_SetSamplingFrequency Fail"
        Else
            Text2.Text = "RQ_SetSamplingFrequency OK"
        End If


    End Sub

    Private Sub Slider1_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider1.ClickEvent
        'set sampling frequency 40 to 100MHz in 10MHz steps
        test = RQ_SetSamplingFrequency(0, Slider1.Value * 1000000)
        Text3.Text = Slider1.Value & " MHz"

        If test = 0 Then
            Text2.Text = "RQ_SetSamplingFrequency Fail"
        Else
            Text2.Text = "RQ_SetSamplingFrequency OK"
        End If

    End Sub

    Private Sub Slider2_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider2.Change
        'set number of samples

        test = RQ_SetNumberOfSamples(0, Slider2.Value)

        Text4.Text = CStr(Slider2.Value)

        numberOfSamples = Slider2.Value

        If test = 0 Then
            Text2.Text = "RQ_SetNumberOfSamples Fail"
        Else
            Text2.Text = "RQ_SetNumberOfSamples OK"
        End If

    End Sub

    Private Sub Slider2_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider2.ClickEvent
        'set number of samples

        test = RQ_SetNumberOfSamples(0, Slider2.Value)

        Text4.Text = CStr(Slider2.Value)

        numberOfSamples = Slider2.Value

        If test = 0 Then
            Text2.Text = "RQ_SetNumberOfSamples Fail"
        Else
            Text2.Text = "RQ_SetNumberOfSamples OK"
        End If
    End Sub

    Private Sub Slider3_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider3.Change
        'set start delay
        test = RQ_SetStartDelay(0, Slider3.Value)
        Text5.Text = CStr(Slider3.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetStartDelay Fail"
        Else
            Text2.Text = "RQ_SetStartDelay OK"
        End If

    End Sub

    Private Sub Slider3_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider3.ClickEvent
        'set start delay
        test = RQ_SetStartDelay(0, Slider3.Value)
        Text5.Text = CStr(Slider3.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetStartDelay Fail"
        Else
            Text2.Text = "RQ_SetStartDelay OK"
        End If


    End Sub

    Private Sub Slider4_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider4.Change
        'set pulse width
        test = RQ_SetTransducerPulseWidth(0, Slider4.Value)
        Text6.Text = CStr(Slider4.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetTransducerPulseWidth Fail"
        Else
            Text2.Text = "RQ_SetTransducerPulseWidth OK"
        End If
    End Sub

    Private Sub Slider4_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider4.ClickEvent
        'set pulse width
        test = RQ_SetTransducerPulseWidth(0, Slider4.Value)
        Text6.Text = CStr(Slider4.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetTransducerPulseWidth Fail"
        Else
            Text2.Text = "RQ_SetTransducerPulseWidth OK"
        End If



    End Sub

    Private Sub Slider5_Change(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider5.Change
        'set pulse repetition rate
        test = RQ_SetRepetitionRate(0, Slider5.Value)
        Text7.Text = CStr(Slider5.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetRepetitionRate Fail"
        Else
            Text2.Text = "RQ_SetRepetitionRate OK"
        End If

    End Sub

    Private Sub Slider5_ClickEvent(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Slider5.ClickEvent
        'set pulse repetition rate
        test = RQ_SetRepetitionRate(0, Slider5.Value)
        Text7.Text = CStr(Slider5.Value)
        If test = 0 Then
            Text2.Text = "RQ_SetRepetitionRate Fail"
        Else
            Text2.Text = "RQ_SetRepetitionRate OK"
        End If


    End Sub

    Private Sub Timer1_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles Timer1.Tick

        If InternalTriggerFlag = 1 Then
            test = RQ_SetForceBScanTrigger(0)
        End If

        If runFlag = 1 Then
            RQ_SetRequestEarlySampleData(0)
            test = RQ_GetAScan(0, dump(0), bufBytes, 0, 0)
            display()
        End If


    End Sub

    Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DiBoardState.CheckedChanged
        ' DI Unit relay on / off
        test = RQ_SetDIBoardState(0, DiBoardState.CheckState)
        If test = 0 Then
            Text2.Text = "RQ_SetDIBoardState Fail"
        Else
            Text2.Text = "RQ_SetDIBoardState OK"
        End If
    End Sub

End Class