Com Components - Keysight Technologies N7700 User Manual

Photonic application suite
Table of Contents

Advertisement

4
Automation

COM Components

52
Automation is implemented using a mechanism called "COM". COM has
been introduced by Microsoft on the Windows platform to allow a unified
way to communicate between different software components. Today,
almost every programming language such as C#, C++, LabView, Keysight
Vee as well as MATLAB offers ways to use these so-called COM
components. Once familiar with handling COM components, programming
can be done using function browsers or auto-completion that show you
the available properties and functions/methods including their parameter
names. It is thus often possible to use the available functions without
consulting the documentation.
Since the syntax of calling COM components is a little different in every
programming language, we focus in our examples on MATLAB code.
MATLAB has a very generic syntax and it should be easy to adapt the code
to any other language. Further examples are included in the software
distribution. These examples get installed with the Photonic Application
Suite and can usually be found at the following location:
C:\Program Files\Keysight\Photonic Application Suite\Examples
Here is a simple example which starts a measurement (similar to clicking
the "Run Single" button):
% Connect to Engine Manager
EngineMgr=actxserver('AgServerFSIL.EngineMgr');
% List all Engines currently running
EngineIDs=EngineMgr.EngineIDs;
% Always connect to first engine
Engine=EngineMgr.OpenEngine(EngineIDs(1));
% Start measurement
Engine.StartMeasurement;
% Release the engine and the engine manager
Engine.release;
EngineMgr.release;
This example assumes that you have already started the Client Software
and thus a server is already running. Therefore, this example connects to
an existing engine.
Keysight N7700 Photonic Application Suite, Fast Spectral Loss Engine, User's Guide

Advertisement

Table of Contents
loading

Table of Contents