Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

All Paragon products can be automated using Python or Tcl.

Support for scripting is provided through wrappers. These wrappers translate from script calls into the native interface used by the instruments. Paragon-neo/100G has two native interfaces:

  • RESTful: A fully-featured REST interface supporting all functionality of the instrument
  • Paragon-X compatibility: A restricted interface intended to provide an easy 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.

Perl

A Perl wrapper is also available but is no longer being actively maintained or supported.


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. 

The 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

REST

The REST 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:

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

See this page.

  • No labels