Using Variables and Traces
Using Math and Move Commands
Trace Math Rule 2
Trace elements greater than +32,767 and less than 032,768 are truncated.
Math operations are restricted to the legal range of measurement units when trace arrays or elements form the destination or source.
10 OUTPUT 723;"MPY TRA[100],1000,1000;" | Multiplies 1000 times 1000, then stores |
| truncated value (32,767) in trace element. |
Trace Math Rule 3
When the source is a real number or variable and the destination is a trace array or element, use the MEASU command to preserve decimal values and yield parameter units
The source and destination express numbers in dierent units, making a conversion necessary. All trace amplitude information is stored internally and manipulated in measurement units. If the conversion to measurement units is omitted, returned data is inaccurate by a factor of 100 and signicant digits may be lost.
In the following example, the marker is assumed to be marking a signal at 010.33 dBm.
10 | OUTPUT | 723;"MOV TRB[100],MKA;" | Copy integer value of marker ( 010) |
|
|
| into trace B element. TRB[100] now |
|
|
| contains 010 measurement units . |
20 | OUTPUT | 723;"TRB[100]?;" | Return 00.1 dBm (false value). |
In following example uses the MEASU command to preserves decimal values and returns trace amplitude values in parameter units.
10 | OUTPUT 723;"MOV TRB[100],MEASU MKA;" | Convert marker amplitude (010.33) |
|
| to measurement units , then move |
|
| value (01033) into trace element. |
|
| TRB[100] now contains 01033 mea- |
|
| surement units . |
20 | OUTPUT 723;"TRB[100]?;" | Return 010.33 (correct value). |