Technical data
Programming Examples 38
Keysight InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide 903
• Windows XP: C:\Documents and Settings\All Users\Keysight\Command
Expert\ScpiNetDrivers
• Windows 7: C:\ProgramData\Keysight\Command Expert\ScpiNetDrivers
d Select the .dll file for your oscilloscope, for example
AgInfiniiVision2000X_01_20.dll; then, click OK.
7 Build and run the program.
For more information, see the SCPI.NET driver help that comes with Keysight
Command Expert.
/*
* Keysight SCPI.NET Example in C#
* -------------------------------------------------------------------
* This program illustrates a few commonly used programming
* features of your Keysight oscilloscope.
* -------------------------------------------------------------------
*/
using System;
using System.IO;
using System.Text;
using Keysight.CommandExpert.ScpiNet.AgInfiniiVision2000X_01_20;
namespace InfiniiVision
{
class ScpiNetInstrumentApp
{
private static AgInfiniiVision2000X myScope;
static void Main(string[] args)
{
try
{
string strScopeAddress;
//strScopeAddress = "a-mx3054a-60028.cos.is.keysight.com";
strScopeAddress =
"TCPIP0::a-mx3054a-60028.cos.is.keysight.com::inst0::INSTR";
Console.WriteLine("Connecting to oscilloscope...");
Console.WriteLine();
myScope = new AgInfiniiVision2000X(strScopeAddress);
myScope.Transport.DefaultTimeout.Set(10000);
// Initialize - start from a known state.
Initialize();
// Capture data.
Capture();
// Analyze the captured waveform.
Analyze();
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}










