...
Support for scripting is provided through wrappers. These wrappers translate from script calls into the native interface used by the instruments. interfaces on the instrument.
Paragon-neo/100G has two native interfaces:
...
title | Perl |
---|
...
RESTful: A fully-featured REST interface supporting all functionality of the instrument, automation scripts can easily be generated using the on-instrument Script Recorder application. The calnexRest wrappers include extended utility commands to make scripting of common tasks easier.
Paragon-X compatibility: A
restrictedlimited interface intended to provide
an easya mechanism to port existing Paragon-X scripts
. In general, the compatibility interface supports only the subset of functionality that is shared between Paragon-X and Paragon-neo/100G.
The RESTful interface is more complex than the compatibility interface but does allow for full access to all instrument features. The compatibility interface is more restricted but has more mature documentation and is easier to learn. The good news is that each of these methods can be used in any one script and so you have the option on a command-by-command basis which you would rather use.
We will be adding script examples to this section of the FAQ over time. For the moment, please see Paragon-neo/100G: Mixing REST and Compatibility Commands for a simple Python example.
.
Reference Documentation
The RESTful interface is documented on-line in your instrument:
Open a browser and enter the IP address of your instrument.
On the help page, you will find a link to a brief Remote Control Manual with instructions to get you started; API will take you to the full RESTful on-line documentation
.
...
for the the REST commands.
The utility functions are documented here: Paragon-neo/100G: CalnexRest wrapper utility functions
The limited Compatibility Interface is documented in the same Remote Control Manual as is provided with Paragon-X. It can be found in your Start menu or from the Paragon-X GUI under Help→Remote Control.
The Wrappers
...
Wrapper Operation
RESTful Wrappers
The REST RESTful wrappers are normally shipped in your instrument and can be referenced from: "http://<ipAddr>/Calnex100G/RemoteControl/". If you would prefer, you can also download them from the links below. The versions below may be more recent than in your instrument but will be backwards compatible with any scripts you have already written.
Python:
calnexRest.py (version 1). This is the version included with Paragon-neo v2.1
calnexRest.py (version 2). This version has an additional utility function for the generation and download of CAT reports. The additional function is:
Code Block | ||||
---|---|---|---|---|
| ||||
def calnexCatGenerateReport(report_name, dest_folder="./", with_charts=True):
"""
Generate a report in the CAT and then download it to the local PC
The measurement must have been stopped before a report can be generated
Parameters:
reportName: str
The name of the report to be generated
destFolder: str, optional
The name of the folder on the local PC where the report will be saved.
The path to the folder will be created if required. If destFolder is not
specified then the report will be saved in the current working directory
(i.e. where the script is executing)
withCharts: bool, optional
If True (the default), then charts will be included in the report.
Returns: None
Raises: Raises a runtime exception if the CAT remains busy
"""
|
Tcl: calnexRest.tcl
Paragon-X Compatibility
Python and Tcl wrappers are provided. The Perl wrapper is no longer being actively maintained or supported on Paragon-neo/100G.
The on-instrument Script Recorder function will generate a user script from the actions performed, this is the easiest way to begin automating the instrument operation:
...
Paragon-X Compatibility Wrapper
Limited support for Paragon-X style commands are available to enable existing Paragon-X scripts to be used. See this page.