VectorStar™ MS4640A SeriesMicrowave Vector Network Analyzer : Appendix B — Programming with LabWindows/CVI : Programming Examples
 
Programming Examples
Getting Started
We’ll create a few simple programs to demonstrate the use of the au464x CVI driver for controlling VectorStar. There are a few necessary steps to take before getting started with the programs.
Setup – Obtaining VNA IP Address
We want to communicate to VectorStar using VXI-11 (TCP/IP) so we’ll need to note the IP Address of the VNA and set up a resource (a connection string).
 
Setup – Resource Setup in NI-MAX
We’ll set up a resource in NI-MAX. The programs will reference this resource rather than a specific address.
 
Setup – Create New Resource
Create a new resource.
 
 
Setup – VISA TCP/IP Resource
Select VISA TCP/IP Resource.
 
 
Setup – VISA TCP/IP – Auto-Detect Selected
If the controlling pc and the VNA are on the same local sub-network (this is usually true if the first 3 numbers in the IP address are the same ─ for example, 192.168.1.x in this case), then you can probably Auto-detect the VNA.
 
 
Setup – VISA TCP/IP – Select detected instrument
Select the detected instrument.
 
 
Setup – VISA TCP/IP – Assign Alias
Give the instrument an alias. Later on we’ll use this alias in LabWindows/CVI.
 
Setup – VISA Alias in use
Note that the VISA connection string has been replaced with the VISA alias.
 
 
Creating the Project
Now back in LabWindows/CVI we’re ready to start creating the first example. We’ll create a new Project from Template.
Command-Line Template
We’ll use the Command-line Application Template.
Setting up the Driver to Load every time CVI starts
Since we’re planning to do a lot of VNA programs we’ll set up CVI to load the Anritsu driver automatically every time CVI starts up.
Auto-Load Anritsu Driver
Go to Library | Customize to have CVI load the driver into our user Library every time CVI starts. This is a preferable way to have access to the driver.
 
 
Find the au464x.fp File
We’ll Browse to find the au464x.fp file.
 
 
au464x.fp Function Tree File
Add the Function Tree (“.fp”) file.
 
 
Libraries Folder
The driver is now in the Libraries folder.
 
 
 
Find the au464x_32.dll DLL Driver
Finally, we’ll need to copy the driver DLL to someplace on the on the system path. If you don’t know or care what the system path is, then just copy the file to C:\Windows\System32.
 
 
Copy the au464x_32.dll DLL Driver
Here we’re copying the DLL to C:\Windows\System32. This step seems strange but it’s necessary. There are other places to put the DLL, if you’re interested, so check the LabWindows/CVI documentation.