:CALibrate Commands

FlexOTO Instance:
Hardware Diagram

Use the :CALibrate subsytem commands to perform these types of calibrations:

  • DCA-M Module Calibrations (vertical and clock recovery) of modules in the Hardware Diagram.
    • AutoCal (automatic calibrations on all modules triggered by a maximum elapsed time or temperature change.
    • AutoCal immediately run without regard to elapsed time or maximum temperature change.
    • Manually started calibration on a single DCA-M.
  • Optical Calibration which calibrates all Hardware Diagram optical paths.

:CALibrate commands can only be sent to FlexOTO Hardware Diagram. Sending these commands to FlexOTO Station will result in an error.

Instrument AutoCal

Use the :CALibrate:ACAL:FORCe command to immediately run an AutoCal on all connected DCA-M modules without regard to elapsed time or temperature change. An AutoCal calibrates all enabled calibrations on all enabled modules. Use the :CALibrate:ACAL:TIME and :CALibrate:ACAL:TEMPerature commands to trigger an AutoCal after a maximum elapsed time or temperature change has occurred.

AutoCal requires that the optical switch supports being configured by FlexOTO to disconnect all switch paths to the switch's output. Otherwise, an AutoCal is not possible. As a results Keysight N773xx-series switches do not support AutoCal. Other switches may support AutoCal based on their installed switch modules. If you have installed a switch by writing a switch driver, the driver must by able to send to the switch the required commands to disconnect all switch paths.

Use the :CALibrate:MODule:STARt command to perform a module calibration on a single DCA-M.

The following table shows the type of module calibrations that are available for each DCA-M module.

Available DCA-M Module Calibrations
DCA-M Module Optical Channel Vertical
Calibrations
Clock
Recovery
Calibrations
A B C D
Oscilloscope Modules
N1092D
N1092B 1
N1092A   1
Clock Recovery Modules
N1078A
N1077A

With Option CDR only.

To setup automatic optical calibrations, use the :CALibrate:ACAL SCPI node commands. Automatic DCA-M module calibrations are based on elapsed time or maximum allowed change in temperature. DCA-M module calibrations can be started at any time using the :CALibrate:ACAL:FORCe command.

Use the :CALibrate:MODule SCPI node commands to enable or disable vertical and clock recovery (if applicable) calibrations for any single DCA-M module.

Because FlexOTO automatically disconnects all input signals from the switch before running a calibration, you do not need to disconnect any cables at the DCA-M's inputs.

A DCA-M module calibration is recommended when:

  • DCA-X (or DCA-M) power has been cycled.
  • DCA-M temperature change exceeds 5°C compared to the temperature of the last module calibration (ΔT > 5°C).
  • Time since the last calibration has exceeded 10 hours.

Optical Calibrations

Use the :CALibrate:OPTical:STARt command to run a guided optical calibration of all Hardware Diagram paths. After completing an optical calibration, FlexOTO automatically saves a calibration file which can be recalled at a later time. The following picture shows the Optical Calibration dialog which steps through each Lane 2 of each Fixture 1. As shown in this picture, for each path calibration you can edit the average input optical power of the optical source and the maximum allowed path attenuation. If FlexOTO measures a path attenuation what is greater than the allowed maximum, the calibration stops. If you want to force the calibration to accept the attenuation and continue the calibration, use the :CALibrate:OPTical:UCURrent command.

Guided Calibration Steps

For optical path calibrations:

  • Every optical path shown in the Hardware Diagram is calibrated.
  • For each path, an optical source (the calibration reference) must be connected to the Fixture and Lane as identified as items 1 and 2 in the figure above.
  • 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 for each lane using the :CALibrate:OPTical:OPOWer command. Use the :CALibrate:OPTical:MATTenuation command to enter the maximum allowed path attenuation.
  • 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:

The following example script demonstrates an optical path calibration. Before the calibration of each path, the script pauses and prompts the user to connect a calibration signal to the fiber from a fixture's optical lane and to enter the average optical power of the signal.

To return a string that lists every optical path that was calibrated along with the loss, use the :CALibrate:OPTical:PLOSs? query.

To Load an Optical Calibration

Use the :CALibrate:OPTical:LOAD command to load a previously saved optical calibration file. If the loaded calibration's optical paths data do not match the current Hardware Diagram you can delete the imported calibration data with the :CALibrate:OPTical:CLEar command and create a new calibration. Or, you can send the :CALibrate:OPTical:UCURrent command to have FlexOTO attempt to change the Hardware Diagram so that it's paths match those in the calibration file. This requires that the same hardware is found and that you change the actual fiber optic cable paths to match those in the revised Hardware Diagram.

Example Script

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()