Sample Program
7-5
IM 701730-17E
7
ElseIf (sts = 2) Then
List1.AddItem "Waiting for Trigger!"
End If
Text1.Text = "END"
StartFlag = 0
End Sub
----------------------------------------------------------------------------------------
Private Sub Command4_Click()
Dim sts As Long
If (StartFlag = 1) Then
Exit Sub
End If
StartFlag = 1
Text1.Text = "START"
List1.Clear
sts = UsbTdiv 'Run Sample4(USB) Set/Get TDIV
If (sts = 0) Then
List1.AddItem Query(0)
End If
Text1.Text = "END"
StartFlag = 0
End Sub
----------------------------------------------------------------------------------------
Private Sub Command5_Click()
Dim sts As Long
If (StartFlag = 1) Then
Exit Sub
End If
StartFlag = 1
Text1.Text = "START"
List1.Clear
sts = UsbGetWord 'Run Sample5(USB) Get Word Data
If (sts = 0) Then
List1.AddItem "END"
End If
Text1.Text = "END"
StartFlag = 0
End Sub
----------------------------------------------------------------------------------------
Private Sub Form_Load()
StartFlag = 0 'Clear Start Flag
Dev = -1 'Clear device id
Command1.Caption = "Sample1(GPIB)" + Chr(13) + "Set/Get TDIV"
Command2.Caption = "Sample2(GPIB)" + Chr(13) + "Get Word Data"
Command3.Caption = "Sample3(GPIB)" + Chr(13) + "Get Measure"
Command4.Caption = "Sample4(USB)" + Chr(13) + "Set/Get TDIV"
Command5.Caption = "Sample5(USB)" + Chr(13) + "Get Word Data"
Text1.Text = ""
End Sub
----------------------------------------------------------------------------------------
7.3 Initialize/Error/Execute