E5071C
1384
The ctrl_ext.vba is a sample program to control instruments connected
through USB/GPIB interface cable using the E5071C as the system
controller. This VBA program consists of the following modules.
Object
name
Module type Content
mdlVisa
Standard
module
Reads out the product information of
external instrument.
Module1
Module2
Standard
module
Two definition files to use VISA library
• When you control peripherals from E5071C VBA, use the GPIB
commands provided for the instrument to communicate over
VISA. On the other hand, when you control the E5071C itself
from E5071C VBA, use the COM objects provided for the
E5071C to communicate.
Lines 90 to 100
Initializes and starts up the VISA system and outputs the startup
information to the Defrm variable. During this process, if an error occurs,
the program goes to the error handling routine (Lines 320 to 360).
Lines 130 to 140
Establishes the connection to the external instrument (GPIB address: 17)
connected via GPIB and outputs the connection information to the Equip
variable. During this process, if an error occurs, the program goes to the
error handling routine (Lines 320 to 360).
Lines 170 to 180
Queries the product information of the external instrument connected via
USB/GPIB interface cable using VISA. During this process, if an error
occurs, the program goes to the error handling routine (Lines 320 to 360).
Lines 210 to 250
Retrieves the product information through VISA and outputs it into the
Prod variable. Displays the read-out result in the message box. During this
process, if an error occurs, the program goes to the error handling routine
(Lines 320 to 360).
Line 280