Using Variables and Traces

Using Math and Move Commands

10 OUTPUT 723;"MOV WAVELENGTH,CENTERWL;"

Copy center wavelength value into

 

WAVELENGTH variable .

The next example uses the multiple command, MPY, to increase the center wavelength by 10%.

10 OUTPUT 723;"MPY CENTERWL,CENTERWL,1.1;"

Trace Math Rule 1

￿Avoid truncating data from using a destination length that is shorter than the source length.

Data is lost when a trace is operated on and stored in a trace of lesser length (that is, of fewer points) or in a variable. When using an active source trace, the portion of the trace not stored is lost when it is updated with new sweep information. The example below shows how trace information may be lost when moving a trace array into a shorter trace array. Since the user-de￿ned trace array, TRACE, is shorter than trace A, amplitude information contained in the last 400 data points is lost when trace A is updated.

30

OUTPUT

723;"SNGLS;TS;"

Single sweep.

40

OUTPUT

723;"TRDEF TRACE,400;"

De￿ne user-de￿ned trace with 400 elements.

50

OUTPUT 723;"MOV TRACE,TRA;"

Copy amplitude information of trace A

 

 

 

into TRACE.

60

OUTPUT

723;"TS;"

Update trace A with new sweep information.

When a short trace or variable is operated on and stored in a trace of longer length, the last trace element is extended for operations with the longer length.

2-16