Example Program 1- Code Structure; Example Program 1- How To Print Driver Properties, Check For Errors, And Close Driver Sessions - Keysight M9383A Programming Manual

Pxie vector signal generator
Hide thumbs Also See for M9383A:
Table of Contents

Advertisement

Example Program 1- Code Structure

The following example code builds on the previously presented " Tutorial: Creating a
Project with IVI-COM Using C#
instances, set the resource names and various initialization values, initialize the two
driver instances, print various driver properties for each driver instance, check
drivers for errors and report the errors if any occur, and close the drivers.
Example Program 1- How to Print Driver Properties, Check for Errors, and
Close Driver Sessions
27
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,
Version=v4.0" />
<supportedRuntime version="v2.0.50727/>
</startup>
</configuration>
// Copy the following example code and compile it as a
C# Console Application
// Example__VsaVsgProperties.cs
#region Specify using Directives
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ivi.Driver.Interop;
using Keysight.KtMVsg.Interop;
using Agilent.AgM9393.Interop;
#endregion
namespace VsaVsgProperties
{
class
Program
{
static void
{
// Create driver instances
IKtMVsg VsgDriver =
IAgM9393 VsaDriver =
try
{
#region Initialize Driver Instances
" and demonstrates how to instantiate two driver
Main(string[] args)
new
KtMVsg();
new
Keysight M9383A PXIe Vector Signal Generator
AgM9393();

Advertisement

Table of Contents
loading

Table of Contents