Picotest M3500A User Manual page 181

6.5 digit
Hide thumbs Also See for M3500A:
Table of Contents

Advertisement

Dim stat As ViStatus
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 * 128
Dim i As Integer
stat = viOpenDefaultRM(dfltRM)
If (stat < VI_SUCCESS) Then
'Rem Error initializing VISA ... exiting
MsgBox "USBTMC resource not found.", vbExclamation, "M3500
multimeter device test"
Exit Sub
End If
Rem Find all M3500 USBTMC instruments in the system
stat = viFindRsrc(dfltRM, "USB[0-9]*::0x05E6::0xM3500::?*INSTR",
fList, nList, desc)
If (stat < VI_SUCCESS) Then
'Rem Error finding resources ... exiting
MsgBox "M3500 device not found.", vbExclamation, "M3500
multimeter device test"
viClose (dfltRM)
Exit Sub
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
MsgBox "Open device failed.", vbExclamation, "M3500 multimeter
device test"
stat = viClose(fList)
Exit Sub
End If
Rem send reset command '*RST' -- reset M3500
stat = viWrite(sesn, "*RST", 4, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error. (*RST)", vbExclamation, "M3500
multimeter device test"
stat = viClose(fList)
Exit Sub
End If
Rem send Clear command '*CLS'-- Clear M3500 status register
stat = viWrite(sesn, "*CLS", 4, ret)
If (stat < VI_SUCCESS) Then
MsgBox "System command error. (*CLS)", vbExclamation, "M3500
multimeter device test"
stat = viClose(fList)
Exit Sub
End If
Rem send command -- 50 ohm reference resistance
stat = viWrite(sesn, "CALC:DBM:REF 50", 15, ret)
If (stat < VI_SUCCESS) Then
MsgBox
"System
multimeter device test"
stat = viClose(fList)
' Array index
command
error.",
181
181
181
181
vbExclamation,
"M3500

Advertisement

Table of Contents
loading

Related Products for Picotest M3500A

Table of Contents