Tutorial
KIKUSUI Electronics Corp.
PWR-01 Interface Manual
Visual Basic 2017
■
Setting the "Project"
First, add the communication middleware (VISA library) to the project.
Click References on the Project menu to open the Reference Manager window.
On the navigation pane, click COM and then Type Libraries.
From the list in the center of the window, select “VISA COM *.* Type Library” (where
*.* is the VISA library version number), and select the check box.
Click OK to close the dialog box.
■
Communication through RS232C, USB, or LAN
Open the VISA
To communicate with an RS232C, USB, or LAN device using VISA, you have to
first open VISA. When you open VISA, specify the I/O resource.
Example : To open VISA by using USB
Set rm = CreateObject("VISA.GlobalRM")
Set msg = rm.Open("USB::0x0B3E::0x1049::00000001::INSTR", NO_LOCK, 0, "")
"USB::0x0B3E::0x1049::00000001::INSTR" is the I/O resource.
The I/O resource is specified by the following constructions. The part indicated with
[ ] can be omitted. Enter the appropriate values in the parts specified in oblique
characters.
Serial
(RS232C)
ASRL[
board
][::INSTR]
Example : The measuring instrument connected to the serial port COM1.
ASRL1::INSTR
USB
USB[
board
]::
VendorID
::
ProductID
::
SerialNumber
[::
InterfaceNumber
]
[::INSTR]
Example: The USNTMC measuring instrument having vendor ID (VID)
2878, Product ID (PID) 4169 and serial number "00000001."
USB0::0x0B3E::0x1049::00000001::INSTR
LAN
*1
VXI-11
TCPIP[
board
]::
hostname
[::inst
0
][::INSTR]
Example :The measuring instrument whose IP address (hostname) is
169.254.7.8.
TCPIP::169.254.7.8::INSTR
You can also set the LAN device name using the host name.
HiSLIP
TCPIP[
board
]::
hostname
::hislip0[::INSTR]
Example :The measuring instrument whose IP address (hostname) is
169.254.7.8.
TCPIP::169.254.7.8::hislip0::INSTR
You can also set the LAN device name using the host name.
SCPI-RAW TCPIP[
board
]::
hostname
::
portno
::SOCKET
Example :The measuring instrument whose IP address (hostname) is
169.254.7.8. (The "portno" setting of the PWR-01 is always 5025.)
TCPIP::169.254.7.8::5025::SOCKET
You can also set the LAN device name using the host name.
*1
: The hostname must be a valid mDNS hostname (a Bonjour hostname that ends in ".lo-
cal") or a DNS hostname that is managed by an external DNS server (a full-qualified domain
name—FQDN). If you are using an mDNS hostname, Apple Bonjour (alternatively, iTunes or
Safari) must be installed on your PC.
For VISA, the alias can be used for the I/O resource.