Environment for Python Scripts (Operators)

Instrument:
N1000A
N109x
UXR Scope
Flex Apps:
FlexDCA
FlexRT
Meas. mode:
Scope
Eye
Jitter
TDR
Package License:
L-RND

Install Python on the N1000A or PC where FlexDCA is running. As shown in the following figure, all Python scripts must begin with the algorithm function which is described in the lessons. A simple XML configuration file identifies your operator script. In addition to calling the script, the XML file populates the User Operator Setup dialog.

Python 3 and Python 2.7 are supported for user measurements. Python 2 support will be removed in a future FlexDCA release. At that time any Python 2 code will need to be ported to Python 3.

All of the example scripts are written in Python 3.

You may need to modify the PC's PATH environment variable to include the path to the Python executable.

When a user function is run, the following events occur for each data acquisition:

  1. FlexDCA passes the source waveform, standard variables, and your custom variables available to your Python script as a dictionary. In Oscilloscope and TDR modes, the source waveform is a one-dimensional numpy array. In Eye mode, the source database is a two-dimensional numpy array.
  2. FlexDCA executes this script.
  3. The script returns to FlexDCA a number of standard output variables from the Python script, including the output waveform.