:FUNCtion Subsystem
Use the :FUNCtion
subsystem to create Waveform Signal Processing operators, assign a function number for the operator, specify input waveforms and tracking, and apply output waveform colors and scaling. You can create up to 64 operators.
Additional operator configuration, if available, is accomplished using the :SPRocess
subsystem. The following picture shows how the :FUNCtion
and :SPRocess
subsystems relate to a typical operator's Setup dialog.
![](../../../Resources/Images/FlexDCA/function_example.png)
To create and configure a function
- Use the
:FUNCtion:FOPerator
command to create the function. Functions are identified by an index::FUNCtion{1:64}
. For example,:FUNCtion3:OPERand1
. - Use the remaining commands in
:FUNCtion
subsystem to configure the define the operator's input signal and configure the display of the operator. These commands are used for all operator and correspond to settings found when clicking on the operator opens the Setup dialog's Display Setup tab. - Use the
:SPRocess
subsystem commands to configure your operator. Not all functions have operator setup commands.
The currently displayed function is automatically saved as part of the FlexDCA's state. Even if you close the FlexDCA application, the next time you open waveform signal processing your function will be viewed. A Default Setup (:SYSTem:DEFaut
) erases the current function definition. To save your function definition, click File > Instrument Setup.
Example Command Sequence
This example creates two functions as shown in the following figure. You can quickly create this code by turning on the SCPI Recorder and using FlexDCA's Waveform Signal Processing's window construction area to build the functions. When finished, click Save in the SCPI Recorder to save the commands to a text file.
In the following commands, the :FOPerator
is used to define Function 1 as the Add operator and Function 2 as the Amplify operator. The :OPERand
command is used to assign various operands to each function.
An example program is provided that shows how to apply a S2P (convolve) operator which can be used to compensate for the loss of a channel element such as a cable or fixture. Example are provided for C#.NET, Labview, Matlab, and Python. Look in the N1000A (or PC) installation folder: \Keysight\FlexDCA\Demo\Example Programs
:FUNCtion1:FOPerator ADD :FUNCtion1:OPERand1 CHAN1A :FUNCtion1:OPERand2 CONStant1 :FUNCtion1:CONStant 2.0 :FUNCtion1:COLor TCOLor2 :FUNCtion1:DISPlay ON :FUNCtion2:FOPerator AMPLify :FUNCtion2:OPERand1 FUNCtion1 :FUNCtion2:COLor TCOLor3 :FUNCtion2:DISPlay ON
![](../../../Resources/Images/FlexDCA/function_construction.png)
- If a channel is not on but is used as an operand, then that channel will acquire waveform data.
- If the source waveforms have different record lengths, the function is performed over the shorter record length. The nearest point is located in the longer waveform record that corresponds to the current point in the shorter record. It then performs math functions on those points and skips non-corresponding points in the longer record.
- If the two sources have the same time base scale, the resulting function has the same time scale. If the sources cover two different time intervals, the function is performed on the portion of the sources that overlap. If the sources don't overlap, the function cannot be performed.
- If the operands have different time scales, the resulting function has no valid time scale. This is because operations are performed based on the displayed waveform data position, and the time relationship of the data records cannot be considered. When the time scale is not valid, delta time pulse parameter measurements have no meaning, and the unknown result indicator is displayed on the screen.
- Numeric constant sources have the same horizontal scale as the associated waveform source.