Keysight V3500A User Manual page 82

Handheld rf power meter
Hide thumbs Also See for V3500A:
Table of Contents

Advertisement

3
Driver Installation and Commands
Example code using Microsoft C#.NET
This sample program shows how to program the V3500A using Microsoft C#.NET 2003.
using
System;
namespace
ExampleV3500A
{
class
Class1
{
[STAThread]
static void
{
string
Reply;
double
MeasuredPower;
// The namespace for the V3500A driver is KeysightV3500A_NS.
// First, create the V3500A object.
KeysightV3500A_NS.KeysightV3500A myPM
KeysightV3500A_NS.KeysightV3500A();
// Set the serial number and check that the meter is available
SN=10973300; // Set this to the numerical serial number of your V3500A (without
int
prefix)
int
MeterAvailable=myPM.IsDeviceAvailable(SN);
// A return value of 1 means the V3500A is available.
// A value of –1 means it is absent, and a value of 0 means it is unavailable (for example, it
may be in use by another program).
if
(MeterAvailable != 1)
{
Console.WriteLine("PowerMeter not available;
status={0}",MeterAvailable); return;
}
Console.WriteLine("V3500A serial number {0} is available", SN);
myPM.SerialNumber=SN;
62
Main(string[] args)
=new
V3500A User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents