Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5566

Controlling instruments using USB and LAN

$
0
0

I have a simple program that I am trying to use to get a instruments status using VBA. I wanted to find out if it is possible to use VISA-Com 5.13 Type Library and have it be able to run with either a USB or LAN address.

My code uses UUT_Address as the USB or LAN address. When I declare UUT_Address as a USB address everything works, but when I declare it as LAN address I get an the following error. Is the VISA-COM 5.13 Type Library capable of this?

sokin_0-1673894677778.png

 

Dim RM As VisaComLib.ResourceManager
Dim VISACOMOBJ As VisaComLib.FormattedIO488
Dim list() As String
Dim timeout As Long: timeout = 50000 '5000msec

Set RM = New VisaComLib.ResourceManager
Set VISACOMOBJ = New VisaComLib.FormattedIO488
Set VISACOMOBJ.IO = RM.Open("UUT_Address", NO_LOCK, timeout)
With VISACOMOBJ
.IO.timeout = timeout

.WriteString "*RST" & vbLf, True

.IO.Close
End With


Viewing all articles
Browse latest Browse all 5566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>