Step 7 - Close the Driver
Calling
when using any IVI driver.
Important! Close()
driver. Failing to do this could mean that system resources are not freed up and
your program may behave unexpectedly on subsequent executions.
Step 8 - Building and Running a Complete Program Using Visual
C-Sharp
Build your console application and run it to verify it works properly.
Keysight M9393A PXIe Performance Vector Signal Analyzer
// Waits until the list is finished or the specified
time passes
bool retval = VsgDriver.List.WaitUntilComplete();
//…or you could use the following:
// Waits 100 ms until output is settled before
producing signal
bool retval = VsgDriver.RF.WaitUntilSettled(100);
at the end of the program is required by the IVI specification
Close()
may be the most commonly missed step when using an IVI
{
if(VsaDriver!=
{
// Close the VSA driver
VsaDriver.Close();
Console.WriteLine("VSA Driver
}
if(VsgDriver !=
{
// Close the VSG driver
VsgDriver.Close();
Console.WriteLine("VSG Driver
}
}
Open the solution file
1.
Set the appropriate platform target for your project.
2.
In many cases, the default platform target (Any CPU) is appropriate.
However, if you are using a 64-bit PC (such as Windows 7) to build a .
NET application that uses a 32-bit IVI-COM driver, you may need to
specify your project's platform target as x86.
3.
null
&& VsaDriver.Initialized)
null
&& VsgDriver.Initialized)
SolutionNameThatYouUsed.sln
Closed\n");
Closed");
in Visual Studio 2010.
34