You can use the same method to create and control many different automated test systems. Complete the following basic steps to set up an automated test system for limit mask testing.
The following sections describe steps 1 and 3 in further detail. Assume that the signal to be monitored starts at x = x0 and all the data points are evenly spaced. The spacing between each point is denoted by dx.
Limits are classified into two types—continuous limits and segmented limits, as shown in the following figure. The top graph in the following figure shows a continuous limit. A continuous limit is specified using a set of x and y points {{x1, x2, x3, …}, {y1, y2, y3, …}}. Completing step 1 creates a limit with the first point at x0 and all other points at a uniform spacing of dx (x0 + dx, x0 + 2dx, …). This is done through a linear interpolation of the x and y values that define the limit. In the following figure, black dots represent the points at which the limit is defined and the solid line represents the limit you create. Creating the limit in step 1 reduces test times in step 3. If the spacing between the samples changes, you can repeat step 1. The limit is undefined in the region x0 < x < x1 and for x > x4.

The bottom graph of the previous figure shows a segmented limit. The first segment is defined using a set of x and y points {{x1, x2}, {y1, y2}}. The second segment is defined using a set of points {x3, x4, x5} and {y3, y4, y5}. You can define any number of such segments. As with continuous limits, step 1 uses linear interpolation to create a limit with the first point at x0 and all other points with a uniform spacing of dx. The limit is undefined in the region x0 < x < x1 and in the region x > x5. Also, the limit is undefined in the region x2 < x < x3.
You can specify limits using formulas. Such limits are best classified as segmented limits. Each segment is defined by start and end frequencies and a formula. For example, the ANSI T1.413 recommendation specifies the limits for the transmit and receive spectrum of an ADSL signal in terms of formula. The following table, which includes only a part of the specification, shows the start and end frequencies and the upper limits of the spectrum for each segment.
| Start (kHz) | End (kHz) | Maximum (Upper Limit) Value (dBm/Hz) |
| 0.3 | 4.0 | –97.5 |
| 4.0 | 25.9 | –92.5 + 21.5 log2(f/4,000) |
| 25.9 | 138.0 | –34.5 |
| 138.0 | 307.0 | –34.5 – 48.0 log2(f/138,000) |
| 307.0 | 1,221.0 | –90 |
The limit is specified as an array of a set of x and y points, [{0.3, 4.0}{–97.5, –97.5}, {4.0, 25.9}{–92.5 + 21.5 log2( f/4,000), –92.5 + 21.5 log2( f/4,000)}, …, {307.0, 1,221.0}{–90, –90}]. Each element of the array corresponds to a segment.
The following figure shows the segmented limit plot specified using the formulas shown in the previous table. The x-axis is on a logarithmic scale.

After you define the mask, you acquire a signal using a DAQ device. The sample rate is set at 1/dx S/s. Compare the signal with the limit. In step 1, you create a limit value at each point where the signal is defined. In step 3, you compare the signal with the limit. For the upper limit, if the data point is less than or equal to the limit point, the test passes. If the data point is greater than the limit point, the test fails. For the lower limit, if the data point is greater than or equal to the limit point, the test passes. If the data point is less than the limit point, the test fails.
The following figure shows the result of limit testing in a continuous mask case. The test signal falls within the mask at all the points it is sampled, other than points b and c. Thus, the limit test fails. Point d is not tested because it falls outside the mask.

The following figure shows the result of limit testing in a segmented mask case. All the points fall within the mask. Points b and c are not tested because the mask is undefined at those points. Thus, the limit test passes. Point d is not tested because it falls outside the mask.
