User Measurements
Use the commands listed in this topic to install, configure, run, and query the user-defined scalar measurements. Creating a user-defined measurement requires that you write either a Python script or MATLAB measurement script.
For detailed instructions on creating user measurements, refer to FlexDCA's user's help.
Depending on FlexDCA's measurement mode, to define and load a user measurement use the following commands:
:MEAS:OSCilloscope:CFILe
:MEAS:Eye:USER:CFILe
:MEAS:TDR:USER:CFILe
To run a user measurement, use these commands:
:MEAS:OSCilloscope:USER
:MEAS:Eye:USER
:MEAS:TDR:USER
Any dependent measurements not already running will be started but will not be displayed in FlexDCA's Results panel. This does not affect the running of the script or its ability to perform it's measurement.
A dependent measurement that, when selected, requires you to select a setting (for example a PAM level) are unsupported in the xml setup file. However, you can still use the measurement. Simply start the measurement manually before running the script, and FlexDCA will automatically pass the measurement result to your user measurement.
MATLAB Based User Measurements
With a MATLAB based script the source waveform, standard variables, and any custom variables are made available in the MATLAB workspace.
Python Based User Measurements
Observe these notes when running Python based user measurement scripts.
Install Python. Before running your script, you must install Python on either an N1000A or the PC where N1010A FlexDCA is running. Python is not provided by Keysight.
Python 3 (latest version) is recommended. FlexDCA revision A.07.90 is the last FlexDCA version that will support Python 2 user operator or user measurement scripts. If you want to run Python 2 scripts in FlexDCA revisions greater than A.07.90, update the scripts to Python 3.
Update PC's PATH variable. Modify the PC's Path environment variable to include the path to the Python executable. You can select the option in the Python installer to update the path variable as part of the installation.
NumPy is required. NumPy is a Python package for creating multidimensional arrays. Even if you do not import NumPy into your user measurement scripts, NumPy must always be installed with Python. Install NumPy using Python's package manager, pip, from the command prompt: pip install numpy
When to import NumPy. If your script accesses the source waveform input variable, which is a NumPy array, import NumPy into your user measurement script. For example, add this statement: import numpy as np
.