No part of this manual may be reproduced
in any form or by any means (including
electronic storage and retrieval or
translation into a foreign language) without
prior agreement and written consent from
Keysight Technologies, as governed by
United States and international copyright
laws.
Keysight Technologies, Deutschland GmbH
Herrenberger Straße 130
71034 Böblingen, Germany.
Manual Part Number
437xB-90A01
Edition
Edition 2.0, February 2015
Subject Matter
The material in this document is subject to
change without notice.
Keysight Technologies makes no warranty
of any kind with regard to this printed
material, including, but not limited to, the
implied warranties of merchantability and
fitness for a particular purpose.
Keysight Technologies shall not be liable
for errors contained herein or for incidental
or consequential damages in connection
with the furnishing, performance, or use of
this material.
Printing History
New editions are complete revisions of the
guide reflecting alterations in the
functionality of the instrument. Updates are
occasionally made to the guide between
editions. The date on the title page changes
when an updated guide is published. To find
out the current revision of the guide, or to
purchase an updated guide, contact your
Keysight Technologies representative.
Warranty
This Keysight Technologies instrument
pro duct i s warranted against defects in
material and workmanship for a period of one
year from date of shipment. During the
warranty period,
either repair or replace products that prove to
be defective.
For warranty service or repair, this product
must be returned to a service facility
designated by
shipping charges to
shall pay shipping charges to return the
product to Buyer. However, Buyer shall pay
all shipping charges, duties, and taxes for
products returned to
country.
Keysight will, at its option,
Keysight. Buyer shall prepay
Keysight and Keysight
Keysight from another
Limitation of Warranty
The foregoing warranty shall not apply to
defects resulting from improper or
inadequate maintenance by Buyer, Buyersupplied software or interfacing,
unauthorized modification or misuse,
operation outside of the environmental
specifications for the product, or improper
site preparation or maintenance.
No other warranty is expressed or implied.
Keysight Technologies specifically disclaims
the implied warranties of Merchantability
and Fitness for a Particular Purpose.
Exclusive Remedies
The remedies provided herein are Buyer’s
sole and exclusive remedies.
Technologies shall not be liable for any
direct, indirect, special, incidental, or
consequential damages whether based on
contract, tort, or any other legal theory.
Keysight
Assistance
Product maintenance agreements and
other customer assistance agreements are
available for
products. For any assistance contact your
nearest
Service Office.
Keysight Technologies
Keysight Technologies Sales and
Certification
Keysight Technologies certifies that this
product met its published specifications at
the time of shipment from the factory.
Keysight Technologies further certifies that
its calibration measurements are traceable
to the United States National Institute of
Standards and Technology, NIST, to the
extent allowed by the Institutes’s
calibration facility, and to the calibration
facilities of other International Standards
Organization members.
Keysight warrants that its software and
firmware designated by
an instrument will execute its programming
instructions when properly installed on that
instrument.
the operation of the instrument, software, or
firmware will be uninterrupted or error free.
Keysight does not warrant that
Keysight for use with
ISO 9001 Certification
Produced to ISO 9001 international quality
system standard as part of our objective of
continually increasing customer satisfaction through improved process control.
Remote Operation5
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Transferring code from the Keysight 8703A/B to the Keysight
N437xB Series Lightwave Component Analyzer11
LCA System Configuration
How to configure the LCA for networking
How to connect the LCA to your network
How to change network settings
Install the LCA Remote Client
12
12
12
12
15
Synchronous vs. Asynchronous Method Calls21
How to use the LCA Remote Client
Adding references to your project
Declare and create the required objects
Basic structure of an LCA client application
Troubleshooting
LCA Remote Programming
LCA remote control DLLs
LCA remote control DLLs
16
16
18
19
23
24
24
24
Specific Commands
Interface structure
Enumeration
Class LCAMeasParams
Class LCAProperties
Interface ILCARemoteClient
General commands
Measurement commands
Properties
The LCA SCPI Interface
Overview
Port Types
Configuration
25
25
26
27
30
31
31
34
40
43
43
43
45
Start/Stop the LCA SCPI Module
Remote Operation
8
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
LCA SCPI Commands
Command Details
45
46
48
Overview
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
9
This programming guide supports LCA models beginning
with the B generation. These now include: N4373D, N7373C,
N4373B, N4374B, N4375D, N4375B, N4376D and N4376B.
This chapter will help you control an LCA from your own
computer. The chapter covers how to write your own
applications. The next chapter explains examples based on
Keysight VEE and VBA/Excel in more detail. Note that
applications for remote control can also be run on the LCA
itself, which is useful for automated measurement procedures.
The LCA is a remoting enabled, Microsoft .NET instrument that
can be controlled across any LAN that can relay an http web
page. The provided remote control client has an Active X
interface and a .NET interface, so you can program the LCA
from many established programming environments such as
Visual Basic 6.0 and VBA, as well as from .NET enabled
programming environments such as C#.
Beginning with the LCA software version 3.00.03 for Windows
XP systems or 3.01.00 with Window 7, an SCPI interface is
also available, which may be more comfortable for other
environments like Labview. The SCPI interface can be used
over either a LAN or USB port.
The LCA uses .NET remoting as the foundation for its external
communications. Remoting is
the process of programs or
distributed components interacting across different processes
or machines.
In .NET remoting, the server program publishes an object on a
Remote Operation
10
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
network channel and the client program subscribes to that
channel when loading or connecting to that object. In the case of
the LCA, a RemoteObject object is published to an http channel
and the subscribing client program is the LCA RemoteClient. A
Remoting server is embedded in the LCA Server application.
The LCA RemoteClient is a layer of abstraction, which provides
an easy to use interface with methods to control the LCA. The
LCA Remote Client layer consists of 3 files, named
"RemoteClient.dll", "RemoteObjects.dll" and "RemoteClient.tlb".
These files are installed as part of the the LCA Remote Client
installation package, together with a number of programming
examples.
Since the LCA interface does not provide any methods to set
network analyzer related parameters or to retrieve
measurement data from the network analyzer, most
applications also need to program the network analyzer. The
network analyzer’s native functions can be controlled either
using SCPI or COM. We recommend using the COM interface.
This is reflected in the programming examples.
Figure 1LCA Remoting Architecture
While this chapter assumes you are familiar with your
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
11
programming environment, it does not assume familiarity with
controlling remote objects from within that environment.
Examples are provided for VB.NET, C#, VB 6.0, VBA and Keysight
VEE, which can be extrapolated to most environments for
controlling the LCA. After installing the LCA Remote Client on
your computer, you can find these examples in the folder:
The location on your computer depends on the folder in which
you installed the LCA Remote Client.
The Excel-VBA example pulls data directly from the LCA into
Excel. This is very useful if you are setting up measurements
manually, but want to analyze the results on your own
computer.
Transferring code from the 8703A/B to the Keysight N437x Series
Lightwave Component Analyzer
Tools are available to migrate code from the 8720 network
analyzer to the new PNA network analyzer platform at
www.keysight.com/find/nadisco
The 8703A/B Lightwave Component Analyzers are based on the
8720 network analyzers, so you can use thes
tools to migrate existing code to the N437x Series LCA based
on the PNA platform.
Most of the code in a typical application for the 8703 LCA
controls the functionality of the network analyzer. This part of
the application can be migrated with these tools.
The code related to LCA specific functionality has to be
migrated by hand.
e code conversion
LCA System Configuration
Remote Operation
12
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
How to configure the LCA for networking
Remote programming of the LCA with the .NET interface is
only possible if the LCA is connected to a local area network
(LAN) via the built-in LAN connector. When the LCA is
connected to a network, it is also possible to connect it to
network printers and remote servers, with access to shared
folders and files.
NOTE
Using the SCPI interface, the LCA can also be controlled from a USB
port.
How to connect the LCA to your network
The LCA comes configured for DHCP networking, and has a
default machine name. In many cases, connecting the LCA to
your LAN is simply a case of registering the machine name with
your IT department.
NOTE
NOTE
Do not connect the LCA to a network that is configured to automatically
install software on network devices. Installing or overwriting files on the
LCA computer system may impact the operation of the instrument. Please
contact your network administrator or IT department to find out if you have
this type of network.
The LCA LAN connector supports 10 Base-T and 100 Base-T Ethernet
networks using TCP/IP and other Microsoft supported networking
protocols. The LCA uses Microsoft® Windows 7 or XP.
How to change network settings
You can change the LCA network settings as needed so that it
connects properly to your specific network.
NOTE
Because your network settings are unique to your IT infrastructure,
Keysight Technologies will not be able to assist you with connecting your
instrument to your network. Please contact your network administrator or
IT department for assistance. For more information, refer to the MS
Windows resource kit (available from Microsoft) that is appropriate for
your computer system. You can also refer to the online Help for Windows
(Start > Help).
NOTE
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
13
By default, as the instrument starts up, you are logged on as an
administrator with the logon name PNA-Admin. The login password,
which is usually not needed, is "pna" for systems with Windows 7 or
"agilent" for systems using Windows XP.
Keysight only recommends using the LCA application while you are logged
on as an administrator.
You can change network settings by using the standard
Microsoft® Windows functions.
To view or change the computer machine name
1 On the Task bar, click Start, point to Settings, and then click
Control Panel.
NOTE
NOTE
NOTE
NOTE
2 Double-click the
System icon and click on the Computer Name
tab. From here you can view or change the machine name.
3 When you have finished making changes, restart the
instrument.
To configure TCP/IP to use DNS or WINS
If using a protocol other than TCP/IP, please contact your IT department
for assistance.
Editing your instrument’s protocols and file access permissions can result
in unwanted behaviors that are difficult to reverse. Ensure that your
changes are valid!
Please consult with your network administrator concerning advanced
TCP/IP and multi-protocol configuration settings to support your network.
Please contact your network administrator or IT department if you have
any problems connecting the LCA to your network.
4 On the Task bar, click Start, point to Settings, and then click
Network and Dial-up Connections.
5 Then click Local Area ConnectionProperties.
6 On the
Networking tab (all other connections), click Internet Protocol
(TCP/IP)
all desired changes.
General tab (for a local area connection) or the
, and then click Properties. From here, you can make
7 When you have finished making changes, restart the
Remote Operation
14
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
instrument.
NOTE
For more information, click Start > Help > Index, and search for “DNS” or
“WINS” or “static” or “dynamic.”
To configure TCP/IP for static or dynamic addressing
• To get started, follow the same steps listed above.
Install the LCA Remote Client
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
15
The LCA Remote Client is described in “Overview” on page 6.
NOTE
This installation is not for the LCA itself. (Applications using the remote
programming commands can be run on the LCA itself without installing
the remote client package.)
1 If not already installed, install the .NET Framework Version
from Microsoft. Go to www.microsoft.com and search for
2.0
‘How to get the Microsoft .NET framework’. Be sure to get the
framework and all the service packs. Make sure that you get
the framework, not the SDK (software development kit.)
2 The LCA CD shipped with the LCA contains the Remote
Client Installation Package to install the LCA specific DLLs and
the programming examples. The most recent version of the LCA
Remote Client Installation Package is available from the
Keysight web site (www.keysight.com/find/lca).
• Insert the CD into the CD drive, use Windows Explorer to
find LCA Remote Client Installer Folder, or
• Start the downloaded installer.
3 If you want to program the network analyzer via its COM
interface you need to install the PNAProxy. The installation
executable “PNAProxy.exe” can be found on the network
analyzer in the folder:
Install the PNA Proxy by running the installation program
“PNAProxy.exe” on your client machine.
When asked to type in the host name or IP address of the
remote network analyzer during installation, you do not need to
type in anything.
You can specify the host name or IP address during program
development or execution.
How to use the LCA Remote Client
Remote Operation
16
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Here you can see the basic steps required to write an LCA client
application.
The code sequences presented here are in VB.NET syntax. For
sequences in other languages like C#, VB 6.0, VBA or C++ refer to
the different programming examples. You can find these
examples in the “Examples” folder, in the “
Client” installation folder.
Since most client applications will also control the network
analyzer for setting measurement parameters like start- and
stop-frequency and for reading out the measurement data, we
also show the basic steps required to control the network
analyzer using its COM interface over LAN (DCOM).
The network analyzer can also be programmed using its SCPI
interface, but this is not covered here. For details about
programming the network analyzer, please refer to the relevant
network analyzer documentation.
Adding references to your project
Keysight LCA Remote
In VB.NET, C#, VB 6.0 or VBA projects, you have to add
references to the LCA Remote Client Library and to the
PNAProxy type library (the network analyzer proxy, assuming
you also want to program the network analyzer).
The LCA Remtote Client implements two different interface
technologies.
• In environments which support .NET assemblies, we
recommend using the LCA Remote Client .NET assembly
directly.
• If your programming environment does not support .NET
assemblies, use the LCA Remote Client over its COM
interface.
Here we show how this is done in Microsoft Visual Studio 2005
using the LCA Remote Client .NET assembly directly. When
using the COM interface, the basic structure is the same.
For the differences, please check the VBA, VB 6.0 and C++
example projects, installed with the LCA Remote Client.
1 From the “Project” menu, select “Add Reference”.
2 Switch to the “Browse” tab.
3 Browse to your LCA Remote Client installation folder.
4 Select “RemoteClient.dll” and press OK.
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
17
If you also want to use the network analyzer COM
5
interface, please refer to the network analyzer
documentation, including:
http://na.support.keysight.com/pna/programming/
Because environments like VB 6.0 or VBA cannot work directly
with .NET assemblies, you have to use the COM interface of the
LCA Remote Client in such cases.
1 In VB 6.0, from the “Project” menu, select “References”.
In VBA, open the “Tools” menu and select “References”.
In both programming environments you will see a dialog like
Remote Operation
18
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
the following:
2 Select“Keysight Remote Client for the LCA”.
Declare and create the required objects
The LCA Remote Client defines
• three interfaces ILCARemoteClient, ILCAMeasParams,
ILCAProperties and
• three classes, LCARemoteClient, LCAMeasParams and
LCAProperties.
Each of these classes implements the corresponding interface.
To be able to use the LCA Remote Client, you have to create
objects from these classes.
‘ Declare the objects
Private lcaClient As Agilent.LCA.RemoteClient.LCARemoteClient
Private lcaMeasParams As Agilent.LCA.RemoteClient.LCAMeasParams
Private lcaProperties As Agilent.LCA.RemoteClient.LCAProperties
….
‘Create the objects
lcaClient = New Agilent.LCA.RemoteClient.LCARemoteClient()
lcaMeasParams = New Agilent.LCA.RemoteClient.LCAMeasParams()
lcaProperties = New Agilent.LCA.RemoteClient.LCAProperties()
If you also want to use the network analyzer, you have to declare
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
19
and create a network analyzer application object.
This is quite different to the LCA. When working with the LCA
you are creating a local LCA Remote Client object. The
connection to the remote LCA server is done with the “Connect”
command on the LCA Remote Client interface.
When using the network analyzer over its COM interface, you are
using DCOM and have to remotely activate the network analyzer
interface. For examples on how this is done in different
programming environments, see the programming examples
installed with the LCA Remote Client.
Here we show how this is done in VB.NET:
‘ Declare the object
Private pnaClient As AgilentPNA835x.Application
…
Public Sub Open(ByVal serverName As String)
‘ the class-id of the AgilentPNA835x.Application class
Dim clsID As System.Guid = New Guid(
"16D3C697-5F97- 11D2-BC1F-0060B0B52EA7")
Dim srvtype As System.Type =
System.Type.GetTypeFromCLSID(
clsID, serverName, True)
‘ now we connect to the remote PNA
pnaClient =
CType(System.Activator.CreateInstance(srvtype),
End Sub
For further details on programming the network analyzer,
please refer to the relevant network analyzer documentation.
Basic structure of an LCA client application
When programming the LCA you have to follow this basic
structure:
1 (optional) Set a time-out value
lcaClient.SetTimeout(timout_ms)
2 Connect to the LCA server.
lcaClient.Connect(serverName)
AgilentPNA835x.IApplication9)
now you could call commands which do not require an open
Remote Operation
20
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
session. In the case of the LCA client, this is the
GetLCAProperties command.
lcaClient.GetLCAProperties(lcaProperties)
3 Open a session on the LCA, and check the return value of the
Open() command. A return value False indicates that the
Open() command has failed.
lcaClient.Open()
4 All commands that change the state of the LCA require an
active session opened on the LCA. All these commands have
to be enclosed by Open() and Close() commands.
Commands which do not change the state of the LCA, like
reading properties, only require a passive session on the
LCA.
5 When finished with working on the LCA, close the session
lcaClient.Close()
6 Before leaving the application, make sure to call the
Disconnect() command. This prevents unnecessary
processing overhead on the LCA, needed to monitor and
close inactive sessions.
lcaClient.Disconnect()
Synchronous vs. Asynchronous Method Calls
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
21
A traditional remote control application consists of a list of
actions that you send to the instrument, expecting it to execute
them in that order and to tell you when it is done. This makes
programming easy - you can do your whole measurement in a
single function or sub-routine.
In this approach you send the actions to the instrument in
chronous mode. This means that an action you send to the
syn
instrument blocks the program flow of the calling thread until it
finishes. The advantage is that your program structure is very
simple. The drawback is that you have to wait for the instrument
to finish the action. For example this could lead to an
unresponsive user interface.
This can be solved using multithreading . Run the measurement
sequence in a new thread while the main thread handles other
things like running the user interface.
A third possibility is to call potentially time consuming actions
synchronously. The LCA Remote Client lets you call some
a
commands in asynchronous mode. This means that the call
returns immediately, even before the action on the instrument
has finished execution.
In such cases you need an additional method to determine,
when an action finishes. The LCA Remote Client offers two
different methods to accomplish this.
• The first is the property OperationComplete().
This property value is True, when the last asynchronously
called operation on the LCA has finished execution.
Otherwise the property value is False.
• The other method is named WaitForOPC().
This method blocks program execution on the calling thread
until the operation on the instrument finishes.
Here are two short examples in VB.NET syntax, showing the
usage of asynchronous calls:
Using the OperationComplete() Property in a loop:
Remote Operation
22
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
oLCAClient.Init_OO(params, False)
Do
‘ let the application handle events
Application.DoEvents()
System.Threading.Thread.Sleep(200)
While oLCAClient.OperationComplete = False
Using the WaitForOPC() command:
oLCAClient.Init_OO(params, False)
DoMyActionsAfterCallingInit() ‘ doing some other stuff
‘ When we are done with our own stuff,
‘ we need to wait for Init_OO to finish
oLCAClient.WaitForOPC()
Troubleshooting
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
23
During application development you may encounter situations
where the Open() call fails.
This happens when a session on the LCA is already open.
If there are no other applications using the LCA, the most likely
reason is that an application finished without closing its
session, for example when running an application in the
debugger and you terminate it by stopping the debugger.
The LCA and the LCA Remote Client have a heartbeat
anism to detect abandoned sessions. The LCA checks for
mech
60 seconds of inactivity. If nothing happens in this time, the
LCA assumes the session has been abandoned and it closes this
session, so that other clients are able to open a session.
You may want to workaround this behavior during application
development. There are two cases here.
• If your client application halts on a breakpoint, the heartbeat
is suspended, so if your application is suspended for more
than 60 seconds, the server closes the session. When you try
to continue execution, you get an error telling you that no
session is open.
To keep sessions open, start the LCA server on the network
analyzer with the command-line parameter
“NOAUTOCLOSE”.
NOTE
• If you are running into problems restarting your application
because aborted sessions are still open, call CloseAll() before
the Open() call.
We recommend you only use these workarounds during development.
Only use CloseAll() in environments where you are sure no other client
could have a session opened. CloseAll() will close sessions from all the
LCA clients.
LCA Remote Programming
Remote Operation
24
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
LCA remote control DLLs
The LCA remote programming interface uses Microsoft.NET
Remoting technology. It is controlled by manipulating the
properties and methods exposed by the server object. The list
of properties and methods in this section describe the interface
that is available to a programmer wanting to program the LCA
system in other applications.
The LCA RemoteClient DLL provides a communication link with
the LCA server. The DLLs are comprised of a set of properties,
and methods that together provide a basic set of remote LCA
capabilities. The two DLLs of interest are: RemoteClient.dll and
RemoteObjects.dll. By default these two DLLs are installed to:
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
25
Interface structure
There are three classes to control the LCA: the
LCAMeasParams, the LCAProperties and the
LCARemoteClient.
• The class LCAMeasParams summarizes all possible
parameters of your measurement.
• The class LCAProperties provides read-only properties,
which give you some information about the network analyzer
and the LCA.
• The class LCARemoteClient provides the methods to connect
to the LCA, perform measurements and change hardware
settings.
Enumeration
Remote Operation
26
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
This is the list of enumeration names, with their possible values.
EnumerationDescription
ELaserStateEnumerates the possible laser states, on or off. NotSet
ELaserWvlEnumerates the possible laser wavelengths.NotSet
EMeasModeSpecify if you are doing single ended or differential measurements.
Note: differential measurements require a 4-port network analyzer.
EMeasTypeEnumerates the different LCA measurement typesNotSet
EModBiasOptSpecify how often a modulator bias voltage optimization has to be performed.
Once: only once when the laser is switched on.
EverySweep: prior to each measurement started by the LCA.
Continuous: the optimization loop runs continuously.
Possible values
LaserOff
LaserOn
Wvl_850nm
Wvl_1310nm
Wvl_1550nm
NotSet
SingleEnded
Differential
EE
EO
OE
OO
NotSet
Once
EverySweep
Continuous
EOpticalInputEnumerates the optical inputs on the optical test head’s front panel. High power
input is comparable to input 2 and standard to input 1.
ERFSwitchEnumerates the RF switches in a switched LCA systemNotSet
ERFSwitchStateEnumerates the possible settings of the RF switchesUnKnown
NotSet
Standard
HighPower
Source
Receiver
Thru
Intern
Class LCAMeasParams
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
27
These are common properties of the LCA measurement
parameters
PropertyDescriptionTy p eDefault value
Wavelength_nm Specify with which laser wavelength the LCA will measure. Enum ELaserWvlNotSet
OpticalPower_dBm Specify the optical output power of the LCA in dBmDouble0.0
HighPower_Input If you are using the high power optical input you have to set
the HighPower_Input property to true.
MeasModeSpecify if you want to do single ended or differential
measurements
ModBiasOptimization Specify how often a modulator bias voltage optimization has
to be performed
PropertyDescriptionTy p eDefault value
AdvancedEnable the possibility to overwrite some of the default
behavior of the LCA. In advanced mode you can force the
LCA to switch the laser on or off independently of the
measurement type. You also have additional Optical- and RFpath deembedding possibilities, or can apply additional
deembedding on the receiver and the source side,
independent of the measurement type.
Laser_OnSwitch the intern laser on or off.
Note: The value of this property is only evaluated in
advanced mode. In default mode the laser is switched on or
off according to the measurement type.
BooleanFalse
Enum EMeasModeSingleEnded
Enum EModBiasOpt EverySweep
Boolean – if true,
advanced features
are active
Boolean – if true, the
laser is on
False
Tr ue
The following properties control additional optical path
deembedding.
PropertyDescriptionTy p eDefault value
UseOpticalConnData With this property you could switch the whole optical path
deembedding on or off.
SrcAttOpt_dBSpecify the optical attenuation on the source path in dB.
In default mode only evaluated for O/E and O/O
measurements.
RcvAttOpt_dBSpecify the optical attenuation on the receiver path in dB
In default mode only evaluated for E/O and O/O
measurements.
BooleanFalse
Double0.0
Double0.0
PropertyDescriptionTy peDefault value
Remote Operation
28
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
SrcRefIdxSpecify the refractive index of the source path in dB.
In default mode only evaluated for O/E and O/O
measurements.
RcvRefIdxSpecify the refractive index of the receiver path in dB.
In default mode only evaluated for E/O and O/O
measurements.
SrcLengthOpt_mSpecify the geometrical length of the source path in m.
In default mode only evaluated for O/E and O/O
measurements.
RcvLengthOpt_mSpecify the geometrical length of the receiver path in m.
In default mode only evaluated for E/O and O/O
measurements.
UseOpticalS2PFileSpecify if you want to describe the optical paths by the
parameters above or by transmission data stored in a s2p
file. Only the S21 transmission data is used.
OptRcvFileThe name of the s2p file to use for additional adaptor
deembedding on the receiver side
In default mode only evaluated for E/O and O/O
measurements.
OptSrcFileThe name of the s2p file to use for additional adaptor
deembedding on the source side.
In default mode only evaluated for O/E and O/O
measurements.
Double0.0
Double0.0
Double0.0
Double0.0
BooleanFalse
StringEmpty string
StringEmpty string
These properties are for controlling the additional electrical
path deembedding.
PropertyDescriptionTy peDefault value
UseElAdaptorWith this property you could switch the whole electrical
path deembedding on or off.
ElRcv1FileThe name of the s2p file to use for electrical adaptor
deembedding.
This property has to be used for receiver side deembedding
in single ended measurements or for the receiver port with
the lower number in differential measurements.
ElRcv2FileThe name of the s2p file to use for electrical adaptor
deembedding.
This property has to be used only for the receiver port with
the higher number in differential measurements.
BooleanFalse
StringEmpty string
StringEmpty string
PropertyDescriptionTy p eDefault value
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
29
ElSrc1FileThe name of the s2p file to use for electrical adaptor
deembedding.
This property has to be used for source side deembedding in
single ended measurements or for the source port with the
lower number in differential measurements.
ElSrc2FileThe name of the s2p file to use for electrical adaptor
deembedding.
This property has to be used only for the source port with
the higher number in differential measurements.
CalSetUserCalName a Calset on the network analyzer which has to be
used for the user calibration measurement.
If an empty string is passed, the current calset is used.
If “NONE” is passed, no calset is applied for the user
calibration measurement.
StringEmpty string
StringEmpty string
StringEmpty string
Class LCAProperties
Remote Operation
30
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
NOTE
PropertyDescriptionTy peDefault value
NWAModelThe model number of the network analyzerString
NumNWAPortsThe number of ports of the network analyzerInteger
NumOpticalInputsThe number of optical inputs of the LCA test headInteger
ProductNumberThe product number of the LCA systemString
SerialNumberThe serial number of the LCA systemString
SwitchedArchitecture True: LCA test head has a switched architecture, False: non
switched architecture
SoftwareVersionThe version of the LCA server softwareString
SourceWvl An array showing all available wavelengths of the LCA test
head
MaxPower_dBmAn array holding the maximum optical output power values
in dB. These values are correlated to the wavelength values
in “SourceWvl” at the same position.
MinPower_dBmAn array holding the minimum optical output power values
in dB. These values are correlated to the wavelength values
in “SourceWvl” at the same position.
These properties are all read-only
Boolean
array ELaserWvl
array double
array double
Interface ILCARemoteClient
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
31
General commands
Sub Connect (ByVal server As String)
Create a connection to an LCA server application.
An LCA client application can only have one open connection to
an LCA server at any time.
The LCA server could handle several open connections
concurrently.
Parameters:
Return value:
ByVal server As String
Host name or IP address of the network analyzer
where the LCA server is running.
No return value.
Sub Disconnect ()
Closes the connection to the LCA server application
Parameters:
Return value:
No parameters.
No return value.
Function IsConnected() As Boolean
Checks if a connection to an LCA server already exists.
Parameters:
Return value:
No parameters.
Boolean
True: a connection to an LCA server exists
False: no connection exists
Function Open () As Boolean
Opens an active session on the LCA.
All commands that change the state of the LCA require an active
session.
The LCA server allows only one active session at any time.
All actions allowed in a passive session are also allowed in an
Remote Operation
32
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
active session.
Parameters:
Return value:
No parameters.
Boolean
True: A session has been opened
False: Opening a session failed
Function OpenPassive () As Boolean
Opens an passive session on the LCA.
All commands that just read settings from the LCA require at
least an open passive session.
Several passive sessions could be opened concurrently.
Parameters:
Return value:
No parameters.
Boolean
True: A session has been opened
False: Opening a session failed
Sub Close ()
Closes active session on the LCA.
Parameters:
Return value:
No parameters.
No return value.
Sub ClosePassive ()
Closes passive session on the LCA.
Parameters:
Return value:
No parameters.
No return value.
Sub CloseAll ()
Closes the active sessions on the LCA. Any measurements that
are currently running are aborted.
This can be useful if an abandoned, open session prevents a
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
33
successful Open() command. However, be careful not to disturb
any other connected client applications.
The LCA automatically closes abandoned sessions after some
time (>60s) of inactivity.
Parameters:
Return value:
No parameters.
No return value.
Sub ResetLCASystem ()
Restarts the LCA server. Open sessions are closed and running
measurements are aborted.
A restart is necessary, when the network analyzer application
as been restarted or when the LCA testhead has been switched
h
off while the LCA server was running.
Parameters:
Return value:
No parameters.
No return value.
Sub GetLCAProperties
(ByVal properties As RemoteClient.ILCAProperties)
Read out the properties of the LCA system.
Parameters:
ByVal properties As RemoteClient.ILCAProperties
The properties are written to this LCAProperties
object
Return value:
No return value.
Sub SetTimeout (ByVal timeout_ms As Integer)
Set the timeout value for the .NET remoting.
A value of 0 or -1 indicates an infinite timeout period, which is
also the default value.
The timeout value is set in the .NET remoting layer during
execution of the “Connect” command. If you want to set a
timeout value, you have to do this before calling the “Connect”
command.
If you are using the LCA Remote Client .NET assembly directly,
Remote Operation
34
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
you can also specify the timeout value in the LCARemoteClient
constructor.
When using the COM interface you could only use the default
constructor, so you have to use this command to specify a nondefault timeout value.
Parameters:
Return value:
Measurement commands
Sub Init_EE
(ByVal parameters As
RemoteClient.ILCAMeasParams,
ByVal sync As Boolean)
Initializes the LCA for a EE measurement.
Parameters:
ByVal timeout_ms As Integer
An integer that specifies the number of
milliseconds to w a it before a .NET remo ting request
times out
No return value.
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
Optional ByVal sync As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately.
Return value:
For synchronization use the synchronization
methods WaitForOPC or OperationComplete
No return value.
Sub Init_EO (ByVal parameters As
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
35
RemoteClient.ILCAMeasParams,
ByVal sync As Boolean)
Initializes the LCA for an EO measurement.
Parameters:
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
Optional ByVal sync As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately. For
synchronization use the synchronization methods
WaitForOPC or OperationComplete
Return value:
No return value.
Sub Init_OE (ByVal parameters As
RemoteClient.ILCAMeasParams,
ByVal sync As Boolean)
Initializes the LCA for an OE measurement.
Parameters:
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
Return value:
Optional ByVal sy
nc As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately.
For synchronization use the synchronization
methods WaitForOPC or OperationComplete
No return value.
Sub Init_OO (ByVal parameters As
Remote Operation
36
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
RemoteClient.ILCAMeasParams,
ByVal sync As Boolean)
Initializes the LCA for an OO measurement.
Parameters:
Return value:
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
Optional ByVal sync As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately.
For synchronization use the synchronization
methods WaitForOPC or OperationComplete
No return value.
Sub LoadOOTxCalData (ByVal parameters As
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
37
RemoteClient.ILCAMeasParams,
ByVal filename As String,
ByVal sync As Boolean)
Use this command instead of Init_OE if you want the LCA to
load and use previously saved user calibration data.
The loaded user calibration data will be used by the LCA until
he next initialization command is called.
t
See also: SaveUserCalData
Parameters:
Return value:
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
ByVal filename As String
The name of the file containing the user calibration
data
Optional ByVal sync As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately.
For synchronization use the synchronization
methods WaitForOPC or OperationComplete
No return value.
Sub LoadOETxCalData (ByVal parameters As
RemoteClient.ILCAMeasParams,
ByVal filename As String,
ByVal sync As Boolean)
Use this command instead of Init_OE if you want the LCA to
load and use previously saved user calibration data.
The loaded user calibration data will be used by the LCA until
Remote Operation
38
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
the next initialization command is called.
See also: SaveUserCalData
NOTE
Parameters:
ByVal parameters As
RemoteClient.ILCAMeasParams
The measurement parameters for initialization
ByVal filename As String
The name of the file containing the user calibration
data
Optional ByVal sy
nc As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately. For
synchronization use the synchronization methods
WaitForOPC or OperationComplete
Return value:
No return value.
Sub Measure (ByVal continuous As Boolean,
ByVal sync As Boolean)
Be careful when calling a continuous measurement in synchronous mode.
Since the synchronous call blocks the program execution of the calling
thread, you can't stop this measurement from the calling thread. It can
only be stopped from another thread.
Triggers a measurement on the LCA.
If you call a continuous measurement while another
measurement is running, the original measurement is stopped
without starting a new measurement.
If you call a single measurement while another measurement is
running, this measurement is stopped and a new single
measurement is started.
It requires that one of the initialization routines above has been
called. If no measurement type has been initialized, an
“InvalidOperationException” is thrown. The type of the
measurement is the one initialized by the last “Init_XX” or
“LoadXXTxCalData” call.
You should trigger your DUT measurements with this routine, as
t takes care of optical DC power dependent deembedding and
i
modulator bias voltage optimization.
For synchronization use the synchronization methods
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
39
WaitForOPC or OperationComplete.
Parameters:
ByVal continuous As Boolean
True: measurements are done continuously
False (default): a single measurement is triggered
Optional ByVal sync As Boolean
True (default): the call is blocked until initialization
is complete
False: the call returns immediately.
Return value:
No return value.
Sub SaveUserCalData (ByVal filename As String)
Save the measured user calibration data into a s2p-file.
If no user calibration data has been measured during last OE or
OO initialization, default values are stored.
This command is only allowed when OE or OO measurement
ode is inititalized.
m
Parameters:
Return value:
ByVal filename As String
The filename, where the data should be stored.
No return value.
Sub Abort ()
Aborts a currently running measurement or initialization.
Parameters:
Return value:
No parameters.
No return value.
Sub WaitForOPC ()
Waits until the last asynchronously called command has
finished execution. Exceptions thrown during execution of an
asynchronously called command could be caught when calling
WaitForOPC() or OperationComplete().
Se also property: OperationComplete()
Remote Operation
40
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Properties
Parameters:
Return value:
No parameters.
No return value.
Reading these properties requires only a passive session, while
setting these properties requires an active session.
LaserWvl_nm As RemoteClient.ELaserWvl
Get or set the current wavelength of the LCA optical output in
nanometers.
Parameters:
No parameters.
LaserPower_dBm As Double
Get or set the current power of the LCA optical output in dBm
Parameters:
No parameters.
LaserState As RemoteClient.ELaserState
Get or set the current state of the LCA optical output
Parameters:
No parameters.
OpticalInput As RemoteClient.EOpticalInput
Get or set the current optical input of the LCA testhead
Parameters:
No parameters.
RFSwitchState
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
41
(ByVal RFSwitch As RemoteClient.ERFSwitch)
Setting the RF switches in the LCA testhead. With a non
switched LCA system, setting this property has no effect. Trying
to set this property to UnKnown, is ignored. Reading this
property from a non switched system will always return
UnKnown.
Parameters:
ByVak RFSwich As RemoteClient.ERFSwitch
The switch you want to read from or you want to
set.
RFPowerFwd_dBm As Double
Gets or sets the RF power on the network analyzer ports for
forward measurements. To set this property back to the factory
defined default value, set it to Double.NaN or a value < 200dBm.
Parameters:
No parameters.
RFPowerRev_dBm As Double
Gets or sets the RF power on the network analyzer ports for
reverse measurements. To set this property back to the factory
defined default value, set it to Double.NaN or a value < 200dBm.
Parameters:
ReadOnly OpticalDCPower_dBm As Double
Get the actual optical DC power, measured by the optical
powermeter built into the LCA testhead
Parameters:
No parameters.
No parameters.
ReadOnly LCAProperties As
Remote Operation
42
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
RemoteClient.ILCAProperties
See the command GetLCAProperties
Parameters:
No parameters.
ReadOnly CurrentMeasType As
RemoteClient.EMeasType
Get the measurement type which has been initialized by the last
call to one of the Init_XX commands or by one of the
LoadXXTxCalData commands.
Parameters:
No parameters.
ReadOnly OperationComplete As Boolean
Get the operation status of the last asynchronously called
command. Exceptions thrown during execution of an
asynchronously called command could be caught when calling
WaitForOPC() or OperationComplete().
Parameters:
No parameters.
The LCA SCPI Interface
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
43
Overview
Port Types
The LCA instrument is a combined instrument. It is a network
analyzer with additional hardware and software to become the
LCA. The network analyzer already offers a SCPI interface on
different ports. Now the new LCA SCPI interface extends the
existing LCA application. It is implemented with the Keysight
Translator Framework and the LCA Remote Server. Each SCPI
command is intercepted and linked to an LCA Remote
Interface method. The LCA SCPI interface is not completely
IEEE compliant. It only implements the most necessary
common commands besides the application specific
commands.
The LCA SCPI interface is available either on a network socket
or on the device USB port. Other ports like GPIB are not
supported. You may select and configure one of the available
types. Using both ports in parallel is not supported.
Socket Port
The LCA SCPI talker/listener runs on port 5026. The network
analyzer SCPI interface runs on port 5025. You may run both
SCPI interfaces for the
LCA and the network analyzer application in parallel, since
they take different socket ports.
USB Port
The LCA system is an integrated system. The system has only
one USB device port which can be used to control the
application from a remote PC. Therefore you can use the USB
port to control either the network analyzer via SCPI or the
LCA application via SCPI. You can’t control both
applications over the USB port at the same time.
You always have to run the network analyzer application to get
Remote Operation
44
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
the LCA functionality. Therefore if you only run the network
analyzer and NOT the LCA SCPI interface, the USB device port
is taken by the network analyzer SCPI talker/listener. When
you first connect your PC with a USB cable to the LCA
(combined instrument), you get the Network Analyzer
identification string if you send the *IDN? query.
If you start the LCA SCPI interface and configure it to run on
the USB device port, you will get theidentification string for
the LCA instrument when
you send the *IDN? SCPI query.
However, if you run the LCA SCPI interface on the socket port
and have connected your PC via USB with the LCA instrument,
the network analyzer
identification string will still be returned.
After a system reboot, the USB device port is always taken by
the network analyzer SCPI interface by default. The LCA SCPI
interface has to be started manually. If you run the LCA SCPI
interface on the USB device port and want to switch to the
socket port, you have to stop the LCA SCPI interface first, then
change the configuration to socket port and save it. This action
will restart the network analyzer application automatically, to
reclaim the USB device port for the network analyzer. Now the
LCA SCPI interface can be restarted with the new
configuration.
GPIB port
The LCA SCPI interface doesn’t support the GPIB port.
However you may control the network analyzer application
through SCPI over the GPIB port.
This gives you the possibility to control the instrument
independent of LAN by controlling the LCA application
through SCPI over USB and the
network analyzer application through SCPI over GPIB.
Configuration
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
45
Select the communication port for your LCA SCPI interface,
either the LAN socket port 5026 or the USB device port. Run
the Agilent.LCA.SCPI.Config.exe program or click on the LCA
SCPI Configuration shortcut on the network analyzer macro
list to select the preferred port. The LCA SCPI talker/listener
runs on the socket port 5026 by default. The port is not
selectable to avoid conflicts with the network analyzer SCPI
interface, which runs on port 5025.
For support purposes, you may turn the logging on or off. The
logging stores all program outputs into a file. Note: it may fill
up your hard disk if you
run the SCPI interface in logging mode for a long time.
When done with configuration, click the “Save Config” button
to store all settings. After saving the settings, the LCA SCPI
module will adopt the modified configuration when you click
on the “Start SCPI” button.
Start/Stop the LCA SCPI Module
All LCA modules require the network analyzer application. It
should always start after a system reboot automatically. If the
network analyzer is not running, please start it manually.
Like all other LCA modules, the LCA SCPI module does not
start automatically. You have to start it manually. Use the
Agilent.LCA.SCPI.Conf.exe program to start or stop the LCA
SCPI interface. To launch this program, you may either use
the LCA SCPI link in the network analyzer GUI macro list
under utilities, or the shortcut LCA SCPI Interface on the
desktop or in the program menu.
LCA SCPI Commands
Remote Operation
46
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
The LCA SCPI interface is implemented on the LCA Remote
Interface methods and the Agilent Translator Framework.
Therefore the LCA Server starts automatically when you start
the LCA SCPI interface. When you click on the “Start SCPI”
button on the SCPI configuration form, the Agilent
Translator Framework starts and loads the
Agilent.LCA.SCPI.Module. The LCA Server cannot handle
more than one session. Therefor you can run either the LCA
Measurement Setup application or the LCA SCPI
interface, but not both in parallel. This is the same for the
LCA Remote Client. It also connects to the LCA Server and
therefore the SCPI interface cannot run at the same time.
Overview
The LCA SCPI commands do not fulfill the IEEE standard.
They just offer a simple way to control the LCA application on
a LAN dependent socket port or on a USB port.
Except for the *IDN? and :SYST:ERR? Commands, there is
always a direct relation between a SCPI command and a
method or property of the LCA.Net Remote Interface.
Command: [:LCA]:SOFTware:VERSion?
syntax: [:LCA]:SOFTware:VERSion?
description: The version of the LCA server software
parameters: none
response string
C#: (property)
example :SOFT:VERS? -> 2.3.10.2
Command:
syntax:
description:
parameters:
response:
C#:
example:
[:LCA]:PNUMber?
:LOAD:OO:CALibration:NAME
:LOAD:OO:CALibration:NAME<wsp>”<path string>”
Use this command instead of Init_OO if you want the LCA
to load and use previously saved user calibration data
“<string>” path and filename enclosed in double quotes
none
(method) LoadOOTxCalData:LOAD:OO:CAL:NAME “c:\temp\test.s2p”
Command:
syntax:
description:
parameters:
response:
C#:
example:
:LOAD:OE:CALibration:NAME
:LOAD:OE:CALibration:NAME<wsp>”<pathstring>”
Use this command instead of Init_OE if you want the
LCA to load and use previously saved user calibration data
“<string>” path and file name enclosed in double quotes
none
(method) LoadOETxCalData
:LOAD:OE:CAL:NAME “c:\temp\test.snp”
Command: :MEASurement:ABORt
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
49
syntax: :MEASurement:ABORt
description: Aborts a currently running measurement or initialization.
Command: :MEASurement:CALData:SAVE
syntax: :MEASurement:CALData:SAVE<wsp>”<path string>”
description: Save the measured user calibration data into a s2p-file.
parameters: “<string>” path and file name enclosed in double quotes
response: none
description: Initializes the LCA for an OE measurement
parameters: none
response: none
C#: (method) Init_OE
example: :MEAS:INIT:OE
:MEASurement:CURRent:TYPE?
:MEASurement:CURRent:TYPE?
Get the measurement type that has been initialized
by the last call to one of the :MEAS:INIT XX commands
or by one of the.:LOAD:XX: commands.
none
<string> NotSet | EE | EO | OE | OO
(method) CurrentMeasType()
:MEAS:CURR:TYPE? -> OO
Triggers a measurement on the LCA. If you call a continuous measurement
while another measurement is running, the original measurement is stopped
without starting a new measurement
<string> SINGle | CONTinuous
none
(method) Measure()
:MEAS:STAR CONT
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:ADVAnced:MODE?
:PARameter:ADVAnced:MODE?
Returns 1 if advanced mode is enabled. In advanced mode you
can force the LCA to switch the laser on or off, independent of
the measurement type. You also have additional optical- and RFpath de-embedding possibilities, or can apply additional deembedding on the receiver and the source side, independent of
the measurement type.
:PARameter:ADVAnced:MODE:PARameter:ADVAnced:MODE<wsp>ON | OFF | 1 | 0
Enables or disables advance mode, which allows changing some
default settings. In advanced mode you can force the LCA to switch
the laser on or off, independent of the measurement type. You also
have additional optical- and RF-path de-embedding possibilities, or can
apply additional de-embedding on the receiver and the source side,
independent of the measurement type.
<string> ON | OFF | 1 | 0
none
(property) Advanced
:PAR:ADVA:MODE ON
command:
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
51
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:ELECtrical:PATH:DEEMbedding?
:PARameter:ELECtrical:PATH:DEEMbedding?
Retrieves the property which shows whether the whole
electrical path de-embedding is switched on or off.
:PARameter:ELECtrical:PATH:DEEMbedding<wsp>ON|OFF|1|0
Sets the property which enables or disables the whole electrical path deembedding .
<string> ON | OFF | 1 | 0
none
(property)UseElAdaptor
:PAR:ELEC:PATH:DEEM OFF
:PARameter:ELECtrical:RECeiver:S2PFile[1 - 2]?
:PARameter:ELECtrical:RECeiver:S2P:FILE[1 - 2]:NAME?
Gets the name of the s2p file to use for electrical adaptor de-embedding. File
index 1 has to be used for receiver side de-embedding in single-ended
measurements or for the receiver port with the lower number in differential
measurements. Index 2 has to be used only for the receiver port with the
higher number in differential measurements
:PARameter:ELECtrical:RECeiver:S2P:FILE[1 - 2]:NAME<wsp>“<path string>”
Sets the name of the s2p file to use for electrical adaptor de-embedding. File
index 1 has to
measurements or for the receiver port with the lower number in differential
measurements. Index 2 has to be used only for the receiver port with the
higher number in differential measurements
“<string>” path and file name
none
(property) ElRcv1File / ElRcv2File
:PAR:ELEC:REC:S2PFile“c:\temp\test.s2p”
be used for receiver side de-embedding in single-ended
command:
Remote Operation
52
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:ELECtrical:SOURce:S2PFile[ 1 - 2]?
:PARameter:ELECtrical:SOURce:S2PFile[[ 1- 2]:NAME?
Gets the name of the s2p file to use for electrical adaptor de-embedding.
This property has to be used with file index 1 for source side deembedding in single-ended measurements or for the source port with the
lower number in differential measurements. Index 2 is the file for the
source port with the higher number in differential measurements.
none
<string> path and file name
(property) ElSrc1File / ElSrc2File:PARameter:ELECtrical:SOURce:S2PFile1? -> c:\temp\test.s2p
command:
syntax:
description:
parameters:
response:
C#:
example:
command: :PARameter:MEASurement:MODE?
syntax: :PARameter:MEASurement:MODE?
description: Returns setting for selecting single-ended or differential measurements
command: :PARameter:MEASurement:MODE
syntax: :PARameter:MEASurement:MODE<wsp>DIFFerential|SINGleended|NOTSet
description: Specify single ended or differential measurements
parameters: <string> DIFFerential|SINGleended | NOTSet
response: none
C#: (property) MeasMode
example: :PAR:MEAS:MODE SING
:PARameter:ELECtrical:SOURce:S2PFile[ 1 - 2]
:PARameter:ELECtrical:SOURce:S2PFile[[ 1- 2]<wsp>“<path string>”
Sets the name of the s2p file to use for electrical adaptor deembedding. This property has to be used with file index 1 for source
side de-embedding in single-ended measurements or for the source
port with the lower number in differential measurements. Index 2 is the
file for the source port with the higher number in differential
measurements
command: :PARameter:MODUlator:BIAS:MODE?
syntax: :PARameter:MODUlator:BIAS:MODE?
description: Returns how often a modulator bias voltage optimization will be performed
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
53
syntax: :PARameter:MODUlator:BIAS:MODE<wsp>CONT|EVER|ONCE
description: Specify how often a modulator bias voltage optimization will be performed
parameters: <string> CONTinuous|EVERysweep|ONCE
response: none
C#: (property) ModBiasOptimization
example: :PAR:MODU:BIAS:MODE EVER
command: :PARameter:OPTical:INPut:POWer:HIGH?
synstax: :PARameter:OPTical:INPut:POWer:HIGH?
description: Returns the state of the high power input property.
parameters: none
response: <string> 1 | 0, input power high true = 1, false = 0
C#: (property) HighPower_Input
example: :PAR:OPT:INP:POWer:HIGH? -> 0
command: :PARameter:OPTical:INPut:POWer:HIGH
syntax: :PARameter:OPTical:INPut:POWer:HIGH<wsp>ON|OFF|1|0
description: Gets the state of the high power input property.
parameters: <string> ON | 1 enables high power input, OFF | 0 disables high power input
response: none
C#: (property) HighPower_Input
example: :PAR:OPT:INP:POWer:HIGH ON
command: :PARameter:OPTical:OUTput:POWer?
synstax: :PARameter:OPTical:OUTput:POWer?
description: Returns the optical output power of the LCA in dBm.
parameters: none
response: <double> power value, the default unit is dBm.
command: :PARameter:OPTical:OUTput:POWer
synstax: :PARameter:OPTical:OUTput:POWer<ws><power>
description: Specify the optical output power of the LCA in dBm.
parameters: power <double>, power value in dBm
response: none.
command: :PARameter:OPTical:PATH:DEEMbedding?
synstax: :PARameter:OPTical:PATH:DEEMbedding?
description: Returns whether the whole optical path de-embedding is set on or off.
command: :PARameter:OPTical:PATH:DEEMbedding
syntax: :PARameter:OPTical:PATH:DEEMbedding<wsp>ON|1|OFF|0
description: Switches the whole optical path de-embedding on or off.
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
synstax:
description:
parameters:
response:
C#:
example:
:PARameter:OPTical:RECeiver:S2PFile?
:PARameter:OPTical:RECeiver:S2PFile?
Returns the name of the s2p file to use for additional adaptor deembedding on the receiver side. In default mode, only evaluated for E/O
and O/O measurements.
none
<string> path and file name
(property) OptRcvFile
:PAR:OPT:REC:S2PF? -> c:\temp\test1.s2p
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:OPTical:RECeiver:S2PFile
:PARameter:OPTical:RECeiver:S2PFile<wsp>”<path string>”
Sets the name of the s2p file which is used for additional adaptor deembedding on the receiver side. In default mode only evaluated for E/O
and O/O measurements.
“<string>” file name and path enclosed in double quotes
none
(property) OptRcvFile
:PAR:OPT:REC:S2PF “c:\temp\test1.s2p”
:PARameter:OPTical:S2PFile:USE?
:PARameter:OPTical:S2PFile:USE?
Returns whether the optical paths are described by transmission data
stored in an s2p file. Only the S21 transmission data is used
:PARameter:OPTical:S2PFile:USE<wsp>ON|1|OFF|0
enables or disables description of the optical paths by transmission data
stored in an s2p file. Only the S21 transmission data is used
<string> ON | 1 = s2p file use
none
(property) UseIOpticalS2PFile
:PAR:OPT:S2PF:USE ON
enabled, OFF | 0 = disabled
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:OPTical:SOURce:S2PFile?
:PARameter:OPTical:SOURce:S2PFile?
Retrieves the name of the s2p file to use for additional adaptor deembedding on the source side. In default mode only evaluated for O/E
and O/O measurements.
none
<string> file name and path of the s2p file on the LCA system.
(property) OptSrcFile
:PAR:OPT:SOUR:S2PF? -> c:\temp\test1.s2p
command:
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
55
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:OPTical:SOURce:S2PFile
:PARameter:OPTical:SOURce:S2PFile<wsp>“<path string>”
Specifies the name of the s2p file to use for additional adaptor deembedding on the source side. In default mode only
and O/O measurements.
“<string>” the file name and path enclosed in double quotes.
<string> file name and path of the s2p file on the LCA system.
(property) OptSrcFile
:PAR:OPT:SOUR:S2PF “c:\temp\test1.s2p”
evaluated for O/E
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:RECeiver:ATTenuation?
:PARameter:RECeiver:ATTenuation?
Retrieves the optical attenuation on the receiver path. In default mode
only evaluated for E/O and O/O measurements
none
<double> attenuation value, default unit is dB
(property) RcvAttOpt_dB
:PAR:REC:ATT? -> 3
:PARameter:RECeiver:ATTenuation
:PARameter:RECeiver:ATTenuation <wsp><attenuation
Specifies the optical attenuation on the receiver path. In default mode only
evaluated for E/O and O/O measurements
attenuation <double> attenuation value, default unit is dB
none
(property) RcvAttOpt_dB
:PAR:REC:ATT 2
:PARameter:RECeiver:PATH:LENGth?
:PARameter:RECeiver:PATH:LENGth?
Retrieves the geometrical length of the receiver path in m. In
default mode only evaluated for E/O and O/O measurements
none
<double> The path length value, default unit is meter.
(property) RcvLengthOpt_m
:PAR:REC:PATH:LENG? -> 0.3
:PARameter:RECeiver:PATH:LENGth
:PARameter:RECeiver:PATH:LENGth<wsp> <length>
Specifies the geometrical length of the receiver path in m. In
default mode only evaluated for E/O and O/O measurements
length <double> path length value, default unit is meter.
none.
(property) RcvLengthOpt_m
:PAR:REC:PATH:LENG 0.45
>
command:
syntax:
description:
parameters:
response:
example:
:PARameter:RECeiver:REFR:INDex?
:PARameter:RECeiver:REFR:INDex ?
Retrieves the refractive index of the receiver path in dB. In default
mode only evaluated for E/O and O/O measurements.
none
<double> the refractive index value, unit is dB.
(property) RcvRefIdx
:PAR:REC:REFR:IND? -> 0
command:
Remote Operation
56
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:RECeiver:REFR:INDex
:PARameter:RECeiver:REFR:INDex<wsp><index>
Specifies the refractive index of the receiver path in dB.
In default mode only evaluated for E/O and O/O
measurements.
index <double> the receiver refractive value, unit id
dB.
none
(property) RcvRefIdx
:PAR:REC:REFR:IND 1.3
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:SOURce:ATTenuation?
:PARameter:SOURce:ATTenuation?
Retrieves the optical attenuation on the source path. In
default mode only evaluated for O/E and O/O
measurements.
none
<double> attenuation value in dB
(property) SrcAttOpt_dB
:PAR:SOUR:ATT? -> 0
:PARameter:SOURce:ATTenuation
:PARameter:SOURce:ATTenuation<wsp><attenuation>
Specifies the optical attenuation on the source path. In
default mode only evaluated for O/E and O/O
measurements.
:PARameter:SOURce:POWer:STATe?
Retrieves the internal laser state, on or off. Note: the
value of this property is only evaluated in advanced
mode. In default mode the laser is switched on or off
according to the measurement type.
none
<string> 1 = internal laser is on, 0 = internal laser is off
(property) Laser_On
:PAR:SOUR:POW:STAT? -> 1
Switches the internal laser on or off. Note: The value of this
property is only evaluated in advanced mode. In default
mode the laser is switched on or off according to the
measurement type
<string> ON | 1 to switch the laser on, OFF | 0 to switch
the laser off
none
(property) Laser_On
:PAR:SOUR:POW:STAT ON
:PARameter:SOURce:PATH:LENGth?
:PARameter:SOURce:PATH:LENGth?
Retrieves the geometrical length of the source path in m . In
default mode only evaluated for O/E and O/O measurements
.none
<double> the path length in meter
SrcLengthOpt_m
:PAR:SOUR:PATH:LENG? -> 0.27
command:
Remote Operation
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
57
synstax:
description:
parameters:
response:
C#:
example:
:PARameter:SOURce:PATH:LENGth
:PARameter:SOURce:PATH:LENGth<wsp><length>
Specifies the geometrical length of the source path in m. In
default mode only evaluated for O/E and O/O
measurements
length <double> the path length value, default unit is
meter.
none
SrcLengthOpt_m
:PAR:SOUR:PATH:LENG 0.42
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:PARameter:SOURce:REFR:INDex?
:PARameter:SOURce:REFR:INDex?
Retrieves the refractive index of the source path in dB. In default
mode only evaluated for O/E and O/O measurements.
none
<double> the refractive index
(property) SrcRefIdx
:PAR:SOUR:REFR:IND? -> 0
:PARameter:SOURce:REFR:INDex
:PARameter:SOURce:REFR:INDex<wsp><index>
Specifies the refractive index of the source path in dB. In
default mode only evaluated for O/E and O/O
measurements.
index <double> the refractive index value in dB
none
(property) SrcRefIdx
:PAR:SOUR:REFR:IND 0.13
:PARameter:USER:CALIbration:CALSet?
:PARameter:USER:CALIbration:CALSet?
Retrieves the name of a Calset on the network analyzer to be
used for the user calibration measurement. If an empty string is
returned, the current Calset is used. If “NONE” is returned, no
Calset is applied for the user calibration measurement.
none
<string> NONE | path and file name
(property) CalSetUserCal
:PAR:USER:CAL:CALS? -> c:\temp\calset1.s2p
command:
syntax:
description:
parameters:
response:
C#:
example:
command: :PARameter:WAVelength?
syntax: :PARameter:WAVelength?
description: Returns the laser wavelength set on the LCA.
parameters: none
response: <string> The wavelength and unit as a string.
Specifies the name of a Calset on the network analyzer to be used for
the user calibration measurement. If an empty string is passed, the
current Calset is used. If “NONE” is passed, no Calset is applied for
the user calibration measurement.
NONE| <string> |No argument, None or the path and file name
surrounded by double quotes.
none
(property) CalSetUserCal
:PAR:USER:CAL:CALS “c:\temp\calset1.s2p”
(property) Wavelength_nm
:PAR:WAV? -> Wvl_1550nm
command: :PARameter:WAVelength
Remote Operation
58
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
syntax: :PARameter:WAVelength<wsp>850|1310|1550
description: Specifies with which laser wavelength the LCA will measure
command: :RF:POWer:FWD?
syntax: :RF:POWer:FWD?
description: Gets the RF power on the network analyzer ports for forward measurements
parameters: none
response: <double> forward power value in dBm
C#: (property) RFPowerFwd_dBm
example: :RF:POWer:FWD? -> -8
command: :RF:POWer:FWD
syntax: :RF:POWer:FWD<wsp><power>
description: Sets the RF power on the network analyzer ports for forward measurements
parameters: power <double> forward power value in dBm
response: none
C#: (property) RFPowerFwd_dBm
example: :RF:POWer:FWD -1
command: :RF:POWer:REVerse?
syntax: :RF:POWer:REVerse?
description: Gets the RF power on the network analyzer ports for reverse measurements.
parameters: none
response: <double> RF reverse power value in dBm.
C#: (property) RFPowerRev_dBm
example: :RF:POW:REV? -> -8
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
command:
syntax:
description:
parameters:
response:
C#:
example:
:RF:POWer:REVerse
:RF:POWer:REVerse<wsp><power>
Sets the RF power on the network analyzer ports for reverse
measurements. To set this property back to the factory defined default
value, set it to Double.NaN or a value < -200dBm.
power <double> RF reverse power value in dBm.
none
(property) RFPowerRev_dBm
:RF:POW:REV -4
:RF:SWITch:STATe?
:RF:SWITch:STATe?
Retrieves the RF switch settings in the LCA test-head. With a nonswitched LCA system, setting this property has no effect.. Reading this
property from a non-switched system will always return Unknown.
:RF:SWITch:STATe<wsp>REC|SOUR,INT|THRU
Setting the RF switches in the LCA testhead. With a non switched LCA
system, setting this property has no effect. Trying to set this property to
UnKnown, is ignored. Setting this property for a non switched system will
stay UnKnown.
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
59
syntax:
description:
parameters:
response:
C#:
example:
:SOURce[1 – n]:MAXPower?
:SOURce[1 – n]:MAXPower?
Retrieves the maximum optical output power values in dB. The
maximum power for an index n corresponds to the wavelength
value from :SOUR:WAV:ALL? at position n.
none
<double> The maximum power value in dBm. For an invalid
index it returns -200 and there is an entry in the error queue.
See :SYST:ERR?.
(property) MaxPower_dBm
:SOUR:MAXP? -> 6
command:
syntax:
description:
parameters:
response:
C#:
example:
command: :SOURce:POWer?
syntax: :SOURce:POWer?
description: Gets the current power of the LCA optical output in dBm
parameters: none
response: <double> Laser power value in dBm.
C#: (property) LaserPower_dBm
example: :SOUR:POW? -> 5.00375
command: :SOURce:POWer
syntax:
:SOURce:POWer<wsp><power>
description: Sets the current power of the LCA optical output in dBm
parameters: power <double> Laser power value in dBm
response: .none
C#: (property) LaserPower_dBm
example: :SOUR:POW 2.45
command: :SOURce:STATe?
syntax: :SOURce:STATe?
description: Gets the current state of the LCA optical output.
:SOURce[1 – n]:MINPower?
Retrieves the minimum optical output power value in dBm. The minimum
power for an index n corresponds to the wavelength value
from
:SOUR:WAV:ALL at position n.
none
<double> The minimum power value in dBm. For an invalid index it
returns -200 and there is an entry in the error queue. See :SYST:ERR?.
(property) MimPower_dBm
:SOUR:MINP? -> -1
command: :SOURce:STATe
syntax: :SOURce:STATe<wsp>ON|OFF|1|0
description: Sets the current state of the LCA optical output.
parameters: <string> ON | 1 | OFF | 0
response: none
C#: (property) LaserState
example: :SOUR:STAT ON
command:
syntax:
description:
parameters:
response:
C#:
example:
:SOURce:WAVelength?
:SOURce:WAVelength?
Gets the current wavelength of the LCA optical output.
none
<string> The wavelength as string together with the unit.
(property) LaserWavelength_nm
:SOUR:WAV? -> <Wvl_1550nm
command:
Remote Operation
60
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
syntax:
description:
parameters:
response:
C#:
example:
command: :SOURce:WAVelength:ALL?
syntax: :SOURce:WAVelength:ALL?
description: Retrieves a list showing all available wavelengths of the LCA test head.
parameters: none
response: <string> comma separated list of wavelengths units.
C#: (property) SourceWvl
example: : SOUR:WAV:ALL? -> Wvl_1310nm, Wvl_1550nm
command: :THEAd:INPut:MODe?
syntax: :THEAd:INPut:MODe?
description: Gets the current optical input of the LCA test-head.
parameters: none
response: <string> Standard | HighPower
C#: (property) OpticalInput
example: THEA:INP:MODE? -> Standard
command: :THEAd:INPut:MODe
syntax: :THEAd:INPut:MODe<wsp>STAN|HIGH
description: Sets the current optical input of the LCA test-head.
parameters: <string> HIGH | STANdard
response: none
C#: (property) OpticalInput
example: THEA:INP:MODE HIGH
:SOURce:WAVelength
:SOURce:WAVelength<wsp><wavelength>
Sets the current wavelength of the LCA optical output. The
available wavelengths can be retrieved with :SOUR:WAV:ALL?
wavelength <string> the wavelength value as string, unit is nm
e. g. 1550.
none
(property) LaserWavelength_nm
:SOUR:WAV 1550
command:
syntax:
description:
parameters:
response:
C#:
example:
command: :THEAd:INPut:NUMBers?
syntax: :THEAd:INPut:NUMBers?
description: Gets the number of optical inputs of the LCA test-head
parameters: none
response: <integer> number of optical inputs.
C#: (property) NumOpticalInputs
example: :THEA:INP:NUMB? -> 2
command:
syntax:
description:
parameters:
response:
C#:
example:
:THEAd:INPut:POWer?
:THEAd:INPut:POWer?
Gets the actual optical DC power, measured by the optical power meter
built into the LCA test-head.
none
<double> the power value in dBm.
(property) OpticalDCPower_dBm
:THEA:INP:POW? -> -40.3798
:THEAd:SWITched:ARCHitecture?
:THEAd:SWITched:ARCHitecture?
Gets the LCA test-head architecture. True: LCA test
head has switched, False: non-switched architecture.
The location on your computer depends on the folder in which
you installed the LCA Remote Client.
VEE Programming Example
Programming Examples
62
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Keysight VEE is a Visual Engineering Environment that allows
you to program by creating intuitive “block diagrams.” You
select and edit objects from pull-down menus and connect them
to each other by wires to specify the program’s flow, mimicking
the order of tasks you want to perform.
This makes it easy to get useful results in a short time and in
only a few steps.
Getting started
Starting a complete measurement means interacting
• over the .NET interface with the LCA and
• over the COM interface with the network analyzer.
Working with the LCA
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
63
If your version of VEE version can use .NET assemblies, we
recommend you reference the LCA Remote Client .NET
assembly directly, as described here.
If you have an older version of VEE which cannot use .NET
assemblies, you need to reference the Active X interface of the
LCA Remote Client. This is not described here, but is similar to
referencing the PNAProxy, which is described later in this
example.
1 After having opened VEE, in the “Device” menu, select “.NET
embly References”.
Ass
Figure 2 Calling the .NET Assembly references
2 Using the "Browse" button, find the references “RemoteClient.dll”
Programming Examples
64
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
3 Enable the flag “Import namespaces after closing”.
4 Ensure that “RemoteClient” and “RemoteObjects” are
selected.
Fi
gure 3 Selecting the required references
5. Set the flag to import the namespaces
“Agilent.LCA.RemoteClient” and click OK
Figure 4 Importing namespaces
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
65
You now find the required functions in the “Function & Object
Browser”.
You will find this in the “Device” menu.
Select
• type: .NET/CLR Objects
• assembly: RemoteClient
• namespace: Agilent.LCA.RemoteClient
to choose the function you want.
NOTE
Before using one of the functions or properties, you have to create an
instance of the constructor.
Figure 5 Function & Object Browser
Programming Examples
66
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Working with the network analyzer
To get your measurement data from the network analyzer, you
have to use the COM-interface. To be able to communicate with
the network analyzer over its COM interface, you have to install
the PNAProxy. For information on installing the PNAProxy see
“Install the LCA Remote Client” on page 12.
You can communicate with it using ActiveX references.
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
67
1 In the “Device” menu, select “ActiveX Automation
References”.
Figure 5 Calling the ActiveX automation references
2 In the dialog, which appears, enable the “Agilent PNA Series
1.9 Type Library” and click OK.
Figure 7 Selecting the required references
Programming Examples
68
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Before you can start, you need to declare a variable as object, so
Keysight VEE knows you want to create an object.
3 In the “Data” menu, select “Variable”, then “Declare
Var iable”.
4 As type, select “Object”, and as subtype, select “COM”, which
is available in the advanced dialog.
gure 8 Declaration
Fi
You can set the declared variable in a new formula.
5 In the “Device” menu, select “Formula”.
6 T ype the following command into the formula
SET name =CreateObject (“AgilentPNA835x.application”,
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
69
IP-Address)
where name is the name of the variable you declared, and IPaddress by the IP address of the LCA.
Figure 9 Setting the variable
This creates the identifier for object
calls “AgilentPNA835x.Application”.
You now find the required functions in the “Function & Object
Browser”.
You will find this in the “Device” menu, under Function & Object
Browser.
Select
• type: ActiveX Objects
• namespace: AgilentPNA835x to
choose the function you want.
Figure 10 Using the Function & Object Browser
Programming Examples
70
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Description of the VEE-example
You can find the examples in the “Examples” folder in the
“Agilent LCA Remote Client” installation folder. In the VEEexample you can switch between the panel and the detail
view.
The panel view lets you set LCA parameters and control the
LCA.
Fi
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
71
gure 11 Panel view
In the detail view you can trace the relationships between the
Programming Examples
72
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
different parts of the program:
Figure 12 Detail view
NOTE
Starting a measurement always needs an open session. That’s why you
have to begin with the point open session of the slider list.
Beginning a new session connects to the server. Before opening
a new session, make sure no other session is open that could
block the LCA. Then you have the right to control the LCA.
When you select “open a session”, the program sets the
instances of LCARemoteClient, LCAMeasParams and
LCAProperties. The program then sets the IP address variable
and makes it available to the other parts of the program.
The “init”-part reads out the parameters set by the user, and
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
73
saves them in the properties of the LCAMeasParams. The LCA
calls the correct initialization routine for the measurement
selected.
The “measure”-part makes a DUT measurement. When the
easurement is finished, the program retrieves the results from
m
the network analyzer andplots them as an X-Y plot.
You can read out our data in the panel view too.
Figure 13 Measured data
When you have finished working with the LCA, close the session
and disconnect from the LCA. Do this by selecting “close
session” and pressing “Run”.
VBA/Excel Programming Example
Programming Examples
74
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
You can find this programming example in the folder:
Examples\Excel VBA\ in your LCA Remote Client installation
directory.
Run the VBA/Excel example:
1 To connect to the LCA you need its IP-address
a On the LCA, from the “Start” menu, select “Run”, then
enter “cmd.exe”.
b Enter “ipconfig” and press Enter.
CAUTION
Now you can read off the IP address of the LCA.
2 Configure the security settings for DCOM.
This procedure sets DCOM security is set to the lowest
level. This ensures the application runs.
For information on how to apply a more specific DCOM
security setting for different environments we recommend
your read the related network analyzer documentation.
(Chapter: Configure for COM-DCOM Programming in the
network analyzer help file) or the document “dcom.rtf” on
the network analyzer support CD.
a From the “Start” menu select “Run”.
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
75
b Enter “dcomcnfg” and press ENTER.
c Expand “Component Services” and “Computers”, and
select “My Computer”.
d Right click on “My Computer”, and select “Properties”.
e Select the “Default Properties” tab.
fFor the “Default Authentication Level”, choose None.
gClose with OK.
3 If it is not already installed, install the PNA-Proxy.
Programming Examples
76
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
For help, see the document “dcom.rtf” on the network
analyzer support CD.
4 Open the Excel workbook “example.xls”.
Change the LCA
parameters.
NOTE
If you encounter COM automation errors when running this example, copy
the file “Ecel.exe.config” into the folder where the Excel executable is
located. This forces the runtime environment to bind Excel with .NET 2.0 at
startup.
If you have an older version of Excel it might be bound to an older version
of the .NET framework by default. Since an application can only be bound
to one version of the .NET framework you will see errors in this case,
because the LCA Remote Client requires .NET 2.0.
This .config file can be found in the same folder as the file “example.xls”.
In the field “LCA Name”, enter the host name or the IP
address of the LCA.
Connect to the LCA and start a
new session.
Disconnect the LCA from the
remote interface (end session).
Select the type of
measurement
The blue button combines the grey buttons, and runs a full
measurement.
Click “measure” to start a
measurement. The results are
shown on sheet 2 (Data).
Click “Draw a chart” to
generate a graph of your
measurement results (on sheet
2).
Change to sheet 2 to see your measurement results.
Programming Examples
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
77
Programming Examples
78
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
All system warranties and support agreements are dependent
upon the integrity of the Lightwave Component Analyzer. Any
modification of the system software or hardware will terminate
any obligation that Keysight Technologies may have to the
purchaser. Please contact your local Keysight field engineer
before embarking in any changes to the system.
System
Remove all doubt
In addition to the standard warranty, extended warranty
periods, on-site troubleshooting, reduced response times and
increased coverage hours can be negotiated under a separate
support agreement and will be charged at an extra cost.
Keysight offers a wide range of additional expert test and
measurement services for your equipment, including initial
start-up assistance onsite education and training, as well as
design, system integration, and project management.
Our repair and calibration services will get your equipment back
o you, performing like new, when promised. You will get full
t
value out of your
Your equipment will be serviced by
using the latest factory calibration procedures, automated repair
diagnostics and genuine parts. You will always have the utmost
confidence in your measurements.
For more information on repair and calibration services, go to
Keysight equipment throughout its lifetime.
Keysight-trained technicians
www.keysight.com/find/removealldoubt
Keysight E-mail Updates
Warranty Information
80
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Get the latest information on the products and
applications you select.
www.keysight.com/find/emailupdates
MyKeysight
Quickly choose and use your test equipment solutions with
confidence.
www.keysight.com/find/mykeysight
Keysight Open
Keysight Open simplifies the process of connecting and
programming test systems to help engineers design,
validate and manufacture electronic products.
offers open connectivity for a broad range of systemready
instruments, open industry software, PC-standard I/O
and global support, which are combined to more easily
integrate test system development.
www.keysight.com/find/open
Keysight
Phone or Fax
Warranty Information
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
81
United States: (tel) 800 829 4444
(fax) 800 829 4433
Canada: (tel) 877 894 4414
(fax) 800 746 4866
China: (tel) 800 810 0189
(fax) 800 820 2816
Europe: (tel) 31 20 547 2111
Japan: (tel) (81) 426 56 7832
(fax) (81) 426 56 7840
Korea: (tel) (080) 769 0800
(fax) (080) 769 0900
Latin America: (tel) (305) 269 7500
Taiwan: (tel) 0800 047 866
(fax) 0800 286 331
Other Asia Pacific Countries: (tel) (65) 6375 8100
(fax) (65) 6755 0042
Email: tm_ap@
keysight.com
Keysight online information:
Warranty Information
82
Keysight N437x Series Lightwave Component Analyzer, Programmer’s Guide
Opt
ical test instruments
www.keysight.com/find/oct
Lightwave Component Analyzers
www.keysight.com/find/lca
Polarization sol
www.keysight.com/find/pol
ctral analysis products
Spe
www.keysight.com/comms/octspectral
lectro-optical converters
E
www.keysight.com/find/ref
Optical test instruments a
www.keysight.com/comms/oct-accessories
irmware and driver download
F
www.keysight.com/comms/octfirmware
utions
ccessories
Keysight photonic discussion forum
www.keysight.com/find/photonic_forum
For Network analyzer related literature, please visit: