?? hpibdv.bas
字號:
' hpibdv.bas
Sub Main ()
Dim dvm As Integer
Dim sw As Integer
Dim res As Double
Dim i As Integer
Dim argcount As Integer
' Open the multimete and switch sessions
dvm = iopen("hpib7,9,3")
sw = iopen("hpib7,9,14")
Call itimeout(dvm, 10000)
Call itimeout(sw, 10000)
' Set up trigger
argcount = ivprintf(sw, "TRIG:SOUR BUS" + Chr$(10))
' Set up scan list
argcount = ivprintf(sw, "SCAN (@100:103)" + Chr$(10))
argcount = ivprintf(sw, "INIT" + Chr$(10))
' Display form1 and print voltage measurements
form1.Show
For i = 1 To 4
' Take a measurement
argcount = ivprintf(dvm, "MEAS:VOLT:DC?" + Chr$(10))
' Read the results
argcount = ivscanf(dvm, "%lf", res)
' Print the results
form1.Print "Result is " + Format(res)
' Trigger to close channel
argcount = ivprintf(sw, "TRIG" + Chr$(10))
Next i
' Close the voltmeter session
Call iclose(dvm)
' Close the switch session
Call iclose(sw)
' Tell SICL to cleanup for this task
Call siclcleanup
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -