:CALibrate:OPTical:STARt

Flex Apps:
FlexOTO
FlexOTO Instance:
Hardware Diagram

Command Syntax

:CALibrate:OPTical:STARt

Description

Starts a calibration of all optical Hardware Diagram paths. For the optical calibration:

  • Every optical path shown in the Hardware Diagram is calibrated.
  • The nominal attenuation of a Demultiplexer's lanes or of an Impairement can be specified (not removed by calibration and so included in relevant measurements). Use these commands to enter the attenuaton:
  • An optical source must be used.
  • Use an optical power meter or DCA-X oscilloscope to measure the average optical power of the optical source. The average optical power must be between 100 μW and 2.000 mW. Enter the measured value using the :CALibrate:OPTical:OPOWer command before you start the calibration.
  • Connect the optical source to the first port on Fixture 1.

Follow this command with the :CALibrate:OPTical:SDONe? query to control program timing.

Example Script

The following Python code example is a very simple script just to demonstrate the very basic steps. It assumes a Hardware Diagram with one 2-lane DUT Fixture and one 2-lane WDM DUT Fixture. So, it must calibrate four lanes. For each lane, the script enters the average power of the optical source in line 8. In a real program, you would read the average power from your power meter or DCA-X and enter the unique average power level for each lane.

Copy
optical-calibration.py
#******************************************************************************
#    MIT License
#    Copyright(c) 2023 Keysight Technologies
#    Permission is hereby granted, free of charge, to any person obtaining a copy
#    of this software and associated documentation files (the "Software"), to deal
#    in the Software without restriction, including without limitation the rights
#    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#    copies of the Software, and to permit persons to whom the Software is
#    furnished to do so, subject to the following conditions:
#    The above copyright notice and this permission notice shall be included in all
#    copies or substantial portions of the Software.
#    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
#    SOFTWARE.
#******************************************************************************

import pyvisa as visa
rm = visa.ResourceManager(r'C:\WINDOWS\system32\visa64.dll')
FlexOTO = rm.open_resource('TCPIP0::localhost::hislip0,4880::INSTR')
FlexOTO.timeout = 20000  # Set connection timeout to 20s
FlexOTO.read_termination = '\n'
FlexOTO.write_termination = '\n'
FlexOTO.write(':CALibrate:OPTical:STARt')
FlexOTO.write(':CALibrate:OPTical:MATTenuation ' + '29.4')
while True:
    message = FlexOTO.query(':CALibrate:OPTical:SDONe?')
    message = message.replace('.  ','.\n')
    if 'Calibration has completed' in message:
        break
    step = FlexOTO.query(':CALibrate:OPTical:STEP?')
    print('Step ' + step + '.  ' + message)
    power = input('\t\tEnter average optical power in mW ("2.0e-3" maximum): ')
    FlexOTO.write(':CALibrate:OPTical:OPOWer ' + power)
    FlexOTO.write(':CALibrate:OPTical:CONTinue')

filename = FlexOTO.query(':CALibrate:OPTical:LOAD:FNAMe?')
print('\n' + message + '\n\t\t' + filename + '\n\n')
FlexOTO.write(':CALibrate:OPTical:CONTinue')
pwrloss = FlexOTO.query(':CALibrate:OPTical:PLOSs?')
pwrlosslst = list(pwrloss.split(';'))
for path in pwrlosslst:
    print('Measured path power loss: ' + path)
FlexOTO.write(':SYSTem:GTLocal')
FlexOTO.close()

The output of this script for my setup is shown here.

Step 1.  "Connect an optical source to Port 1.1 (DUT Fixture 1 Lane 1) and specify the average optical power."
		Enter average optical power (eg, 4.0e-4): 380e-6
Step 2.  "Connect an optical source to Port 1.2 (DUT Fixture 1 Lane 2) and specify the average optical power."
		Enter average optical power (eg, 4.0e-4): 400e-6
Step 3.  "Connect an optical source with the appropriate wavelength to Port 1.5 (WDM DUT Fixture 2 Lane 1)
and specify the average optical power below"
		Enter average optical power (eg, 4.0e-4): 4.2e-4
Step 4.  "Connect an optical source with the appropriate wavelength to Port 1.5 (WDM DUT Fixture 2 Lane 2)
and specify the average optical power below"
		Enter average optical power (eg, 4.0e-4): 3.9e-4

Message "Optical Calibration has completed successfully. The optical calibration data will be saved to the
following file:"
"C:\Users\kentb\Documents\Keysight\FlexOTO\Optical Calibrations\OpticalCalibration_2022-05-19_5.ocdx"