There are many cases where a user may want programmatic control of the VNA. Examples include automating a test sequence, manufacturing testing, orchestrating a complex measurement involving various pieces of test equipment, gathering a time series of data, or as a convenient way of getting data, files or images transferred from the VNA to a pc for further analysis.
GPIB Mnemonics
VectorStar has a fairly large set of GPIB commands. This includes a set of Native commands, Lightning commands and Agilent 8510 commands. You use the same commands regardless of the communication method employed. See Example 4 for using the LIST command to output the full set of supported GPIB mnemonics directly from the VNA. Because VectorStar supports Lightning commands we can use the VectorStar au464x LabWindows/CVI driver to control VectorStar but also send some Lightning commands if necessary. This document uses a combination of au464x driver functions and VISA Reads and Writes to send commands to the VNA and to get data from the VNA. With this combination method, we use the driver to accomplish many simple activities while the VISA commands allow a full range of command including VectorStar Native commands (see example 6). Thus the full set of VectorStar functionality is available to the LabWindows/CVI programmer.
The beauty of using VISA is that the only thing that needs to be changed for any of these possible communication protocols is the connection string. The rest of the code should be exactly the same (except for SOCKETS which are not covered in this document). For TCP/IP we recommend using VXI-11 since it better implements the IEEE 488.2 standard and all status checking. The Getting Started section of the Programming Examples shows how to set up for communication over VXI-11 (TCP/IP).
Programming Environments
Programming environments that are commonly used with test equipment include LabVIEW, LabWindows/CVI, Microsoft Visual Studio, Visual Basic 6, HP Basic, and so on. NI-VISA supports the following Windows development environments:
• LabVIEW
• LabWindows/CVI
• Measurement Studio for Visual Studio (all versions)
• Microsoft Visual Studio 2010/2008/2005/2003/6.0
• Microsoft Visual Basic 6.0
For the examples below, we will use LabWindows/CVI Version 8.5 with the Anritsu VectorStar au464x LabWindows/CVI driver. We will interchangeably use the terms LabWindows/CVI and CVI. These both refer to the programming environment.