Keysight M9383A PXIe Vector Signal Generator
24
1.
2.
3.
Step 7 - Close the Driver
Calling
at the end of the program is required by the IVI specification
Close()
when using any IVI driver.
may be the most commonly missed step when using an IVI
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.
{
if
(VsaDriver!=
null
&& VsaDriver.Initialized)
{
// Close the VSA driver
VsaDriver.Close();
Console.WriteLine(
"VSA Driver Closed\n"
);
}
if
(VsgDriver !=
null
&& VsgDriver.Initialized)
{
// Close the VSG driver
VsgDriver.Close();
Console.WriteLine(
"VSG Driver Closed"
);
}
}
Step 8 - Building and Running a Complete Program Using Visual
C-Sharp
Build your console application and run it to verify it works properly.
Open the solution file
in Visual Studio 2010.
SolutionNameThatYouUsed.sln
Set the appropriate platform target for your project.
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.
Choose Project >
Properties and select
ProjectNameThatYouUsed
Build |
.
Rebuild Solution
Tip
: You can also do the same thing from the Debug menu by
selecting Start Debugging or pressing the
key.
F5
Example programs are available from C:\Program Files (x86)\IVI
Foundation\IVI\Drivers\KtM9383\Examples
Before you run the LiveSoftFrontPanel C# example program, ensure that the
associated app.config file has the following content for the .NET Runtime
interoperability: