While installing the software, it places the following sample programs into two locations on your C: drive—both locations contain the same files:
ControlByGUI
Setups
SimpleControl
Using Microsoft Visual C# .NET, or a similar IDE, you can use these sample projects as a starting point to develop your own API programs.
C:\Users\<user name>\AppData\Roaming\Keysight\Signal Studio\GSM EDGE\Samples
C:\ProgramData\Keysight\Signal Studio\GSM EDGE\Samples
C:\Documents and Settings\All Users\Application Data\Keysight\Signal Studio\GSM EDGE\Samples
C:\Documents and Settings\<user name>\Application Data\Keysight\Signal Studio\GSM EDGE\Samples
You can create an API program by performing the following general steps. This sequence is demonstrated in the Main.cs file found in the SimpleControl sample program folder located in the above paths.
Before editing the sample programs, make backup copies of all files. To save the edited files, right-click each file, select Properties, and de-select the Read-only attribute.
Create API object.
Configure the instrument connection.
Clear all carriers.
Configure the waveform.
Add framed carrier with GSM Normal burst configuration.
Generate and download the waveform to the instrument.
Turn on the RF output.
End program and turn off the RF output.
When migrating an API program developed for license option N7602B-Exx to an API program which uses license option N7602B-Fxx, the software can generate multiple ambiguous reference errors if there are two name space statements at the same time in the program.
Because license option N7602B-Fxx is a super-set of N7602B-Exx, any program written for N7602B-Exx will work with license option N7602B-Fxx by changing the "name space" to the one set up for the N7602B-Fxx option.
For example, the name space for a normal GSM/EDGE carrier is written as:
using Keysight.SignalStudio.N7602.API.GsmEdgeFramed;
However, to run the same program with a normal EGPRS2 carrier, the previous statement needs to be replaced with:
using Keysight.SignalStudio.N7602B.API.GsmEdgeFramedEGPRS2;
The SimpleControl sample project (...\Samples\SimpleControl\SimpleControl.sln) provides a basic program for generating and downloading waveforms using API commands.
To view the code, open the SimpleControl.sln file using the Microsoft Visual C# .NET IDE, or open the Main.cs file using an ASCII text editor, such as Notepad. Since the SimpleControl.sln program flow does not use the API GUI, you will see only the code contained in the Main.cs file in the Code Editor, as shown in Figure 1.
Figure 1. Main.cs displayed in the Microsoft Visual C# .NET IDE
Using Microsoft Visual C# .NET, or a similar IDE, open the API_TEST project (...\Samples\ControlByGUI\API_TEST.sln). This displays a .NET API graphical user interface with two API mode selections (see Figure 2):
– settings that you configure using the .NET API GUI are displayed in the N7602B Signal Studio user interface, and are subsequently sent to the instrument via the Signal Studio application. The Signal Studio GUI is automatically displayed when you select Debug mode. Using this mode allows you to see how changes in your program modify the parameters in the Signal Studio software interface.
– settings that you configure using the .NET API are not displayed in the Signal Studio user interface, but are sent directly to the API instance of the Signal Studio application and subsequently to the instrument.
Ensure that the .dll file Keysight.SignalStudio.N7602B is correctly displayed under References in the Solution Explorer. If the file is not listed, add it as follows:
Select
> . A window opens in which you can select the reference files.Locate the directory (the listed paths assume that you installed Signal Studio for GSM EDGE in the default location):
Windows XP—C:\Program Files\Keysight\Signal Studio\GSM EDGE
Windows 7—C:\Program Files (x86)\Keysight\Signal Studio\GSM EDGE
Highlight "Keysight.SignalStudio.N7602.dll".
Click
to add the file in the project as a reference.
Figure 2. API graphical user interface
To view the C# code in the API_TEST project, select the TestApiForm.cs tab in the Code Editor window in the Microsoft Visual C# .NET IDE. See Figure 3.
Figure 3. TestApiForm.cs displayed in the Microsoft Visual C# .NET IDE