Sample API Programs

Sample programs are placed in this default location when you install the software:

C:\Users\<user name>\AppData\Roaming\Keysight\Signal Studio\PA Test 2018.0730\Samples

Using Microsoft Visual C# .NET or a similar IDE, you can modify these sample projects to develop your own API programs.

Basic Program Flow

You can create an API program by performing the following general steps. This sequence is demonstrated in the Programs.cs file, which is included in the ...\Samples\SimpleControl\ConsoleApplication1 folder.

using Keysight.SignalStudio.N7614;

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

 

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Api api = new Api();

api.PATestApplication.WaveformModel.FileName = @"C:\Program Files\Keysight\Signal Studio\PA Test 2018.0201\Waveforms\LTE_FDD_5M_QPSK_FullRB.wfm";

api.PATestApplication.EnvelopeTrackingModel.Enabled = false;

api.PATestApplication.DigitalPredistortionModel.Enabled = false;

 

api.PATestApplication.PlaybackManager.Select(typeof(SGPlaybackModel));

api.PATestApplication.PlaybackManager.CurrentModel.SignalGeneratorModel.Address = "192.168.0.100";

api.PATestApplication.CaptureManager.Select(typeof(SACaptureModel));

api.PATestApplication.CaptureManager.CurrentModel.SignalAnalyzerModel.Address = "192.168.0.101";

 

api.PATestApplication.Run();

 

string error = api.ReadError();

Console.WriteLine(error);

 

api.Close();

 

}

}

}

Before editing the sample programs, make backup copies of all files. To save the edited files, right-click each file, select Properties, and deselect the read-only attribute.