Matrix Test Equipment
Distortion Measurement Script Control
User Guide
and Supplement to
Quick Start Instructions for
Matrix CATV Equipment Control Program
Matrix Test Equipment, Inc.
200 Wood Avenue
Middlesex, New Jersey 08846
Phone: (732) 469-9510
Fax: (732) 469-0418
Date: June 1, 1998
Web Address: www.matrixtest.com
Tech Support E-Mail: support@matrixtest.com
Table of Contents
Distortion Measurement Script Control Form
Entry and Display Form Controls
Typical Sequence of Steps for Using Scripts for Distortion Measurement
Sample Script.ini and Script Files
Distortion Measurement Script Control Form

See section Typical Sequence of Steps for Using Scripts for Distortion Measurement. for an overview of distortion measurement procedures.
File
Edit Script.ini - brings up the script configuration file (SCRIPT.INI) in an editor to allow you to edit this file. The SCRIPT.INI file defines the grid columns (and their labels) that are to be displayed and that also serve as variables in the scripts files. The variable names are displayed as column labels in the Frequency List and Test Results Grid and the values are stored by frequency. The format for the SCRIPT.INI file is:
[Test Parameter]
name=col1name;col2name; ,colxname;
where col1name is any text string that represents the labels for column1 in the grid and would be CSO_RAW for the sample screen configuration above. This column name would also serve as the variable name in which to store a reading from the spectrum analyzer. Each variable name is separated by ";", and lack a subsequent column name would create an additional column in the grid. After making changes to the file, save the file, exit the editor, and select File>Load Script.ini to have the changes take effect.
Load Script.ini-Once you have changed the SCRIPT.INI file while the program is running, you need to click Load Script.ini to have the changes activated without restarting the program. You should then see the changes on the Frequency List and Test Results Grid heading.
Scripts
New Script- Opens a new file in the notepad editor. To save the file, select File>Save enter a name and then click OK.
Edit Scripts-brings up a file dialog box with the default directory set to the Script sub directory under the directory where the application resides. Select the script file and click OK to open the file with the Notepad editor. The script file should adhere to the following format:
[Script File]
desc=YYY
where YYY represents the description of the script file to be displayed in the Spectrum Analyzer scripts control box on the form. For example, YYY represents: "CTB Sample Script Part 1" in the CTB1.txt script file that appears as the second script in the Spectrum Analyzer Scripts Grid on the form.
XXX;XXX;XXX;
XXX;
and XXX; represents script commands. Each command is separated by ";". Commands include standard HP spectrum analyzer commands and also this applications pseudo script commands and keywords .
Refresh Scripts-if you change the desc=YYY line of your script file, click Refresh Scripts after saving the file to allow the changes to take effect without restarting the program. You should then see the changes in the Spectrum Analyzer Scripts grid. It is NOT necessary to Refresh Scripts when editing the command portion of the script file, only if the description changes.
Help
Displays the CATV Help Table of Contents.
Entry and Display Form Controls
Meas. Freq Offset (Measurement Frequency Offset)
The value entered in this box is added to the selected frequency in the Frequency and Test Result Grid, and displayed in the Meas. Frequency box. The contents of this control is not cleared, so that once an offset is entered, it will persist until it is manually changed.
Meas. Frequency (Measurement Frequency)
This control contains the sum of the selected frequency in the Frequency and Test Result Grid and the Meas. Freq Offset control after the frequency is clicked or as the offset is changed. The special keyword <FO> can be used to access this frequency for use in scripts.
ASX Command
This control is used to select an ASX generator command by clicking on the arrow and then selecting a command, or entering a command directly in this box. The command is sent by clicking on the Send ASX command button.
Response from ASX-16
Any commands that return data from the ASX generator will display the data read in this control.
Spect. Anal. Command
This control is used for entering any commands to be sent to the Spectrum Analyzer. The commands are sent when the Send Spect. Analyzer button is selected.
Spect. Anal. Response
Any data read from the Spectrum Analyzer will be displayed in this control.
Special Pseudo Script Commands and Keywords
Commands recognized only by the software must contain "<" and ">" signs as above.
<TDLY>
Format: <TDLY>T
This command is used to set a time delay to allow enough time for commands to complete execution at the spectrum analyzer before the computer sends out the next command. T represents seconds or tenths of seconds.
Ex. SP 500KHZ;<TDLY>1.8 sends a command to the spectrum analyzer to set the span to 500KHz and waits 1.8 seconds before issuing the next command.
<MOV>
Format: <MOV>colxname
This is the command to copy the current reading into a variable. colxname is any name defined in the SCRIPT.INI file as a column heading name.
Ex. MKA?; (Spectrum Analyzer command to read the marker.)
<MOV>CTB_RAW stores the amplitude reading from the spectrum analyzer into the column defined as CTB_RAW in the SCRIPT.INI file.
<SUB>
Format: <SUB> A B C
Evaluates as: A = B-C where A, B, C are the variable/column names.
Example: This example assumes the column names "CTB_RAW", "Temp", and CARR_OFF" have been defined in the SCRIPT.INI file and the amplitude has been read with all of the carriers on, and was moved into the column "Temp" by a previous script or set of commands. It is also assumed that the test carrier was turned off prior to executing the script in the example with a portion shown below:
MKPK HI;MKA?;
<MOV>CARR_OFF; <SUB>CTB_RAW Temp CARR_OFF
The above example reads the marker amplitude and stores it in the column CARR_OFF. The contents of CARR_OFF are subtracted from the contents of Temp and the result is stored in CTB_RAW.
<ADD>
Format: <ADD> A B C
Evaluates as: A = B+C where A, B, C are the variable/column names.
<MUL>
Format: <MUL> A B C
Evaluates as: A = B * C where A, B, C are the variable/column names.
<DIV>
Format: <DIV> A B C
Evaluates as: A = B/C where A, B, C are the variable/column names.
Special Key words to be used within any command are:
<CF>
This is a special key word that can be used within other commands to substitute the frequency of the test carrier. It represents the selected frequency in MHz corresponding to the channel highlighted in the Frequency and Test Result Grid.
Example: CF <CF>MHZ; will send the command "CF 55.25MHZ;" if the selected frequency in the Frequency and Test Result Grid was 55.25 MHz.
<FO>
This is a special key word that substitutes the Measurement Frequency. This frequency is the sum of the test carrier frequency from the selected channel in the Frequency and Test Result Grid plus the Measurement Frequency Offset as entered in the corresponding field on the computer screen.
Example: CF <FO>MHZ; will send the command "CF 54MHZ;" if the selected frequency is 55.25 and the Meas. Freq. Offset box contains "-1.25"
/ At the beginning of a line, causes the entire line to be ignored and can be used to introduce comments into the script. (See sample scripts)
1. Control of generator
Controlling all modules simultaneously
The operating mode buttons inside the All Modules frame perform as follows:
On CW - Turn all the modules in the current frequency plan on in CW.
On Mod - Turn all the modules on with 100% MODULATION at the modulation frequency selected.
Off - Turn all the modules off.
Low - Set all modules in the Low state.
Controlling modules individually
The operating mode buttons inside the Single Module frame performs as follows:
To use these features, first select a channel in the Frequency List and Test Results Grid.
ON or OFF - Turn the specified module either On in the CW mode, or OFF, depending on the previous state of the module.
Mod - This button is only active when the carrier is on. Toggles between MOD to CW.
LOW - Toggles the output of the specified module between LOW and ON.
Send ASX Commands - This button will send the command selected in the ASX Command box to the generator. (See Diagnostics/Manual Entry help).
2. AFS Filter - Allows selection of a filter from the filter selector.
(See AFS-12 Screen help for more information.)
3. Controlling the Spectrum Analyzer
To run a script to test a particular channel, first select the channel on the Frequency List and Test Results Grid.
To select a script file, click on the line containing the script to be run in the Spectrum Analyzer Scripts Grid. The first column in the grid provides a description (YYY) of the script file if the script file contains the desc=YYY line as specified in the Scripts section. The second column is the name of the script file and must reside in the Scripts sub directory.
Click the Run Script button to run the selected script. The Spectrum Analyzer command being sent appears in the Spectrum Analyzer Command box, and responses from the Spectrum Analyzer are displayed in the Spectrum Analyzer Response box. (Note that it may not be possible to see all of the commands in the script because some may execute so quickly that they will not be observable. If you wish to see a particular command execute for troubleshooting purposes, temporarily insert a <TDLY>T command with T set to 1 or 2 seconds after the command that you wish to observe in the Spect. Anal. command box.)
You can also type in commands for the Spectrum Analyzer directly in the Command box and click on the Send Spect. Anal button to see how the Spectrum Analyzer responds. To cancel running of a script, click the Cancel Script button.
4. Save Measurement Results.
While running your script, the <MOV> and arithmetic commands in your script will store the spectrum analyzer readings and computations into a variable that has been defined in the Script.ini file. When the Save Results button is clicked, a Save file Dialog box will appear with the Result sub directory selected. Supply a file name and click OK to save all the data in the Frequency List and Test Results grid to the specified file.
5. View Results
Displays a dialog window with all the file names containing saved results under the Results sub directory. Select the file you want to view and click OK to open the file with the Notepad editor.
6. Clear the Results Grid
Click Clear Results to clear the results in the grid.
7. Return to the main panel
To return to main control panel, click the Return button.
8. How to use Context Sensitive Help
To find out how context sensitive Help works, click Help button.
Typical Sequence of Steps for Using Scripts for Distortion Measurement
(It is assumed that the scripts have already been written, the filters have been defined, and the SCRIPT.INI file has been configured for the grid columns to be displayed.)
Sample Script.ini and Script Files
Script.ini File
[Test Parameter]
Name=CSO_RAW; CTB_RAW; Temp
Script Files
CTB1.txt
[Script File]
desc=CTB Sample Script Part1
/Sample script develop by Matrix Test Inc.
SP200KZ;
RB30KZ; VB3KZ;
CF<CF>MHZ
TS;
VB300HZ;SNGLS;TS;RL-10DM;
AT0DB;
MKPK HI; TS;
MKRL; TS;
MKA?;
/ Save amplitude with carrier on in CW for computation in CTB2.txt script
<MOV> Temp
CTB2.txt
[Script File]
desc=CTB Sample Script Part2
/Sample script develop by Matrix Test Inc.
/Use CTB Sample Script Part1 first, turn off the examined carrier and then use this part.
VB10HZ;
TS;
MKPK HI; MKRL; TS;
VAVG 2; TS; MKPK HI; VAVG OFF;
MKA?;
/ Capture amplitude with carrier at test freq off
<MOV>CTB_RAW
/ Calc CTB as [level with carrier on from CTB1.txt script] - [amplitude with carrier off]
<SUB>CTB_RAW Temp CTB_RAW
CSO.txt
[Script File]
desc=CSO Sample Script.
/Sample script develop by Matrix Test Inc.
SP200KZ;
RB30KZ; VB3KZ;
CF<CF>MHZ
TS;
VB300HZ; SNGLS;TS;RL-10DM;
AT0DB;
MKPK HI; TS;
MKRL; TS;
MKA?;
/ Save level at center carrier freq in Temp
<MOV> Temp
MKSP; RB30KZ; VB300HZ; SP500KZ; HD; SNGLS;
/Set center frequency to offset where CSO is being examined.
CF<FO>MHZ; TS; HD; VB10HZ; TS; MKPK HI; MKRL;
TS; VAVG 2; TS; MKPK HI; VAVG OFF;
/ Capture level at offset from video carrier freq in CSO_RAW
MKA?; <MOV> CSO_RAW;
HD;
/ Calc CSO as [level at video carrier] - [level at offset freq]
<SUB>CSO_RAW Temp CSO_RAW