Keysight V3500A User Manual page 88

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

Advertisement

3
Driver Installation and Commands
Example code using Microsoft Visual C++.NET
// This sample program shows how to program the V3500A using Microsoft Visual C++.NET 2003
#include
"stdafx.h"
#using
<mscorlib.dll>
using namespace System;
using namespace
KeysightV3500A_NS;
int
_tmain()
{
String * Reply;
double
MeasuredPower;
void
CheckForOK(String * Msg);
// The namespace for the V3500A driver is KeysightV3500A_NS.
// First, create the V3500A object.
KeysightV3500A_NS::KeysightV3500A *myPM
// Set the serial number and check that the meter is available.
int
SN=10973300; // Set this to the numerical serial number of your V3500A
(without 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(S"PowerMeter not available;
status={0}",__box(MeterAvailable));
return
0;
}
Console::WriteLine("V3500A serial number {0} is available", __box(SN));
myPM->SerialNumber=SN;
// Initialize the V3500A.
68
=new
KeysightV3500A();
V3500A User's Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents