Keithley 2100 User Manual page 139

6 1/2-digit resolution multimeter
Hide thumbs Also See for 2100:
Table of Contents

Advertisement

Model 2100 6 1/2-Digit Resolution Digital Multimeter User's Manual
4.
5.
6.
7.
8.
9.
The Sub Main function is where you need to add initialization code.
Sub Main()
Rem #########################################
Rem
Rem
Rem
Rem
Rem
Rem
Rem #########################################
Dim stat
Dim dfltRM As ViSession
Dim sesn As ViSession
Dim fList As ViFindList
Dim desc As String * VI_FIND_BUFLEN
Dim nList As Long
Dim ret As Long
Dim readin As String * 64
stat = viOpenDefaultRM(dfltRM)
If (stat < VI_SUCCESS) Then
test"
End If
Rem Find all 2100 USBTMC instruments in the system
stat = viFindRsrc(dfltRM, "USB[0-9]*::0x05E6::0x2100::?*INSTR", fList, nList,
desc)
If (stat < VI_SUCCESS) Then
End If
Rem Open a session to each and determine if it matches
stat = viOpen(dfltRM, desc, VI_NULL, VI_NULL, sesn)
If (stat < VI_SUCCESS) Then
End If
Rem send reset command '*RST' -- reset 2100
stat = viWrite(sesn, "*RST", 4, ret)
If (stat < VI_SUCCESS) Then
2100-900-01 Rev. B / July 2007
From the main menu, select Project, then select Add Module and press the Open button.
Cut and paste the code below into module 1.
From the main menu, select Project, then select References.
Select Browse... and navigate to the C:\Windows\System32 directory.
Select the file, visa32.dll, and click the Open button (this will add a reference to the "VISA
Library").
Save your project.
Using NI-VISA library visa32.dll
Set device on the VOLTage:DC configure and
read the measure
As ViStatus
'Rem Error initializing VISA ... exiting
MsgBox "USBTMC resource not found.", vbExclamation, "2100 multimeter device
Exit Sub
'Rem Error finding resources ... exiting
MsgBox "2100 device not found.", vbExclamation, "2100 multimeter device test"
viClose (dfltRM)
Exit Sub
MsgBox "Open device failed.", vbExclamation, "2100 multimeter device test"
stat = viClose(fList)
Exit Sub
Return to
Section Topics
Appendix B: Remote Interface Reference
B-25

Advertisement

Table of Contents
loading

Table of Contents