Language Reference

PDA

Example Perform amplitude distribution function on trace A.

90OUTPUT 723;"SNGLS;TS;" Activate single-sweep mode . Clear-write trace A.

100 OPTION BASE 1

Specify lower boundary of arrays to be 1.

110OUTPUT 723;"TRDEF NN,20;" De￿ne user-de￿ned trace of 20 elements , NN.

120OUTPUT 723;"MOV NN,0;" Store 0 in all elements of trace array .

130OUTPUT 723;"PDA NN,TRA,5;" Perform amplitude distribution function on

trace A.

140

DIM

A(20)

Dimension 20-element computer array .

150

OUTPUT 723;"NN?;"

Query values stored in NN.

160

ENTER 723;A(*)

Store values in computer array .

170

FOR

I=1 TO 20

Print values on computer display .

180PRINT A(I)

190NEXT I

Description This command replaces the destination trace with the amplitude distribution function of the source trace. The data in the source trace is processed point

by point. The value of the bottom of the display is subtracted from each point, then the di￿erence is divided by the resolution value which has been rounded to the nearest integer. If the result falls within the range of the elements of the destination trace, the content of the corresponding destination trace element is increased by one. An error results if there is not enough memory to execute PDA.

For example, assume that the source trace is displayed on a logarithmic scale of 10 dB per division, which produces an amplitude range of 100 dB. Choosing a resolution parameter of 5 divides the displayed amplitude range of trace A (100 dB) into twenty 5-dB increments numbered 1 through 20, with increment 1 beginning at the bottom graticule line and increment 20 ending at the reference level.

A resolution parameter of 5 yields a function that evaluates the amplitude of each point of trace A as follows. A trace-A point that is within 5 dB of the reference level adds 1 to the 20th point of the destination trace. A trace-A point that is between 5 to 10 dB below the reference level adds 1 to the 19th point in the destination trace, and so forth. Thus, if the amplitude of the ￿rst point is 12 dB below the reference level, the amplitude of the eighteenth point of the destination trace increases by 1. Likewise, if the amplitude of the second point of the source trace is 17 dB below the reference level, the seventeenth point of the destination trace increases by 1. Note that the destination trace must be long enough, in this case, 20 points long.

7-354