Keithley 2100 User Manual page 143

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

Advertisement

Model 2100 6 1/2-Digit Resolution Digital Multimeter User's Manual
Creating the application
To create a new Visual Basic 6 project:
1.
2.
3.
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
2100-900-01 Rev. D / September 2011
Create a new Standard.EXE project.
From the main menu, select Project, then select Project 1 Properties and press the OK
button.
Set the startup object for a Windows application to Sub Main and press the OK button.
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
Return to
Section Topics
Appendix B: Remote Interface Reference
B-31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents