KIKUSUI Electronics Corp.
338
■
Communicating via GPIB, RS232C, USB, or LAN
Opening VISA
Before you can use the VISA library to communicate with GPIB, RS232C, USB, and
LAN devices, you have to open VISA. Specify an I/O resource to open VISA.
Example: Opening VISA when using USB on the PCR-WE
Set rm = CreateObject("VISA.GlobalRM")
Set msg = rm.Open("USB::0x0B3E::0x104E::00000001::INSTR", NO_LOCK, 0, "")
“
USB::0x0B3E::0x104E::00000001::INSTR
”
is an I/O resource.
The I/O resource syntax is shown below. The parts surrounded by square brackets ([ ])
can be omitted. Enter the appropriate values in the parts written in italics.
GPIB
GPIB[
board
]::PrimaryAddress[::SecondaryAddress][::INSTR]
Example: Measuring instrument with primary address 3 connected to GPIB0
GPIB0::3::INSTR
Serial
(RS232C)
ASRL[
board
][::INSTR]
Example: A measuring instrument connected to serial port COM1
ASRL1::INSTR
USB
USB[
board
]::
VendorID
::
ProductID
::
SerialNumber
[::
InterfaceNumber
][::IN-
STR]
Example: A USBTMC measuring instrument whose vendor ID (VID) is 2878,
product ID (PID) is 4174, and serial number is 00000001
USB0::0x0B3E::0x104E::00000001::INSTR
LAN
*1
VXI-11
TCPIP[
board
]::
hostname
[::inst
0
][::INSTR]
Example: Measuring instrument whose IP address (hostname) is
169.254.7.8
TCPIP::169.254.7.8::INSTR
You can also specify the host name for the hostname parameter.
HiSLIP
TCPIP[
board
]::
hostname
::hislip0[::INSTR]
Example: Measuring instrument whose IP address (hostname) is
169.254.7.8
TCPIP::169.254.7.8::hislip0::INSTR
You can also specify the host name for the hostname parameter.
SCPI-RAW TCPIP[
board
]::
hostname
::
portno
::SOCKET
Example: Measuring instrument whose IP address (hostname) is
169.254.7.8 (the product
ʼ
s port number is fixed to 5025)
TCPIP::169.254.7.8::5025::SOCKET
You can also specify the host name for the hostname parameter.
*1
: The hostname must be a valid mDNS hostname (a Bonjour hostname that ends in ".local")
or a DNS hostname that is managed by an external DNS server (a full-qualified domain name
̶