HP (Hewlett-Packard) Drive Network Card User Manual


 
Using IVI with Visual Basic 6.0
89
Set the Trigger Delay
Set the trigger delay to 0.01 seconds.
Type: dmm.Trigger.Delay = 0.01
Display the Reading
Set the reading timeout to 1 second and display the reading.
1 Return to the form view and click the Label Button in the Toolbox to create a
label.
2 Drag it to the form and drop it.
3 Change the Name to lblResult in the Properties list at right.
4 Remove the text under Caption.
5 In the code after the trigger delay command, type
lblResult.Caption = dmm.Measurement.Read(1000)
Close the Session
Type
dmm.Close
Your final program should contain the code below.
Option Explicit
Dim dmm As New Agilent34401
Private Sub btnTest_Click()
dmm.Initialize “GPIB::23”, False, True, “Simulate=True”
dmm.Function = Agilent34401FunctionDCVolts
dmm.DCVoltage.Configure 1.5, 0.001
dmm.Trigger.Delay = 0.01
lblResult.Caption = dmm.Measurement.Read(1000)
dmm.Close
End Sub